marvinroger / node-red-contrib-homie

Node-RED nodes for the Homie home automation system
GNU General Public License v2.0
14 stars 5 forks source link

Any example flow please ? #1

Open titusece opened 8 years ago

titusece commented 8 years ago

Hello, Can you please provide any sample flow for your node-red app ?

Regards, Titus S.

alco28 commented 8 years ago

yeah please, I also can't get it working on node-red.

PKGeorgiev commented 7 years ago

Here is one read/write example:

image

Flow code:

[{"id":"837192a8.14b28","type":"debug","z":"7a6f6e28.a16f1","name":"HOMIE_DEBUG","active":true,"console":"false","complete":"true","x":430,"y":240,"wires":[]},{"id":"abfbf08a.f09df","type":"Homie shim","z":"7a6f6e28.a16f1","device":"49782169.78beb","name":"Light node","x":200,"y":240,"wires":[["837192a8.14b28"]]},{"id":"91364d17.29bd","type":"Homie send from shim","z":"7a6f6e28.a16f1","device":"49782169.78beb","node-id":"light","property":"on/set","value":"","name":"","x":440,"y":420,"wires":[]},{"id":"1b196cf.b2e5093","type":"inject","z":"7a6f6e28.a16f1","name":"ON","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"x":210,"y":360,"wires":[["91364d17.29bd"]]},{"id":"17d5c817.ee5758","type":"inject","z":"7a6f6e28.a16f1","name":"OFF","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"x":210,"y":480,"wires":[["91364d17.29bd"]]},{"id":"e188dbdc.26c178","type":"comment","z":"7a6f6e28.a16f1","name":"Monitors the \"light\" node of device \"kitchen-light\" for changes","info":"","x":360,"y":200,"wires":[]},{"id":"9b219823.3ca088","type":"comment","z":"7a6f6e28.a16f1","name":"Sets the light property to ON of node \"light\" of device \"kitchen-light\"","info":"","x":380,"y":320,"wires":[]},{"id":"34cd670.90b9a9a","type":"comment","z":"7a6f6e28.a16f1","name":"Sets the light property to OFF of node \"light\" of device \"kitchen-light\"","info":"","x":380,"y":520,"wires":[]},{"id":"e6770cb4.af08f","type":"comment","z":"7a6f6e28.a16f1","name":"ESP CODE: https://github.com/marvinroger/homie-esp8266/blob/develop/examples/LightOnOff/LightOnOff.ino","info":"","x":510,"y":140,"wires":[]},{"id":"49782169.78beb","type":"Homie device","z":"","mqtt-host":"127.0.0.1","mqtt-port":"1883","device-id":"kitchen-light","name":"kitchen-light","nodes":"temperature","firmware-name":"Node-RED","firmware-version":"1.0.0"}]

fabiosoft commented 6 years ago

There are some JSON formatting errors... here is the fixed one.

[{"id":"837192a8.14b28","type":"debug","z":"7a6f6e28.a16f1","name":"HOMIE_DEBUG","active":true,"console":"false","complete":"true","x":430,"y":240,"wires":[]},{"id":"abfbf08a.f09df","type":"Homie shim","z":"7a6f6e28.a16f1","device":"49782169.78beb","name":"Light node","x":200,"y":240,"wires":[["837192a8.14b28"]]},{"id":"91364d17.29bd","type":"Homie send from shim","z":"7a6f6e28.a16f1","device":"49782169.78beb","node-id":"light","property":"on/set","value":"","name":"","x":440,"y":420,"wires":[]},{"id":"1b196cf.b2e5093","type":"inject","z":"7a6f6e28.a16f1","name":"ON","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"x":210,"y":360,"wires":[["91364d17.29bd"]]},{"id":"17d5c817.ee5758","type":"inject","z":"7a6f6e28.a16f1","name":"OFF","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"x":210,"y":480,"wires":[["91364d17.29bd"]]},{"id":"e188dbdc.26c178","type":"comment","z":"7a6f6e28.a16f1","name":"Monitors the light node of device kitchen-light for changes","info":"","x":360,"y":200,"wires":[]},{"id":"9b219823.3ca088","type":"comment","z":"7a6f6e28.a16f1","name":"Sets the light property to ON of node light of device kitchen-light","info":"","x":380,"y":320,"wires":[]},{"id":"34cd670.90b9a9a","type":"comment","z":"7a6f6e28.a16f1","name":"Sets the light property to OFF of node light of device kitchen-light","info":"","x":380,"y":520,"wires":[]},{"id":"e6770cb4.af08f","type":"comment","z":"7a6f6e28.a16f1","name":"ESP CODE: https://github.com/marvinroger/homie-esp8266/blob/develop/examples/LightOnOff/LightOnOff.ino","info":"","x":510,"y":140,"wires":[]},{"id":"49782169.78beb","type":"Homie device","z":"","mqtt-host":"127.0.0.1","mqtt-port":"1883","device-id":"kitchen-light","name":"kitchen-light","nodes":"temperature","firmware-name":"Node-RED","firmware-version":"1.0.0"}]