Skip to content

Make a button in NodeRed for Openhab

image
image

Node Red code Aqara double key wireless wall switch (2018 model) with Openhab.

  1. Install the Openhab addon for NodeRED

  2. Double click is off Single click is on.

  3. If you do use Openhab 3 you must use the api as Username in NodeRED.

Nodered code button

[{"id":"fd2a0.17199d61","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"431f7c84.71294c","type":"openhab2-in","z":"fd2a0.17199d61","name":"Kitchen button","controller":"19f8a3a1.1b736c","itemname":"GF_Kitchen_Button_Press","x":220,"y":260,"wires":[["52f7a068.3eff6"],["52f7a068.3eff6"]]},{"id":"52f7a068.3eff6","type":"switch","z":"fd2a0.17199d61","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"left","vt":"str"},{"t":"eq","v":"right","vt":"str"},{"t":"eq","v":"left_double","vt":"str"},{"t":"eq","v":"right_double","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":690,"y":260,"wires":[["f128ccb7.e66138"],["528a72a3.eb52fc"],["bb825f0f.020708"],["159135d7.78c932"]]},{"id":"f128ccb7.e66138","type":"openhab2-out","z":"fd2a0.17199d61","name":"","controller":"19f8a3a1.1b736c","itemname":"GF_LivingRoom_Light_s","topic":"ItemCommand","payload":"ON","x":970,"y":120,"wires":[[]]},{"id":"528a72a3.eb52fc","type":"openhab2-out","z":"fd2a0.17199d61","name":"","controller":"19f8a3a1.1b736c","itemname":"GF_Kitchen_Light_s","topic":"ItemCommand","payload":"ON","x":960,"y":180,"wires":[[]]},{"id":"bb825f0f.020708","type":"openhab2-out","z":"fd2a0.17199d61","name":"","controller":"19f8a3a1.1b736c","itemname":"GF_LivingRoom_Light_s","topic":"ItemCommand","payload":"OFF","x":980,"y":240,"wires":[[]]},{"id":"159135d7.78c932","type":"openhab2-out","z":"fd2a0.17199d61","name":"","controller":"19f8a3a1.1b736c","itemname":"GF_Kitchen_Light_s","topic":"ItemCommand","payload":"OFF","x":970,"y":320,"wires":[[]]},{"id":"19f8a3a1.1b736c","type":"openhab2-controller","name":"192.168.1.11","protocol":"http","host":"localhost","port":"8080","path":"","username":"","password":""}]
Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *