smar000 / evoGateway

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

can't get away from eavesdropping mode. #60

Open blb4github opened 10 months ago

blb4github commented 10 months ago

I've tried all kind of things based on the readme and the issues reported earlier, but I can't get away from eavesdropping mode. I hope someone can help!

The log I receive whe starting up:

:~/scripts $ python evogateway.py 2023-08-29 12:36:26,710 [1137] Schema file missing or the 'known_list' section is missing. Defaulting to ramses_rf 'eavesdropping' mode Best practice is exactly one gateway (HGI) in the known_list: [] It is strongly recommended to provide a known_list, and use it as a whitelist (device_id filter), configure: enforce_known_list = True 2023-08-29 12:36:26 | 2023-08-29 12:36:26 | ------------------------------------------------------------------------------------------ 2023-08-29 12:36:26 | Devices loaded from 'devices.json' file: 2023-08-29 12:36:26 | CTL 01:187689 - Controller 2023-08-29 12:36:26 | TRV 04:032215 - TRV:032215 2023-08-29 12:36:26 | TRV 04:032217 - TRV:032217 2023-08-29 12:36:26 | TRV 04:095385 - TRV:095385 2023-08-29 12:36:26 | TRV 04:202711 - TRV:202711 2023-08-29 12:36:26 | TRV 04:202713 - TRV:202713 2023-08-29 12:36:26 | TRV 04:202715 - TRV:202715 2023-08-29 12:36:26 | TRV 04:202717 - TRV:202717 2023-08-29 12:36:26 | HGI 18:000730 - evoGateway 2023-08-29 12:36:26 | ------------------------------------------------------------------------------------------ 2023-08-29 12:36:26 | 2023-08-29 12:36:26 | # evogateway 3.11-0.22.40 (using 'ramses_rf' library 0.22.40) Not using any device filter: using a known_list (as a whitelist) is strongly recommended)

My devices.json and ramses_rf_schema.json files: devices.json.txt ramses_rf_schema.json.txt

smar000 commented 10 months ago

As per the warning message, your schema file or known_list appears to be missing. Have you defined these?

blb4github commented 10 months ago

I'm afraid I don't understand what I have to do for that. what I attached are the files as created after a normal run of evogateway.py. From what I see there is a known_list in ramses_rf_schema.json. It's not clear for me how I have to create a schema file and/or known_list.

smar000 commented 10 months ago

A default schema file is automatically generated by the script, once it has been running for a period of time and has managed to "snoop" the evohome devices in your system. This is then saved as ramses_rf_schema.json, which I assume is the file you have linked above.

You can now edit this schema file with e.g. a text editor or VSCode etc, and in the known_list put a list of all the device IDs that you know are actually in your network. This ensures that if your radio receives messages from a device ID that is not in this known list, it will be ignored. This can be useful if you have neighbours nearby with another evohome system! It can also help filter out incorrectly received messages from your devices due to "noise" in the radio waves.

The format of the known_list section should be something like:

"known_list": {
        "01:139901": { "alias" : "Dining Room"},
        "02:043392": { "alias" : "Controller"},
        "04:000868": { "alias" : "XXX's Room"},
        "04:001048": { "alias" : "Landing"},
        "04:143922": { "alias" : "Gym"},
        "04:143924": { "alias" : "Master Ensuite"},
        "04:143926": { "alias" : "Living Room Middle"}
}

Unless you are experiencing spurious messages from unwanted neighbouring devices etc, it should be fine to continue using the system even with that known_list warning. Finally, you may find further information on the whole schema and known_list etc at the ramses_rf repo.

blb4github commented 10 months ago

I've tried a couple of things but still no luck. My ramses_rf_schama.json file, it contains a know list:

{
    "config": {
        "disable_sending": false,
        "disable_discovery": true,
        "enforce_known_list": true,
        "evofw_flag": null,
        "max_zones": 12,
        "use_aliases": true,
        "use_native_ot": "prefer",
        "reduce_processing": 0,
        "packet_log": {
            "file_name": "packet.log",
            "rotate_bytes": 1000000,
            "rotate_backups": 9
        }
    },
    "main_tcs": "01:187689",
    "01:187689": {
        "system": {
            "appliance_control": null
        },
        "orphans": [],
        "stored_hotwater": {},
        "underfloor_heating": {},
        "zones": {
            "01": {
                "_name": "Gang",
                "class": "radiator_valve",
                "sensor": "04:202717",
                "actuators": [
                    "04:032211",
                    "04:202717"
                ]
            },
            "02": {
                "_name": "Badkamer",
                "class": "radiator_valve",
                "sensor": "04:032215",
                "actuators": [
                    "04:032215"
                ]
            },
            "03": {
                "_name": "SK xxxx",
                "class": "radiator_valve",
                "sensor": "04:095385",
                "actuators": [
                    "04:095385"
                ]
            },
            "04": {
                "_name": "Balkonkamer",
                "class": "radiator_valve",
                "sensor": "04:202711",
                "actuators": [
                    "04:202711"
                ]
            },
            "05": {
                "_name": "Zolderkamer",
                "class": "radiator_valve",
                "sensor": "04:202713",
                "actuators": [
                    "04:202713"
                ]
            },
            "06": {
                "_name": "Zolderoverloop",
                "class": "radiator_valve",
                "sensor": "04:032217",
                "actuators": [
                    "04:032217"
                ]
            },
            "07": {
                "_name": "Zolderbadkamr",
                "class": "radiator_valve",
                "sensor": "04:202715",
                "actuators": [
                    "04:202715"
                ]
            },
            "08": {
                "_name": "Woonkamer",
                "class": "radiator_valve",
                "sensor": null,
                "actuators": [
                    "04:032301",
                    "04:095387"
                ]
            }
        }
    },
    "orphans_heat": [
        "04:209421",
        "10:113534"
    ],
    "orphans_hvac": [
        "21:060691"
    ],
    "known_list": {
        "01:187689": { "alias" : "controller"},
        "04:032215": { "alias" : "Badkamer"},
        "04:032217": { "alias": "Zolderoverloop"},
        "04:095385": { "alias": "SK xxxx"},
        "04:202711": { "alias": "Balkonkamer"},
        "04:202713": { "alias": "Zolderkamer"},
        "04:202715": { "alias": "Zolderbadkamr"},
        "04:202717": { "alias": "Gang_02"},
        "18:069926": { "alias": "gateway_interface_01"},
        "10:113534": { "alias": "opentherm_bridge"},
        "04:032211": { "alias": "Gang_01"},
        "04:095387": { "alias": "Woonkamer_02"},
        "04:032301": { "alias": "Woonkamer_01"},
        "04:209421": { "alias": "radiator_valve"},
        "18:000073": { "alias": "gateway_interface_02"}
    }
}

If I start the script it shows:

pi@rPi4b:~/scripts $ python3 evogateway.py
2023-09-13 19:48:24,051 [1137] Schema file missing or the 'known_list' section is missing. Defaulting to ramses_rf 'eavesdropping' mode
Best practice is exactly one gateway (HGI) in the known_list: []
It is strongly recommended to provide a known_list, and use it as a whitelist (device_id filter), configure: enforce_known_list = True
2023-09-13 19:48:24 |
2023-09-13 19:48:24 | ------------------------------------------------------------------------------------------
2023-09-13 19:48:24 | Devices loaded from 'devices.json' file:
2023-09-13 19:48:24 |    CTL 01:187689 - Controller
2023-09-13 19:48:24 |    TRV 04:032215 - TRV:032215
2023-09-13 19:48:24 |    TRV 04:032217 - TRV:032217
2023-09-13 19:48:24 |    TRV 04:095385 - TRV:095385
2023-09-13 19:48:24 |    TRV 04:202711 - TRV:202711
2023-09-13 19:48:24 |    TRV 04:202713 - TRV:202713
2023-09-13 19:48:24 |    TRV 04:202715 - TRV:202715
2023-09-13 19:48:24 |    TRV 04:202717 - TRV:202717
2023-09-13 19:48:24 |    HGI 18:000730 - evoGateway
2023-09-13 19:48:24 | ------------------------------------------------------------------------------------------
2023-09-13 19:48:24 |
2023-09-13 19:48:24 | # evogateway 3.11-0.22.40 (using 'ramses_rf' library 0.22.40)
Not using any device filter: using a known_list (as a whitelist) is strongly recommended)
``

