Page 18 of 19 FirstFirst ... 813141516171819 LastLast
Results 171 to 180 of 187

Thread: My HGI80 equivalent Domoticz setup without HGI80

  1. #171
    Automated Home Jr Member
    Join Date
    Mar 2019
    Posts
    18

    Default

    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)

  2. #172
    Automated Home Guru
    Join Date
    Feb 2016
    Posts
    230

    Default

    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)

  3. #173
    Automated Home Jr Member
    Join Date
    Mar 2019
    Posts
    18

    Default

    Quote 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

  4. #174
    Automated Home Guru
    Join Date
    Feb 2016
    Posts
    230

    Default

    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.

  5. #175
    Automated Home Jr Member
    Join Date
    Mar 2019
    Posts
    18

    Default

    Quote 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; 7th November 2019 at 01:53 AM.

  6. #176
    Automated Home Guru
    Join Date
    Feb 2016
    Posts
    230

    Default

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

    https://github.com/codeaholics/node-red-contrib-evohome

    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.

  7. #177
    Automated Home Jr Member
    Join Date
    Mar 2019
    Posts
    18

    Default

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

    https://github.com/codeaholics/node-red-contrib-evohome

    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

  8. #178
    Automated Home Guru
    Join Date
    Feb 2016
    Posts
    230

    Default

    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

  9. #179
    Automated Home Jr Member
    Join Date
    Mar 2019
    Posts
    18

    Default

    Quote 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?

  10. #180
    Automated Home Guru
    Join Date
    Feb 2016
    Posts
    230

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •