smar000 / evoGateway

Python script for listening in and responding to evohome heating control radio messages
47 stars 17 forks source link

ID configuration - no sending #4

Closed Gamelauncher closed 4 years ago

Gamelauncher commented 4 years ago

Hello,

Been trying to figure this out now on and off for the past couple of weeks but seem to get stuck.

Setup is a TRV on the living room radiator for which the evohome controller is the master. I don't know how it internally is organised but it seems to work. However, sometimes an event comes in, like the latest one ZONE_HEATDEMAND from the bedroom which is captured on zone 1, not zone 3 ... any idea why that might be?

Somehow I think I have the id's wrong although I don't see it, I have an unknown id popping up as well which I think should be the livingroom.

Situation is 1 evohome controller ATP921R + 4 HR92's.

I think because of this, sending commands is not working either. I've used the FIFO branch without result.

The Spare TRV is one that is not linked yet with the controller.

Any suggestions I can look at?


2019-09-14 18:55:38 | | *                   | 1: Connected to serial port /dev/cu.wchusbserialfd130                                         
2019-09-14 18:55:38 | |                     |                                                                                               
2019-09-14 18:55:38 | |                     | -----------------------------------------------------------                                   
2019-09-14 18:55:38 | |                     | Devices loaded from 'devices.json' file:                                                      
2019-09-14 18:55:38 | |                     |    01:132956 - Livingroom             - Zone 1   [Master]                                     
2019-09-14 18:55:38 | |                     |    04:232191 - Office                 - Zone 2   [Master]                                     
2019-09-14 18:55:38 | |                     |    04:232195 - Unknown                - Zone 5                                                
2019-09-14 18:55:38 | |                     |    04:232199 - Spare                  - Zone 4   [Master]                                     
2019-09-14 18:55:38 | |                     |    04:232201 - Bedroom                - Zone 3   [Master]                                     
2019-09-14 18:55:38 | |                     |    13:000432 - Heating                - Zone 252                                              
2019-09-14 18:55:38 | |                     |    30:071715 - EvoGateway             - Zone 240 [Master]                                     
2019-09-14 18:55:38 | |                     | -----------------------------------------------------------                                   
2019-09-14 18:55:38 | |                     |                                                                                               
2019-09-14 18:55:38 | |                     | Listening...                                                                                  
2019-09-14 18:55:38 | | *                   | Connecting to mqtt server 192.168.1.230                                                       
2019-09-14 18:55:38 | | *                   | Subscribing to mqtt topic 'evohome/gateway/command'                                           
2019-09-14 18:55:38 | | *                   | MQTT connection established with broker                                                       
2019-09-14 18:57:14 | | COMMAND_OUT         | SETPOINT_OVERRIDE: Sending command with arguments '5.0 degC for zone Office'                  
2019-09-14 18:57:14 |1| SETPOINT_OVERRIDE   | W | GWAY EvoGateway       -> 01:139901             |  5.00°C @ Office               [Zone 2 ] 
2019-09-14 18:57:36 |1| SYNC                | I | CONTROLLER            -> BROADCAST MESSAGE     | Next sync at 19:00:25 (in 169 secs)      
2019-09-14 18:57:36 |1| SETPOINT_CTL        | I | CONTROLLER            -> BROADCAST MESSAGE     | 22.00°C @ Livingroom           [Zone 1 ] 
2019-09-14 18:57:36 |1| SETPOINT_CTL        | I | CONTROLLER            -> BROADCAST MESSAGE     | 18.50°C @ Office               [Zone 2 ] 
2019-09-14 18:57:36 |1| SETPOINT_CTL        | I | CONTROLLER            -> BROADCAST MESSAGE     | 23.00°C @ Bedroom              [Zone 3 ] 
2019-09-14 18:57:36 |1| ZONE_TEMPERATURE    | I | CONTROLLER            -> BROADCAST MESSAGE     | 26.32°C @ Livingroom           [Zone 1 ] 
2019-09-14 18:57:56 |1| ZONE_HEAT_DEMAND    | I | CONTROLLER            -> BROADCAST MESSAGE     |    0.0%                        [Zone 252] 
2019-09-14 18:58:14 | | COMMAND_OUT         | setpoint_override: Command NOT acknowledged. Resending attempt 1 of 3...                      
2019-09-14 18:58:14 | | COMMAND_OUT         | SETPOINT_OVERRIDE: Sending command with arguments '5.0 degC for zone Office'                  
2019-09-14 18:58:14 |1| SETPOINT_OVERRIDE   | W | GWAY EvoGateway       -> 01:139901             |  5.00°C @ Office               [Zone 2 ] 
2019-09-14 18:58:59 |1| ZONE_HEAT_DEMAND    | I | TRV Bedroom           -> CONTROLLER            |    0.0% @ Livingroom           [Zone 1 ] 
2019-09-14 18:59:14 | | COMMAND_OUT         | setpoint_override: Command NOT acknowledged. Resending attempt 2 of 3...                      
2019-09-14 18:59:14 | | COMMAND_OUT         | SETPOINT_OVERRIDE: Sending command with arguments '5.0 degC for zone Office'                  
2019-09-14 18:59:14 |1| SETPOINT_OVERRIDE   | W | GWAY EvoGateway       -> 01:139901             |  5.00°C @ Office               [Zone 2 ] 
2019-09-14 19:00:14 | | COMMAND_OUT         | setpoint_override: Command NOT acknowledged. Resending attempt 3 of 3...                      
2019-09-14 19:00:14 | | COMMAND_OUT         | SETPOINT_OVERRIDE: Sending command with arguments '5.0 degC for zone Office'                  
2019-09-14 19:00:14 |1| SETPOINT_OVERRIDE   | W | GWAY EvoGateway       -> 01:139901             |  5.00°C @ Office               [Zone 2 ] 
2019-09-14 19:00:14 | | COMMAND             | ERROR: Previously sent command 'setpoint_override' failed to send. No ack received from controller
2019-09-14 19:00:25 |1| SYNC                | I | CONTROLLER            -> BROADCAST MESSAGE     | Next sync at 19:03:14 (in 169 secs)      
2019-09-14 19:00:25 |1| SETPOINT_CTL        | I | CONTROLLER            -> BROADCAST MESSAGE     | 22.00°C @ Livingroom           [Zone 1 ] 
2019-09-14 19:00:25 |1| SETPOINT_CTL        | I | CONTROLLER            -> BROADCAST MESSAGE     | 18.50°C @ Office               [Zone 2 ] 
2019-09-14 19:00:25 |1| SETPOINT_CTL        | I | CONTROLLER            -> BROADCAST MESSAGE     | 23.00°C @ Bedroom              [Zone 3 ] 
2019-09-14 19:00:25 |1| ZONE_TEMPERATURE    | I | CONTROLLER            -> BROADCAST MESSAGE     | 26.32°C @ Livingroom           [Zone 1 ] 
2019-09-14 19:03:14 |1| SYNC                | I | CONTROLLER            -> BROADCAST MESSAGE     | Next sync at 19:06:03 (in 169 secs)      
2019-09-14 19:03:14 |1| SETPOINT_CTL        | I | CONTROLLER            -> BROADCAST MESSAGE     | 22.00°C @ Livingroom           [Zone 1 ] 
2019-09-14 19:03:14 |1| SETPOINT_CTL        | I | CONTROLLER            -> BROADCAST MESSAGE     | 18.50°C @ Office               [Zone 2 ] 
2019-09-14 19:03:14 |1| SETPOINT_CTL        | I | CONTROLLER            -> BROADCAST MESSAGE     | 23.00°C @ Bedroom              [Zone 3 ] 
2019-09-14 19:03:14 |1| ZONE_TEMPERATURE    | I | CONTROLLER            -> BROADCAST MESSAGE     | 26.32°C @ Livingroom           [Zone 1 ] 
2019-09-14 19:05:21 |1| ACTUATOR_CHECK_REQ  | I | CONTROLLER            -> BROADCAST MESSAGE     | Actuator time period sync request: 252   
2019-09-14 19:06:03 |1| SYNC                | I | CONTROLLER            -> BROADCAST MESSAGE     | Next sync at 19:08:52 (in 169 secs)      
2019-09-14 19:06:03 |1| SETPOINT_CTL        | I | CONTROLLER            -> BROADCAST MESSAGE     | 22.00°C @ Livingroom           [Zone 1 ] 
2019-09-14 19:06:03 |1| SETPOINT_CTL        | I | CONTROLLER            -> BROADCAST MESSAGE     | 18.50°C @ Office               [Zone 2 ] 
2019-09-14 19:06:03 |1| SETPOINT_CTL        | I | CONTROLLER            -> BROADCAST MESSAGE     | 23.00°C @ Bedroom              [Zone 3 ] 
2019-09-14 19:06:03 |1| ZONE_TEMPERATURE    | I | CONTROLLER            -> BROADCAST MESSAGE     | 26.32°C @ Livingroom           [Zone 1 ] 
2019-09-14 19:07:21 |1| ZONE_HEAT_DEMAND    | I | TRV Spare             -> 63:262142             |    0.0% @ Livingroom           [Zone 1 ] 
2019-09-14 19:08:52 |1| SYNC                | I | CONTROLLER            -> BROADCAST MESSAGE     | Next sync at 19:11:41 (in 169 secs)      
2019-09-14 19:08:52 |1| ZONE_INFO           | I | CONTROLLER            -> BROADCAST MESSAGE     | Temp. range: 5.0°C to 35.0°C @ Livingroom           [Zone 1 ] (Flags: 16)
2019-09-14 19:08:52 |1| ZONE_INFO           | I | CONTROLLER            -> BROADCAST MESSAGE     | Temp. range: 5.0°C to 35.0°C @ Office               [Zone 2 ] (Flags: 16)
2019-09-14 19:08:52 |1| ZONE_INFO           | I | CONTROLLER            -> BROADCAST MESSAGE     | Temp. range: 5.0°C to 35.0°C @ Bedroom              [Zone 3 ] (Flags: 16)
2019-09-14 19:10:45 |1| UNKNOWN COMMAND     | Command code: 0009, Payload: FC01FF                                                           
2019-09-14 19:10:47 |1| UNKNOWN COMMAND     | Command code: 1100, Payload: FC0C0400007FFF01                                                 
2019-09-14 19:10:49 |1| UNKNOWN COMMAND     | Command code: 1100, Payload: 000C0400007FFF01                                                 
2019-09-14 19:11:11 |1| ZONE_HEAT_DEMAND    | I | TRV Office            -> CONTROLLER            |    0.0% @ Office               [Zone 2 ] 
2019-09-14 19:11:31 |1| SYNC                | I | CONTROLLER            -> BROADCAST MESSAGE     | Next sync at 19:14:20 (in 169 secs)      
2019-09-14 19:11:31 |1| SETPOINT_CTL        | I | CONTROLLER            -> BROADCAST MESSAGE     | 22.00°C @ Livingroom           [Zone 1 ] 
2019-09-14 19:11:32 |1| SETPOINT_CTL        | I | CONTROLLER            -> BROADCAST MESSAGE     | 18.50°C @ Office               [Zone 2 ] 
2019-09-14 19:11:32 |1| SETPOINT_CTL        | I | CONTROLLER            -> BROADCAST MESSAGE     | 23.00°C @ Bedroom              [Zone 3 ] 
2019-09-14 19:11:32 |1| ZONE_TEMPERATURE    | I | CONTROLLER            -> BROADCAST MESSAGE     | 27.55°C @ Livingroom           [Zone 1 ] 
2019-09-14 19:12:32 |1| RELAY_HEAT_DEMAND   | I | CONTROLLER            -> BROADCAST MESSAGE     |    0.0% @ BDR Boiler Relay               
2019-09-14 19:14:20 |1| SYNC                | I | CONTROLLER            -> BROADCAST MESSAGE     | Next sync at 19:17:09 (in 169 secs)      
2019-09-14 19:14:20 |1| SETPOINT_CTL        | I | CONTROLLER            -> BROADCAST MESSAGE     | 22.00°C @ Livingroom           [Zone 1 ] 
2019-09-14 19:14:21 |1| SETPOINT_CTL        | I | CONTROLLER            -> BROADCAST MESSAGE     | 18.50°C @ Office               [Zone 2 ] 
2019-09-14 19:14:21 |1| SETPOINT_CTL        | I | CONTROLLER            -> BROADCAST MESSAGE     | 23.00°C @ Bedroom              [Zone 3 ] 
2019-09-14 19:14:21 |1| ZONE_TEMPERATURE    | I | CONTROLLER            -> BROADCAST MESSAGE     | 27.45°C @ Livingroom           [Zone 1 ] 
2019-09-14 19:15:32 |1| ACTUATOR_STATE      | RQ| CTL Livingroom        -> BDR Heating           | State update request                     
2019-09-14 19:15:34 |1| ACTUATOR_STATE      | RQ| CTL Livingroom        -> BDR Heating           | State update request                     
2019-09-14 19:15:36 |1| ACTUATOR_STATE      | RQ| CTL Livingroom        -> BDR Heating           | State update request                     
2019-09-14 19:17:09 |1| SYNC                | I | CONTROLLER            -> BROADCAST MESSAGE     | Next sync at 19:19:58 (in 169 secs)      
2019-09-14 19:17:09 |1| SETPOINT_CTL        | I | CONTROLLER            -> BROADCAST MESSAGE     | 22.00°C @ Livingroom           [Zone 1 ] 
2019-09-14 19:17:10 |1| SETPOINT_CTL        | I | CONTROLLER            -> BROADCAST MESSAGE     | 18.50°C @ Office               [Zone 2 ] 
2019-09-14 19:17:10 |1| SETPOINT_CTL        | I | CONTROLLER            -> BROADCAST MESSAGE     | 23.00°C @ Bedroom              [Zone 3 ] 
2019-09-14 19:17:10 |1| ZONE_TEMPERATURE    | I | CONTROLLER            -> BROADCAST MESSAGE     | 26.74°C @ Livingroom           [Zone 1 ] 

