No announcement yet.

mcsMQTT Plugin

This is a sticky topic.
  • Filter
  • Time
  • Show
Clear All
new posts

    Yes, Zwave can be controlled directly via MQTT and the mcsMQTT. Other users have confirmed that mcsMQTT preforms the correct CAPI control. If you happen to have an odd-ball Zwave then we can work through it with debug.

    The "R" column on the Association tab is intended to perform the hiding function that you would like. There is also a "Show Rejected" checkbox at the top of that tab to make the rejected ones visible again should you change your mind later.

    I see your example of three topics as normal mcsMQTT mapping to HS devices. I am not fully understanding your intent. If you want the combination these three messages to cause some other action then this is a basic HS "AND" Event where the three topics have been captured in HS devices by mcsMQTT.


      Originally posted by jheavner View Post
      No offense, but you are suggesting I do exactly what I don't want to do. I don't want to read about the trials and tribulations of Lewis & Clark before I visit California; I just want to visit California. I understand that history and context are useful to some people but I'm not one of those people. Different people learn in different ways. I'm aware of the other plugin and I'm decently handy with MQTT and node-red already.

      Likewise here,

      I have a bad habit of wanting to stick my hands into things before I read manuals!
      Maybe you are not alone after all!

      But I would also would like to notify you that the authors of free plugins reserve the right not to be apologetic, answer questions especially on demand but if you can wait because they owe us nothing.
      But we owe them gratitude!

      I would also like to hereby clarify we all have somewhere we started but not mention the mcsMQTT manual has changed a lot because the author (Michael) incorporated most of our rambling (WHAT IFs) and then some =====> Need I say more ?===> Go here :

      When you look at Pete's posts, most of the things he asks for are added in a day or two.

      You must also note that there are some unsung heroes (Pete *****) who take their time to answer questions just for the love of helping!

      When I answer a question I try use a set of skills (Interpersonal Skills) a previous employer trained me in. I know when to loose a fight therefore am never bitter


      TinkerLand : Life's Choices,"No One Size Fits All"


        Hi Michael,
        Can you help me troubleshoot this.
        I have added my Sonoff S20 with Tasmota as a device in the Association tab and entered the Publish topic to turn on/off power. The device seems to have been created correctly with control buttons. When I click the OFF button (for example) the History tab shows the Publish message that was sent and the HS3 log shows the device being set to OFF by CAPI Control Handler. But the message does not reach the MQTT Broker. I have tested sending the same Publish message to the Broker from a separate client and the Sonoff responds appropriately. Not sure why the Publish message is not getting to the Broker. Btw, the status messages are received by the Plug In and the device shows the status correctly in Device Management. I'm attaching the DB and debug files as well as screenshots below. Thanks for your help:

        Attached Files


          Sorry about your time investigating. It turns out I had commented out a block of code and the actual publish was in that block. in the updater should take care of it.


            Thanks. That fixed it. No worries about the time. I learn better when I troubleshoot . So, time well spent


              I guess I am having a similar problem. I don't know what I am doing wrong.
              I am trying to publish a message when a device changes, but the plugin never seems to publish the message. I have put it in an event, and it will publish the payload when I run the event, but if I just stop or start the device nothing happens.
              This is what I have done: attached images
              Basically, added an existing device and filled in the topic to be published.
              I simply want to publish the value - 0 or 1

              Attached Files


                I am not following about putting it an an event. What are you doing to have the Status of device 548 change? If you enable debug then mcsMQTT will write to the debug file \Data\mcsMQTT\mcsMQTT_Debug.txt when it sees any device change and that will provide visibility into if/when you change 548.


                  Thanks for the reply.
                  Sorry I was not clear. Device 548 is a Z-Wave plugin module (on/off - like for a lamp.

                  Log: May-12 7:33:53 PM Z-Wave Device: HVAC Garage Water recirculate pump Set to 1
                  May-12 7:33:53 PM Device Control Device: HVAC Garage Water recirculate pump to Running (1) by/from: CAPI Control Handler

                  I created an event, where I turn on the water pump and then send a mqtt message, which works.

                  I don't see any entry in the debug log where when the z-wave device is toggled, that a message is sent.
                  I have attached the debug log
                  Thanks for taking the time to look at this
                  Attached Files


                    You are correct that there is nothing in the debug log related to device 548. What should happen is an HSEvent call to mcsMQTT should be made by HS when the Zwave device changes to "Running". mcsMQTT will then recognize that this device has a publish topic and will then publish it via MQTT.

                    I expected to see other HSEvent calls where HS informs mcsMQTT that a device has changed. These also were not in the debug. I added debug to that records mcsMQTT registering for the HSEvent callback.

                    I believe you have double-booked the water_recirculate/led/power publication. If you setup the publish topic on the Association or Edit tabs then the publish will occur based upon the HS device changing. You also have this publish setup as an event Action. I would expect the message to be published twice. We still need to figure out why HSEvent callbacks are not occurring.


                      Attached is a short guide on flashing the Sonoff S20 with Tasmota SonOTA and integrating it with HS3 using the mcsMQTT plugin.
                      Attached Files


                        Thanks again for looking at this.
                        I didn't think I double entered this, as you can see from my screen shots, I only checked the "A" column on the one I added from the Edit screen (First image- first post). The image at the bottom is the payload received by mcsMQTT from either the event firing or from my testing with the mqtt broker and sending this topic. The "A" isn't checked. I tried that several different ways - checking one, the other, both, and unchecking them. I actually lost the device from Homeseer at one point, and had to exclude and re-include the device. (Before I upgraded to the latest version.)
                        Anything other information I can give you? I am using the Raspberry pi Version of Homeseer - the Hometroller Zee



                          The top screen shot pink row shows HS Device having an MQTT publish topic of "water_recirculate/led/power"
                          The later screen shot event first THEN action is to change that status of 548 to "Running". Because of the setup on the pink row this will publish "water_recirculate/led/power"
                          The second THEN is to publish publish "water_recirculate/led/power" sos this will be a duplicate of what was just published.
                          If these two screen shots are not correlated and just showing two way that you tried then you can ignore my duplicate analysis.
                          The debug I added to will show when mcsMQTT is requesting HSEvent callbacks from HS. That is the first thing I want to understand. The debug will be in the mcsMQTT_Debug.txt file.
                          It seems you are saying that the Event publish of "water_recirculate/led/power" worked. Please confirm. If not then it is something else to investigate.
                          If the debug you previously posted is for a setup where device 548 does not exist and no other publish topic has been defined then that explains why no HSEvent callbacks are being generated. I just need a consistent set of data to do a good analysis.


                            Taylormia, your guide is excellent. I would like to post it at the top with the manual if that is OK with you. It is too easy to miss so deep in this thread.


                              Go right ahead Michael. Thanks for the awesome plugin!


                                Thanks for your time, I really appreciate your help.
                                Sorry I have not explained it well. I will try to give you more info.

                                I have a pump, which I can control by zwave - device 548. Works fine, I can control it from
                                any zwave controller (Homeseer). It is in the garage where I can't see or hear it to know if it
                                is on or off. I set up several LEDs in the house, which I have turn on when the pump turns on.
                                To do this, I am using mqtt, with the payload of water_recirculate/led/power - 0 or 1. This works fine
                                from the mqtt broker sending the payload.
                                I want mcsMQTT to send the payload when device 548 is toggled. I could do this with an earlier version of
                                mcsMQTT. When I upgraded, this had to be set up differently. I added the existing device to send the payload on the Edit page (top screenshot). I tried, but nothing in the debug file or on the statistics page, and no change with the LED. Since this didn't work, I then tried by adding the line to send the payload from my existing events that control the pump device (event screenshot). This works. (see log entries) That is good and gives me alot of the functionality I desire, but there are times when the pump is turned on and off manually, and the LED is not updated to the current state of the pump.
                                I think it has to do with how I manually set up the device on the Edit page, but not sure.
                                Again, I see the topic on the association page (bottom screenshot), but I did not accept that as I don't need control of the zwave device. I see the payload updated only when the event is run or I send the topic with the mqtt broker.
                                I have attached the debug file, where I turn on and off the device on the device management page, and then manually start the event. I have also copied entrys from the homeseer log.

                                Hopes this gives you more information.

                                Thanks again,
                                Log entries:
                                Homeseer log:

                                Earliest entries: Toggling zwave device 548 from device management page - on, off, on
                                no mqtt message sent

                                Later entries: Manually running events - turn off, turn on
                                mqtt message sent
                                toggling on the device management page
                                Device Management page:
                                May-13 7:53:23 AM Z-Wave Device: HVAC Garage Water recirculate pump Set to 1
                                May-13 7:53:23 AM Device Control Device: HVAC Garage Water recirculate pump to Running (1) by/from: CAPI Control Handler
                                May-13 7:53:00 AM Z-Wave Device: HVAC Garage Water recirculate pump Set to 0
                                May-13 7:53:00 AM Device Control Device: HVAC Garage Water recirculate pump to Off (0) by/from: CAPI Control Handler
                                May-13 7:52:05 AM Z-Wave Device: HVAC Garage Water recirculate pump Set to 1
                                May-13 7:52:05 AM Device Control Device: HVAC Garage Water recirculate pump to Running (1) by/from: CAPI Control Handler

                                Running the event manually:
                                Running Event:
                                May-13 7:54:22 AM Z-Wave Device: HVAC Garage Water recirculate pump Set to 1
                                May-13 7:54:22 AM Device Control Device: HVAC Garage Water recirculate pump to Running (1)
                                May-13 7:54:22 AM Event Event Trigger "HVAC Hot Water Recirculate - Daily On"
                                May-13 7:54:22 AM Event Event HVAC Hot Water Recirculate - Daily On triggered by the event page 'Run' button.
                                May-13 7:53:53 AM Z-Wave Device: HVAC Garage Water recirculate pump Set to 0
                                May-13 7:53:53 AM Device Control Device: HVAC Garage Water recirculate pump to Off (0)
                                May-13 7:53:53 AM Event Event Trigger "HVAC Hot Water Recirculate - Daily AM Off"
                                May-13 7:53:53 AM Event Event HVAC Hot Water Recirculate - Daily AM Off triggered by the event page 'Run' button.

                                mcsMQTT debug entries at the same time:
                                mcsMQTT debug:
                                5/13/2018 7:53:53 AM 54848525 | ActoOnMessageFor Trigger Topic water_recirculate/led/power,Payload=0
                                5/13/2018 7:54:22 AM 54877654 | ActoOnMessageFor Trigger Topic water_recirculate/led/power,Payload=1
                                5/13/2018 8:00:01 AM 55216705 | ActoOnMessageFor Trigger Topic water_recirculate/led/power,Payload=0
                                no other entries
                                Attached Files