MQTT Hub/Gateway

On the Virtual Devices app target_temperature is configurable for min, max and step during device setup.


So might be doable.

@HarriedeGroot, any chance we could have configurable limits for target_temperature similar to what is available in Virtual Devices? Either from the advanced JSON configuration and/or during setup of the MQTT Device when Target Temperature is selected.

Created an issue at github: MQTT device thermostat configurable range value limits · Issue #82 · harriedegroot/nl.hdg.mqtt · GitHub

1 Like

Ah yes, true that! I should’ve known that hehe.

1 Like

Does anyone here know if it is possible to invert the status of a mqtt hub contact sensor?

Try with Device capabilities app Device Capabilities App for Homey | Homey

Is there a MQTT device custom state mapping enum value? I have an MQTT topic that returns int for carState, where null if internal error (Unknown/Error=0, Idle=1, Charging=2, WaitCar=3, Complete=4, Error=5)

Am I alone with the issue that after each reboot I need to do a “Broadcast”? Or has anybody an idea why this happens? Without the “Broadcast” I just get updates on HA on some of the devices…
Of course I can trigger a broadcast after a reboot, but it would be interesting to know where the issue is.

No you’re not alone. Same here. :blush:
Don’t know why.

Yes, same here. I made a workaround reacting on the Mqtt topic of HA state.

First flow eeacts on the topic change and changes a variable.

Second flow reacts on the changed variable to restart the Hub app.

That prevebts the restart when Homey is restarted and the Mqtt client get the online state from HA.
It will only restart the app if the state changes from offline to online after HA was restarted.

Since I made this flow, the Hub is restarted automatically and HA is up to date.

1 Like

All right, thanks a lot for the homey flow @RonnyW! However I’m not sure whether I do have the same issue as you or not. I’ve restarted Homey yesterday and not HA. May be it happens as well if I do a HA restart, but at least a Homey restart triggers my issue.

After Homey restart you can set a timer to restart the HubApp again. After 10minutes or so - when all apps are running again.

Yepp that was exactly my initial plan. But do you face both issues as well or just the HA restart issue? Btw in my case it seems to take a lot of time until homey has started all the apps.

Depends on the # of apps you run, starting 43 apps here takes around 45 minutes, about a minute for every app. When you look it this way it seems less long?
Maybe you can force the MQTT app to start quicker after a Homey reboot, by first enabling it after x minutes, and then restart it 30s after that.

I let the hub restart after HA comes back online, and also when Homey is restarted.

Just a simple flow on Homey restart.
Firt is the heating plan to wait for the Eurotronics app an ZWave zo start. Then the MqttHub.

I don’t think you can force an app to start earlier. And it’s better to start the Hub late. Then all devices are already present.

Will this flow not just start these apps two times? First time with restart and second time with this flow. Or maybe that’s the point and I’m missing it. :blush:

That’s right. That’s why at first start most of the devices are not ready and are not synced to HA after Homey restart.
The flow restarts the app after some time to re-sync all devices.

1 Like

Observe fal the following:
When restarting without restart flows, the MQTT Hub is very slow when transmitting. This continues until the MQTT client hangs and deactivates.
Nearly 15 minutes pass before the hub closes again quickly after a restart of the client. After that, the client is also no longer terminated.
I also have a flow that restarts Homey with disable Client and Hub. After 15 minutes the client starts first and after 20 minutes the hub.

How do you restart without starting the hub?

Simply write a flow that Homey should deactivate the hub and the client on restart. In the same flow, start the client and hub with a time delay of xx minutes.

1 Like

So this is all new to me so excuse the question but cannot find an answer.

How do you configure MQTT to use the MQTT Broker on Homey rather than another one I have running?

I cannot find where the IP address is set or the username/pwd

I can see it is publishing albeit erratically to a test MQTT Broker I setup earlier.

But now need it to work with the MQTT Broker setup on Homey.

I am reducing the workload on Homey to the things it connects to that I would struggle to connect to directly in Node Red, so Homey will have little to do and can carry the load of the Broker.

Can someone point me to how I point the MQTT Hub to itself on port 1883 and feed it credentials?

Many thanks

Ok made some progress no idea how or why now sort of working.

Now trying work out why some selected devices are replicating to the MQTT and others not.