Hubitat MyQTTHub


#1

Im using https://github.com/parasaurolophus/hubitat-mqtt-connection drivers to create a MQTT connection with my MyQTThub broker, i can create a connect and also create a rule in Hubitat to check connection that works, but can’t send/received mqtt messages through topic and payload,i can see an errors from the error tab in MyQTTHub connection replaced by connection from RemoteAddr, when click disconnect and then connect from the connection driver. Have tried to send message from Node Red with no joy. Any help much appreciated Mark


#2

Hello,

I can confirm you are connecting right and sending messages as expected (problem is not there).

I think the problem is the connection replace flag that should only be used by sending devices
(“producers”) and that there’s no matching subscription for tests you are sending.

You can see how test messages Home/Test get it (by clicking at your “Last Msgs” tab)
but they are not forwarded to your NodeRed, right?

In that case, make sure:

  1. Your NodeRed (consumer) do not use SkipConnectionReplace to avoid creating
    virtual devices any time you connect where subscription to these tests messages should be sent
    but because your NodeRed is not always connected, that subscription remains to that virtual
    device and hence they are unreachable.

  2. And make NodeRed to subscribe to testing messages you are sending (Home/Test). Otherwise
    you will not received them. You can check what’s currently subscribed by your NodeRed by clicking
    at “Show subscriptions” button at user form that represent your NodeRed. There, we see no subscription
    matching tests you are sending.

So in short, make your “sending” devices (producers) to remain the same (they can use SkipConnectionReplace)
but, for anything that is a consumer device (NodeRed), try to use an unique clientId device especific
and independant for each for these “consumer” devices to make sure any subscritpion and/or operation
done before connection and during connection, affects to the same entity…

…and also watch your “consumers” subscribes to the topic that are going to be produced by
your “producers” (sending device).

Inside the following article, there is a reference to this conncept inside “Notes about disabling connection replace”:

Please check these details and let’s see if it solves your issue.
Best Regards.