Homey Community Forum

MQTT Hub/Gateway

#406

I’ll try to give a clearer example: when switching on a Ikea light bulb in a room using the physical switch (so the light turns from off to on and connect to the Signed network), this gives a birth message from the bulb in mqtt (?). And than use that message to trigger a Homey flow (eg turning on mechanical ventilation). This way I don’t have to add modules behind switches or lights to sense whether the light is switched.

Hope I am making some (more) sense…

0 Likes

#407

The birth and last will messages are not related to devices - they are related to the MQTT-Hub app itself. So when the app starts it sends a birth message to announce it is online and then if it quits (or dies) the last will message is sent. So it doesn’t do what you want.

Theoretically if the status of the bulb does change in Homey when you power it on/off from the switch (??) then you can likely detect that from an MQTT status change in the onoff or dim topic for that device. This may depend on what actually happens when you switch it on as when off at the switch the device is ‘absent’ from the network. I don’t know what status is reflected in Homey when in this state (no ikea bulbs here). This is not needed though as…

Much better … you can trigger such a flow directly on a state change within Homey - no need for MQTT-Hub at all for that (as long as the Homey state does change)

0 Likes

#408

Thanks for the clarification. Unfortunately, these devices do not change state when switched, only when they are (un)reachable with a command from Homey. Not sure how to use this though, maybe by implementing some kind of polling?

0 Likes

#409

Jus wondering if you guy’s experience the same issue. MQTT Light component contains brightness_scale. The default scale is 0-255 where 255 is 100% you can adjust the scale by adjusting this brightness_scale to the max value. So brightness_scale: 100 means a scale 0 - 100. now the problem, homey scale is 0.01 to 1 where 1 equals 100%. I’m not aware how to adjust the mqtt light scale so homey knows how to handle it. any clues?

0 Likes

#410

@Leon_van_Efferen Setting the percentage scaling to 0…100 in the app settings will resolve this.

EDIT: This will be the default setting in the next version.

0 Likes

#411

You mean in homey app? did not know that scale is adjustable in Homey

0 Likes

#412

In the MQTT Hub (app settings). It’s available with the custom protocol setting.

0 Likes

#413

I’m on 2.0.6 so I guess it is not yet available on that version?

0 Likes

#414

That explains. You could install via CLI or have a little patience.

FYI: Currently I’m writing some documentation. Next version will be pushed asap.

0 Likes

#415

I will sit back and wait, there is still enough to find out about home assistent while waiting :slight_smile: the funny this is while playing with Home Assistent and MQTT, It really shows how good/simple homey is. Is discovery also available in the next version?

0 Likes

#416

Yes, HA discovery (beta) will be available in the next version.

0 Likes

#417

New version on the BETA branch:

Version 2.1.0

  • HA Discovery (beta)
  • Simplified settings page + added many options
  • App performance & stability (introduction of a MessageQueue)
  • Birth & Last Will messages
  • Topic clean-up (remove retained messages from the broker when disabling devices)
  • Many BUG fixes

Also submitted to the app store (waiting for approval from Athom).

2 Likes

#418

This may be a point for here but also the other thread…

I have managed to get Spirit TRVs working with gBridge/Google Home…

However, when gBridge sends the Mode Topic - the command is ‘off’
When MQTT Hub Sends out the command from Homey it sends ‘Off’

Is there anything on this side that can be done to allow for this?

I have also reached out to the gBridge Dev to see what he thinks

0 Likes

#419

Did you try latest beta?

0 Likes

#420

no… i havent updated to it…
I assume I cant Install by CLI remotely?

0 Likes

#421

Version 2.1.0 is available in the store

2 Likes

#422

Installed it straight over cli-version and it seems to work so far. Good job.

0 Likes

#423

Latest beta seems to break on homey reboot.

0 Likes

#424

I made some changes on the BETA branch. Is someone (with issues) willing to try?

0 Likes

#425

Yes I guess I could do it.
Edit: beta on github or somewhere else?

0 Likes