# 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:** 3

<div class="post-metadata">

**Author:** ![Robin\_van\_Kekem](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robin_van_kekem/32/8187_2.png) [@Robin\_van\_Kekem](https://community.homey.app/u/Robin_van_Kekem)\
**Post date:** [October 22, 2019, 2:21pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/42 "2019-10-22T14:21:35Z")

</div>

I’ve created a basic Node-red flow for you which sets both the u-values to a gauge on your dashboard.  
I don’t know which values you’d like to have on your dashboard?

You’d have to change the url in the second node (called Get Energy Link week data).  
It updates every 10min (see timestamp node).  
Change the gauge nodes to the dashboard you created.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/1/c13c93c1b06fd6e6f43ac04ae4f608fb5cd8ff1c.png)

You can copy below ‘code’ to import it into a new flow in Node-red:  
[https://nodered.org/docs/user-guide/editor/workspace/import-export](https://nodered.org/docs/user-guide/editor/workspace/import-export)

```
[{"id":"7a8cc078.2f21f","type":"inject","z":"c636d43a.eaa548","name":"","topic":"","payload":"","payloadType":"date","repeat":"600","crontab":"","once":true,"onceDelay":0.1,"x":230,"y":320,"wires":[["486fd7a0.2a9d48"]]}]
```

---

<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 22, 2019, 7:52pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/43 "2019-10-22T19:52:29Z")

</div>

Hello Robin,

first objective is to publish a value on the dashboard, like powerconsumption for a week so to learn how it works. Target is to publish the actual power- and gas consumption of more.

In my previous post I just copied two lines of output.  
The total output of https:///password/el/graph/u/week is :

 ![HomeWizard%20EnergyLink%20-%20Week](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/2/a260c78412bd2afc8652900b2891ce152be78c93.png)

I created your flow, but honestly, I have nu clue what to fill in at switch / set.msg.payload / cauge…  
Can you give me a hint?  
And I set the return object ‘Get Enery Link…’ to a parse json object. Right?

---

<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 22, 2019, 9:50pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/44 "2019-10-22T21:50:15Z")

</div>

Got result!  
I discovered this topic : [https://forum.athom.com/discussion/2964/tut-how-to-get-data-from-your-homewizard-and-use-it-in-homey-also-the-868-sensors](https://forum.athom.com/discussion/2964/tut-how-to-get-data-from-your-homewizard-and-use-it-in-homey-also-the-868-sensors)

I installed the jsonpath module and change the flow :

```
[{"id":"5ef24d5a.f881cc","type":"tab","label":"Energy Link","disabled":false,"info":""},{"id":"3886dc6f.9bf22c","type":"http request","z":"5ef24d5a.f881cc","name":"Get Energylink Total Consumption","method":"GET","ret":"txt","paytoqs":false,"url":"http://<homewizard-ip>/<password>/el/get/0/readings","tls":"","persist":false,"proxy":"","authType":"","x":450,"y":200,"wires":[["dde3cb08.6741e8","f394e95f.1f1748","d04e6bcd.3d2848"]]},{"id":"16f05c76.a950a4","type":"inject","z":"5ef24d5a.f881cc","name":"","topic":"","payload":"","payloadType":"date","repeat":"3600","crontab":"","once":true,"onceDelay":0.1,"x":150,"y":200,"wires":[["3886dc6f.9bf22c"]]},{"id":"5fcb5d03.9d32a4","type":"ui_gauge","z":"5ef24d5a.f881cc","name":"","group":"e6187cda.24cc2","order":2,"width":0,"height":0,"gtype":"gage","title":"Energie verbruik laag","label":"kWh","format":"{{value}}","min":0,"max":"5000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":1060,"y":140,"wires":[]},{"id":"7a39567.1f7bfa8","type":"ui_gauge","z":"5ef24d5a.f881cc","name":"","group":"e6187cda.24cc2","order":1,"width":"0","height":"0","gtype":"gage","title":"Energieverbruik Hoog","label":"kWh","format":"{{value}}","min":0,"max":"5000","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":1060,"y":200,"wires":[]},{"id":"dde3cb08.6741e8","type":"jsonpath","z":"5ef24d5a.f881cc","expression":"$.response[?(@.tariff==1)].consumed","split":false,"name":"Verbruik laag","x":730,"y":140,"wires":[["5fcb5d03.9d32a4"]]},{"id":"f394e95f.1f1748","type":"jsonpath","z":"5ef24d5a.f881cc","expression":"$.response[?(@.tariff==2)].consumed","split":false,"name":"Verbruik hoog","x":740,"y":200,"wires":[["7a39567.1f7bfa8"]]},{"id":"d04e6bcd.3d2848","type":"jsonpath","z":"5ef24d5a.f881cc","expression":"$.response[?(@.type=='gas')].consumed","split":false,"name":"Verbruik gas","x":730,"y":260,"wires":[["49850eff.45f1a"]]},{"id":"49850eff.45f1a","type":"ui_gauge","z":"5ef24d5a.f881cc","name":"","group":"e6187cda.24cc2","order":4,"width":0,"height":0,"gtype":"gage","title":"Verbruik Gas","label":"m3","format":"{{value}}","min":0,"max":"2500","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":1030,"y":260,"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}]

```

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/d/cdba4aa4c15a0d295cadb52c7bec110bd3d23695.png)

