[APP][Pro] MQTT Hub - Community version

New test version 4.2.3 including some fixes:

  • Changed start/stop control in app settings
  • Fixed custom settings (checkboxes)
  • Fixed HA discovey on Hub restart

@Fabien_Schmitz FYI and to try:

Hi Ronny,

The Checkboxes are working now! Thank you for the quick solution.

I’m still running in some problems, (mqtt device reporting no value but says invalid date etc) but I’ll have to investigate it further to make a proper bug report!

Hi there,

I’ve developed some sensors using ESP32 and I would like to use MQTT to send data to Homey gateway.

At this point I have MQTT Device added do Homey with properties like on/of and temperature measue. Problem is that temperature measure is setable=false and this value can’t be ubdated by MQTT from what I understand.

So MQTT Hub is to have Homey real devices accesible outside throuth MQTT but is it a method to update temperature measure in that kind of virtual device or i mssed something?

Already tryed change setable to true but it not helped.

Cheers!

If you add a MQTT-device and add a measure_temperature capability linked to a numeric MQTT topis, this value gets updated in realtime if the MQTT value changes.
The capability is not setable. That means, you can’t set the value from “outside”. But the app itself can of course change the value.

You don’t need to handle the capabilities or values with flows like it’s needed for virtual devices. That’s all done by the app.

1 Like

My problem solved.
thank you @RonnyW !

image

Where do you find Advanced? I can’t see it in mobile app nor web? (version 4.2.4)

That’s device settings for a MQTT device.

Hi, would it be possible to add a checkbox (or any way) to enable and disable the cumulative property of an mqtt device?
My situation is that I have a mqtt power meter, and the power it measures is added to Homeys energy section so it looks like my energy usage is double of what it is.
It doesn’t cause any porblems other than making the energy usage visualization off, so its not a big problem :slight_smile:

1 Like

Hi @RonnyW
Recently the app seems to be instable at times.Sometimes with an “Memory Warning Limit Reached”


and other times with an “CPU Warning Limit Reached”

Today the instability began at 3:00 am:

Diagnostic rapport:
a22d022f-3905-4a68-898d-cf67e3623512

Any idea why?

The CPU usage is caused by a sync in most cases.
Was the Mqtt connection broken at this time and caused a new sync?

Did you set a sync delay in Mqtt Hub settigs? If not, please try 20 ms. If you get still crashes, increase up to 50ms.

I don’t think the mqtt connection was broken at the time of the crashing period. I have the broker running on a Qnap nas, and used mqtt explorer on a PC to check the connection. That worked fine.

Thanks for the suggestion to adjust the sync delay. To be honest, I do not have a clou wat sync delay is :sweat_smile: But I can’t find it either in the settings?

These are the settings I have:


Or do I need to set it somewhere in the broker settings (I use mosquitto on the Qnap NAS)?

[EDIT]
Just found out I was running an old version of MQTT hub even though I had the auto-update on.


I see the delay option now :+1:
Thanks.

Now you are using this app/version?

Yes I am now on 4.2.4

Hi @RonnyW! Quick question (asking for a friend :wink:); Are there any plans to update the app with the new capabilities? I’m currently using it for my Itho Daalderop ventilation unit, and it would be awesome to have the option to use “fan speed” instead of just “dim” :eyes:

Hi, you mean while adding a MqttHub device when you add a capability for a topic?
I have to check how it’s implemented. I just took over the app but don’t know all details.

You can try to change the capability in device settings (the JSON definition). I know you can change capabiliy options, but I never tried to change the capability itself.

More details later :wink:

1 Like

Short update based on a question on Github…

If you have topics using a custom mode list, you can’t set this on adding the device.
But you can change the attributes of the enum capability later in device settings:

The capability update functionality updates all attributes set in the JSON. If you use the “values” element, this capability option is updated which sets the enum list.
I just tried an example and it’s working if you set the mode list in correct JSON syntax. Add the “values” element, then add all entries to the array.

{ "thermostat_mode": { "capability": "thermostat_mode", "stateTopic": "homie/homey-pro/heizung-buro/eurotronic-mode-spirit", "setTopic": "", "valueTemplate": "", "outputTemplate": "", "displayName": "Thermostat", "values":[ { "id": "mode1", "title": "Mode 1" }, { "id": "mode2", "title": "Mode 2" } ] } }

See documentation:

You can also add all language dependent titles if needed.

This way you get this mode list:
grafik

1 Like

With the new energy tab(beta), it would be nice to get this, “cumulative”: “true”, work! I have tried adding this to the Jason Sting on the device. And it applies the change.

But it does not show up as a smart meeter.

{
	"measure_power": {
		"capability": "measure_power",
		"stateTopic": "ams/meter/import/active",
		"setTopic": "",
		"valueTemplate": "",
		"outputTemplate": "",
		"title": "Power",
                     "cumulative": "true"
	}

Afaik cumulative true|false is a meter_power setting, named energy (kWh).
Some meters just count, others reset at midnight.
measure_power is a now value, it does not count up/down.

Please try this syntax:

"energy": {
    "cumulative": true
  }

But I have to check how the capability is changed. If I’m right, the capabilityOptions are set. This would mean, the cumulative option is not applied. This has to be done with a device method. I’ll check that later…

1 Like

God point, did now apply this:

	"meter_power.acc": {
		"capability": "meter_power",
		"stateTopic": "ams/meter/import/active/accumulated",
		"setTopic": "",
		"valueTemplate": "",
		"outputTemplate": "",
		"title": "Energy",
                 "cumulative": "true"
	},

But it don’t show up as smart meeter now either.