First refer to Espressif documentation to install ESP32 SDK
After setting up the shell you can run the following:
git clone git@github.com:Ortes/iot_mqtt.git
cd iot_mqtt
idf.py menuconfig # configure broker address in Example Configuration -> Broker
idf.py flash && idf.py monitorMQTT topics are:
- esp/temp topic where temperature is published as a string
- esp/hum topic where temperature is published as a string
- esp/led topic where led state is published
'0'is off'1'is on
The port 1883 must be open.
sudo apt install mosquitto
mosquittoThe port 1880 must be open.
docker run -it -p 1880:1880 --name mynodered nodered/node-redGiven ip_address the ip address of the server where NodeRed is installed.
To setup the flow open ip_address:1880 then clic on import and import copy and paste the json in nodered/flow-nodered.json