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

<div class="post-metadata">

**Author:** ![Jan\_Willem\_Visser](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jan_willem_visser/32/10747_2.png) [@Jan\_Willem\_Visser](https://community.homey.app/u/Jan_Willem_Visser)\
**Post date:** [July 4, 2020, 5:59am UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/472 "2020-07-04T05:59:35Z")

</div>

So easy… thank you, shame on me 🙈 😌

---

<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:** [July 4, 2020, 7:41am UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/473 "2020-07-04T07:41:43Z")

</div>

> [@MFM\_Bart](#):
>
> Can someone tell me what variable I have to use for windspeed in kmh and m/s?  
> The variable I use now is does not give the right speed.
> 
> var msg = {  
> “payload”: {  
> “speed”:Math.round(Math.random() \* 60)  
> }  
> }  
> return msg;

To be honest I don’t know what you are trying to accomplish with this code. Looks like you are trying to send a message with an random rounded number. There’s no conversion calculation whatsoever. Where do you get the data from, what kind of data is it, and to what does it need to converted to?

---

<div class="post-metadata">

**Author:** ![MFM\_Bart](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mfm_bart/32/9492_2.png) [@MFM\_Bart](https://community.homey.app/u/MFM_Bart)\
**Post date:** [July 5, 2020, 8:29am UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/474 "2020-07-05T08:29:55Z")

</div>

What I am trying to do, is to get the data from my windmeter more often than it does now. So instead of a mqtt in node and a a output every 5 minutes I want to use a inject node with a function node and a template node to see the data every minute.  
The function node has the above variable and the template node has another.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/3/93722dcb26107cd225999d250c0672af45abdc94.jpeg)

---

<div class="post-metadata">

**Author:** ![pvdhelm1974](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pvdhelm1974/32/9424_2.png) [@pvdhelm1974](https://community.homey.app/u/pvdhelm1974)\
**Post date:** [July 5, 2020, 12:38pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/475 "2020-07-05T12:38:36Z")

</div>

> [@Satoer](#):
>
> ```auto
> var color;
> 
> if(msg.payload === "Sfeerlicht"){
> // state is true (lets make button green)
> color = "#53c653";
> }
> else{
> // state is false (lets make button blue)
> color = "#0094ce";
> }
> 
> msg = {background:color};
> return msg;
> 
> ```

i still have problems with this. i cant get to change my button collor and activate the flow on my homey.

Can you please share your node red code so i can see what goes wrong here.

---

<div class="post-metadata">

**Author:** ![Rene\_Boeije](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rene_boeije/32/16757_2.png) [@Rene\_Boeije](https://community.homey.app/u/Rene_Boeije)\
**Post date:** [July 7, 2020, 8:37am UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/476 "2020-07-07T08:37:58Z")

</div>

Hi Jan\_Willwm, in case you did not yet find out:  
In de node-red editor, click on the hamburger-button in the top right corner and select import.

---

<div class="post-metadata">

**Author:** ![Rene\_Boeije](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rene_boeije/32/16757_2.png) [@Rene\_Boeije](https://community.homey.app/u/Rene_Boeije)\
**Post date:** [July 7, 2020, 8:41am UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/477 "2020-07-07T08:41:41Z")

</div>

Sorry, When I scroll back this is already answered. As us Dutch say ‘mosterd na de maaltijd’.

---

<div class="post-metadata">

**Author:** ![Roy\_Hopman](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@Roy\_Hopman](https://community.homey.app/u/Roy_Hopman)\
**Post date:** [July 10, 2020, 8:52am UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/478 "2020-07-10T08:52:39Z")

</div>

Hi All,

i have setup Node Red last year but since i was still remoddeling our house this project could not be finalized yet. I would like to mount a tablet next to two double wall sockets, one socket to be powering the tablet. There is no option to flush-mount it into the wall unfortunately. Does anyone have experience with wall mounts, and any advise on this?  
Reason for second wall socket is because it’s located central in the living room and we primarily use it for the vacuum.

There are wall mounts with arm, and mounts for direct clamping to the wall. Tablet to be mounted will currently be an IPAD mini, but likely change to android later. Therefore, the wall mount should be ‘‘flexible’’.

any input before i’l start buying is much appreciated!

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [July 10, 2020, 9:21am UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/479 "2020-07-10T09:21:54Z")

</div>

I bought a Vögel TMS 1010, because the tablet can be removed from the mount:

 ![Schermafbeelding 2020-07-10 om 11.20.04](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/f/2f6fc6d5d2b63d90a07c0e1db61da6588f497a80.jpeg)

[link](https://www.vogels.com/en-us/c/tablet-holders/at-home)

---

<div class="post-metadata">

**Author:** ![johannes1702](https://avatars.discourse-cdn.com/v4/letter/j/db5fbb/32.png) [@johannes1702](https://community.homey.app/u/johannes1702)\
**Post date:** [July 10, 2020, 9:33am UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/480 "2020-07-10T09:33:55Z")

</div>

Have not ordered it yet, but I will most likely go for this one:

König KNM-FTM10 Tablet-Wandhalterung mit fester Position bis 30,5 cm (12 Zoll) [https://www.amazon.de/dp/B00TUEQL2I/ref=cm\_sw\_r\_cp\_api\_i\_4wdcFb5STMKSM](https://www.amazon.de/dp/B00TUEQL2I/ref=cm_sw_r_cp_api_i_4wdcFb5STMKSM)

---

<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:** [July 10, 2020, 9:38am UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/481 "2020-07-10T09:38:57Z")

</div>

I use the TMS 1010, its flexible. has not an 10" android and had a 7" android beforre.

One point, remove the magnet from the mount, some tablets notice the magnet and then think they are in desktop mode and then teh screen reacts different. Had this problem with the 7" tablet.

And replace one outlet with a version which has also USB with an usb cable which has a 90degree connector, or buy an sCharge Charger with an blind plate over it.

---

<div class="post-metadata">

**Author:** ![Roy\_Hopman](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@Roy\_Hopman](https://community.homey.app/u/Roy_Hopman)\
**Post date:** [July 10, 2020, 9:39am UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/482 "2020-07-10T09:39:20Z")

</div>

This is already a much more economical solution than the Vögel version.  
@Eternity Since both the vögel as this KÖnig bracket use a clamp-in system, i suppose both allow for easy removal of the tablet right? only with the Vögel one, you can can either take it from the clamps, or take the complete unit (that’s attached to the arm) from the wall. is there any benefit in having an arm? i suppose you won’t move it around often since it gonna be about aestethics as well right?

---

<div class="post-metadata">

**Author:** ![Eternity](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eternity/32/102113_2.png) [@Eternity](https://community.homey.app/u/Eternity)\
**Post date:** [July 10, 2020, 10:21am UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/483 "2020-07-10T10:21:25Z")

</div>

@Roy_Hopman  
I wanted the tablet to be as close to the wall as possible, so got the TMS 1010. And, yes, you can click the tablet in the wall of remove the tablet altogether. That can be handy.

---

<div class="post-metadata">

**Author:** ![MFM\_Bart](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mfm_bart/32/9492_2.png) [@MFM\_Bart](https://community.homey.app/u/MFM_Bart)\
**Post date:** [July 10, 2020, 4:50pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/484 "2020-07-10T16:50:55Z")

</div>

@M_a_r_c_o  
On Slack I saw that you have the ikea smart home node running. How did you do that?  
The security code or identity don’t let the gateway show up in the node.

I am sure I have the right code because they work in the ikea homey app.

Can you help me out please.

---

<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:** [July 10, 2020, 8:17pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/485 "2020-07-10T20:17:00Z")

</div>

Try to switch the ikea hub off/on and then redo the security stuff in the Homey Ikea gateway app.

The just fill in the ip address, identity and psk at node-red, do not use authenticate/security code in node-red again, that will block the ikea gw app in homey again.

---

<div class="post-metadata">

**Author:** ![VanGilles](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/vangilles/32/11478_2.png) [@VanGilles](https://community.homey.app/u/VanGilles)\
**Post date:** [July 11, 2020, 5:30am UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/486 "2020-07-11T05:30:00Z")

</div>

2 other brand options for (close) wall mounts;

- [Vidamount](https://www.vidabox.com/kiosks/vidamount-on-wall-ipad-tablet-enclosure-mount.html)

- [Displine](https://displine.com/dame-wall/)  
(‘Dame wall’ or cheaper ‘Companion wall’)

> [@Eternity](#):
>
> @Roy_Hopman  
> I wanted the tablet to be as close to the wall as possible, so got the TMS 1010. And, yes, you can click the tablet in the wall of remove the tablet altogether. That can be handy.

---

<div class="post-metadata">

**Author:** ![MFM\_Bart](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mfm_bart/32/9492_2.png) [@MFM\_Bart](https://community.homey.app/u/MFM_Bart)\
**Post date:** [July 11, 2020, 3:15pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/487 "2020-07-11T15:15:09Z")

</div>

Sadly does not work for me. Still can’t find the gateway. The debug node says: Error stopping node: ReferenceError: \_ping is not defined.

If I use the ping node in node red it will find the ip adress.

---

<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:** [July 11, 2020, 3:56pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/488 "2020-07-11T15:56:33Z")

</div>

In node-red there is no auto discovery for the ikea gateway. You need to type the gateway address in, into the field in the connection profile.

Edit the existing hub, in a trafri block

 ![ploatje1](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/2/0218ae67da3b8ee83d21284acec59dbfcfdfebdb.png)

![ploatje2](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/7/67be3af6ef1cbf73db59004a2f6c1e110318b5bb.png)

---

<div class="post-metadata">

**Author:** ![MFM\_Bart](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mfm_bart/32/9492_2.png) [@MFM\_Bart](https://community.homey.app/u/MFM_Bart)\
**Post date:** [July 11, 2020, 5:30pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/489 "2020-07-11T17:30:16Z")

</div>

Thanks for your help. But it Still won’t see the gateway.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/d/6d98799a1a0bfe69e307c62e7e629ad9f9b3c90e.jpeg)  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/7/c7efe579c28fe666ee604f63c20b57ed39bd6ad8.jpeg)

On your pictures it’s a different node as I have, I think.

---

<div class="post-metadata">

**Author:** ![Roy\_Hopman](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@Roy\_Hopman](https://community.homey.app/u/Roy_Hopman)\
**Post date:** [July 13, 2020, 2:04pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/490 "2020-07-13T14:04:49Z")

</div>

I finally ordered the TMS1010 just like you. i want to be able to swap tablet in case i ever want to. Thank you all for your help.

---

<div class="post-metadata">

**Author:** ![Jeroen\_Kokhuis](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeroen_kokhuis/32/12592_2.png) [@Jeroen\_Kokhuis](https://community.homey.app/u/Jeroen_Kokhuis)\
**Post date:** [July 16, 2020, 2:06pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/491 "2020-07-16T14:06:34Z")

</div>

> [@Keverjeroen](#):
>
> TEST

thanks for your code. I imported this code but the icons are not dislpayed. Do you have an idea whats wrongs?

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

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