Announcement

Collapse
No announcement yet.

Plugin suddenly stopped processing incoming payloads

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

    Plugin suddenly stopped processing incoming payloads

    I've been using this plugin for a while and have started to become decently savvy with it.. I have a large number of devices that both send and receive topics..

    Recently, which I just noticed today, any new plugin-device I have created, will not process a received payload.


    Example:
    • I have a plugin device "OhmHour" which is subscribed to /Energy/OhmHour, and set also with the same publish topic, /Energy/OhmHour (see first screenshot below)
    • I have Node-Red setup with an MQTT subscribe node, set to /Energy/OhmHour. I have a MQTT publish node, setup to publish a "1" to /Energy/OhmHour for testing.
    I click the Node-Red button, which publishes "1" to /Energy/OhmHour.. This is confirmed, by the MQTT receive node, which then tells me mcsMQTT has set /Energy/OhmHour to "1" (see second screenshot). So I know mcsMQTT is both sending and receiving topics..

    Problem:

    The mcsMQTT plugin device is not receiving the published topic. See first screenshot below, you can see the payload field is just empty.

    This does not happen on older devices. I am able to publish, using the same type of flow/nodes in NodeRed, a numerical value to /Energy/ACPower, and mcsMQTT process it just fine.

    When using the HS4 device, created by mcsMQTT, I can publish a "1" just the same as I would in Node-Red.. The Node-Red MQTT subscribe node will receive the topic as well! So everything appears to be working with mcsMQTT except the fact that it is not placing a received topic into the device's payload field.

    I have tried restarting the plugin, as well as HS4 as a whole; and also deleting the device association, and recreating it from scratch. Again, all new plugin-devices have this issue.. All old ones, do not.. Looking at an old and a new, they appear to be configured identically, apart from the topic itself.

    Click image for larger version  Name:	1.png Views:	0 Size:	199.4 KB ID:	1413061


    Click image for larger version  Name:	2.png Views:	0 Size:	56.4 KB ID:	1413060

    #2
    I am not able to replicate this issue. I suggest the following:
    1. Confirm that the General tab, Inbound Subscription Management Topic Discovery row is set to "Discover All Published MQTT Topics". If not then definitely do #2.
    2. Update to version of mcsMQTT that matches my working source with is http://mcsSprinklers.com/mcsMQTT_5_5_1_5.zip. The only file that you need is mcsMQTT_2020.dll that goes in the \bin\mcsMQTT folder.
    3. Enable debug from General tab. Debug data will be placed in \data\mcsMQTT\mcsMQTT Debug.txt
    4. Clarify if issue is with Association tab payload column not being updated or HS device not being updated.

    Comment


      #3
      Never mind Michael McSharry , this is still broken.

      Steps to reproduce error:
      1. Go to plugin interface, Edit/Add, manually add new topic: Energy/OhmHour
      2. Set HS Device Publish Topic, to Energy/OhmHour
      3. Set HS Device Control Status/UI to Button
      4. Go to Devices page, turn OhmHour on, and off. Yay it works! HS device, and Associations tab payload column are both updated
      5. Go to HS Plugins -> Installed, turn off mcsMQTT
      6. Wait a few seconds, turn on mcsMQTT
      7. Go to Devices page, turn OhmHour on, and off. Breaks! Neither HS device, nor Associations tab payload column are updated.. However, MQTT client with subscription to Energy/OhmHour receives published payloads.

      Log file attached.
      Attached Files

      Comment


        #4
        I have the same problem as you described. Have you found a solution?

        Comment


          #5
          Originally posted by mgennip View Post
          I have the same problem as you described. Have you found a solution?
          I wouldn't say a solution, but a workaround at least yes.. I think the problem stems from having the publish and subscribe topic set the same..

          What I have done, and this may work with a "plugin device", but I created a virtual Homeseer device, and then associated that with mcsMQTT. Then I set a "control" subscribe topic, and a "status" publish topic which are different. This gives me a device in Homeseer I can control reliably with a event, or a click - which then publishes a status update on one topic reliably, and can be controlled via a slightly different topic also reliably. If you'd like I can post screenshots..

          Comment


            #6
            Using the same topic for publlish and subscribe is likely the issue. Why select the same topic for both? If mcsMQTT recognizes that Topic/xyz was received then it will update HS device. The updated HS device will result in an event callback from HS to mcsMQTT so mcsMQTT will publish. If the same publish topic is used the when mcsMQTT publishes Topic/xyz it will then receive Topic/xyz and the cycle starts over.

            The simple solution should be to never use the same publish topic as is being used to subscribe. Why are the same topics being used? Typically a Widget will expect a suffix or prefix added to the subscribe topic with something like cmnd, command or set to indicate that the message is intended to control the Widget. For example Light/Power topic may provide the status from a light bulb. To change the light bulb the topic Light/Power/set is used for the topic.

            Comment

            Working...
            X