This results in :

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/9/09ee20ea1aebec0300aa23f94dc6bf4fe8a1f2e8.png)

Next challenge, display live consumption.

---

<div class="post-metadata">

**Author:** ![Robin\_van\_Kekem](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robin_van_kekem/32/8187_2.png) [@Robin\_van\_Kekem](https://community.homey.app/u/Robin_van_Kekem)\
**Post date:** [October 23, 2019, 4:53am UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/45 "2019-10-23T04:53:25Z")

</div>

Nice, well done

---

<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 23, 2019, 7:05am UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/46 "2019-10-23T07:05:27Z")

</div>

Maybe a stupid questiion…  
My diagrams are empty today, no values. I wonder how is that stored.  
I gewt values from MQTT but do I need to have the dashboard running/viewing to let it create diagrams on the go? Seems like when closing the webpage /ipadress:1880/ui all diagrams get zero

---

<div class="post-metadata">

**Author:** ![Stefan\_Wempe](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/stefan_wempe/32/9572_2.png) [@Stefan\_Wempe](https://community.homey.app/u/Stefan_Wempe)\
**Post date:** [October 24, 2019, 1:17pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/47 "2019-10-24T13:17:32Z")

</div>

[https://flows.nodered.org/flow/09f81780458d23156b74bf3f1168bbd8](https://flows.nodered.org/flow/09f81780458d23156b74bf3f1168bbd8)

check this one out.  
Change inputs to MQTT values from homey

---

<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 24, 2019, 7:52pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/48 "2019-10-24T19:52:04Z")

</div>

Hello Stefan,

thanks but this works with HomeAssistant.  
I’ve got a HomeWizard Energylink.

To get the latest data you can perform a http request : [http://homewizard-ip/password/el/get/0/telegram](http://homewizard-ip/password/el/get/0/telegram)

The output :

```
/KFM5KAIFA-METER
1-3:0.2.8(42)
0-0:1.0.0(191024213340S)
0-0:96.1.1(4530303235313030303635323633383136)
1-0:1.8.1(004740.032*kWh)
1-0:1.8.2(003867.271*kWh)
1-0:2.8.1(000000.000*kWh)
1-0:2.8.2(000000.000*kWh)
0-0:96.14.0(0002)
1-0:1.7.0(00.473*kW)
1-0:2.7.0(00.000*kW)
0-0:96.7.21(00001)
0-0:96.7.9(00000)
1-0:99.97.0(1)(0-0:96.7.19)(000101000001W)(2147483647*s)
1-0:32.32.0(00000)
1-0:32.36.0(00000)
0-0:96.13.1()
0-0:96.13.0()
1-0:31.7.0(002*A)
1-0:21.7.0(00.473*kW)
1-0:22.7.0(00.000*kW)
0-2:24.1.0(003)
0-2:96.1.0(4730303332353631323931373231363137)
0-2:24.2.1(191024210000S)(01455.404*m3)
!94AB

```

I’m trying build a flow whhich executes Python script based on this article : [http://domoticx.com/p1-poort-slimme-meter-data-naar-node-red-mqtt/](http://domoticx.com/p1-poort-slimme-meter-data-naar-node-red-mqtt/)

Currently using this :  
HomeWizard EnergyLink has graphs for day/week/month/year. When I put [http://homewizard-ip/password/el/graph/s1/day](http://homewizard-ip/password/el/graph/s1/day) in the browser I noticed it’s poll’s every 5 minutes and count the values for a total that day.  
So I use this http request in a flow and publish the last values of ‘a’ (netto consumption) and ‘g’ (gas consumption). Also executes every 5 minutes.

To get the last value I figured out that I have to use the Jsonpath and define that I want the latest value of the array.

Flow :

```
[{“id”:“37e7cbb6.b00ed4”,“type”:“inject”,“z”:“72f59c0b.65acf4”,“name”:"",“topic”:"",“payload”:"",“payloadType”:“date”,“repeat”:“300”,“crontab”:"",“once”:true,“onceDelay”:0.1,“x”:190,“y”:240,“wires”:[[“130da8ad.2cad77”]]},{“id”:“130da8ad.2cad77”,“type”:“http request”,“z”:“72f59c0b.65acf4”,“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”:490,“y”:240,“wires”:[[“7fa3b8b7.13eff8”,“a0a8d198.6d46c”]]},{“id”:“7fa3b8b7.13eff8”,“type”:“jsonpath”,“z”:“72f59c0b.65acf4”,“expression”:".response[-1:].[a]","split":false,"name":"Huidig energieverbruik","x":800,"y":200,"wires":[["eb844269.33059"]]},{"id":"a0a8d198.6d46c","type":"jsonpath","z":"72f59c0b.65acf4","expression":".response[-1:].[g]",“split”:false,“name”:“Huidig gasverbruik”,“x”:790,“y”:280,“wires”:[[“667b1a5b.48dce4”]]},{“id”:“eb844269.33059”,“type”:“ui_gauge”,“z”:“72f59c0b.65acf4”,“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”:1090,“y”:200,“wires”:},{“id”:“667b1a5b.48dce4”,“type”:“ui_gauge”,“z”:“72f59c0b.65acf4”,“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”:1080,“y”:279,“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}]
```

---

<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 25, 2019, 12:08pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/49 "2019-10-25T12:08:44Z")

</div>

I have problem that some devices dont send 0 kw when nothing is consumption energy.  
And when the device a couple of hours later turns on I get a line between the last consumption and now.  
That becomes a problem when doing charts in node-red. Can I change the way charts draw that line ?

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/e/bef61bd985ed9d44ae365446d92f4b6cb0a6c1b8.png)

---

<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 25, 2019, 1:25pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/50 "2019-10-25T13:25:57Z")

</div>

What kind of device is that? A smart plug and it’s turned off by Homey? Don’t you get a MQTT message if so?  
If not, you can also start a timer inside node red triggered by an incoming message, and keep resetting it when a new message arrives. If no message arrives for X seconds, send a 0 to the graph.

---

<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 25, 2019, 1:34pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/51 "2019-10-25T13:34:54Z")