And if I stop the script a new ramses_rf_schema.json file is written without my changes. This fits with what's written in de readme.rm: "This file should not normally need to be manually edited (previous versions are overwritten with the current version)."

smar000 commented 10 months ago

As long as it is not defaulting to evesdrop mode, you can ignore the above message I think.

PRoomberg commented 7 months ago

I'm having the same issue. Each time I start the gateway eavesdropping starts and a new ramses file is generated when I stop the gateway.

blb4github commented 7 months ago

I've not yet a solution, it's for me indeed still the same.

smar000 commented 7 months ago

I will try put some time aside over the festive period to have a look at this properly.

smar000 commented 6 months ago

@PRoomberg - which versions of ramses_rf are you using?

I have just tried out installing on a clean vm. Other than an error with the packet_log entry in the newly ramses_rf.json, I am not seeing any other issues. The ramses_rf.json is not getting overwritten each time.

Are you both saying that your ramses_rf.json is getting overwritten each and every time you stop the evogateway script?

PRoomberg commented 6 months ago

I'm running 0.22.4. And yes, each time the gateway starts it shows these lines:

2023-09-13 19:48:24,051 [1137] Schema file missing or the 'known_list' section is missing. Defaulting to ramses_rf 'eavesdropping' mode Best practice is exactly one gateway (HGI) in the known_list: [] It is strongly recommended to provide a known_list, and use it as a whitelist (device_id filter), configure: enforce_known_list = True

smar000 commented 6 months ago

The ramses_rf version is fine.

I noticed that your schema missing warning is showing as line 1137. However, in the current code, that line is a blank, and that specific warning is on line 1135.

Can you check that you are running the latest version of evoGateway, and if so, see if you can identify where the extra 2 lines are in your version?

Also separately, I assume there are no file permission issues? Are you running on Windows by any chance?

PRoomberg commented 6 months ago

I was a bit lazy and copied those lines from a post above. Here's real output from my setup:

2023-12-22 00:19:47,723 [1146] Schema file missing or the 'known_list' section is missing. Defaulting to ramses_rf 'eavesdropping' mode Best practice is exactly one gateway (HGI) in the known_list: [] It is strongly recommended to provide a known_list, and use it as a whitelist (device_id filter), configure: enforce_known_list = True 2023-12-22 00:19:47 | 2023-12-22 00:19:47 | ------------------------------------------------------------------------------------------ 2023-12-22 00:19:47 | Devices loaded from 'devices.json' file: ...

... 2023-12-22 00:19:47 | ------------------------------------------------------------------------------------------ 2023-12-22 00:19:47 | 2023-12-22 00:19:47 | # evogateway 3.14-0.22.40 (using 'ramses_rf' library 0.22.40) Not using any device filter: using a known_list (as a whitelist) is strongly recommended)

smar000 commented 6 months ago

2023-12-22 00:19:47,723 [1146] Schema file missing or the 'known_list' section is missing. Defaulting to ramses_rf

Can you post any output text prior to this line. I am specifically looking for a loading schema mesage or a schema not found message.

blb4github commented 6 months ago

This is my log of a short run:

 $ python3 evogateway.py
