Announcement

Collapse
No announcement yet.

Different Buttons = different payload, want to display payload

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

    #16
    Hello,

    I cleared the <<..>> code and retested SetA, SetB

    20/06/2020 21:31:43 88335356 | MessageSourceExists SELECT count(Source) as extant FROM MQTT_MESSAGE WHERE (Source='home/pi24/test/status')=1
    20/06/2020 21:31:43 88335363 | UpdateRecord UPDATE MQTT_MESSAGE SET Source='home/pi24/test/status',Topic='home/pi24/test/command',Payload='Started',Template='',Pattern='',Replace='' ,Match='0',LastDate='2020-06-19 22:05:19',Reject=0,Express=0,Elevate=0,ElevateKeys='',URIEnc ode=0,Accept=1,RetainFlag=0,PluginDevice=1,Subscribe=1,Chart =0,History=0,StorePayload=1,Ref=1546,ChangeType=1,Misc=256,Q OS=0,StatusType=1,Broker=0 WHERE (Source='home/pi24/test/status'), result=1, Key=Source
    20/06/2020 21:31:44 88336649 | ActoOnMessageForTrigger Topic home/shed/status,Payload=Ready, Triggers=0
    20/06/2020 21:31:46 88339031 | ActoOnMessageForTrigger Topic home/shed/status,Payload=Ready, Triggers=0
    20/06/2020 21:31:47 88339422 | HSEvent VALUE_CHANGE| 1024| C55E86C6-010-Q62| 200.4| 200.9| 1408
    20/06/2020 21:31:47 88339551 | MessageSourceExists SELECT count(Source) as extant FROM MQTT_MESSAGE WHERE (Source='home/pi24/test/status')=1
    20/06/2020 21:31:47 88339557 | UpdateRecord UPDATE MQTT_MESSAGE SET Source='home/pi24/test/status',Topic='home/pi24/test/command',Payload='Started',Template='',Pattern='',Replace='' ,Match='0',LastDate='2020-06-19 22:05:19',Reject=0,Express=0,Elevate=0,ElevateKeys='',URIEnc ode=0,Accept=1,RetainFlag=0,PluginDevice=1,Subscribe=1,Chart =0,History=0,StorePayload=1,Ref=1546,ChangeType=1,Misc=256,Q OS=0,StatusType=1,Broker=0 WHERE (Source='home/pi24/test/status'), result=1, Key=Source
    20/06/2020 21:31:47 88339607 | HSEvent VALUE_CHANGE| 1024| C55E86C6-050-Q3| 99.5| 94.9| 1197
    20/06/2020 21:31:49 88341424 | ActoOnMessageForTrigger Topic home/shed/status,Payload=Ready, Triggers=0
    20/06/2020 21:31:51 88343819 | ActoOnMessageForTrigger Topic home/shed/status,Payload=Ready, Triggers=0
    20/06/2020 21:31:52 88344446 | HSEvent VALUE_CHANGE| 1024| C55E86C6-010-Q62| 201.1| 200.4| 1408
    20/06/2020 21:31:53 88345272 | HSEvent VALUE_CHANGE| 1024| C55E86C6-053-Q16| 43.3| 37.4| 1330
    20/06/2020 21:31:53 88346214 | ActoOnMessageForTrigger Topic home/shed/status,Payload=Ready, Triggers=0
    20/06/2020 21:31:56 88348603 | ActoOnMessageForTrigger Topic home/shed/status,Payload=Ready, Triggers=0
    20/06/2020 21:31:57 88349403 | HSEvent VALUE_CHANGE| 1024| C55E86C6-010-Q62| 200.3| 201.1| 1408
    20/06/2020 21:31:59 88351277 | ActoOnMessageForTrigger Topic home/shed/status,Payload=Ready, Triggers=0
    20/06/2020 21:31:59 88351489 | SetIOMulti 1546, oCAPI.ControlType=Button, MQTTReceiveRefDictionary.Contains=True
    20/06/2020 21:32:01 88353604 | HSEvent VALUE_CHANGE| 1024| C55E86C6-050-Q3| 101| 99.5| 1197
    20/06/2020 21:32:01 88353670 | ActoOnMessageForTrigger Topic home/shed/status,Payload=Ready, Triggers=0
    20/06/2020 21:32:02 88355228 | SetIOMulti 1546, oCAPI.ControlType=Button, MQTTReceiveRefDictionary.Contains=True
    20/06/2020 21:32:03 88356052 | ActoOnMessageForTrigger Topic home/shed/status,Payload=Ready, Triggers=0
    20/06/2020 21:32:06 88358476 | ActoOnMessageForTrigger Topic home/shed/status,Payload=Ready, Triggers=0

    Comment


      #17
      This shows that the command is being received from HS, but without a line "CommandControlableDevice" it shows it did not make it to this subsequent point in the logic. What I did with the attached is added "Trace" markers at most branches in the logic between these two points. Unzip the attached into the \bin\mcsMQTT folder. Assure debug is set. Repeat the test. Post the debug lines as you did above.
      Attached Files

      Comment


        #18
        Cool, will do tomorrow, getting a bit late here, and I certainly do need my beauty sleep ;-)

        Comment


          #19
          Hello,

          Here is the output after pressing buttons SetA and SetB

          21/06/2020 09:37:10 81950 | ActoOnMessageForTrigger Topic home/shed/status,Payload=Ready, Triggers=0
          21/06/2020 09:37:10 81976 | SetIOMulti 1546, oCAPI.ControlType=Button, MQTTReceiveRefDictionary.Contains=True
          21/06/2020 09:37:10 81976 | SetIOMulti Trace 0
          21/06/2020 09:37:10 81976 | SetIOMulti Trace 1
          21/06/2020 09:37:10 81976 | SetIOMulti Trace 2
          21/06/2020 09:37:10 81976 | SetIOMulti Trace 3 Value=SetA
          21/06/2020 09:37:10 81976 | SetIOMulti Trace 4
          21/06/2020 09:37:10 81977 | SetIOMulti Trace 5
          21/06/2020 09:37:10 81993 | SetIOMulti Trace 6
          21/06/2020 09:37:10 81994 | SetIOMulti Trace 7
          21/06/2020 09:37:12 83664 | HSEvent VALUE_CHANGE| 1024| C55E86C6-010-Q62| 317.5| 317.3| 1408
          21/06/2020 09:37:12 84110 | SetIOMulti 1546, oCAPI.ControlType=Button, MQTTReceiveRefDictionary.Contains=True
          21/06/2020 09:37:12 84110 | SetIOMulti Trace 0
          21/06/2020 09:37:12 84110 | SetIOMulti Trace 1
          21/06/2020 09:37:12 84110 | SetIOMulti Trace 2
          21/06/2020 09:37:12 84110 | SetIOMulti Trace 3 Value=SetB
          21/06/2020 09:37:12 84110 | SetIOMulti Trace 4
          21/06/2020 09:37:12 84111 | SetIOMulti Trace 5
          21/06/2020 09:37:12 84111 | SetIOMulti Trace 6
          21/06/2020 09:37:12 84111 | SetIOMulti Trace 7
          21/06/2020 09:37:12 84323 | ActoOnMessageForTrigger Topic home/shed/status,Payload=Ready, Triggers=

          Comment


            #20
            It is treating it as a WLED Segment to be controlled. WLED Segments use TCP/HTTP rather than MQTT. I should be able to figure out why the topic looks like a WLED topic.

            Comment


              #21
              I ran down the problem. The update is at http://mcsSprinklers.com/mcsMQTT_5_3_0_2.zip

              Two choices to install.
              Disable mcsMQTT from Interfaces page.
              One option is extract mcsMQTT_2020.dll and put in in the \bin\mcsMQTT folder. If you also want HS to reflect this version number then copy HSPI_MCSMQTT.exe to the HS folder.
              Second option is to copy the zip to \updates3\Zips folder. Extract updater_override.txt from zip and put it in HS3 folder. Browser to HS Interfaces page, Update Listing button, Local Updates, select mcsMQTT. Install. Remove updater_override.txt from HS3 folder.
              Enable mcsMQTT from Interfaces page.

              It looks to me that in this use case there is a limited number of responses on this topic that reflect its state. This means that VSPs can be setup. Two for the buttons and two (or however many) for the states. This would all be defined in the VSP section of Edit tab. When all done then use HS Device Management to change the VSPs from Both to either Control or Status. Change the numerical value of the Control buttons to be the same value as the corresponding status. If you do it this way then HS DeviceValue will be maintained to match the status returned from the topic and then DeviceValues can be used in events. Status will show the same as what is provided in the topic via the VSP association.

              Of course you can also use the new feature I added to store the status from the topic into DeviceString. The downside is that DeviceValue is no longer being maintained.

              Comment


                #22
                Hello,

                So far, testing looks good, thank you. I will test more over the next couple of days.

                Regards John

                Comment


                  #23
                  Hello,

                  Looks very good, setup a number of tests, all working as expected. Again, thank you.

                  Regards John

                  Comment


                    #24
                    Hello Michael,

                    All is going well.
                    I have had a thought, In the configuration of the MQTT device screen would it be possible to also have a field to input the device name into, you have the locations, this would make it easier to find the device once setup.

                    Regards John

                    Comment


                      #25
                      Added in http://mcsSprinklers.com/mcsMQTT_5_3_3_0.zip

                      Comment


                        #26
                        Hello,

                        I have installed as per previous instructions, aka exe and dll. Restarted HS3, looked at an existing mqtt device I had created. It does not seem to have any where to input/or show the device name... am I missing something?

                        Click image for larger version

