Announcement

Collapse
No announcement yet.

Nooby to MQTT seeking help getting status to HS

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

    Nooby to MQTT seeking help getting status to HS

    I am new to MQTT, please be gentle with me :-)
    I have a Cytech Comfort alarm. I have a Python script which reads and writes to the alarm and publishes/receives from MQTT. I have that working (well, from the alarm to MQTT, I haven't tried the other way yet).
    I am running HS4.
    I have installed this plugin and have the relevant Devices created in HS. Simple things like doors opening and shutting are working fine with the status and changes (open/close) appearing in HS in real time.
    The bit I'm struggling with is the alarm 'status'. There are 5 states; disarmed, pending, armed_night, armed_home and armed_away.
    These appear in the HS device VSP List in the plugin but they do not appear in the HS device Satus/graphics page.
    When the alarm state changes I see the change in the MQtt broker, on the plugin association table and the status changes under advanced information in the HS device.
    However the value remains at 0.
    What I want to be able to do is trigger events on status change but I can't see how to capture that if the vlaue doesn't change.
    Any suggestions gratefully recieved.
    Cheers


    #2
    On mcsMQTT Edit tab, the Control/Status UI row should have Button or List selected to have VSP setup in HS. mcsMQTT tries to select the best Control/Status UI based upon the first payload it receives so things like open and on will be treated as Button, but something like armed_night will likley be seen as text.

    Button creates a set of buttons in HS. List creates a pulldown selector.

    If you have further issue it may be helpful to know if you are running HS3 or HS4 versions of mcsMQTT.

    Comment


      #3
      Thanks for the speedy reply. I am using the HS4 version 5.5.2.0.

      I 'ticked' the button option in Settings for Plugin Device but I don't see anything in the HS device. Do I need to do anything to 'repopulate' the HS device with the new setting?

      Comment


        #4
        Has an MQTT message on this topic been sent since you made the change? After than, and if still an issue look at HS Devices / Advanced to confirm that DeviceString is blank. What you expect to see if the DeviceValue set to the VSP mapping that was on the VSP of the Edit tab.

        Comment


          #5
          I've made a couple of changes to the alarm and they have appeared as messages in the broker, and I see that change.
          The String under 'Advanced is showing the message from the broker.
          The Device Type (String) is blank.
          The Device value remains 0
          I must be missing something!

          Comment


            #6
            It looks to me as if the Control/Status UI is not being treated as a List or Button. I think the DeviceString is changed to a blank when the Control/Status UI changes from Text. The String containing the payload indicates a Text type. Can you post the Edit tab setup screenshot for this device?

            Comment


              #7
              Click image for larger version

Name:	Edit tab.PNG
Views:	117
Size:	217.0 KB
ID:	1422614
              Attached Files

              Comment


                #8
                There is a Store Payload row about 1/3 down from the top. Change the radio from String to Value. This feature was added later and I overlooked automatically changing it when the Control/Status UI was changed.

                You may also need to manually store a blank in DeviceString so Status will reflect the VSP value. I do this with one-line script.

                Comment


                  #9
                  I have domesticity to attend to! I'll get back to this in the morning.
                  Thanks again for your assistance.

                  Comment


                    #10
                    I changed the Store Payload value as you suggest;
                    Click image for larger version  Name:	StorePayload.PNG Views:	0 Size:	38.7 KB ID:	1422802
                    Now I'm not seeing the state in the device list, previously it showed here;
                    Click image for larger version  Name:	Alarm1.PNG Views:	0 Size:	27.9 KB ID:	1422804

                    And nothing in the device detail;
                    Click image for larger version  Name:	Alarm2.PNG Views:	0 Size:	213.3 KB ID:	1422805
                    I see nothing in String - Click image for larger version  Name:	Alarm3.PNG Views:	0 Size:	398.2 KB ID:	1422807
                    do I need to do anything with that?

                    Comment


                      #11
                      String blank is what you want. I have three solutions that should work for you. Two are workaround using the plugin version you have. The other is the solution.

                      Workarounds on Edit Tab
                      #1 Change Button to List
                      #2 Click No Graphic Display on Misc Row

                      Solution use version 5.5.3.4 which is at http://mcsSprinklers.com/HSPI_mcsMQTT_5_5_3_4.zip. To Update:
                      One approach is to extract MCSMQTTHS4_2020.dll into \bin\mcsMQTT. This will fix the problem but not update the version number
                      To update version number also extract HSPI_MCSMQTT.exe into root HS folder.
                      Another approach is to use updater to install entire package. To do this extract updater_override.json into the HS root folder. Copy the zip file into the HS root folder. From Browser Plugins menu, Add. Only HS4 plugin listed will be mcsMQTT. Click on it. When done remove updater_override.json from HS folder to restore normal Updater operation. You can also delete the zip from HS folder.

                      The issue was introduced when the default Misc setting was changed to show graphics in the version that you now running.

                      Comment


                        #12
                        Thank you. I'll have a go with this tomorrow.
                        See below :-)

                        Comment


                          #13
                          I decided to install this evening. I used the updater and now have version 5.5.3.4 installed.
                          Unfortunately, there is no change.
                          I armed and disarmed the system to get some messages;

                          Click image for larger version

Name:	Messages.PNG
Views:	137
Size:	24.7 KB
ID:	1422916
                          And restarted HS but I'm still not getting anything in the status page;

                          Click image for larger version

Name:	Alarm device.PNG
Views:	127
Size:	143.5 KB
ID:	1422917

                          Comment


                            #14
                            There are no VSP entries being created in HS4. It looks like there was some error raised that prevented the device setup. Anything in the HS log about it?

                            Next step is probably the debug which is enabled from the top of the General Tab of mcsMQTT. The collected data goes in \data\mcsMQTT\mcsMQTT Debug.txt. Either post it or email to mcsSolutions at CenturyTel dot net.

                            For the test toggle the Control/Status UI to Text and then to Button or List. Cause MQTT message about the alarm state.

                            Comment


                              #15
                              I followed your instructions for debug - and all the functions have now appeared in the device!
                              I don't know what worked - but I am now a 'happy chappy'.
                              Thank you again for your help.

                              Click image for larger version

Name:	Alarm.PNG
Views:	118
Size:	238.4 KB
ID:	1423110

                              Comment

                              Working...
                              X