2023-12-22 23:16:27,721 [1137] Schema file missing or the 'known_list' section is missing. Defaulting to ramses_rf 'eavesdropping' mode
Best practice is exactly one gateway (HGI) in the known_list: []
It is strongly recommended to provide a known_list, and use it as a whitelist (device_id filter), configure: enforce_known_list = True
2023-12-22 23:16:27 |
2023-12-22 23:16:27 | ------------------------------------------------------------------------------------------
2023-12-22 23:16:27 | Devices loaded from 'devices.json' file:
2023-12-22 23:16:27 |    CTL 01:187689 - Controller
2023-12-22 23:16:27 |    TRV 04:032211 - TRV:032211
2023-12-22 23:16:27 |    TRV 04:032215 - TRV:032215
2023-12-22 23:16:27 |    TRV 04:032217 - TRV:032217
2023-12-22 23:16:27 |    TRV 04:095385 - TRV:095385
2023-12-22 23:16:27 |    TRV 04:202711 - TRV:202711
2023-12-22 23:16:27 |    TRV 04:202713 - TRV:202713
2023-12-22 23:16:27 |    TRV 04:202715 - TRV:202715
2023-12-22 23:16:27 |    TRV 04:202717 - TRV:202717
2023-12-22 23:16:27 |    HGI 18:000730 - evoGateway
2023-12-22 23:16:27 | ------------------------------------------------------------------------------------------
2023-12-22 23:16:27 |
2023-12-22 23:16:27 | # evogateway 3.11-0.22.40 (using 'ramses_rf' library 0.22.40)
Not using any device filter: using a known_list (as a whitelist) is strongly recommended)
2023-12-22 23:16:35 |048| CTL Controller        -> OTB 10:113534         |RQ| boiler_setpoint | REQUEST: boiler_setpoint
2023-12-22 23:16:35 |047| OTB 10:113534         -> CTL Controller        |RP| boiler_setpoint | setpoint: 10.0
2023-12-22 23:16:36 |048| CTL Controller        -> OTB 10:113534         |RQ| opentherm_msg   | REQUEST: description: Fault flags & OEM fault code, msg_name: fault_flags
2023-12-22 23:16:36 |000| HGI evoGateway        -> OTB 10:113534         |RQ| opentherm_msg   | REQUEST: description: Status, msg_name: status_flags
2023-12-22 23:16:37 |047| OTB 10:113534         -> HGI evoGateway        |RP| opentherm_msg   | description: Status, msg_name: null, value: [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0]
2023-12-22 23:16:37 |000| HGI evoGateway        -> OTB 10:113534         |RQ| actuator_state  | REQUEST: actuator_state
2023-12-22 23:16:37 |047| OTB 10:113534         -> HGI evoGateway        |RP| actuator_state  | _flags_2: 10, _flags_3: [0, 0, 0, 0, 1, 0, 1, 0], ch_active: true, dhw_active: false, flame_active: true, modulation_level: 0%
2023-12-22 23:16:38 |048| CTL Controller        -> OTB 10:113534         |RQ| opentherm_msg   | REQUEST: description: Fault flags & OEM fault code, msg_name: fault_flags
2023-12-22 23:16:39 |047| OTB 10:113534         -> CTL Controller        |RP| opentherm_msg   | description: Fault flags & OEM fault code, msg_name: fault_flags
2023-12-22 23:16:39 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_devices    | REQUEST: device_role: heating_valve, domain_id: F9, zone_type: 0E
2023-12-22 23:16:39 |048| CTL Controller        -> HGI evoGateway        |RP| zone_devices    | device_role: heating_valve, devices: [], domain_id: F9, zone_type: 0E
2023-12-22 23:16:39 |000| HGI evoGateway        -> CTL Controller        |RQ| tpi_params      | REQUEST: domain_id: FC
2023-12-22 23:16:41 |048| CTL Controller        -> OTB 10:113534         |RQ| opentherm_msg   | REQUEST: description: Relative modulation level, msg_name: RelativeModulationLevel
2023-12-22 23:16:41 |047| OTB 10:113534         -> CTL Controller        |RP| opentherm_msg   | description: Relative modulation level, msg_name: RelativeModulationLevel
2023-12-22 23:16:41 |048| CTL Controller        -> OTB 10:113534         |RQ| opentherm_msg   | REQUEST: description: Central heating water pressure (bar), msg_name: CHWaterPressure
2023-12-22 23:16:42 |047| OTB 10:113534         -> CTL Controller        |RP| opentherm_msg   | description: Central heating water pressure (bar), msg_name: CHWaterPressure
2023-12-22 23:16:42 |048| CTL Controller        -> OTB 10:113534         |RQ| opentherm_msg   | REQUEST: description: Central heating water pressure (bar), msg_name: CHWaterPressure
2023-12-22 23:16:42 |000| HGI evoGateway        -> CTL Controller        |RQ| system_fault    | REQUEST: system_fault
2023-12-22 23:16:42 |047| CTL Controller        -> HGI evoGateway        |RP| system_fault    | log_entry: [23-12-16T18:07:05, restore, battery_low, sensor, 05, 04:202711, B0, 0000, FFFF7000], log_idx: 00
2023-12-22 23:16:42 |000| HGI evoGateway        -> CTL Controller        |RQ| datetime        | REQUEST: datetime
2023-12-22 23:16:42 |048| CTL Controller        -> HGI evoGateway        |RP| datetime        | 2023-12-22T23:16:10
2023-12-22 23:16:42 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_devices    | REQUEST: device_role: dhw_sensor, domain_id: FA, zone_type: 0D
2023-12-22 23:16:44 |048| CTL Controller        -> OTB 10:113534         |RQ| opentherm_msg   | REQUEST: description: Central heating water pressure (bar), msg_name: CHWaterPressure
RP --- 10:113534 01:187689 --:------ 3220 005 00F0120000 < Polling now deprecated for code|ctx=3220|12: it appears to be unsupported
2023-12-22 23:16:45 |047| OTB 10:113534         -> CTL Controller        |RP| opentherm_msg   | description: Central heating water pressure (bar), msg_name: CHWaterPressure
2023-12-22 23:16:45 |048| CTL Controller        -> OTB 10:113534         |RQ| opentherm_msg   | REQUEST: description: Boiler water temperature, msg_name: BoilerWaterTemperature
2023-12-22 23:16:46 |047| OTB 10:113534         -> CTL Controller        |RP| opentherm_msg   | description: Boiler water temperature, msg_name: BoilerWaterTemperature, value: 32.75
2023-12-22 23:16:46 |048| CTL Controller        -> OTB 10:113534         |RQ| opentherm_msg   | REQUEST: description: DHW temperature, msg_name: DHWTemperature
2023-12-22 23:16:46 |000| HGI evoGateway        -> CTL Controller        |RQ| system_zones    | REQUEST: zone_class: rad_actuator, zone_type: 08
2023-12-22 23:16:46 |048| CTL Controller        -> HGI evoGateway        |RP| system_zones    | zone_class: radiator_valve, zone_mask: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], zone_type: 08
2023-12-22 23:16:46 |000| HGI evoGateway        -> CTL Controller        |RQ| system_zones    | REQUEST: zone_class: ufh_actuator, zone_type: 09
2023-12-22 23:16:46 |048| CTL Controller        -> HGI evoGateway        |RP| system_zones    | zone_class: underfloor_heating, zone_mask: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], zone_type: 09
2023-12-22 23:16:47 |000| HGI evoGateway        -> CTL Controller        |RQ| temperature     | REQUEST: temperature
2023-12-22 23:16:47 |048| CTL Controller        -> HGI evoGateway        |RP| temperature     | 20.25°C                                       @ Woonkamer                   [Zone 00 ]
2023-12-22 23:16:47 |047| OTB 10:113534         -> CTL Controller        |RP| opentherm_msg   | description: DHW temperature, msg_name: DHWTemperature, value: 39.0
2023-12-22 23:16:47 |048| CTL Controller        -> OTB 10:113534         |RQ| opentherm_msg   | REQUEST: description: Return water temperature, msg_name: ReturnWaterTemperature
2023-12-22 23:16:47 |000| HGI evoGateway        -> CTL Controller        |RQ| system_zones    | REQUEST: zone_class: val_actuator, zone_type: 0A
2023-12-22 23:16:47 |048| CTL Controller        -> HGI evoGateway        |RP| system_zones    | zone_class: zone_valve, zone_mask: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], zone_type: 0A
2023-12-22 23:16:47 |000| HGI evoGateway        -> CTL Controller        |RQ| temperature     | REQUEST: temperature
2023-12-22 23:16:47 |048| CTL Controller        -> HGI evoGateway        |RP| temperature     | 18.40°C                                       @ Gang                        [Zone 01 ]
2023-12-22 23:16:47 |047| OTB 10:113534         -> CTL Controller        |RP| opentherm_msg   | description: Return water temperature, msg_name: ReturnWaterTemperature, value: 28.5
2023-12-22 23:16:47 |000| HGI evoGateway        -> TR0 00:001769         |RQ| system_zones    | REQUEST: zone_class: mix_actuator, zone_type: 0B
2023-12-22 23:16:47 |048| CTL Controller        -> OTB 10:113534         |RQ| opentherm_msg   | REQUEST: description: OEM diagnostic code, msg_name: OEMDiagnosticCode
2023-12-22 23:16:47 |000| HGI evoGateway        -> CTL Controller        |RQ| temperature     | REQUEST: temperature
2023-12-22 23:16:47 |048| CTL Controller        -> HGI evoGateway        |RP| temperature     | 17.73°C                                       @ Badkamer                    [Zone 02 ]
2023-12-22 23:16:48 |000| HGI evoGateway        -> CTL Controller        |RQ| temperature     | REQUEST: temperature
2023-12-22 23:16:48 |048| CTL Controller        -> HGI evoGateway        |RP| temperature     | 18.89°C                                       @ Zolderoverloop              [Zone 03 ]
2023-12-22 23:16:48 |047| OTB 10:113534         -> CTL Controller        |RP| opentherm_msg   | description: OEM diagnostic code, msg_name: OEMDiagnosticCode
2023-12-22 23:16:48 |000| HGI evoGateway        -> CTL Controller        |RQ| temperature     | REQUEST: temperature
2023-12-22 23:16:48 |048| CTL Controller        -> HGI evoGateway        |RP| temperature     | 16.77°C                                       @ SK Bauke                    [Zone 04 ]
2023-12-22 23:16:48 |000| HGI evoGateway        -> CTL Controller        |RQ| temperature     | REQUEST: temperature
2023-12-22 23:16:48 |048| CTL Controller        -> HGI evoGateway        |RP| temperature     | 19.55°C                                       @ Balkonkamer                 [Zone 05 ]
2023-12-22 23:16:48 |000| HGI evoGateway        -> CTL Controller        |RQ| temperature     | REQUEST: temperature
2023-12-22 23:16:48 |048| CTL Controller        -> HGI evoGateway        |RP| temperature     | 17.86°C                                       @ Zolderbadkamr               [Zone 06 ]
2023-12-22 23:16:48 |000| HGI evoGateway        -> CTL Controller        |RQ| temperature     | REQUEST: temperature
2023-12-22 23:16:48 |048| CTL Controller        -> HGI evoGateway        |RP| temperature     | 17.38°C                                       @ Zolderkamer                 [Zone 07 ]
2023-12-22 23:16:49 |047| OTB 10:113534         -> ---                   | I| opentherm_sync  | ticker: 12973
2023-12-22 23:16:50 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_devices    | REQUEST: device_role: rad_actuator, zone_type: 08 @ Woonkamer               [Zone 00 ]
2023-12-22 23:16:50 |048| CTL Controller        -> HGI evoGateway        |RP| zone_devices    | device_role: rad_actuator, devices: [04:095387, 04:032301], zone_type: 08 @ Woonkamer               [Zone 00 ]
2023-12-22 23:16:50 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_devices    | REQUEST: device_role: zone_sensor, zone_type: 04 @ Woonkamer                [Zone 00 ]
2023-12-22 23:16:50 |047| CTL Controller        -> HGI evoGateway        |RP| zone_devices    | device_role: zone_sensor, devices: [], zone_type: 04 @ Woonkamer               [Zone 00 ]
2023-12-22 23:16:50 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_devices    | REQUEST: device_role: rad_actuator, zone_type: 08 @ Gang                    [Zone 01 ]
2023-12-22 23:16:50 |048| CTL Controller        -> HGI evoGateway        |RP| zone_devices    | device_role: rad_actuator, devices: [04:032211, 04:202717], zone_type: 08 @ Gang                    [Zone 01 ]
2023-12-22 23:16:50 |000| HGI evoGateway        -> CTL Controller        |RQ| system_zones    | REQUEST: zone_class: ele_actuator, zone_type: 11
2023-12-22 23:16:50 |048| CTL Controller        -> HGI evoGateway        |RP| system_zones    | zone_class: electric_heat, zone_mask: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], zone_type: 11
2023-12-22 23:16:50 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_devices    | REQUEST: device_role: zone_sensor, zone_type: 04 @ Gang                     [Zone 01 ]
2023-12-22 23:16:50 |048| CTL Controller        -> HGI evoGateway        |RP| zone_devices    | device_role: zone_sensor, devices: [04:032211], zone_type: 04 @ Gang                    [Zone 01 ]
2023-12-22 23:16:51 |000| HGI evoGateway        -> CTL Controller        |RQ| system_zones    | REQUEST: zone_class: zone_sensor, zone_type: 04
2023-12-22 23:16:51 |048| CTL Controller        -> HGI evoGateway        |RP| system_zones    | zone_class: heating_zone, zone_mask: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0], zone_type: 04
2023-12-22 23:16:51 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_devices    | REQUEST: device_role: rad_actuator, zone_type: 08 @ Badkamer                [Zone 02 ]
2023-12-22 23:16:51 |048| CTL Controller        -> HGI evoGateway        |RP| zone_devices    | device_role: rad_actuator, devices: [04:032215], zone_type: 08 @ Badkamer                [Zone 02 ]
2023-12-22 23:16:51 |000| HGI evoGateway        -> CTL Controller        |RQ| system_mode     | REQUEST: system_mode
2023-12-22 23:16:51 |048| CTL Controller        -> HGI evoGateway        |RP| system_mode     | auto
2023-12-22 23:16:51 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_devices    | REQUEST: device_role: zone_sensor, zone_type: 04 @ Badkamer                 [Zone 02 ]
2023-12-22 23:16:51 |048| CTL Controller        -> HGI evoGateway        |RP| zone_devices    | device_role: zone_sensor, devices: [04:032215], zone_type: 04 @ Badkamer                [Zone 02 ]
2023-12-22 23:16:51 |000| HGI evoGateway        -> CTL Controller        |RQ| schedule_version | REQUEST: schedule_version
2023-12-22 23:16:51 |048| CTL Controller        -> HGI evoGateway        |RP| schedule_version | _header: 0005, change_counter: 15
2023-12-22 23:16:52 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_devices    | REQUEST: device_role: rad_actuator, zone_type: 08 @ Zolderoverloop          [Zone 03 ]
2023-12-22 23:16:52 |048| CTL Controller        -> HGI evoGateway        |RP| zone_devices    | device_role: rad_actuator, devices: [], zone_type: 08 @ Zolderoverloop          [Zone 03 ]
2023-12-22 23:16:52 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_devices    | REQUEST: device_role: rad_actuator, zone_type: 08 @ SK Bauke                [Zone 04 ]
2023-12-22 23:16:52 |048| CTL Controller        -> HGI evoGateway        |RP| zone_devices    | device_role: rad_actuator, devices: [04:095385], zone_type: 08 @ SK Bauke                [Zone 04 ]
2023-12-22 23:16:52 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_devices    | REQUEST: device_role: zone_sensor, zone_type: 04 @ Zolderoverloop           [Zone 03 ]
2023-12-22 23:16:52 |048| CTL Controller        -> HGI evoGateway        |RP| zone_devices    | device_role: zone_sensor, devices: [34:084622], zone_type: 04 @ Zolderoverloop          [Zone 03 ]
2023-12-22 23:16:52 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_devices    | REQUEST: device_role: zone_sensor, zone_type: 04 @ SK Bauke                 [Zone 04 ]
2023-12-22 23:16:52 |048| CTL Controller        -> HGI evoGateway        |RP| zone_devices    | device_role: zone_sensor, devices: [04:095385], zone_type: 04 @ SK Bauke                [Zone 04 ]
2023-12-22 23:16:52 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_devices    | REQUEST: device_role: rad_actuator, zone_type: 08 @ Balkonkamer             [Zone 05 ]
2023-12-22 23:16:52 |048| CTL Controller        -> HGI evoGateway        |RP| zone_devices    | device_role: rad_actuator, devices: [04:202711], zone_type: 08 @ Balkonkamer             [Zone 05 ]
2023-12-22 23:16:53 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_devices    | REQUEST: device_role: rad_actuator, zone_type: 08 @ Zolderbadkamr           [Zone 06 ]
2023-12-22 23:16:53 |048| CTL Controller        -> HGI evoGateway        |RP| zone_devices    | device_role: rad_actuator, devices: [04:202715], zone_type: 08 @ Zolderbadkamr           [Zone 06 ]
2023-12-22 23:16:53 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_devices    | REQUEST: device_role: zone_sensor, zone_type: 04 @ Balkonkamer              [Zone 05 ]
2023-12-22 23:16:53 |048| CTL Controller        -> HGI evoGateway        |RP| zone_devices    | device_role: zone_sensor, devices: [04:202711], zone_type: 04 @ Balkonkamer             [Zone 05 ]
2023-12-22 23:16:53 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_devices    | REQUEST: device_role: zone_sensor, zone_type: 04 @ Zolderbadkamr            [Zone 06 ]
2023-12-22 23:16:53 |048| CTL Controller        -> HGI evoGateway        |RP| zone_devices    | device_role: zone_sensor, devices: [04:202715], zone_type: 04 @ Zolderbadkamr           [Zone 06 ]
2023-12-22 23:16:53 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_devices    | REQUEST: device_role: rad_actuator, zone_type: 08 @ Zolderkamer             [Zone 07 ]
2023-12-22 23:16:53 |048| CTL Controller        -> HGI evoGateway        |RP| zone_devices    | device_role: rad_actuator, devices: [04:202713], zone_type: 08 @ Zolderkamer             [Zone 07 ]
2023-12-22 23:16:53 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_devices    | REQUEST: device_role: zone_sensor, zone_type: 04 @ Zolderkamer              [Zone 07 ]
2023-12-22 23:16:53 |048| CTL Controller        -> HGI evoGateway        |RP| zone_devices    | device_role: zone_sensor, devices: [04:202713], zone_type: 04 @ Zolderkamer             [Zone 07 ]
2023-12-22 23:16:54 |000| HGI evoGateway        -> OTB 10:113534         |RQ| opentherm_msg   | REQUEST: description: Control setpoint, msg_name: ControlSetpoint
2023-12-22 23:16:54 |047| OTB 10:113534         -> HGI evoGateway        |RP| opentherm_msg   | description: Control setpoint, msg_name: ControlSetpoint, value: 0.0
2023-12-22 23:16:54 |000| HGI evoGateway        -> OTB 10:113534         |RQ| opentherm_msg   | REQUEST: description: DHW flow rate (litres/minute), msg_name: DHWFlowRate
2023-12-22 23:16:55 |047| OTB 10:113534         -> HGI evoGateway        |RP| opentherm_msg   | description: DHW flow rate (litres/minute), msg_name: DHWFlowRate
2023-12-22 23:16:55 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_devices    | REQUEST: device_role: appliance_control, domain_id: FC, zone_type: 0F
2023-12-22 23:16:55 |048| CTL Controller        -> HGI evoGateway        |RP| zone_devices    | device_role: appliance_control, devices: [], domain_id: FC, zone_type: 0F
2023-12-22 23:16:55 |000| HGI evoGateway        -> OTB 10:113534         |RQ| opentherm_msg   | REQUEST: description: Outside temperature, msg_name: OutsideTemperature
2023-12-22 23:16:56 |047| OTB 10:113534         -> HGI evoGateway        |RP| opentherm_msg   | description: Outside temperature, msg_name: OutsideTemperature, value: 8.0
2023-12-22 23:16:56 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_devices    | REQUEST: device_role: hotwater_valve, domain_id: FA, zone_type: 0E
2023-12-22 23:16:56 |048| CTL Controller        -> HGI evoGateway        |RP| zone_devices    | device_role: hotwater_valve, devices: [], domain_id: FA, zone_type: 0E
2023-12-22 23:16:56 |000| HGI evoGateway        -> CTL Controller        |RQ| tpi_params      | REQUEST: domain_id: FC
2023-12-22 23:16:56 |048| CTL Controller        -> HGI evoGateway        |RP| tpi_params      | cycle_rate: 6, domain_id: FC, min_off_time: 0.0, min_on_time: 1.0, proportional_band_width: null
2023-12-22 23:16:56 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_devices    | REQUEST: device_role: dhw_sensor, domain_id: FA, zone_type: 0D
2023-12-22 23:16:56 |048| CTL Controller        -> HGI evoGateway        |RP| zone_devices    | device_role: dhw_sensor, devices: [], domain_id: FA, zone_type: 0D
2023-12-22 23:16:56 |000| HGI evoGateway        -> CTL Controller        |RQ| system_zones    | REQUEST: zone_class: mix_actuator, zone_type: 0B
2023-12-22 23:16:56 |048| CTL Controller        -> HGI evoGateway        |RP| system_zones    | zone_class: mixing_valve, zone_mask: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], zone_type: 0B
 I --- 20:181212 20:075028 --:------ 4E22 003 000432 < Corrupt packet: Unknown code: 4E22
^[a
2023-12-22 23:17:06 |085| RND RND:084622        ->                       | I| temperature     | 18.88°C
2023-12-22 23:17:16 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_mode       | REQUEST: zone_mode                            @ Zolderbadkamr               [Zone 06 ]
2023-12-22 23:17:16 |047| CTL Controller        -> HGI evoGateway        |RP| zone_mode       | mode: temporary_override, setpoint: 10.0, until: 2023-12-23T06:00:00 @ Zolderbadkamr           [Zone 06 ]
2023-12-22 23:17:17 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_mode       | REQUEST: zone_mode                            @ Gang                        [Zone 01 ]
2023-12-22 23:17:17 |048| CTL Controller        -> HGI evoGateway        |RP| zone_mode       | mode: follow_schedule, setpoint: 16.0         @ Gang                        [Zone 01 ]
2023-12-22 23:17:17 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_mode       | REQUEST: zone_mode                            @ Woonkamer                   [Zone 00 ]
2023-12-22 23:17:17 |048| CTL Controller        -> HGI evoGateway        |RP| zone_mode       | mode: follow_schedule, setpoint: 16.0         @ Woonkamer                   [Zone 00 ]
2023-12-22 23:17:17 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_name       | REQUEST: zone_name
2023-12-22 23:17:17 |048| CTL Controller        -> HGI evoGateway        |RP| zone_name       | name: Badkamer                                @ Badkamer                    [Zone 02 ]
2023-12-22 23:17:17 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_mode       | REQUEST: zone_mode                            @ Zolderoverloop              [Zone 03 ]
2023-12-22 23:17:17 |048| CTL Controller        -> HGI evoGateway        |RP| zone_mode       | mode: follow_schedule, setpoint: 16.0         @ Zolderoverloop              [Zone 03 ]
2023-12-22 23:17:17 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_mode       | REQUEST: zone_mode                            @ Badkamer                    [Zone 02 ]
2023-12-22 23:17:17 |048| CTL Controller        -> HGI evoGateway        |RP| zone_mode       | mode: follow_schedule, setpoint: 16.0         @ Badkamer                    [Zone 02 ]
2023-12-22 23:17:18 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_params     | REQUEST: zone_params                          @ SK Bauke                    [Zone 04 ]
2023-12-22 23:17:18 |048| CTL Controller        -> HGI evoGateway        |RP| zone_params     | local_override: true, max_temp: 35.0, min_temp: 5.0, multiroom_mode: false, openwindow_function: true @ SK Bauke                [Zone 04 ]
2023-12-22 23:17:18 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_mode       | REQUEST: zone_mode                            @ Balkonkamer                 [Zone 05 ]
2023-12-22 23:17:18 |048| CTL Controller        -> HGI evoGateway        |RP| zone_mode       | mode: temporary_override, setpoint: 15.0, until: 2023-12-23T06:00:00 @ Balkonkamer             [Zone 05 ]
2023-12-22 23:17:18 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_name       | REQUEST: zone_name
2023-12-22 23:17:18 |048| CTL Controller        -> HGI evoGateway        |RP| zone_name       | name: SK Bauke                                @ SK Bauke                    [Zone 04 ]
2023-12-22 23:17:18 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_name       | REQUEST: zone_name
2023-12-22 23:17:18 |048| CTL Controller        -> HGI evoGateway        |RP| zone_name       | name: Zolderkamer                             @ Zolderkamer                 [Zone 07 ]
2023-12-22 23:17:18 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_mode       | REQUEST: zone_mode                            @ SK Bauke                    [Zone 04 ]
2023-12-22 23:17:18 |048| CTL Controller        -> HGI evoGateway        |RP| zone_mode       | mode: follow_schedule, setpoint: 16.0         @ SK Bauke                    [Zone 04 ]
2023-12-22 23:17:19 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_mode       | REQUEST: zone_mode                            @ Zolderkamer                 [Zone 07 ]
2023-12-22 23:17:19 |048| CTL Controller        -> HGI evoGateway        |RP| zone_mode       | mode: temporary_override, setpoint: 15.0, until: 2023-12-23T06:00:00 @ Zolderkamer             [Zone 07 ]
2023-12-22 23:17:19 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_params     | REQUEST: zone_params                          @ Zolderbadkamr               [Zone 06 ]
2023-12-22 23:17:19 |048| CTL Controller        -> HGI evoGateway        |RP| zone_params     | local_override: true, max_temp: 35.0, min_temp: 5.0, multiroom_mode: false, openwindow_function: true @ Zolderbadkamr           [Zone 06 ]
2023-12-22 23:17:19 |047| OTB 10:113534         -> ---                   | I| opentherm_sync  | ticker: 12974
2023-12-22 23:17:20 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_name       | REQUEST: zone_name
2023-12-22 23:17:20 |048| CTL Controller        -> HGI evoGateway        |RP| zone_name       | name: Zolderbadkamr                           @ Zolderbadkamr               [Zone 06 ]
2023-12-22 23:17:20 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_params     | REQUEST: zone_params                          @ Gang                        [Zone 01 ]
2023-12-22 23:17:20 |047| CTL Controller        -> HGI evoGateway        |RP| zone_params     | local_override: true, max_temp: 35.0, min_temp: 5.0, multiroom_mode: true, openwindow_function: true @ Gang                    [Zone 01 ]
2023-12-22 23:17:20 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_params     | REQUEST: zone_params                          @ Woonkamer                   [Zone 00 ]
2023-12-22 23:17:20 |048| CTL Controller        -> HGI evoGateway        |RP| zone_params     | local_override: true, max_temp: 23.0, min_temp: 12.0, multiroom_mode: false, openwindow_function: false @ Woonkamer               [Zone 00 ]
2023-12-22 23:17:20 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_name       | REQUEST: zone_name
2023-12-22 23:17:20 |048| CTL Controller        -> HGI evoGateway        |RP| zone_name       | name: Gang                                    @ Gang                        [Zone 01 ]
2023-12-22 23:17:20 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_name       | REQUEST: zone_name
2023-12-22 23:17:20 |048| CTL Controller        -> HGI evoGateway        |RP| zone_name       | name: Woonkamer                               @ Woonkamer                   [Zone 00 ]
2023-12-22 23:17:21 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_params     | REQUEST: zone_params                          @ Badkamer                    [Zone 02 ]
2023-12-22 23:17:21 |048| CTL Controller        -> HGI evoGateway        |RP| zone_params     | local_override: true, max_temp: 35.0, min_temp: 5.0, multiroom_mode: false, openwindow_function: true @ Badkamer                [Zone 02 ]
2023-12-22 23:17:21 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_params     | REQUEST: zone_params                          @ Zolderoverloop              [Zone 03 ]
2023-12-22 23:17:21 |048| CTL Controller        -> HGI evoGateway        |RP| zone_params     | local_override: true, max_temp: 35.0, min_temp: 5.0, multiroom_mode: false, openwindow_function: true @ Zolderoverloop          [Zone 03 ]
2023-12-22 23:17:21 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_name       | REQUEST: zone_name
2023-12-22 23:17:21 |048| CTL Controller        -> HGI evoGateway        |RP| zone_name       | name: Zolderoverloop                          @ Zolderoverloop              [Zone 03 ]
2023-12-22 23:17:21 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_params     | REQUEST: zone_params                          @ Balkonkamer                 [Zone 05 ]
2023-12-22 23:17:21 |048| CTL Controller        -> HGI evoGateway        |RP| zone_params     | local_override: true, max_temp: 35.0, min_temp: 5.0, multiroom_mode: false, openwindow_function: true @ Balkonkamer             [Zone 05 ]
2023-12-22 23:17:21 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_name       | REQUEST: zone_name
2023-12-22 23:17:21 |048| CTL Controller        -> HGI evoGateway        |RP| zone_name       | name: Balkonkamer                             @ Balkonkamer                 [Zone 05 ]
2023-12-22 23:17:22 |000| HGI evoGateway        -> CTL Controller        |RQ| zone_params     | REQUEST: zone_params                          @ Zolderkamer                 [Zone 07 ]
2023-12-22 23:17:22 |048| CTL Controller        -> HGI evoGateway        |RP| zone_params     | local_override: true, max_temp: 35.0, min_temp: 5.0, multiroom_mode: false, openwindow_function: true @ Zolderkamer             [Zone 07 ]
2023-12-22 23:17:22 |048| CTL Controller        -> OTB 10:113534         |RQ| actuator_state  | REQUEST: actuator_state
2023-12-22 23:17:22 |047| OTB 10:113534         -> CTL Controller        |RP| actuator_state  | _flags_2: 10, _flags_3: [0, 0, 0, 0, 1, 0, 1, 0], ch_active: true, dhw_active: false, flame_active: true, modulation_level: 0%
 I --- 20:181212 20:075028 --:------ 4E22 003 000432 < Corrupt packet: Unknown code: 4E22
2023-12-22 23:17:37 |000| HGI evoGateway        -> OTB 10:113534         |RQ| opentherm_msg   | REQUEST: description: Status, msg_name: status_flags
2023-12-22 23:17:38 |047| OTB 10:113534         -> HGI evoGateway        |RP| opentherm_msg   | description: Status, msg_name: null, value: [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0]
^CMsgTransport.pkt_dispatcher(): connection_lost(None)
Schema[gateway] = {
    "config": {
        "disable_sending": false,
        "disable_discovery": false,
        "enable_eavesdrop": false,
        "enforce_known_list": false,
        "evofw_flag": null,
        "max_zones": 12,
        "use_aliases": true,
        "reduce_processing": 0,
        "use_native_ot": "prefer",
        "packet_log": {
            "file_name": "packet.log",
            "rotate_bytes": 1000000,
            "rotate_backups": 9
        }
    },
    "main_tcs": "01:187689",
    "01:187689": {
        "system": {
            "appliance_control": null
        },
        "orphans": [],
        "stored_hotwater": {},
        "underfloor_heating": {},
        "zones": {
            "00": {
                "_name": "Woonkamer",
                "class": "radiator_valve",
                "sensor": null,
                "actuators": [
                    "04:032301",
                    "04:095387"
                ]
            },
            "01": {
                "_name": "Gang",
                "class": "radiator_valve",
                "sensor": "04:032211",
                "actuators": [
                    "04:032211",
                    "04:202717"
                ]
            },
            "02": {
                "_name": "Badkamer",
                "class": "radiator_valve",
                "sensor": "04:032215",
                "actuators": [
                    "04:032215"
                ]
            },
            "03": {
                "_name": "Zolderoverloop",
                "class": "radiator_valve",
                "sensor": "34:084622",
                "actuators": []
            },
            "04": {
                "_name": "SK Bauke",
                "class": "radiator_valve",
                "sensor": "04:095385",
                "actuators": [
                    "04:095385"
                ]
            },
            "05": {
                "_name": "Balkonkamer",
                "class": "radiator_valve",
                "sensor": "04:202711",
                "actuators": [
                    "04:202711"
                ]
            },
            "06": {
                "_name": "Zolderbadkamr",
                "class": "radiator_valve",
                "sensor": "04:202715",
                "actuators": [
                    "04:202715"
                ]
            },
            "07": {
                "_name": "Zolderkamer",
                "class": "radiator_valve",
                "sensor": "04:202713",
                "actuators": [
                    "04:202713"
                ]
            }
        }
    },
    "orphans_heat": [
        "10:113534"
    ],
    "orphans_hvac": [],
    "known_list": {
        "01:187689": {
            "class": "controller",
            "alias": null,
            "faked": false
        },
        "04:032211": {
            "class": "radiator_valve",
            "alias": null,
            "faked": false
        },
        "04:032215": {
            "class": "radiator_valve",
            "alias": null,
            "faked": false
        },
        "04:032217": {
            "class": "radiator_valve",
            "alias": null,
            "faked": false
        },
        "04:095385": {
            "class": "radiator_valve",
            "alias": null,
            "faked": false
        },
        "04:202711": {
            "class": "radiator_valve",
            "alias": null,
            "faked": false
        },
        "04:202713": {
            "class": "radiator_valve",
            "alias": null,
            "faked": false
        },
        "04:202715": {
            "class": "radiator_valve",
            "alias": null,
            "faked": false
        },
        "04:202717": {
            "class": "radiator_valve",
            "alias": null,
            "faked": false
        },
        "10:113534": {
            "class": "opentherm_bridge",
            "alias": null,
            "faked": false
        },
        "18:069926": {
            "class": "gateway_interface",
            "alias": null,
            "faked": false
        },
        "04:095387": {
            "class": "radiator_valve",
            "alias": null,
            "faked": false
        },
        "04:032301": {
            "class": "radiator_valve",
            "alias": null,
            "faked": false
        },
        "34:084622": {
            "class": "thermostat",
            "alias": null,
            "faked": false
        }
    }
}

Params[gateway] = {"devices": {"01:187689": {}, "04:032211": {}, "04:032215": {}, "04:032217": {}, "04:032301": {}, "04:095385": {}, "04:095387": {}, "04:202711": {}, "04:202713": {}, "04:202715": {}, "04:202717": {}, "10:113534": {"opentherm_params": {}, "ramses_ii_params": {"max_rel_modularion": null}}, "18:069926": {}, "34:084622": {}}}

Status[gateway] = {"devices": {"01:187689": {}, "04:032211": {"temperature": null, "setpoint": null, "heat_demand": null, "battery_state": null, "window_open": null}, "04:032215": {"temperature": null, "setpoint": null, "heat_demand": null, "battery_state": null, "window_open": null}, "04:032217": {"temperature": null, "setpoint": null, "heat_demand": null, "battery_state": null, "window_open": null}, "04:032301": {"temperature": null, "setpoint": null, "heat_demand": null, "battery_state": null, "window_open": null}, "04:095385": {"temperature": null, "setpoint": null, "heat_demand": null, "battery_state": null, "window_open": null}, "04:095387": {"temperature": null, "setpoint": null, "heat_demand": null, "battery_state": null, "window_open": null}, "04:202711": {"temperature": null, "setpoint": null, "heat_demand": null, "battery_state": null, "window_open": null}, "04:202713": {"temperature": null, "setpoint": null, "heat_demand": null, "battery_state": null, "window_open": null}, "04:202715": {"temperature": null, "setpoint": null, "heat_demand": null, "battery_state": null, "window_open": null}, "04:202717": {"temperature": null, "setpoint": null, "heat_demand": null, "battery_state": null, "window_open": null}, "10:113534": {"heat_demand": null, "actuator_cycle": null, "actuator_state": {"modulation_level": 0.0, "ch_active": true, "dhw_active": false, "flame_active": true}, "boiler_output_temp": 32.75, "boiler_return_temp": 28.5, "boiler_setpoint": 0.0, "ch_setpoint": null, "ch_max_setpoint": null, "ch_water_pressure": null, "dhw_flow_rate": null, "dhw_setpoint": null, "dhw_temp": 39.0, "oem_code": null, "outside_temp": 8.0, "rel_modulation_level": 0.0, "ch_active": true, "ch_enabled": null, "cooling_active": false, "cooling_enabled": false, "dhw_active": false, "dhw_blocking": false, "dhw_enabled": false, "fault_present": false, "flame_active": true, "summer_mode": false, "otc_active": false}, "18:069926": {}, "34:084622": {"temperature": 18.88, "setpoint": null, "battery_state": null}}}
Schema[orphans_heat] = {
    "schema": [
        "10:113534"
    ]
}

DEVICES = {
    "01:187689": {
        "alias": "Controller"
    },
    "04:032211": {
        "alias": "TRV:032211"
    },
    "04:032215": {
        "alias": "TRV:032215"
    },
    "04:032217": {
        "alias": "TRV:032217"
    },
    "04:095385": {
        "alias": "TRV:095385"
    },
    "04:202711": {
        "alias": "TRV:202711"
    },
    "04:202713": {
        "alias": "TRV:202713"
    },
    "04:202715": {
        "alias": "TRV:202715"
    },
    "04:202717": {
        "alias": "TRV:202717"
    },
    "18:000730": {
        "alias": "evoGateway"
    },
    "34:084622": {
        "alias": "RND:084622"
    }
}
Updated 'devices.json' and ramses_rf schema files generated
 - ended without error (e.g. EOF)
$ 
PRoomberg commented 6 months ago

2023-12-22 00:19:47,723 [1146] Schema file missing or the 'known_list' section is missing. Defaulting to ramses_rf

Can you post any output text prior to this line. I am specifically looking for a loading schema mesage or a schema not found message.

There is no prior output. Only the command prompt with the start of the python script. The same as blb4github shows above.

smar000 commented 6 months ago

2023-12-22 23:16:27 | # evogateway 3.11-0.22.40 (using 'ramses_rf' library 0.22.40)

I don't think this is the problem, but for good order, can you try using the latest master, which is at version 3.14 (this has not been tagged, so just download the evogateway.py file directly).

Are you confident that there are no file permissions issues?

dmsviento commented 6 months ago

Also getting the same prob:

2024-01-14 15:59:08,528 [1146] Schema file missing or the 'known_list' section is missing. Defaulting to ramses_rf 'eavesdropping' mode
Best practice is exactly one gateway (HGI) in the known_list: []
It is strongly recommended to provide a known_list, and use it as a whitelist (device_id filter), configure: enforce_known_list = True
2024-01-14 15:59:08 |
2024-01-14 15:59:08 | ------------------------------------------------------------------------------------------
2024-01-14 15:59:08 | Devices loaded from 'devices.json' file:

.....
2024-01-14 15:59:08 | # evogateway 3.14-0.22.40 (using 'ramses_rf' library 0.22.40)

also ending up with mutiple saved shema and devices.json files

smar000 commented 5 months ago

Can you try adding the following into line 1137, and see what it shows:

print(f"RAMSESRF_DISABLE_DISCOVERY: {RAMSESRF_DISABLE_DISCOVERY}, schema_loaded_from_file: {schema_loaded_from_file}, os.path.isfile(SCHEMA_FILE): {os.path.isfile(SCHEMA_FILE)}")

dmsviento commented 5 months ago

Certainly, will. Should be able to get back to this over the weekend

dmsviento commented 5 months ago

Guess you after this bit:

RAMSESRF_DISABLE_DISCOVERY: False, schema_loaded_from_file: False, os.path.isfile(SCHEMA_FILE): True
2024-01-20 09:20:03,152 [1147] Schema file missing or the 'known_list' section is missing. Defaulting to ramses_rf 'eavesdropping' mode
PRoomberg commented 5 months ago

I'm getting the same results as above when I add that line.

smar000 commented 5 months ago

I'm getting the same results as above when I add that line.

That's as expected, as the line was only to show us the value of those variables. Can you post your config file as well.

dmsviento commented 5 months ago
[Serial Port]
# Port is required
COM_PORT         = /dev/ttyUSB0

# optional
COM_BAUD         = 115200

# Optional
[Files]
EVENTS_FILE                 = events.log
PACKET_LOG_FILE             = packet.log
LOG_FILE_ROTATE_COUNT       = 9
LOG_FILE_ROTATE_BYTES       = 1000000

DEVICES_FILE                = devices.json
SCHEMA_FILE                 = ramses_rf_schema.json
LOAD_ZONES_FROM_FILE        = True

[MQTT]
# Required
MQTT_SERVER                 = <host>
MQTT_USER                   = <user_name>
MQTT_PW                     = <password>

# Optional
MQTT_PUB_TOPIC              = evohome/evogateway
MQTT_SUB_TOPIC              = evohome/evogateway/_zone_independent/command

#Publish as a json string. If False, the key/values of the json will be published individually
MQTT_PUB_AS_JSON            = False

# Either group messages by zone name (default), otherwise by device name
MQTT_GROUP_BY_ZONE          = True

[MISC]
THIS_GATEWAY_NAME           = evoGateway

# Display full json string from evohome_rf, or just key data item for each row
DISPLAY_FULL_JSON            = False

# SCHEMA_EAVESDROP            = False

# Assumes that there is only a single HGI device on the network (in case of spurious HGI device addresses)
FORCE_SINGLE_HGI            = True
PRoomberg commented 5 months ago

Here's my config:

[Serial Port]
# Port is required
COM_PORT         = /dev/ttyUSB0

# optional
COM_BAUD         = 57600
COM_RETRY_LIMIT  = 10

# Optional
[Files]
EVENTS_FILE                 = events.log
PACKET_LOG_FILE             = packet.log
LOG_FILE_ROTATE_COUNT       = 9
LOG_FILE_ROTATE_BYTES       = 1000000 

DEVICES_FILE                = devices.json
SCHEMA_FILE                 = ramses_rf_schema.json
LOAD_ZONES_FROM_FILE        = True

[PACKET_LOG]

[MQTT]
# Required
MQTT_SERVER                 = <host>
MQTT_USER                   = <user_name>
MQTT_PW                     = <password>

# Optional
#MQTT_PUB_TOPIC              = evohome/evogateway
#MQTT_SUB_TOPIC              = evohome/evogateway/_zone_independent/command
MQTT_PUB_TOPIC             = evohome/gateway
MQTT_SUB_TOPIC             = evohome/gateway/command

#Publish as a json string. If False, the key/values of the json will be published individually
MQTT_PUB_AS_JSON            = False

# Either group messages by zone name (default), otherwise by device name
MQTT_GROUP_BY_ZONE          = True

[MISC]
THIS_GATEWAY_NAME           = EvoGateway

# Display full json string from evohome_rf, or just key data item for each row
DISPLAY_FULL_JSON           = False

#SCHEMA_EAVESDROP            = False

# Assumes that there is only a single HGI device on the network (in case of spurious HGI device addresses)
FORCE_SINGLE_HGI            = True
smar000 commented 5 months ago

Thanks. Can you add the following to the bottom of your config file, and give it a try:


[Ramses_rf]
DISABLE_DISCOVERY           = True
PRoomberg commented 5 months ago

Added it and restarted. Now this messages is shown in the events.log

2024-01-22 22:07:11,412 [1121] Loading schema from file 'ramses_rf_schema.json'

But no lines after that.

Removed the parameter and restarted again. Now the events.log shows

2024-01-22 22:12:39,733 [1147] Schema file missing or the 'known_list' section is missing. Defaulting to ramses_rf 'eavesdropping' mode
2024-01-22 22:12:39,761 [1227] # evogateway 3.14-0.22.40 (using 'ramses_rf' library 0.22.40)
2024-01-22 22:12:39,763 [705] Connected to MQTT broker. Subscribing to topic evohome/gateway/command for commands

Followed by real events.

dmsviento commented 5 months ago

Firstly, I will say that despite this minor problem this is an extremely helpful module. Many thanks for the effort put into this, it has saved me a boat load of headaches, excellent work.

I have added the requested and also get the same:

2024-01-23 08:43:47,356 [1120] Loading schema from file 'ramses_rf_schema.json'

It goes no further than that. Changing the value to false and restarting resolves, but back to:

2024-01-23 08:45:40,738 [1146] Schema file missing or the 'known_list' section is missing. Defaulting to ramses_rf 'eavesdropping' mode
smar000 commented 5 months ago

Thanks for trying. Very odd. It seems to be getting stuck on opening the schema file. Are you sure file permissions are ok etc? Are you running on linux or Windows?

dmsviento commented 5 months ago

Linux, raspberry pi 5. Everything (incl the directory itself) has the same owner (current user) and group. I have tried this running standalone from the command line and as service run as either root or user - same result

smar000 commented 5 months ago

If you've tried with root, then it most likely is not a permissions issue then. If you are up for it, can you replace lines 1121 to 1132 in the main script with the following:

            with open(SCHEMA_FILE) as config_schema:
                print("--> Checkpoint 1")
                schema = json.load(config_schema)
        print("--> Checkpoint 2")
                if SZ_SCHEMA in schema and SZ_MAIN_TCS in schema[SZ_SCHEMA] and schema[SZ_SCHEMA][SZ_MAIN_TCS] is None:
                    print("--> Checkpoint 3")
                    schema_loaded_from_file = False
                    log.warning(f"The existing schema file '{SCHEMA_FILE}' appears to be invalid. Ignoring...")
                    RAMSESRF_DISABLE_DISCOVERY = False
                else:
                    print("--> Checkpoint 4")
                    lib_kwargs.update(schema)
                    print("--> Checkpoint 5")
                    if COM_PORT: # override with the one in the main config file
                        lib_kwargs[SZ_CONFIG][SZ_SERIAL_PORT] = COM_PORT
                    log.debug(f"Schema loaded. Updated lib_kwargs: {lib_kwargs}")
                    schema_loaded_from_file = True

Please try this with the DISABLE_DISCOVERYparameter set to True in the config file. This will hopefully help pin down exactly where it is hanging.

PRoomberg commented 5 months ago

I'm running Ubuntu 20.04.6 LTS in a VMware virtual machine on a Mac.

I've added the checkpoints to the code but didn't see any details in the events.log. So made some changes:

        if os.path.isfile(SCHEMA_FILE):
            log.info(f"Loading schema from file '{SCHEMA_FILE}'")
            log.info(f"--> Checkpoint 0")
            with open(SCHEMA_FILE) as config_schema:
                log.info(f"--> Checkpoint 1")
                schema = json.load(config_schema)
                log.info(f"--> Checkpoint 2")
                if SZ_SCHEMA in schema and SZ_MAIN_TCS in schema[SZ_SCHEMA] and schema[SZ_SCHEMA][SZ_MAIN_TCS] is None:
                    log.info(f"--> Checkpoint 3")
                    schema_loaded_from_file = False
                    log.warning(f"The existing schema file '{SCHEMA_FILE}' appears to be invalid. Ignoring...")
                    RAMSESRF_DISABLE_DISCOVERY = False
                else:
                    log.info(f"--> Checkpoint 4")
                    lib_kwargs.update(schema)
                    if COM_PORT: # override with the one in the main config file
                        log.info(f"--> Checkpoint 5")
                        lib_kwargs[SZ_CONFIG][SZ_SERIAL_PORT] = COM_PORT
                    log.info(f"--> Checkpoint 6")
                    log.debug(f"Schema loaded. Updated lib_kwargs: {lib_kwargs}")
                    schema_loaded_from_file = True
                log.info(f"--> Checkpoint 7")
            log.info(f"--> Checkpoint 8")
        else:
            log.info(f"--> Checkpoint 9")
            log.warning(f"The schema file '{SCHEMA_FILE}' was not found'")
            RAMSESRF_DISABLE_DISCOVERY = False
        log.info(f"--> Checkpoint 10")

That gave a better result:

2024-01-23 18:44:08,718 [1121] Loading schema from file 'ramses_rf_schema.json'
2024-01-23 18:44:10,920 [1122] --> Checkpoint 0
2024-01-23 18:44:10,920 [1124] --> Checkpoint 1
2024-01-23 18:44:10,920 [1126] --> Checkpoint 2
2024-01-23 18:44:10,920 [1133] --> Checkpoint 4
2024-01-23 18:44:10,920 [1136] --> Checkpoint 5
2024-01-23 18:44:10,920 [1138] --> Checkpoint 6
2024-01-23 18:44:10,921 [1141] --> Checkpoint 7
2024-01-23 18:44:10,921 [1142] --> Checkpoint 8
2024-01-23 18:44:10,921 [1147] --> Checkpoint 10
smar000 commented 5 months ago

I've added the checkpoints to the code but didn't see any details in the events.log.

With the print statements, they would only show on the screen, and not go into the log file. But good job on logging all the checkpoints. These all look fine and can be removed.

Can you try putting one in the remainder of that function, and particularly at the end, just before the return serial_port, lib_kwargs line.

If the checkpoints show that the end of function is reached correctly, then the next thing to check is your schema file itself and see if there is anything there that is making it hang.

dmsviento commented 5 months ago

okay managed to get mine to work. All the checkpoints looked good on mine and the function was returning correctly. It was then failing at this point:

async def main(**kwargs):
    log.info("check#0")    <----GOOD
    serial_port, lib_kwargs = initialise_sys(kwargs)
    log.info("check#13")    <---GOOD
    global GWY
    GWY = Gateway(serial_port, lib_kwargs)
    GWY.create_client(process_gwy_message)
    log.info("check#13")    <----FAILED

I put an exception handler round this

try:
    GWY = Gateway(serial_port, **lib_kwargs)
    GWY.create_client(process_gwy_message)
    log.info("check#13")
except Exception as e:
    log.info("check#15:"+str(e))

and it returned this

check#15:extra keys not allowed @ data['config']['packet_log']

Not fully understanding your code I removed the double asterisk relating to the arguments for lib_kwargs. From this:

GWY = Gateway(serial_port, **lib_kwargs)

To this:

GWY = Gateway(serial_port, lib_kwargs)

This then allowed it to run, although not sure if right or not. Does this help?

smar000 commented 5 months ago

Not fully understanding your code I removed the double asterisk relating to the arguments for lib_kwargs.

Great detective work! The problem appears to be in the schema file (the above double asterisk is so that we pass a pointer to the parameters collection, rather than a single individual parameter value - the reason it "works" without the asterisks is that your schema file parameters are no longer being sent to the underlying ramses gateway - i.e. your schema file contents are being completely ignored).

The error says that there is a key in your schema file that is not being accepted. I recall that the underlying ramses library had a few changes in the schema file structure at about the time of the last update of evoGateway, and so it is possible that something has slipped through.

Can you remove the packet_log parameters from your schema and try it again (with the double asterisks back in place!).

dmsviento commented 5 months ago

Removed the packet_log parameters from the schema, re-added the double asterisk. Set disable discovery to True. Restarted, all looked to start correctly, no errors and it reported the the shema file had been loaded. However, zero events logged. I'll do a little more digging shortly to see what else can be seen

smar000 commented 5 months ago

It seems as if there may be one or more further issues with your schema. Can you try removing sections at a time from the schema and see if you can pin down which part is causing the issue?

blb4github commented 5 months ago

@dmsviento did you discover anything more?

dmsviento commented 4 months ago

Apologies, been away with work. Plan on getting back to it this weekend

chris-hunter commented 2 months ago

I think this is the same issue I had, which is resolved here:

https://github.com/smar000/evoGateway/issues/51#issuecomment-1418284831