Announcement

Collapse
No announcement yet.

Can I use MQTT to publish HS4 device changes, (without the use of events)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Can I use MQTT to publish HS4 device changes, (without the use of events)

    I am thinking of creating a Node Red dashboard for HS4. To start, I want to get a temperature devices value into Node Red. Ideally in real-time. I want to avoid using events. Ultimately there will be a lot of devices sending data and the running events every second or so causes my event engine to stop. So is there a way to have MQTT to publish device changes? I already use it to receive updates from my ring doorbell, and send topics to Node Red for Alexa TTS. I only beginner level knowledge

    #2
    This is implicit with mcsMQTT plugin.

    There are two types of HS devices managed by mcsMQTT. One is plugin devices that shows up as green background on the Association and Edit tabs. The other is non-plugin devices that show up as pink background. Hybrid devices show up as blue background. They are essentially non-plugin devices but have ability to be controlled via MQTT. Any HS device created by mcsMQTT will be green. Others will be pink or blue.

    If you want a device to report updates via MQTT using mcsMQTT then you provide a publish (pub) Topic to be used to publish status. This is done on the Association tab of the MQTT page or the Edit tab of same page.

    A default publish Topic is generated when a non-plugin device has been associated. Association is usually done from Association tab or MQTT page. Look at the checkboxes and filters at the top of the Association tab to select the subset of all items to be included in the Association table for viewing. The "a" column checkbox is used to association or un-associate a HS device from a MQTT topic.

    HS will generate a HSEvent callback to mcsMQTT whenever a HS device is set or changes. If an association has been made ("a" checkbox) and a publish topic (pub textbox) has been defined then mcsMQTT will publish the HS DeviceValue. It is also possible to publish the HS DeviceString or pretty much anything else based upon what the user enters on the publish payload template that is available on the Edit tab.

    There are many replacement variables and expressions are supported. This means you could publish a JSON payload or publish a payload in imperial units when HS maintains the data in metric units as well as many other variants. Look at Tables 2 and 3 in mcsMQTT.pdf for an itemization of capabilities in this area.

    Bottom line is:
    1. Start from MQTT Page, Association tab.
    2. Select checkboxes and pulldown filters to identify what you want to see in the Association table.
    3. From the Association table use the "a" column checkbox to select what HS status you want to be sent via MQTT protocol.
    4. Enter a pub textbox topic in Association table (or Edit tab). Note Edit page can be entered from the column 1 hyperlink or the Ref button on Association table.
    5. Update Edit tab publish payload template if special formatting is desired in the payload vs. just the DeviceValue.

    Comment


      #3
      That is very helpful, thank you

      Comment

      Working...
      X