• Guillaume Blanchy's avatar
    Updates for working webinterface with new process_commands() · d0fde750
    Guillaume Blanchy authored
    - fix passing sequence with new process_commands
    - update process_commands as json.loads() parse recursively
    - update index.html pseudo-section (+ hover info)
    - comment double info log in run_sequence_async
    - fix update_settings by adding '_settings' to common cmd_id with set_sequence (from http_interface)
    d0fde750
Forked from reversaal / OhmPi
Source project has a limited visibility.
install_local_mqtt_broker.sh 851 bytes
txtred='\e[0;31m' # Red
txtgrn='\e[0;32m' # Green
txtylw='\e[0;33m' # Yellow
txtdef='\e[0;0m'  # Default

echo -e "${txtgrn}>>> Updating system and installing MQTT broker...${txtdef}"
sudo apt update && sudo apt upgrade
sudo apt install -y mosquitto mosquitto-clients
sudo systemctl enable mosquitto.service

echo -e "\n${txtgrn}>>> Broker is installed. Starting now...${txtdef}"
mosquitto -v 

echo -e "\n${txtgrn}>>> Updating configuration to allow anonymous remote connections...${txtdef}"
echo "listener 1883" | sudo tee -a /etc/mosquitto/mosquitto.conf
echo "allow_anonymous true" | sudo tee -a /etc/mosquitto/mosquitto.conf
echo -e "\n${txtgrn}>>> Current configuration stored in /etc/mosquitto/mosquitto.conf is displayed below${txtdef}" 
cat /etc/mosquitto/mosquitto.conf
echo -e "\n${txtylw}>>> Adapt it according to your needs!${txtdef}\n"