This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
ee:nodered [2020/10/19 22:02] FKR@staff.hsrw |
ee:nodered [2025/02/05 10:09] (current) |
||
---|---|---|---|
Line 10: | Line 10: | ||
sudo apt-get update | sudo apt-get update | ||
sudo apt-get upgrade | sudo apt-get upgrade | ||
- | sudo apt-get install build-essential | + | sudo apt-get install build-essential curl npm |
- | sudo apt-get install curl | + | |
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) | bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) | ||
</code> | </code> | ||
+ | |||
+ | Dasboard installieren: | ||
+ | <code> | ||
+ | node-red-stop | ||
+ | cd ~/.node-red | ||
+ | npm install node-red-dashboard | ||
+ | </code> | ||
+ | |||
Mosquito installieren: | Mosquito installieren: | ||
<code> | <code> | ||
- | sudo apt install mosquitto mosquitto-clients sudo systemctl enable mosquitto | + | sudo apt install mosquitto mosquitto-clients |
+ | sudo systemctl enable mosquitto | ||
sudo systemctl status mosquitto | sudo systemctl status mosquitto | ||
</code> | </code> | ||
Line 24: | Line 32: | ||
<code> | <code> | ||
Subscribe im Terminal 1 | Subscribe im Terminal 1 | ||
- | mosquitto_sub -h localhost -t “test/message” | + | mosquitto_sub -h localhost -t "test/message" |
Publish im Terminal 2 | Publish im Terminal 2 | ||
- | mosquitto_pub -h localhost -t “test/message” -m “Hello, world” | + | mosquitto_pub -h localhost -t "test/message" -m "Hello, world" |
</code> | </code> | ||
+ | |||
+ | Node-red starten: | ||
+ | <code> | ||
+ | node-red-start | ||
+ | <code> | ||
Code für ESP | Code für ESP | ||
https://github.com/Edistechlab/Relais-per-MQTT-schalten/blob/master/MQTT_Output.ino | https://github.com/Edistechlab/Relais-per-MQTT-schalten/blob/master/MQTT_Output.ino |