This shows you the differences between two versions of the page.
ee:nodered [2020/10/19 22:00] FKR@staff.hsrw |
ee:nodered [2021/03/08 13:39] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | Node-red und Mosquitto für MQTT auf den Raspberry Pi installieren: | ||
- | https://www.youtube.com/watch?v=heyH0hgENF8 | ||
- | |||
- | WiFi - Relais mit Node-red über MQTT schalten: | ||
- | https://www.youtube.com/watch?v=aHiAVTuKL7M | ||
- | |||
- | Node-Red installieren: | ||
- | <code> | ||
- | sudo apt-get update | ||
- | sudo apt-get upgrade | ||
- | sudo apt-get install build-essential | ||
- | sudo apt-get install curl | ||
- | bash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered) | ||
- | </code> | ||
- | |||
- | Mosquito installieren: | ||
- | <code> | ||
- | sudo apt install mosquitto mosquitto-clients sudo systemctl enable mosquitto | ||
- | sudo systemctl status mosquitto | ||
- | </code> | ||
- | |||
- | Mosquito testen: | ||
- | <code> | ||
- | Subscribe im Terminal 1 | ||
- | mosquitto_sub -h localhost -t “test/message” | ||
- | Publish im Terminal 2 | ||
- | mosquitto_pub -h localhost -t “test/message” -m “Hello, world” | ||
- | </code> | ||
- | |||
- | Code für ESP | ||
- | https://github.com/Edistechlab/Relais-per-MQTT-schalten/blob/master/MQTT_Output.ino |