# Node Red: A widget based dashboard working with Homey trough MQTT

**URL:** <https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798>\
**Category:** Apps\
**Created:** [October 3, 2019, 10:05am UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798 "2019-10-03T10:05:10Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![Kalle\_Kronbeck](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kalle_kronbeck/32/13158_2.png) [@Kalle\_Kronbeck](https://community.homey.app/u/Kalle_Kronbeck)\
**Post date:** [October 29, 2019, 11:55am UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/62 "2019-10-29T11:55:51Z")

</div>

We had a powerloss yesterday and now all my dashboards are gone.  
I managed to restore all flows from a backup file.  
But where does Node-Red store data thats Dashoboard related, names, sizes etc

---

<div class="post-metadata">

**Author:** ![Satoer](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/satoer/32/38113_2.png) [@Satoer](https://community.homey.app/u/Satoer)\
**Post date:** [October 29, 2019, 2:26pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/63 "2019-10-29T14:26:58Z")

</div>

That’s weird… I’ve rebooted my NAS several times without any problems. Did you install Node-red using Docker? In docker you can export the complete image for backup.  
Or you can export all nodes inside of Node-red in JSON format (Hamburger menu =\> Export =\> All nodes)

---

<div class="post-metadata">

**Author:** ![Kalle\_Kronbeck](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kalle_kronbeck/32/13158_2.png) [@Kalle\_Kronbeck](https://community.homey.app/u/Kalle_Kronbeck)\
**Post date:** [October 29, 2019, 3:37pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/64 "2019-10-29T15:37:29Z")

</div>

Rebooted the Ubuntu again, and now everything is back again ??!!

---

<div class="post-metadata">

**Author:** ![M\_a\_r\_c\_o](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/m_a_r_c_o/32/146_2.png) [@M\_a\_r\_c\_o](https://community.homey.app/u/M_a_r_c_o)\
**Post date:** [October 29, 2019, 5:54pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/65 "2019-10-29T17:54:52Z")

</div>

I have created an homey user for all members, but did not give them the app. And use smart present to switch the homey users home/away. Then also the cards last person left the house and first person to come home are functional.

Homey presence is send to mqtt (i thought I saw that)

---

<div class="post-metadata">

**Author:** ![Marc](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marc/32/11229_2.png) [@Marc](https://community.homey.app/u/Marc)\
**Post date:** [October 29, 2019, 6:50pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/66 "2019-10-29T18:50:32Z")

</div>

> [@Theo\_Helder](#):
>
> [{“id”:“d05f012d.bcf46”,“type”:“tab”,“label”:“Flow 1”,“disabled”:false,“info”:“”},{“id”:“82545cad.b3eea”,“type”:“inject”,“z”:“d05f012d.bcf46”,“name”:“”,“topic”:“”,“payload”:“”,“payloadType”:“date”,“repeat”:“300”,“crontab”:“”,“once”:true,“onceDelay”:0.1,“x”:210,“y”:300,“wires”:[[“608b1e65.a04a6”]]},{“id”:“608b1e65.a04a6”,“type”:“http request”,“z”:“d05f012d.bcf46”,“name”:“Get Energylink actueel verbruik”,“method”:“GET”,“ret”:“txt”,“paytoqs”:false,“url”:“[http://homewizard-ip/password/el/graph/s1/day",“tls”:“”,“persist”:false,“proxy”:“”,“authType”:“”,“x”:510,“y”:300,“wires”:[[“8b5c74d3.7b3258”,“2498e39f.7b60dc”]]},{“id”:“8b5c74d3.7b3258”,“type”:“jsonpath”,“z”:“d05f012d.bcf46”,“expression”:"](http://homewizard-ip/password/el/graph/s1/day%22,%22tls%22:%22%22,%22persist%22:false,%22proxy%22:%22%22,%22authType%22:%22%22,%22x%22:510,%22y%22:300,%22wires%22:%5B%5B%228b5c74d3.7b3258%22,%222498e39f.7b60dc%22%5D%5D%7D,%7B%22id%22:%228b5c74d3.7b3258%22,%22type%22:%22jsonpath%22,%22z%22:%22d05f012d.bcf46%22,%22expression%22:%22).response[-1:].[a]“,“split”:false,“name”:“Huidig energieverbruik”,“x”:820,“y”:260,“wires”:[[“d8040eef.a9988”]]},{“id”:“2498e39f.7b60dc”,“type”:“jsonpath”,“z”:“d05f012d.bcf46”,“expression”:”.response[-1:].[g]”,“split”:false,“name”:“Huidig gasverbruik”,“x”:810,“y”:340,“wires”:[[“e85c6229.9985e”]]},{“id”:“d8040eef.a9988”,“type”:“ui\_gauge”,“z”:“d05f012d.bcf46”,“name”:“”,“group”:“e6187cda.24cc2”,“order”:4,“width”:0,“height”:0,“gtype”:“gage”,“title”:“Energieverbruik”,“label”:“Watt”,“format”:“{{value}}”,“min”:0,“max”:“3500”,“colors”:[“#00b500”,“#e6e600”,“#ca3838”],“seg1”:“”,“seg2”:“”,“x”:1110,“y”:260,“wires”:},{“id”:“e85c6229.9985e”,“type”:“ui\_gauge”,“z”:“d05f012d.bcf46”,“name”:“”,“group”:“e6187cda.24cc2”,“order”:5,“width”:0,“height”:0,“gtype”:“gage”,“title”:“Gasverbruik”,“label”:“m3”,“format”:“{{value}}”,“min”:0,“max”:“1”,“colors”:[“#00b500”,“#e6e600”,“#ca3838”],“seg1”:“”,“seg2”:“”,“x”:1100,“y”:339,“wires”:},{“id”:“e6187cda.24cc2”,“type”:“ui\_group”,“z”:“”,“name”:“Energie Monitor”,“tab”:“d99238dd.18adb8”,“disp”:true,“width”:“6”,“collapse”:false},{“id”:“d99238dd.18adb8”,“type”:“ui\_tab”,“z”:“”,“name”:“Homey Dashboard”,“icon”:“dashboard”,“order”:1,“disabled”:false,“hidden”:false}]

Still getting errors (after replace the "), I think something went wrong in the split part

 ![import](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/2/c23c8856e1991136fe68e55692154650273743b9.jpeg)

I entered on these positions and the import went wel, but no data (I changed the homewizard url) and getting the information in the debug screen

PROBLEM SOLVED: had to delete the . in the EDIT-JSONPATH NODE (on both cards)!!.. Thanks so far!

---

<div class="post-metadata">

**Author:** ![Theo\_Helder](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/theo_helder/32/16580_2.png) [@Theo\_Helder](https://community.homey.app/u/Theo_Helder)\
**Post date:** [October 29, 2019, 9:06pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/67 "2019-10-29T21:06:37Z")

</div>

Hello Marc,

glad to hear it worked.  
I just started with Node-Red, so troubleshooting is difficult.  
Don’t know why you have to delete the . in the EDIT-JSONPATH node.

---

<div class="post-metadata">

**Author:** ![victoroos](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/victoroos/32/8344_2.png) [@victoroos](https://community.homey.app/u/victoroos)\
**Post date:** [October 30, 2019, 11:48am UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/68 "2019-10-30T11:48:21Z")

</div>

Awesome, I’ll look into that. How do you mean replace all flows of homey?

And btw, what do you do under teh “security” tab with all the locks. Cna you really lock the bathroom from there/ :O. Cool if yes, hahah. expensive as well?those locks?..

---

<div class="post-metadata">

**Author:** ![Satoer](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/satoer/32/38113_2.png) [@Satoer](https://community.homey.app/u/Satoer)\
**Post date:** [October 30, 2019, 12:09pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/69 "2019-10-30T12:09:55Z")

</div>

> How do you mean replace all flows of homey?

With node red you can read en set devices trough MQTT. For example, turn the lights on when the light sensor gets below 20 lux. Almost everything you can create with flows, you can create with nodes in node red. You can create way more complicated structures if you want (which are not possible with flows). Going this route would make the Homey just a translator for every device to MQTT, and the node-red server the brains. I haven’t done this myself, I rather control my devices as directly as possible, but if I have a complicated task in the future, I might do this with node-red.

> And btw, what do you do under teh “security” tab with all the locks. Cna you really lock the bathroom from there/ :O. Cool if yes, hahah. expensive as well?those locks?..

No, these are just window / door sensors. If I leave I can see all the open windows without physically need to go there to check.

---

<div class="post-metadata">

**Author:** ![Viking42](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/viking42/32/12687_2.png) [@Viking42](https://community.homey.app/u/Viking42)\
**Post date:** [October 30, 2019, 2:43pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/70 "2019-10-30T14:43:09Z")

</div>

Hi, my comment not adding value 🙂  
It looks absolutely stunning and sexy!  
i’m unfortunately not talented enough for the manual / coding lines steps and will have to wait for a version for general audience 😳

---

<div class="post-metadata">

**Author:** ![Satoer](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/satoer/32/38113_2.png) [@Satoer](https://community.homey.app/u/Satoer)\
**Post date:** [October 30, 2019, 3:08pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/71 "2019-10-30T15:08:42Z")

</div>

> i’m unfortunately not talented enough for the manual / coding lines steps and will have to wait for a version for general audience

Maybe the HomeyDash project will get a more widget style dashboard, but I don’t think node-red is going to get less complicated… although it’s not that complicated, if you managed to install the software on a server and go trough to the steps in my tutorial it shouldn’t be that hard.

How is everyone’s MQTT memory usage? It seems to be way less than I started this project.  
The Client went from 38MB to 22 MB  
The Hub went from 35 to 23,8 MB  
(Don’t know about the Broker, I run this one on my NAS)  
Dont know why, maybe the Homey 3.0 update.

---

<div class="post-metadata">

**Author:** ![M\_a\_r\_c\_o](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/m_a_r_c_o/32/146_2.png) [@M\_a\_r\_c\_o](https://community.homey.app/u/M_a_r_c_o)\
**Post date:** [November 5, 2019, 5:07pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/72 "2019-11-05T17:07:31Z")

</div>

I have a question, probably I do something wrong, but can’t see whats wrong:

If i toggle the switch from a lamp on the node-red dashboard, I see in MQTT Explorer that the topic is updated, but the lamp stay’s off. Like the MQTT client app in the Homey does not read that topic and/or react on it.

How does mqtt client know which topic to look in? I understand that the hub only sends the current status to mqtt and node-red is used to read these topics and set the values, but I don’t see how mqtt client then looks in the right topic and act on that.

What about LWT? Do I need to configure that in the MQTT client? And in the hub, should I enable that? And what topic paths should I use?

My config is Homey with MQTT client and hub apps. MQTT and Node-Red on a Pi3, and topics from Hub are published to mqtt and updated (including on the node read dashbard, when status is changed in Homey.

---

<div class="post-metadata">

**Author:** ![xAPPO](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/xappo/32/13726_2.png) [@xAPPO](https://community.homey.app/u/xAPPO)\
**Post date:** [November 5, 2019, 6:13pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/73 "2019-11-05T18:13:30Z")

</div>

> [@M\_a\_r\_c\_o](#):
>
> How does mqtt client know which topic to look in?

For control MQTT client looks in the topic used to report the status but with /set appended on the end.  
So if the status topic is a/b/c/dim. The topic you update to change that value is a/b/c/dim/set

---

<div class="post-metadata">

**Author:** ![M\_a\_r\_c\_o](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/m_a_r_c_o/32/146_2.png) [@M\_a\_r\_c\_o](https://community.homey.app/u/M_a_r_c_o)\
**Post date:** [November 11, 2019, 9:21pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/74 "2019-11-11T21:21:08Z")

</div>

Thanks, that was what I missed.

---

<div class="post-metadata">

**Author:** ![Satoer](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/satoer/32/38113_2.png) [@Satoer](https://community.homey.app/u/Satoer)\
**Post date:** [November 12, 2019, 9:22am UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/75 "2019-11-12T09:22:42Z")

</div>

![DSC09332-FB](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/1/c1b8ef3b237c7174afd4e9fbf78d135dc8a7711f.jpeg)  
For users that are using the dashboard on an iPad or other tablet that want to lock / unlock (turn on and off) the tablet by Homey… For example controlled by a motion detector, or on during the day:  
I’ve coded a firmware for a ESP 32 (cheap microcontroller). To emulate a Bluetooth keyboard. This way you can turn the tablet wireless on and off. A nice non intrusive solution. No need for soldering.

> [@Homey ESP32 Bluetooth Keyboard firmware (can lock / unlock iPad remotely) Dev. review needed](https://community.homey.app/t/homey-esp32-bluetooth-keyboard-firmware-can-lock-unlock-ipad-remotely-dev-review-needed/20568):
>
> I’ve had several request how I unlock and lock my iPad dashboard remotely. I used an old Pad2 that needed an new connector, so when I opened the iPad, I directly soldered a wire to the smart cover magnetic hall sensor to unlock. But opening an iPad is a real pain, and there are better wireless non-intrusive solutions. One solution is to emulate an Bluetooth keyboard and send lock and unlock key shortcuts to it. I’ve written an firmware for a cheap ESP32 module, no need for solde…

---

<div class="post-metadata">

**Author:** ![M\_a\_r\_c\_o](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/m_a_r_c_o/32/146_2.png) [@M\_a\_r\_c\_o](https://community.homey.app/u/M_a_r_c_o)\
**Post date:** [November 15, 2019, 2:37pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/76 "2019-11-15T14:37:22Z")

</div>

Playing with a Node-Red dashboard (Homey-Redboard?). My college is testing with node-red and I asked a homeydash a like background…

 ![NodeRed-Homey-Redboard-testing](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/9/e96a5c80d4741e9a88b6335f35ad6242bd72b916.png)

---

<div class="post-metadata">

**Author:** ![Tangodelta](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tangodelta/32/9471_2.png) [@Tangodelta](https://community.homey.app/u/Tangodelta)\
**Post date:** [November 26, 2019, 2:43pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/77 "2019-11-26T14:43:24Z")

</div>

Very Nice! This is my little project om Google nest

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/8/38cec99cdbf0f3afa0132ebc07692df3db65af89.jpeg)

How do u arrange for a sensor to show, like water leak or movement?

---

<div class="post-metadata">

**Author:** ![Satoer](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/satoer/32/38113_2.png) [@Satoer](https://community.homey.app/u/Satoer)\
**Post date:** [November 27, 2019, 9:49pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/78 "2019-11-27T21:49:53Z")

</div>

Just use a simple Switch node, and change the on/of icon to a droplet or something. You can even change the on / off icon colour (see the locks in my dashboard)  
Enable “Switch shows the state of the input” and attach the sensor MQTT signal to it (you might need to change the boolean string to a real boolean value. See the first (tutorial) post how to do that with a function node.)

I also have water alarms, I personally unhide a complete Group with a big warning if something like that happens.

 ![WaterAlarm](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/d/9d97b9b2388624f0c003bdff383d6a4d8b507ff8.png)

---

<div class="post-metadata">

**Author:** ![Tangodelta](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tangodelta/32/9471_2.png) [@Tangodelta](https://community.homey.app/u/Tangodelta)\
**Post date:** [November 29, 2019, 8:43am UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/80 "2019-11-29T08:43:22Z")

</div>

Thanks! Starting to get somewhere! Main dashboard in addition to 8 rooms, a lot of work!

 ![Skjermbilde](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/9/996504f1ec907fbf19d03c986cdf03efb690fd8e.jpeg)

---

<div class="post-metadata">

**Author:** ![Maik](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/maik/32/12376_2.png) [@Maik](https://community.homey.app/u/Maik)\
**Post date:** [November 29, 2019, 4:41pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/81 "2019-11-29T16:41:40Z")

</div>

oh, nice! how did you integrate a camera picture? can you share your node configuration?

---

<div class="post-metadata">

**Author:** ![Maik](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/maik/32/12376_2.png) [@Maik](https://community.homey.app/u/Maik)\
**Post date:** [November 29, 2019, 7:23pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/83 "2019-11-29T19:23:39Z")

</div>

Thank you very much, but I think there are some syntax errors in the code. Mabey you can use the “perfomattet Text”-function of the Forum?

[Previous page](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798.md?page=3)

[Next page](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798.md?page=5)