</div>

I’m using the smart presence app and it’s sending a MQTT message when a person (name) leaves / arrives home.

---

<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 25, 2019, 2:27pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/52 "2019-10-25T14:27:59Z")

</div>

Its z-wave from Cleverio. I think a timer is the right way to go. Will try that first

It was the app in Homey that was messing around. The app hasent “found” the z-wave device right.  
So the app didnt send the values, didnt send anything.  
But in z-wave I could see that values wore sent from the Device to Homey.  
Removed/added device and restarted Homey, now it works and send a 0 when its 0 🙂

---

<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 27, 2019, 10:54am UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/53 "2019-10-27T10:54:29Z")

</div>

If I import you’re flow (to get the latest value) in Node Red I get an “SyntaxError: Unexpected token “ in JSON at position 2”

---

<div class="post-metadata">

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

</div>

You have to replace all “smart quotation marks” (“ and ”) with “dumb quotation marks” (").

---

<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 27, 2019, 11:48am UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/55 "2019-10-27T11:48:24Z")

</div>

![Knipsel](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/c/fc3d124297f18048ccfb9e15c4431787e4a1efb3.jpeg)

Then other errors pop up…

---

<div class="post-metadata">

**Author:** ![sepatneu](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sepatneu/32/2270_2.png) [@sepatneu](https://community.homey.app/u/sepatneu)\
**Post date:** [October 27, 2019, 4:15pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/56 "2019-10-27T16:15:13Z")

</div>

Thanks for the tip. I’ve tried Smart presence, but it don’t send any MQTT. Or at least i can’t see any in the debug window. I can see it works within Homey, cause i made a test flow to check that. But it doesn’t  
work in Node red. Do you have an example code I can use. Or is it som setting in the MQTT Hub i’m missing?  
Thank again for your time.

---

<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 27, 2019, 5:46pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/57 "2019-10-27T17:46:12Z")

</div>

If you make a virtual switch that goes on when you’re at home and off when you are away. Then the switch will send the request

---

<div class="post-metadata">

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

</div>

Thanx Marc!  
I thought about that too, but I was hoping not also having to create virtual switches for every family member. I already created a Smart presence-device for every family member. So now I need them devices to make it possible. But if thats the only way I guess thats what it will be done.

I have another problem also. I can’t seem to get a slider for dimming lights to work both ways. I have made it receiveing values from Homey and show it in the dashboard-slider, but not the other way around.  
Do you have any idea what i’m missing here?

---

<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 28, 2019, 8:17am UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/59 "2019-10-28T08:17:15Z")

</div>

Hello Marc,

did you solve it already?

Maybe something went wrong with posting the code… made a new copy (change homewizard-ip/password)

[{“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}]

---

<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 28, 2019, 9:55am UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/60 "2019-10-28T09:55:12Z")

</div>

Nope it is not working. Replaced all the quotes didn’t do the trick. But halve not much time to see where it went wrong, will try later further. Thanks by the way…

---

<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, 11:04am UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/61 "2019-10-29T11:04:18Z")

</div>

> [@sepatneu](#):
>
> Thanks for the tip. I’ve tried Smart presence, but it don’t send any MQTT. Or at least i can’t see any in the debug window. I can see it works within Homey, cause i made a test flow to check that. But it doesn’t  
> work in Node red. Do you have an example code I can use. Or is it som setting in the MQTT Hub i’m missing?  
> Thank again for your time.

I’ve looked into my code, and I’m sorry; you are right. MQTT Hub does not send Smart Presence data. The way I solved it, is to create a flow triggered by Smart Presence, and send a MQTT message with MQTT Client:

 ![PrecenceTrigger](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/c/9c8f737c82580462616aa4c2b4935b32ac960ba7.png)

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

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