The debug for the unknown messages

2019-09-14 19:10:45: 1: UNKNOWN COMMAND: ---  I --- 01:132956 --:------ 01:132956 0009 003 FC01FF
2019-09-14 19:10:45: 1: ---  I --- 01:132956 --:------ 01:132956 0009 003 FC01FF
2019-09-14 19:10:47: 1: UNKNOWN COMMAND: ---  I --- 01:132956 --:------ 01:132956 1100 008 FC0C0400007FFF01
2019-09-14 19:10:47: 1: ---  I --- 01:132956 --:------ 01:132956 1100 008 FC0C0400007FFF01
2019-09-14 19:10:49: 1: UNKNOWN COMMAND: --- RQ --- 01:132956 13:000432 --:------ 1100 008 000C0400007FFF01
2019-09-14 19:10:49: 1: --- RQ --- 01:132956 13:000432 --:------ 1100 008 000C0400007FFF01
eljuanchete commented 4 years ago

Hello, I had a similar issue in the last weeks after adding some new TRVs. It was driving me mad too as I did not see the problem. In the end I did a factory reset of the controller and all TRVs and reconfigured all system. No problem since then. I think that some TRVs did not bind correctly and that was the source of the problem. Maybe you should give it a try and see if it helps

Gamelauncher commented 4 years ago

Fixed the sending part, completely overlooked the controller id that the command was being sent to.

CONTROLLER_ID was not included in the config, added it, swapped in the correct controller id and voila :)

Will monitor about the crossing of events from one zone to another.


2019-09-15 00:07:31 | | COMMAND_OUT         | SETPOINT_OVERRIDE: Sending command with arguments '15.0 degC for zone Terras'                 
2019-09-15 00:07:31 |1| SETPOINT_OVERRIDE   | W | GWAY EvoGateway       -> CONTROLLER            | 15.00°C @ Terras               [Zone 4 ] 
2019-09-15 00:07:31 |1| SETPOINT_OVERRIDE   | I | CONTROLLER            -> BROADCAST MESSAGE     | 15.00°C @ Terras               [Zone 4 ] 
2019-09-15 00:07:31 |1| SETPOINT            | I | CONTROLLER            -> BROADCAST MESSAGE     | 15.00°C @ Terras               [Zone 4 ] 
2019-09-15 00:07:32 |1| SETPOINT_OVERRIDE   | I | CTL Livingroom        -> GWAY EvoGateway       | 15.00°C @ Terras               [Zone 4 ] 
2019-09-15 00:07:32 | | COMMAND_OUT         | SETPOINT_OVERRIDE: Command acknowledged by controller                                      
Gamelauncher commented 4 years ago

I've default as @eljuanchete suggested but to no avail ...

Everything seems almost right, but ZONE_HEAT_DEMAND and WINDOW_STATUS seems to be reported for some reason on a different zone ...

smar000 commented 4 years ago

Good to hear that you got the sending working.

I haven't looked at your logs in detail but initial instinct says that it is probably your devices/zones file that has something wrong. You mention that you have a TRV in the living room and if I understand correctly, you are using the evohome controller as the temperature sensor for the living room. If this is the case, then you will need to include the living room TRV again with Zone 1 (but not as master).

Separately, what is the Unknown device on your zone 5? Is that the spare TRV?

Finally, you can probably ignore the unknown commands. Those are basically command codes that the gateway is picking up, that I have not been able determine what they do. I post it to the display more as an FYI than anything at this stage.

Gamelauncher commented 4 years ago

I went over it a bit more and 1 of unknown commands is because of typo in the notation I think. 10e0 -> 10E0, not really important but it's gone now.

The "unknown" I've solved too then with your explanation, it's the livingroom's actual trv.

I need to have a closer look at the mismatch, it picks up the correct id and name from the string, but matches it to the wrong zone_id ....

I've seen this behaviour only in the zone_heat_demand and window_status commands.

As a side note, found this one too: https://github.com/Evsdd/Evohome_Schedule_Backup also has a restore script.


