Announcement

Collapse
No announcement yet.

HS4 to HS2 communication - MQTT??

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

    #16
    Just thought I'd update you. It looks like your suggestions were right.
    I ran a number of tests today using your suggestions with a few tweaks to match my hardware (a zwave leak sensor). When I first ran it Dan's plugin created a homeseer device as it should, but nothing I did after that made any changes to the device's value, status or string. I changed the template and tried $$STATUS, $$STRING AND $$VALUE. Everything looked right at arrival at the broker.
    My HS2 log showed it arrived there:
    12/6/2020 5:58:59 PM ~!~MQTT debug~!~MQTT : Topic: Homeseer/Home/Basement/Water_Notification Payload: {"status":"Water detected", "tst":"UNIX:","type":"Leak Sensor"}
    12/6/2020 5:58:59 PM ~!~MQTT debug~!~UpdateHomeseerDevice()
    12/6/2020 5:58:59 PM ~!~MQTT debug~!~Homeseer : {"status":"Water Detected","tst":"UNIX:","type":"Leak Sensor"}
    12/6/2020 5:58:59 PM ~!~MQTT debug~!~Topic : Home ~ Basement : Water_Notification
    12/6/2020 5:58:59 PM ~!~MQTT debug~!~parsePayload()
    12/6/2020 5:58:59 PM ~!~MQTT debug~!~Payload : UNIX/0
    12/6/2020 5:58:59 PM ~!~MQTT debug~!~deviceExistsByName Found Device belonging to this Plugin: Home Basement Water_Notification

    but nothing changed in the HS2 device.
    I've forward these test results to Dan and am hoping he can suggest something.
    Thanks for your help

    Rich
    Dick
    HS PRO 2.5.0.81, WinXP, IE8, Shuttle XS35V3, 2.13GHz, 4GB, 40GB SSD drive, AC-RF2, ADIOcelot, Message Server, TI103, SNEVL CID, pjcOutlook, MCSTemperature, Powertrigger, BLBackup, BLFloorplan, BLIcon, BLOccupied, BLRadar, BLRfid, BLLogMonitor, ACPUPSD, UltraECM, WeatherXML & Stipus' script connector. 500+ devices, 260+ events, 1-wire weather station + temp/humidity sensors & Oregon Scientific temp & humidity sensors & 2 Brultech ECM-1240s

    Comment


      #17

      The following does not look correct to me.
      12/6/2020 5:58:59 PM ~!~MQTT debug~!~MQTT : Topic: Homeseer/Home/Basement/Water_Notification Payload: {"status":"Water detected", "tst":"UNIX:","type":"Leak Sensor"}
      The substitution for UNIX is not being specified or not be interpreted correctly. What I expect is that you specified it in the template as $$UNIX:. I thought it was a simple enough change and did not test it explicitly. Does your template contain the $$ prefix on UNIX?

      Comment


        #18
        Yes, it does. I also just got a response from Dan:

        UNIX in payload is wrong it needs to be a number, representing the currenttime.

        https://www.unixtimestamp.com this website will show you what the number needsto be for any time.

        Did Michael give you a version that supports $$UNIX last I read he needed to make that update.

        you could take that payload, remove UNIX and replace with number from unix converter and publish it from mqtt.fx to test/prove hs2 plugin works....


        This makes sense. How can I implement his suggestion?

        Rich
        Dick
        HS PRO 2.5.0.81, WinXP, IE8, Shuttle XS35V3, 2.13GHz, 4GB, 40GB SSD drive, AC-RF2, ADIOcelot, Message Server, TI103, SNEVL CID, pjcOutlook, MCSTemperature, Powertrigger, BLBackup, BLFloorplan, BLIcon, BLOccupied, BLRadar, BLRfid, BLLogMonitor, ACPUPSD, UltraECM, WeatherXML & Stipus' script connector. 500+ devices, 260+ events, 1-wire weather station + temp/humidity sensors & Oregon Scientific temp & humidity sensors & 2 Brultech ECM-1240s

        Comment


          #19
          What version of mcsMQTT are you using? 5.10.4.0 added the $$UNIX: substitution.

          Comment


            #20
            OK, got the right unix timestamp for 8:00 and it worked. The devices string updated to reflect the leak sensor's status. Now to get the your plugin to put the right number in for the unix timestamp.
            Dick
            HS PRO 2.5.0.81, WinXP, IE8, Shuttle XS35V3, 2.13GHz, 4GB, 40GB SSD drive, AC-RF2, ADIOcelot, Message Server, TI103, SNEVL CID, pjcOutlook, MCSTemperature, Powertrigger, BLBackup, BLFloorplan, BLIcon, BLOccupied, BLRadar, BLRfid, BLLogMonitor, ACPUPSD, UltraECM, WeatherXML & Stipus' script connector. 500+ devices, 260+ events, 1-wire weather station + temp/humidity sensors & Oregon Scientific temp & humidity sensors & 2 Brultech ECM-1240s

            Comment


              #21
              Originally posted by Michael McSharry View Post
              What version of mcsMQTT are you using? 5.10.4.0 added the $$UNIX: substitution.
              I've got 5.9.3.2. How do I update it? From within HS4 it only gives me the 5.9.3.2 version to install.
              Dick
              HS PRO 2.5.0.81, WinXP, IE8, Shuttle XS35V3, 2.13GHz, 4GB, 40GB SSD drive, AC-RF2, ADIOcelot, Message Server, TI103, SNEVL CID, pjcOutlook, MCSTemperature, Powertrigger, BLBackup, BLFloorplan, BLIcon, BLOccupied, BLRadar, BLRfid, BLLogMonitor, ACPUPSD, UltraECM, WeatherXML & Stipus' script connector. 500+ devices, 260+ events, 1-wire weather station + temp/humidity sensors & Oregon Scientific temp & humidity sensors & 2 Brultech ECM-1240s

              Comment


                #22
                Download from the link provided in this thread into the HS4 folder. Disable mcsMQTT. Unzip updater_override.json into the HS4 folder. From HS Plugin menu select Add and the only HS4 plugin will be mcsMQTT. Select it. When done remove updater_override.json to restore normal Updater functionality.

                Comment


                  #23
                  Originally posted by Michael McSharry View Post
                  Download from the link provided in this thread into the HS4 folder. Disable mcsMQTT. Unzip updater_override.json into the HS4 folder. From HS Plugin menu select Add and the only HS4 plugin will be mcsMQTT. Select it. When done remove updater_override.json to restore normal Updater functionality.
                  Could you explain that again but for my linux HS4 Pi server?
                  Dick
                  HS PRO 2.5.0.81, WinXP, IE8, Shuttle XS35V3, 2.13GHz, 4GB, 40GB SSD drive, AC-RF2, ADIOcelot, Message Server, TI103, SNEVL CID, pjcOutlook, MCSTemperature, Powertrigger, BLBackup, BLFloorplan, BLIcon, BLOccupied, BLRadar, BLRfid, BLLogMonitor, ACPUPSD, UltraECM, WeatherXML & Stipus' script connector. 500+ devices, 260+ events, 1-wire weather station + temp/humidity sensors & Oregon Scientific temp & humidity sensors & 2 Brultech ECM-1240s

                  Comment


                    #24
                    Got it updated. Should I now put $$UNIX in for the "tst" variable. If so, it doesn't seem to work. It then shows "{"status":"OK","tst":"UNIX","type":"Leak Sensor"} as arriving at the broker.
                    Dick
                    HS PRO 2.5.0.81, WinXP, IE8, Shuttle XS35V3, 2.13GHz, 4GB, 40GB SSD drive, AC-RF2, ADIOcelot, Message Server, TI103, SNEVL CID, pjcOutlook, MCSTemperature, Powertrigger, BLBackup, BLFloorplan, BLIcon, BLOccupied, BLRadar, BLRfid, BLLogMonitor, ACPUPSD, UltraECM, WeatherXML & Stipus' script connector. 500+ devices, 260+ events, 1-wire weather station + temp/humidity sensors & Oregon Scientific temp & humidity sensors & 2 Brultech ECM-1240s

                    Comment


                      #25
                      It does not matter if you are running Linux or Windows. It is the same process. You need to get the file from http://mcssprinklers.com/HSPI_mcsMQTT_5_10_4_0.zip into your HS4 folder. I typically use WinSCP since Linux is not my native environment, but any download method will work. You can download to Windows, extract updater_override.json and then copy both the .zip and the .json to your HS4 folder on Linux. From this point you use the browser and the HS4 HTTP server.

                      Comment


                        #26
                        Can I get $$UNIX without the 5 decimal digits portion? I think HS2 MQTT is unable to handle that.
                        Dick
                        HS PRO 2.5.0.81, WinXP, IE8, Shuttle XS35V3, 2.13GHz, 4GB, 40GB SSD drive, AC-RF2, ADIOcelot, Message Server, TI103, SNEVL CID, pjcOutlook, MCSTemperature, Powertrigger, BLBackup, BLFloorplan, BLIcon, BLOccupied, BLRadar, BLRfid, BLLogMonitor, ACPUPSD, UltraECM, WeatherXML & Stipus' script connector. 500+ devices, 260+ events, 1-wire weather station + temp/humidity sensors & Oregon Scientific temp & humidity sensors & 2 Brultech ECM-1240s

                        Comment


                          #27
                          I will update to round it to zero decimals, but I did provide an example in this thread on how you can do it using <<ROUND($$UNIX:,0)>> rather than just $$UNIX:

                          I'm surprised it provides this precision. I will check it out myself.

                          Edit: Confirmed the ROUND function works as described.

                          Comment


                            #28
                            That worked!! Thanks, now I can relax for a few minutes before going to bed.
                            Dick
                            HS PRO 2.5.0.81, WinXP, IE8, Shuttle XS35V3, 2.13GHz, 4GB, 40GB SSD drive, AC-RF2, ADIOcelot, Message Server, TI103, SNEVL CID, pjcOutlook, MCSTemperature, Powertrigger, BLBackup, BLFloorplan, BLIcon, BLOccupied, BLRadar, BLRfid, BLLogMonitor, ACPUPSD, UltraECM, WeatherXML & Stipus' script connector. 500+ devices, 260+ events, 1-wire weather station + temp/humidity sensors & Oregon Scientific temp & humidity sensors & 2 Brultech ECM-1240s

                            Comment


                              #29
                              The update without need for ROUND function for UNIX is attached.
                              Attached Files

                              Comment


                                #30
                                THANKS for the update. It works perfectly!!!
                                Dick
                                HS PRO 2.5.0.81, WinXP, IE8, Shuttle XS35V3, 2.13GHz, 4GB, 40GB SSD drive, AC-RF2, ADIOcelot, Message Server, TI103, SNEVL CID, pjcOutlook, MCSTemperature, Powertrigger, BLBackup, BLFloorplan, BLIcon, BLOccupied, BLRadar, BLRfid, BLLogMonitor, ACPUPSD, UltraECM, WeatherXML & Stipus' script connector. 500+ devices, 260+ events, 1-wire weather station + temp/humidity sensors & Oregon Scientific temp & humidity sensors & 2 Brultech ECM-1240s

                                Comment

                                Working...
                                X