Homey Community Forum

MQTT Hub/Gateway

Wat are the allowed mired values? 153-500 is the default setting. Don’t know if these values can be read from the capability info from Homey? Homey works with a 0…1 value…

Version 3.4.0

  • MQTT Device: allow mathJS expressions as value template for incoming messages

Both mathJS & jsonPath expression are allowed as value template for incoming messages.
The value is accessible via the value param if the message is a raw value.
If the message is JSON formatted: path.within.json can be used to target the value.

Example: Convert incoming Wh to kWh

1 Like

I never even heard of Mired… :confused: Long live Google! :slight_smile:
Now learned that a lot of questions are raise in the HA community why Mired is uses instead of the very much more commonly used Kelvin.

The desired Mired value for my Ikea bulbs would be 454.54 for most warm (2200K) and 250.00 for most cold. If I understand correctly the formula would be: Mired = 1.000.000/Kelvin.
In MQTT Exporer see the following lines in the config. Can something be done there, or do I (as I expect) have to sort this out in HA?

BTW: Since the last update(s) to v3.3.0 or 3.4.0 MQTT Explorer keeps displaying red notifications “disconnected from server” which I didn’t see before. But is reconnects immediately as well (and then disconnects again). Everything is working well though…
Can it have something to do with the updates?

To be honest, I wouldn’t bother to much about the actual displayed value in HA. The HA temperature slider is interpreted as a % scale (0…100) and the Homey IKEA driver converts this to the appropriate temperature between the min & max of the bulb’s capability. Or do you mis any functionality?

No the functionality is there. Is morefrom a cosmetic point of view. .

When you adjust the slider, the value is shown, just above and you can show the value right next to it.
In the screenshot below I am adjusting the slider; the value that is now at 500 gets updated when releasing the slider.
Those values are now incorrect.

I am already very happy so far! Thanks again for all the great help!

Works fine, thanks a million!

Just tried JSONpath and it’s a godsend for zigbee2mqtt! Great job!

Version 3.4.1

  • MQTTDevice: allow mathJS expressions as output template for outgoing messages
  • MQTTDevice: removed default ‘{{value}}’ output template

For version history, see: CHANGE_LOG.

You have something(s) logging on to the MQTT broker twice with the same client ID

Ah, thx for the tip!
Will try to sort that out then!

Tnx for this great app @HarriedeGroot !! In addition to @Henk_Renting’s question on color temperature, I’ve got another one:

I’ve got a zigbee lamp on Homey that is connected to Home Assistant using MQTT. It is capable of showing different colors ánd different light temperature. (screenshot). However to change from temperature to color or the other way around, the lamp ‘mode’ has to be changed. In the Homey UI this is done by picking the other circle (screenshot).

In Homey developer you can see there is a capability ‘light_mode’ which can be set. However, in Home Assistant it is shown as a separate sensor, not an attribute of the lamp. Is this something that can be changed in MQTT Hub? Or do I need to look somewhere else for a solution?

Unfortunately light modes is not implemented (yet).

Screenshot from (r557):

I’m really trying to understand these kind of things, so maybe one day I can actually contribute with code… So out of curiosity: how can Home Assistant discover a MQTT sensor ‘light mode’ for this lamp ?

The HA MQTT Light contains a color_mode config:

This needs to be mapped to the Homey light_mode capability.
But to be honest; I need to look into this further one day, not sure if thats the full picture…

I’m already happy the light is working and all my other devices are too, so I’ll happily wait . However I still don’t understand why HA is showing a sensor (screenshot) when there’s no mapping for light_mode. Or do all capabilities that have no mapping show up as a sensor?

Schermafbeelding 2021-05-04 225709

Version 3.4.2

  • MQTTDevice: Display capability details
  • Readme update

For version history, see: CHANGE_LOG

It appears that the Homey MQTT Broker app is not retaining messages - 1.0.5. You need to use an external broker and then it works fine, so MQTT Client seems OK. I tested with direct broker access from MQTT Explorer too.

@scanno I know you’re busy and it’s not an issue for me as I use an external broker - just flagging it for others.

On the MQTT broker app messages are NOT retained when the broker or homey is restarted. The messages are stored in memory, just for the simple fact that there is (or was) no database available to store messages in. That would have meant writing a storage mechanism myself. Not something that is easily done as you can imagine.

Sneak peek!
MQTT Device icons



Wow, just documenting that would have helped so many people diagnose the issues they were having with HA etc.

Don’t use the Homey based MQTT broker with MQTT Hub - use an external fully featured broker !

It would be good to update the instructions accordingly and remove the compatibility recommendation Harrie.