Achronite / energenie-ener314rt

Node module for RaspberryPi energenie ener314-rt board, used by node-red-contrib-energenie-ener314rt
MIT License
4 stars 2 forks source link

Periodic eTRV commands #31

Open Achronite opened 1 year ago

Achronite commented 1 year ago

This task is to investigate/implement a method periodic sending of messages for eTRVs due to the limitation of what the eTRV regularly reports/expects

Applicable Commands:

Achronite commented 1 year ago

Looks like VOLTAGE auto reports so is not needed for this:

energenie: monitor received={"deviceId":XXXX,"mfrId":4,"productId":3,"timestamp":1674211839,"TEMPERATURE":13.3,"command":0,"retries":0}
publishing energenie/3/XXXX/TEMPERATURE/state: 13.3
publishing energenie/3/XXXX/command/state: None
publishing energenie/3/XXXX/retries/state: 0
publishing energenie/3/XXXX/Maintenance/state: None
energenie: monitor received={"deviceId":XXXX,"mfrId":4,"productId":3,"timestamp":1674212149,"VOLTAGE":3.000000,"command":0,"retries":0,"VOLTAGE":3.00,"VOLTAGE_TS":1674212149}
publishing energenie/3/XXXX/VOLTAGE/state: 3
publishing energenie/3/XXXX/command/state: None
publishing energenie/3/XXXX/retries/state: 0
publishing energenie/3/XXXX/Maintenance/state: None
publishing energenie/3/XXXX/VOLTAGE_TS/state: 1674212149
genestealer commented 1 year ago

I did not know the voltage auto reports.

I created two automations for getting the voltage and calibrating the valve.

alias: Energenie eTRV Request Voltage Each Night
description: ""
trigger:
  - platform: time
    at: "04:00:00"
condition: []
action:
  - service: button.press
    data: {}
    target:
      entity_id:
        - button.5251_request_voltage
        - button.3449_request_voltage
        - button.5475_request_voltage
        - button.5318_request_voltage
        - button.office_heating_request_voltage
mode: single
alias: Energenie eTRV Calibrate Once a Week
description: ""
trigger:
  - platform: time
    at: "04:30:00"
condition:
  - condition: time
    weekday:
      - sun
action:
  - service: button.press
    data: {}
    target:
      entity_id:
        - button.5475_calibrate
        - button.5318_calibrate
        - button.5251_calibrate
        - button.3449_calibrate
        - button.office_heating_calibrate
mode: single
Achronite commented 1 year ago

@genestealer So do you think adding auto-commands (VOLTAGE, DIAGNOSTICS & EXERCISE_VALVE) would be beneficial to you?

I'm thinking it might be better to add it to the core module, so that both the mqtt & node-red implementations would benefit.

genestealer commented 1 year ago

My only worry about automating those particular functions within the core code module would be that they could overwrite any of the incoming user commands if they both coincided within the same polling window period. If there was a way to monitor any pending commands then you would want ensure the automated command is postponed until the user requested command has been processed. The automated commands might also wish to be configurable such as frequency, time of day and disabled.

Achronite commented 1 year ago

My only worry about automating those particular functions within the core code module would be that they could overwrite any of the incoming user commands if they both coincided within the same polling window period.

I was planning to ensure that the automated commands are only sent when there are no outstanding commands for the device.

The automated commands might also wish to be configurable such as frequency, time of day and disabled.

I would need config for those... but I don't have any config at the mo for the core module; it could get quite messy. The DIAGNOSTICS and VOLTAGE commands are query only so are non-destructive. Maybe I'll leave out EXERCISE_VALVE for now.