[APP][Pro] MQTT Hub - Community version

New test version 4.2.0:

  • Added flow trigger for memory/CPU warnings.
  • Added setting to choose a capability naming variant (old: device name + capability name; new: capability name) to get compatible with HomeAssistant discovery since version 2023.8
  • Added restart flow action and restart button in app settings view. This restarts the whole Hub including device registry, HA discovery and device/state broadcast. You can now use this flow to update HA discovery after Homey restart. An app restart is not needed.
  • Changed settings view: Instead of saving settings and starting a broadcast for every change (checkboxes, input fields), there is a new “Save settings” button now to save settings and restart the Hub (to broadcast all states incl. HA discovery and device registry). Some settings needed an app restart before to take effect which should not happen now with a complete sync after saving settings.

The app flow action:
grafik

Settings view.

  • Broadcast button with light blue progress bar.
  • New button “Restart Hub”
  • New button “Save settings”

@L_Gru : FYI, The capability name can now be changed to capability name only.

5 Likes

Hi Ronny,

Thanks for the major improvements!

(Pro 2019)

I’ve tried all kinds of settings and made many comparisons, but devices still appear with double device names in HA, regardless of having selected “Capability name” to Capability name or to Device name - Capability name

Homey

A test device


MQTT Hub

Log snippet:

Settings:

HA

I only tested Homie device, not custom. Perhaps there is a second place where the Name is generated.

It crossed my mind, but I’ve no clue how different ‘homie’ is from my custom settings.
All I know, I only use these custom settings because with the default ‘homie’ setting, Homey devices were unresponsive when operated using HA.

I’ll go experiment with the ‘homie’ setting.

Is HA discovery active?

Yes.
These were the settings, Ronny:

Today I changed the custom settings to ‘homie convention’,
Then I disabed and re-enabled some devices, and enabled some never enabled devices in MQTT Hub, but the device names still appear twice in HA

Example of a never published device:

_
@ the HA MQTT integration, what MQTT protocol do you use, Ronny?
I use 5.
Just now I tried 3.1.1, but most, or all device entities didn’t appear?

New test version 4.2.1:

  • Fixed capability name setting for HA discovery. It was added for Homie device export in last version. Now it’s added for HA discovery, too.
  • Fixed HA discovery restart on settings saved/hub restart.

@Peter_Kawa FYI: thanks for the hint and examples

1 Like

New test version 4.2.2:

  • Fixes a bug on app restart (settings/flow) where a MQTT topic “undefined” is created.
    If you have such a topic, you can remove it with MqttExplorer 4.x. With version 4.x you can remove more than 50 topics at once (the limit of MqttExporer 3.x).
    This issue should only appear if you have restarted the Hub from settings/flow or saved settings (wich also restarts).
3 Likes

Version 4.2.2 is now live with including changes since 4.1.4

3 Likes

Is there anyway to update the old version to the community version?

If I delete the old one and install the new one I guess that I loose all devices in HA which I paired via the old MQTT hub, so a lot of dead devices in HA is this correct?

A simple update is not possible. The app has a new ID and you have to install it again. Please deactivate the old app before installing The new one.

The HA enties won’t chang. The entity name is built using the Homey device title.
You only have to ‘screenshot’ app settings to set then again.
Only devices you can loose are Mqtt devices created for this app. But for them you also can save device settings (JSON).

Hi, awesome App, thanks for that!
I’ve created a mqtt device. Is there a way to change the unit for energy?
In addition to kWh, I also need Wh for energy.

Possibly it’s a Homey default unit, presenting energy values as kWh

That would be sad, my mqtt device sends one value in Wh :frowning:

Go to device settings and add a value template: "value*1000" :wink:

1 Like

I was hoping there was such a simple solution, thx :heart:

1 Like

Bug seems to be fixed now @ Pro23 RC firmware

1 Like

There’s not too much documented about the virtual device feature of MQTT Hub («Advanced» field under settings). Though it’s very easy to use I still have 4 questions:

  1. Are there really not any other «capabilities» than the «speaker_» media fields for text? The «musical note» tab selector and non-existant album art feels awkward and unnecessary for other kinds of strings. I know I could rather use the AVD/Device Capabilities app for this but I really like the simplicity of a virtual device that directly subscribes and publishes to my existing MQTT broker.

  2. Is there any way to change the list items of an «enumerated» list capability like how the Homey API (and AVD) allows when choosing to add such a capability?

  3. How can I activate or toggle one of several stateful button capabilities on the same device from a flow? The generic flow card for giving any capability a new value either doesn’t seem to reach eg. «button.2» etc., or «true» and «1» don’t work as values.

  4. Also, when manually activating one of several such similar stateful buttons in the UI of one device I get an error about «missing capability listener». Probably because I use a dot separator in the IDs of the buttons (as per Homey SDK) ? Is this a bug?

EDIT: No. 4 seems to have got fixed by restarting the app, and/or possibly by using numerical labels instead of letters after the dot(?).

Hi,

I thought it is time for an update of my “MQTT Hub”.
Currently I am using the “official” Version 3.5.5

  1. Can I simply install you version?
  2. Do they exist side by side, meaning I have to remove the old version?
  3. Is there a way to go back to the old version, if something doesn’t work as excepted?
  4. Will the device be published under the same name?

Thank you! :slight_smile:

EDIT: already answered above :slight_smile: