Announcement

Collapse
No announcement yet.

Adding received MQTT messages to HS Log

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

  • Adding received MQTT messages to HS Log

    I'm using mscMQTT to receive messages from a NodeMCU on my garage door controller, and have associated HS devices to some topics. But I can't figure out how to get the state changes of the devices to be added to the HS Log. What am I doing wrong here?


  • #2
    Your HS device 217 contains the state reported by NodeMCU. If you click on the 217 button on Association tab it will bring up the Edit tab for this device. The control/status UI that you want will be Button. The VSP entries below it should already be open and closed assuming these payloads have been received.

    When the next payload is received then mcsMQTT will update DeviceValue of device 217 to be 0 or 1 based upon the VSP mapping you have setup. The default is open = 1, closed=0. When device 217 changes then I would expect to see it in the HS log.

    You can use HS Device Management, advanced tab, to look at the actual value in this device.

    Comment


    • #3
      I have set it up as you have suggested, and it works very well. I can send MQTT messages on e.g. the state topic using the MQTTBox application, and observe the device changing between open and closed states in Device Management. However, I get no entries in the HomeSeer Log.

      Comment


      • #4
        The HS log is normally used to capture unusual events. I can provide an option to provide device-level information in the log, but it means that it could become pretty chatty. Why do you want this level of information in the HS log?

        Comment


        • #5
          Hmm.. You're the second person asking why I'm looking for the device state changes in the HS log. I'm not that experienced a HomeSeer user yet, so I wonder if I'm going about this the wrong way then. On a generic level, if you want to log and keep sensor data or control state changes, no matter if it's Z-Wave devices, 433 MHz devices, or devices sending MQTT messages, where is the best place to keep this data if not in the HS log?

          My actual problem in this case is that my garage door motor is not outputting door state values correctly (reporting that the door is open when it's not). Also, I'm having some problems with the NodeMCU connected to the garage door motor losing connection with the MQTT server. I wanted to see the history of NodeMCU connection changes and door state changes, each having their own separate HS Device. And I sort of expected finding this in the HS log, since all my Z-Wave devices are reporting data to the HS log out of the box on a regular interval.

          Comment


          • #6
            HST has elected to have their Zwave plugin report changes. Likely from a history of needing to debug the Zwave network and HST provides no other visualization facility beyond the log. When you use the log as a catch-all then it can be a struggle to mine data from the log.

            There are other plug-in or script that will provide the logging for device changes and they come with a UI to typically show them graphically.

            mcsMQTT contains this capability already with the intention to be used much like you indicate your need. It will also record other HS devices that can be used for later visualization. The History tab and the Chart tabs are the two mcsMQTT facilities that support this. For your specific need I suggest that on the General Tab you make the following settings:
            History Retention at perhaps 100 days. Pub-Sub Message History checkbox for either Retain history or Accepted subscribed message or Retain history of topics marked with H checkbox, depending upon how targeted you want to make the data retention. If you select the H checkbox option, then check the H column on row with device 217 on the Association tab.

            After you have collected some data then use the History tab to view it. Select the data range, the Inbound messages checkbox. Use Show Selected History button to populate the table.

            If you want to look at it graphically then use the Chart tab to view one or two devices at a time.

            The mcsMQTT manual has more details on use of History and Charts.

            The facility provided in mcsMQTT is intended to support the type of investigation that you are trying to accomplish. If you want something that is a more long-term display of data, such as the daily temperature over the past year or more than two lines on the same chart then other plug-in data collection/display is better suited.

            Comment

            Working...
            X