Name:	DeviceConfig.png
Views:	137
Size:	477.1 KB
ID:	1397090

                        Comment


                          #27
                          The most current version is http://mcsSprinklers.com/mcsMQTT_5_3_3_3.zip but changes are related to Daikin and not the device name.
                          Make certain mcsMQTT_2020.dll is not in HS folder, but is in \bin\mcsMQTT folder. The one is the zip is where the logic was updated for the name.

                          Click image for larger version

Name:	Capture.PNG
Views:	127
Size:	21.0 KB
ID:	1397144

                          Comment


                            #28
                            Hello,

                            Ran some tests this afternoon, working just fine, Thank you.

                            John

                            Comment


                              #29
                              I have been testing out the free text (textbox) input method.I can see the text going out on the 'command' topic, and see the incoming 'status' topic. But the device value does not get updated.

                              Click image for larger version

Name:	CommandAndStatus.png
Views:	105
Size:	5.2 KB
ID:	1397835

                              Click image for larger version  Name:	TextBoxNoStatus.png Views:	0 Size:	15.1 KB ID:	1397832
                              Click image for larger version  Name:	TextBoxConfiguration.png Views:	0 Size:	49.5 KB ID:	1397833

                              Regards John

                              Comment


                                #30
                                Looks like the VSP is setup for control only. I believe it needs to be Both if you want status updated. This should happen automatically when you select Number as the Control/Status UI type on the Edit tab. I think this wall also result in the "Includes Values" setting to be enabled too.

                                Comment

                                Working...
                                X