2019-09-16 20:06:32 |1| ZONE_HEAT_DEMAND    | I | TRV Office            -> CONTROLLER            |    0.0% @ Bedroom              [Zone 3 ]
2019-09-16 20:06:32: 1: ZONE_HEAT_DEMAND   ---  I --- 04:232191 --:------ 01:132956 3150 002 0200

2019-09-16 20:18:55 |1| ZONE_HEAT_DEMAND    | I | TRV Bedroom           -> CONTROLLER            |    0.0% @ Livingroom           [Zone 1 ] 
2019-09-16 20:18:55: 1: ZONE_HEAT_DEMAND   ---  I --- 04:232201 --:------ 01:132956 3150 002 0000

{
    "01:132956": {
        "name": "Livingroom", 
        "zoneId": 1, 
        "zoneMaster": true
    }, 
    "04:232195": {
        "name": "Livingroom",
        "zoneId": 1,
        "zoneMaster": false
    },
    "04:232191": {
        "name": "Office", 
        "zoneId": 2, 
        "zoneMaster": true
    }, 
    "04:232201": {
        "name": "Bedroom",
        "zoneId": 3,
        "zoneMaster": true
    },
    "04:232199": {
        "name": "Terras",
        "zoneMaster": true,
        "zoneId": 4
    },
    "13:000432": {
        "name": "Heating", 
        "zoneId": 252, 
        "zoneMaster": false
    }, 
    "30:071715": {
        "name": "EvoGateway", 
        "zoneId": 240, 
        "zoneMaster": true
    }
}
Gamelauncher commented 4 years ago

I've sorted it now by replacing the zone_id loading in both the window_status and the zone_heat_demand functions. This causes the commands to be logged in the proper mqtt topics :-)

That covers everything is guess, on to building the home assistant interface ...



    zone_id=0
    if devices.get(msg.source_id):
        zone_id = devices[msg.source_id]["zoneId"]
        zone_name = zones[zone_id] if zone_id in zones else "Zone {}".format(zone_id)
    else:
        display_and_log("DEBUG","Device not found for source " + msg.source_id)