# 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:** 1\
**Showing post:** 229

<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:** [January 14, 2020, 2:28pm UTC](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798/229 "2020-01-14T14:28:10Z")

</div>

I’ve encountered the same problem allthough I use Mi-Lights instead of the Philip Hue. (I thought it was a Milight problem, but I guess it’s an MQTT problem) I could not set the hue of the light:

> [@MQTT Hub/Gateway](https://community.homey.app/t/mqtt-hub-gateway/6766/668):
>
> Hi guy’s. I’m totally new with this MQTT, but studied hard this weekend and managed to create a nice and working node-red MQTT dashboard. But I’m facing a problem with the lights. I want to control my mi-lights, but I’m only able to control the on/off, brightness and mode… I can’t figure out what I need for “topic” to control the color. Ive tried (binnenring is the name of the light): Works: homie/homey-topic/binnenring/onoff/set : “true” / “false” homie/homey-topic/binnenring/dim/set : 100 …

Eventually when no-one could lead me to a workable solution, I created a workaround. It uses HomeyScript to translate custom MQTT messages to setting the colour:

> [@MQTT Hub/Gateway](https://community.homey.app/t/mqtt-hub-gateway/6766/671):
>
> Well… I’ve made a “hack” to resolve the issue. It works but it’s not pretty. I capture the MQTT scentence in a flow, and push it to a HomeyScript. This script searches for the light and changes the hue: (Example topic string: “homey/lights/light-name/set 360”) let devices = await Homey.devices.getDevices(); function CleanName(NameToChange) { //Removes spaces, - and \_ var NewName=NameToChange return NewName.replace(/\_/g, '').replace(/\s+/g, '').replace(/-/g, '').toLowerCa…

It’s not pretty, but it works. If I activate a light a extra panel appears to set the light colour and brightness.

 ![colors](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/0/806017a351da6423c3633e8ef0914bf5995567c8.png)  
I’m using simple coloured buttons. In my opinion this is more touch friendly than the colour picker. I still should give this a graphic overhaul with more colour choice, but to be honest, I hardly use the direct setting of the lights. Most of the time I just set a scene.

Later in that topic user @xAPPO profided some hint’s. But I still had a hard time how to formulate the message to send. And since I had a working solution I did not explore it any further. If you find the right topic / payload please let us know!

---

_[View the full topic](https://community.homey.app/t/node-red-a-widget-based-dashboard-working-with-homey-trough-mqtt/18798)._
