Remi_J
March 31, 2021, 8:30am
870
Thanks @HarriedeGroot . It seems to work now (I had not checked for a few days and now running 3.1.9).
I still have some weird “Error publishing message” log messages but the data seem to be transmitted to my mqtt broker.
I don’t know if it is new, but I found that, when adding a new device, broadcast does not send the current value of the data items. It is only updated the first time the data changes and it can take a long time (for a plug for example, if you never switch it on/off, you don’t know the state)
@Remi_J the ‘error publishing message’ should be solved in the test version of the MQTT Client (v2.4.2).
Remi_J
March 31, 2021, 8:38am
872
@HarriedeGroot , MQTT Client V2.4.2 does not seem to update automaticaly like the other apps How can I try it ?
@Remi_J Don’t forget to update your app review
xAPPO
March 31, 2021, 10:13am
876
HarriedeGroot:
Version 3.1.7
Skip messages not meant for the HUB
Might this have any impact on homie discovery into Homey - or indeed HA MQTT Discovery into Homey ?
I haven’t actually tried homie into Homey but will do soon as my Hubitat MQTT app publishes using that format. The homie spec is a little vague in describing device $types.
Kevin
@xAPPO No this should’t influence any of the named processes. It’s changed at the level of detecting /set messages on homie device topics.
1 Like
@scanno When do you expect to release v2.4.2 of the MQTT Client app (current test version)?
I get many complaints about the ‘Error publishing message’ issue, which is solved in the latest version of the client:
scanno
April 2, 2021, 4:39pm
879
Ah forgot about that. Bit busy
Submitted for approval.
scanno
April 2, 2021, 4:43pm
880
Hehe… yeah people tend to down vote when there is a problem and never change the review.
Very motivating to improve your apps.
scanno
April 2, 2021, 5:03pm
882
That was fast… already live
I’ve sent you a diagnostics report.
When enabling mqtt hub after a while my homey crashes or better any app trying to get devices can’t anymore. (Homeykit, Heimdall,…)
I am on v6 rc4 ( my fault )
Could also be a homey thing
@Pieterv123 Most likely the Homey v6 RC4 indeed. Saw some simular reports on Slack.
Yeah that was my report.
I will monitor it, keeping mqtt hub disabled fixes the issue for now
Pushed a new version of the MQTT Hub to the test channel .
Version 3.2.0
Unsubscribe from topics to free unused resources
Homie Discovery: skip unknown devices
NOTE : The test version of the MQTT Client is needed for the unsubscription api
:
For changes of the MQTT Client, see:
scanno:beta
← harriedegroot:feature/topic-subscription
opened 10:04PM - 11 Apr 21 UTC
1. **Made some improvements to the topic registrations (api vs trigger)**
2. **… Fixed handling of retained messages**
3. **Prevent losing api connections**
4. **Addressed the bug of randomly disabled flows**
5. **Added unsubscribe api**
6. **Introduced a TriggerQueue to handle the rate limiting of flow card triggers and prevent disabling of flows**
7. **Added broker online/offline flow card triggers**
8. **Added flow card action to send an empty message to be able to remove retained messages from the broker**
9. **Introduced TopicsRegistry to register topics by reference (e.g. app id), this reference can be used with the unsubscribe api**
10. **Performance improvements**
11. **General bug fixes**
**Commit 1**
Topic registration:
- always subscribe to the broker to return retained messages on subscription
- re-subscribe to all previously registered topics on connection of the broker/mqtt-client (keep topic registry alive)
- made some calls async and actually wait for the result before continuing + fixed some async handling of promises
- extended the TopicArray with seperate methods for api & trigger topics
**Commit 2**
- prevent topic unsubscription if its used by another registration (api vs trigger)
**Commit 3**
Flow card triggers:
- prevent destruction of the full topics array, causing all api connections being lost
- subscribe to all flow card trigger topics on initialisation
- on trigger card change (flow card config): unsubscribe from removed topics & subscribe to newly added topics
- await the Homey trigger call
- check for api topic match before forwarding the message to the realtime api
**Commit 4**
pre-check to prevent uneccesairy calls to the Homey trigger system
prevents disabling of random flows not even listening to these topics (Homey BUG?)...
this is also a performance boost, since the Homey trigger system won't be called for all api topics
the small downside is the duplicate topic matching, if there is a match on a trigger topic
**Commit 5**
(added missing file 'Trigger.js' for commit 3
**Commit 6**
On change of app settings:
- prevent destruction of the full topicsArray resulting in lost api connections
- re-connect to the broker to trigger subscription of all registered topics (instead of the trigger topics only)
- await topic unsubscription before setting up the new client
**Commit 7**
added unsubscribe api
**Commit 8**
Introduced a TriggerQueue to handle the rate limiting of flow card triggers and prevent disabling of flows
**Commit 9**
Added broker online/offline flow card triggers
**Commit 10**
Added flow card action to send an empty message to be able to remove retained messages from the broker
**Commit 11**
Introduced a TopicsRegistry to register topics by reference (e.g. app id). The unsubscribe api can only be called for topics with the reference provided during topic subscription. This prevents unsubscription of topics used by other apps/processes.
Also optimized the topic matching by using a topic map (instead of array lookup).
**Commit 12**
- Remove messages from the trigger queue when a topic is unsubscribed
- Added failsafe for the TriggerQueue size. Allow homey to disable the flow (by rate limiting) if the number of messages in the trigger queue exceeds the max allowed number of messages.
- Correctly handle topic subscriptions after flow card triger changes.
- updated the README with examples of usage of the reference and unsubscribing of topics
**Commit 13**
- merged api changes from commit: https://github.com/scanno/nl.scanno.mqtt/commit/02c3f0f816dd70475ebe2d848cd5012fb5034f2b
- added response to unsubscribe api
- version bump to 3.x
After the update the topics were published without any properties. Couldn’t get the setup up working by restarting the individual MQTT apps. Homey reboot (V6.0) made it all running again. No any deviations in the log files.
Thanks again for all your commitment and effort!
Since the latest updates MQTT works great here,
Thx developers!
Has anyone made some progress regarding the color temperature of Ikea tunable bulbs?
Same problem here: on/off and dimming work great and a color temperature slider is shown. But when color temperature is changed in HA, nothing happens in Homey and when changed from Homey, the HA entity doesn’t get updated too…
MQTT Client v3.0.0 & MQTT Hub v3.2.0 are both published to live.