My HGI80 equivalent Domoticz setup without HGI80

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • minthemerciless
    Automated Home Jr Member
    • Mar 2019
    • 18

    In the zlib version I have, there isn't a decompress method. Is this because it's a newer/older version? Is there a newer version of decompress? This is my data:

    02688163606060606280800D2C0C0C3338206C98580A2B03C3 1D568418235C9D018A18BA3A26B83A7E460264317475CC58EC 65C6A28E05AE8E4301590C5D1D2B16F7B16251C786C55E3624 750028DB1331

    Is someone able to decompress it to see if it's correct?

    Comment

    • DanD
      Automated Home Ninja
      • Feb 2016
      • 250

      Your data string doesn't look right and I've tried decompressing with zlib via Python and it returns an error. Do the spaces indicate the end of the data from each message? If so, it looks like you're missing quite a bit of the payload. Here's an example set of messages from my system:

      Code:
      13/04/2017 18:55:06 045 RQ --- 30:060058 01:037519 --:------ 0404 007 00200008000100
      13/04/2017 18:55:06 045 RP --- 01:037519 30:060058 --:------ 0404 048 0020000829010368816DCCC10D8030084051A0881DA8078F3D398303388B733A8A9A686CDACF8D1F7822FF1C2A5272C9
      13/04/2017 18:55:09 045 RQ --- 30:060058 01:037519 --:------ 0404 007 00200008000203
      13/04/2017 18:55:09 045 RP --- 01:037519 30:060058 --:------ 0404 048 002000082902034D92F36E79CE73DB161FEFD649A4468D6F57F0143C054FC133F00C3C03CFC04BE025F01278093C07CF
      13/04/2017 18:55:10 045 RQ --- 30:060058 01:037519 --:------ 0404 007 00200008000303
      13/04/2017 18:55:11 045 RP --- 01:037519 30:060058 --:------ 0404 038 002000081F0303C173F01CBCE9FD6DEF9EB6D9D87AEF697BE70578015E80178D77014CCE19AA
      The 3 payloads which require concatenation and then decompressing (from the RP messages) are as follows:

      Code:
      68816DCCC10D8030084051A0881DA8078F3D398303388B733A8A9A686CDACF8D1F7822FF1C2A5272C9
      4D92F36E79CE73DB161FEFD649A4468D6F57F0143C054FC133F00C3C03CFC04BE025F01278093C07CF
      C173F01CBCE9FD6DEF9EB6D9D87AEF697BE70578015E80178D77014CCE19AA

      Comment

      • minthemerciless
        Automated Home Jr Member
        • Mar 2019
        • 18

        Originally posted by DanD View Post
        Your data string doesn't look right and I've tried decompressing with zlib via Python and it returns an error. Do the spaces indicate the end of the data from each message? If so, it looks like you're missing quite a bit of the payload. Here's an example set of messages from my system:

        Code:
        13/04/2017 18:55:06 045 RQ --- 30:060058 01:037519 --:------ 0404 007 00200008000100
        13/04/2017 18:55:06 045 RP --- 01:037519 30:060058 --:------ 0404 048 0020000829010368816DCCC10D8030084051A0881DA8078F3D398303388B733A8A9A686CDACF8D1F7822FF1C2A5272C9
        13/04/2017 18:55:09 045 RQ --- 30:060058 01:037519 --:------ 0404 007 00200008000203
        13/04/2017 18:55:09 045 RP --- 01:037519 30:060058 --:------ 0404 048 002000082902034D92F36E79CE73DB161FEFD649A4468D6F57F0143C054FC133F00C3C03CFC04BE025F01278093C07CF
        13/04/2017 18:55:10 045 RQ --- 30:060058 01:037519 --:------ 0404 007 00200008000303
        13/04/2017 18:55:11 045 RP --- 01:037519 30:060058 --:------ 0404 038 002000081F0303C173F01CBCE9FD6DEF9EB6D9D87AEF697BE70578015E80178D77014CCE19AA
        The 3 payloads which require concatenation and then decompressing (from the RP messages) are as follows:

        Code:
        68816DCCC10D8030084051A0881DA8078F3D398303388B733A8A9A686CDACF8D1F7822FF1C2A5272C9
        4D92F36E79CE73DB161FEFD649A4468D6F57F0143C054FC133F00C3C03CFC04BE025F01278093C07CF
        C173F01CBCE9FD6DEF9EB6D9D87AEF697BE70578015E80178D77014CCE19AA
        @DanD

        No, the spaces don't indicate the ends of messages. I think that was a copy paste issue. My raw messages look like this

        Code:
        045 RQ --- 18:730 01:172240 --:------ 0404 007 02200008000100
        051 RP --- 01:172240 18:013589 --:------ 0404 048 02200008290102688163606060606280800D2C0C0C3338206C98580A2B03C31D568418235C9D018A18BA3A26B83A7E46
        045 RQ --- 18:730 01:172240 --:------ 0404 007 02200008000202
        050 RP --- 01:172240 18:013589 --:------ 0404 045 0220000826020264317475CC58EC65C6A28E05AE8E4301590C5D1D2B16F7B16251C786C55E3624750028DB1331
        I think this looks right?
        Last edited by minthemerciless; 6 November 2019, 12:40 AM.

        Comment

        • DanD
          Automated Home Ninja
          • Feb 2016
          • 250

          Yes, that pair of responses looks complete. Here are the 2 sections of the payloads which contain the schedule information:

          Code:
          688163606060606280800D2C0C0C3338206C98580A2B03C31D568418235C9D018A18BA3A26B83A7E46
          64317475CC58EC65C6A28E05AE8E4301590C5D1D2B16F7B16251C786C55E3624750028DB1331
          I tried concatenating and decompressing them with zlib and it worked OK and produced this output (after being formatted/interpreted by the Python code):

          Code:
          ZONE=3 DAY=1 TIME=20:00 TEMP=22.00
          ZONE=3 DAY=1 TIME=23:00 TEMP=15.00
          ZONE=3 DAY=2 TIME=20:00 TEMP=22.00
          ZONE=3 DAY=2 TIME=23:00 TEMP=15.00
          ZONE=3 DAY=3 TIME=20:00 TEMP=22.00
          ZONE=3 DAY=3 TIME=23:00 TEMP=15.00
          ZONE=3 DAY=4 TIME=20:00 TEMP=22.00
          ZONE=3 DAY=4 TIME=23:00 TEMP=15.00
          ZONE=3 DAY=5 TIME=20:00 TEMP=22.00
          ZONE=3 DAY=5 TIME=23:00 TEMP=15.00
          ZONE=3 DAY=6 TIME=20:00 TEMP=22.00
          ZONE=3 DAY=6 TIME=23:00 TEMP=15.00
          ZONE=3 DAY=7 TIME=20:00 TEMP=22.00
          ZONE=3 DAY=7 TIME=23:00 TEMP=15.00
          Does this schedule information match your zone?

          Comment

          • minthemerciless
            Automated Home Jr Member
            • Mar 2019
            • 18

            Originally posted by DanD View Post
            Yes, that pair of responses looks complete. Here are the 2 sections of the payloads which contain the schedule information:

            Code:
            688163606060606280800D2C0C0C3338206C98580A2B03C31D568418235C9D018A18BA3A26B83A7E46
            64317475CC58EC65C6A28E05AE8E4301590C5D1D2B16F7B16251C786C55E3624750028DB1331
            I tried concatenating and decompressing them with zlib and it worked OK and produced this output (after being formatted/interpreted by the Python code):

            Code:
            ZONE=3 DAY=1 TIME=20:00 TEMP=22.00
            ZONE=3 DAY=1 TIME=23:00 TEMP=15.00
            ZONE=3 DAY=2 TIME=20:00 TEMP=22.00
            ZONE=3 DAY=2 TIME=23:00 TEMP=15.00
            ZONE=3 DAY=3 TIME=20:00 TEMP=22.00
            ZONE=3 DAY=3 TIME=23:00 TEMP=15.00
            ZONE=3 DAY=4 TIME=20:00 TEMP=22.00
            ZONE=3 DAY=4 TIME=23:00 TEMP=15.00
            ZONE=3 DAY=5 TIME=20:00 TEMP=22.00
            ZONE=3 DAY=5 TIME=23:00 TEMP=15.00
            ZONE=3 DAY=6 TIME=20:00 TEMP=22.00
            ZONE=3 DAY=6 TIME=23:00 TEMP=15.00
            ZONE=3 DAY=7 TIME=20:00 TEMP=22.00
            ZONE=3 DAY=7 TIME=23:00 TEMP=15.00
            Does this schedule information match your zone?

            @DanD

            Yes, that is correct on to getting the decoding working.

            Comment

            • minthemerciless
              Automated Home Jr Member
              • Mar 2019
              • 18

              As simple start, would you expect this to work or do I need to do something else with the input?

              Code:
              import zlib
              data_in = '688163606060606280800D2C0C0C3338206C98580A2B03C31D568418235C9D018A18BA3A26B83A7E4664317475CC58EC65C6A28E05AE8E4301590C5D1D2B16F7B16251C786C55E3624750028DB1331'
              data_out = zlib.decompress(data_in)

              Comment

              • DanD
                Automated Home Ninja
                • Feb 2016
                • 250

                Yes, that looks OK (assuming you're using Python). The data_out variable will be a string and then you need to process it in the following way (each block of 20 characters defines a setpoint). Note this code also adds labels for each value and saves the output in a TXT file. I chose this format as I wanted the output to be easily readable and manually editable, but this may not suit your use.

                Code:
                for record in [data_out[i:i+20] for i in range(0, len(data_out), 20)]:
                      (zone, day, time, temp, unk) = struct.unpack("<xxxxBxxxBxxxHxxHH", record)
                      print('ZONE={0:d} DAY={1:d} TIME={2:02d}:{3:02d} TEMP={4:.2f}'.format(zone+1, day+1, *divmod(time, 60), temp/100), file=output_backup)

                Comment

                • minthemerciless
                  Automated Home Jr Member
                  • Mar 2019
                  • 18

                  Originally posted by DanD View Post
                  Yes, that looks OK (assuming you're using Python). The data_out variable will be a string and then you need to process it in the following way (each block of 20 characters defines a setpoint). Note this code also adds labels for each value and saves the output in a TXT file. I chose this format as I wanted the output to be easily readable and manually editable, but this may not suit your use.

                  Code:
                  for record in [data_out[i:i+20] for i in range(0, len(data_out), 20)]:
                        (zone, day, time, temp, unk) = struct.unpack("<xxxxBxxxBxxxHxxHH", record)
                        print('ZONE={0:d} DAY={1:d} TIME={2:02d}:{3:02d} TEMP={4:.2f}'.format(zone+1, day+1, *divmod(time, 60), temp/100), file=output_backup)
                  Got a simple python script working that can be called from the command line with the concatenated hex data as an input. Need to get it working on my Pi with Node Red.

                  Thanks for the help DanD

                  Comment

                  • DanD
                    Automated Home Ninja
                    • Feb 2016
                    • 250

                    Excellent! Glad you got it working and I'm really happy that you were able to tweak it for your purposes. As this approach allows bulk changes to the entire Evohome schedule on a per zone basis, it could have some great uses e.g. complex user-defined 'Quick Actions', different schedules for each season, etc.

                    Comment

                    • minthemerciless
                      Automated Home Jr Member
                      • Mar 2019
                      • 18

                      Originally posted by DanD View Post
                      Excellent! Glad you got it working and I'm really happy that you were able to tweak it for your purposes. As this approach allows bulk changes to the entire Evohome schedule on a per zone basis, it could have some great uses e.g. complex user-defined 'Quick Actions', different schedules for each season, etc.
                      @DanD , Thanks for your help. I'm very grateful


                      I have now have a python script that I can trigger from node red with a pythonshell node. I can request the schedule for a zone, then concatenate the relevant payload parts together, pass that and a file name to the python script, which then write it to the file. Alternatively, I can pass 'get' (instead of the hex string) and a file name and it will read the file and respond to node red with the required payload packets to be written. These are then formed into full messages by node red and transmitted to write to the controller.

                      This opens lots of opportunities for automation. Using wifi connection to determine when visitors are over and change the schedule for the spare bedrooms, and living room. Being able to create dynamic schedules based on something like google calendar. When we are on holiday, off work, visitors, out late, home late out early, home early blah blah.

                      I am currently also working on making my lights wifi enabled to link to node red. What I really like about all of this is that I can now have room based tabs in node red dashboard with lights, heating etc all in one place. No extra apps, or dependency on 3rd party services.

                      Does anyone have experience with setpoint overrides with a HGI80?
                      Last edited by minthemerciless; 7 November 2019, 01:53 AM.

                      Comment

                      • DanD
                        Automated Home Ninja
                        • Feb 2016
                        • 250

                        Have you seen @dty's Github Evohome Node Red implementation?

                        Honeywell Evohome integration for NodeRED. Contribute to codeaholics/node-red-contrib-evohome development by creating an account on GitHub.


                        He's taken a lot of the Evohome functionality that we've implemented within Domoticz and ported it to Node Red. I've not used it so can't really help with further details. If you've already worked through all of this and can't find what you need, I'll see if I can provide some additional tips.

                        Comment

                        • minthemerciless
                          Automated Home Jr Member
                          • Mar 2019
                          • 18

                          Originally posted by DanD View Post
                          Have you seen @dty's Github Evohome Node Red implementation?

                          Honeywell Evohome integration for NodeRED. Contribute to codeaholics/node-red-contrib-evohome development by creating an account on GitHub.


                          He's taken a lot of the Evohome functionality that we've implemented within Domoticz and ported it to Node Red. I've not used it so can't really help with further details. If you've already worked through all of this and can't find what you need, I'll see if I can provide some additional tips.
                          No, I had not seen that. But I have implement a significant amount of that functionality in Node red with function nodes and switches. I have been able to read data and put in into influxdb for quite a while. Think I have about 6 months of data for boiler state, room temperatures, setpoints, window state, heat demand. From what I can see that set of node will only red data from the hgi80, but not while to it. A nice pointer for tidying my node red flow up though. Thanks

                          Comment

                          • DanD
                            Automated Home Ninja
                            • Feb 2016
                            • 250

                            Here's some info on the command structure for sending an immediate setpoint override to zone via a serial device which we've decoded:

                            Code:
                            Example setpoint override message (command 0x2349): 
                            ---  W --- 18:002858 01:073076 --:------ 2349 007 0104B002FFFFFF
                            
                            Payload (hex) decode info:
                            01     : Zone = 2 (n+1)
                            04B0   : Setpoint = 12.00deg (1200)
                            02     : Override type = Permanent (1=Temporary, 2=Permanent)
                            FFFFFF : Additional flags, meaning unknown

                            Comment

                            • minthemerciless
                              Automated Home Jr Member
                              • Mar 2019
                              • 18

                              Originally posted by DanD View Post
                              Here's some info on the command structure for sending an immediate setpoint override to zone via a serial device which we've decoded:

                              Code:
                              Example setpoint override message (command 0x2349): 
                              ---  W --- 18:002858 01:073076 --:------ 2349 007 0104B002FFFFFF
                              
                              Payload (hex) decode info:
                              01     : Zone = 2 (n+1)
                              04B0   : Setpoint = 12.00deg (1200)
                              02     : Override type = Permanent (1=Temporary, 2=Permanent)
                              FFFFFF : Additional flags, meaning unknown

                              Ooooo, excellent can this be sent from a hgi80 with the same ID as the schedule request (18:740) or does it require a specific ID?

                              Comment

                              • DanD
                                Automated Home Ninja
                                • Feb 2016
                                • 250

                                Oh, I see what you mean. Sorry, you can ignore the specific first device ID and any 18:XXXXXX value should work with your nano serial device (obviously if you're using a HGI80 you must use 18:730). You just need to use the correct ID for your controller in the second device ID and it should all work OK. You'll see the setpoint change eventually appear on the zone sensor (HR92 etc), controller and via the app within a few minutes, it's not instantaneous as the change can only be sent from the controller during the zone sensor's next wake period.

                                Comment

                                Working...
                                X