smar000 / evoGateway

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

evoGateway will not start - error message #35

Closed Schorsch99 closed 3 years ago

Schorsch99 commented 3 years ago

Hi,

I can't get evoGateway to run, I keep getting the following error:

pi@iobroker:~/evoGateway $ python3 evogateway.py 2021-07-04 10:03:06,880 [903] The schema file 'ramses_rf_schema.json' was not found' 2021-07-04 10:03:06,881 [916] Schema file missing or the 'allow_list' section is missing. Defaulting to ramses_rf 'eavesdropping' mode 2021-07-04 10:03:06 | 2021-07-04 10:03:06 | ------------------------------------------------------------------------------------------ 2021-07-04 10:03:06 | Devices loaded from 'devices.json' file: Traceback (most recent call last): File "evogateway.py", line 1006, in asyncio.run(main()) File "/usr/lib/python3.7/asyncio/runners.py", line 43, in run return loop.run_until_complete(main) File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete return future.result() File "evogateway.py", line 962, in main lib_kwargs = initialise_sys(kwargs) File "evogateway.py", line 946, in initialise_sys zone_ids = get_parent_keys(lib_kwargs["schema"]["zones"], key) KeyError: 'schema'

Latest version, MQTT configured, no devices.json file (in order to discover devices).

Please let me know if you need any other info.

Best Regards, Schorsch

RikOnline commented 3 years ago

Same issue here...

smar000 commented 3 years ago

Small bug had crept in for those starting without a devices file. Should be fixed in latest build just uploaded.

Schorsch99 commented 3 years ago

I updated both ramses_rf (to 0.11.1) and evogateway to last version. The error message has changed:

pi@iobroker:~/evoGateway $ python3 evogateway.py 2021-07-08 08:22:51 | Existing devices file not found. Defaulting to 'eavesdropping' mode 2021-07-08 08:22:51 | # evogateway 3.0.5 An empty block_list was enabled, so will be ignored Traceback (most recent call last): File "evogateway.py", line 1009, in asyncio.run(main()) File "/usr/lib/python3.7/asyncio/runners.py", line 43, in run return loop.run_until_complete(main) File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete return future.result() File "evogateway.py", line 978, in main GWY = Gateway(serial_port, lib_kwargs)
File "/home/pi/.local/lib/python3.7/site-packages/ramses_rf/init.py", line 101, in init self.known_devices = load_system_schema(self,
schema) File "/home/pi/.local/lib/python3.7/site-packages/ramses_rf/schema.py", line 383, in load_system_schema _load_system_schema(gwy, kwargs[SCHEMA]) File "/home/pi/.local/lib/python3.7/site-packages/ramses_rf/schema.py", line 401, in _load_system_schema schema = SYSTEM_SCHEMA(schema) File "/home/pi/.local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 272, in call return self._compiled([], data) File "/home/pi/.local/lib/python3.7/site-packages/voluptuous/validators.py", line 215, in _run return self._exec(self._compiled, value, path) File "/home/pi/.local/lib/python3.7/site-packages/voluptuous/validators.py", line 267, in _exec self.msg, path=path) File "/home/pi/.local/lib/python3.7/site-packages/voluptuous/validators.py", line 260, in _exec return func(path, v) File "/home/pi/.local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict return base_validate(path, iteritems(data), out) File "/home/pi/.local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping raise er.MultipleInvalid(errors) voluptuous.error.MultipleInvalid: extra keys not allowed @ data['main_controller']

smar000 commented 3 years ago

I have not tested against ramses 0.11.1 and so there may have been changes there that are throwing the error. Can you use version 0.10.5 for now and see if you still have problems.

RikOnline commented 3 years ago

Just checked with 0.10.5 and no problems here. Just had to disable sending - self build hardware - to get it working.

smar000 commented 3 years ago

Just checked with 0.10.5 and no problems here. Just had to disable sending - self build hardware - to get it working.

Good to hear. If you have no further issues, will close the issue.

Schorsch99 commented 3 years ago

I did: git checkout 42e86d7 to revert to ramses_rf 0.10.5, but no change when starting evogateway, still getting the same error.

smar000 commented 3 years ago

I did: git checkout 42e86d7 to revert to ramses_rf 0.10.5, but no change when starting evogateway, still getting the same error.

I assume you did of course install the ramses_rf libraries after changing to the 0.10.5 branch, and that on starting evoGateway, it shows the correct ramses_rf branch number? And you deleted the ramses_rf_schema.json and the devices.json that were created from your previous runs?

If so, and you are using the current evoGateway build, I don't see how the same error can occur. That error (extra keys not allowed @ data['main_controller']) is basically saying that that the schema file format has changed between the different versions of ramses_rf.

EDIT: I have just had a quick look on my system, and you shouldn't need to delete the previous ramses_rf_schema.json or devices.json files (though no harm if you do). It seems to work straight off, as soon as the correct version of ramses_rf is installed.

Schorsch99 commented 3 years ago

I renamed the 2 files anyway, just to be sure. And I also did an install (once more, to be sure):

pi@iobroker:~/evoGateway $ pip3 install -r requirements.txt Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Requirement already satisfied: ramses_rf==0.10.5 in /home/pi/.local/lib/python3.7/site-packages (from -r requirements.txt (line 1)) (0.10.5) Requirement already satisfied: colorama==0.4.4 in /home/pi/.local/lib/python3.7/site-packages (from -r requirements.txt (line 2)) (0.4.4) Requirement already satisfied: paho_mqtt==1.5.1 in /home/pi/.local/lib/python3.7/site-packages (from -r requirements.txt (line 3)) (1.5.1) Requirement already satisfied: pyserial-asyncio>=0.5 in /home/pi/.local/lib/python3.7/site-packages (from ramses_rf==0.10.5->-r requirements.txt (line 1)) (0.5) Requirement already satisfied: colorlog>=5.0.1 in /home/pi/.local/lib/python3.7/site-packages (from ramses_rf==0.10.5->-r requirements.txt (line 1)) (5.0.1) Requirement already satisfied: voluptuous>=0.12.1 in /home/pi/.local/lib/python3.7/site-packages (from ramses_rf==0.10.5->-r requirements.txt (line 1)) (0.12.1) Requirement already satisfied: pyserial in /usr/lib/python3/dist-packages (from pyserial-asyncio>=0.5->ramses_rf==0.10.5->-r requirements.txt (line 1)) (3.4)

But I still get:

pi@iobroker:~/evoGateway $ python3 evogateway.py 2021-07-11 11:35:42 | Existing devices file not found. Defaulting to 'eavesdropping' mode 2021-07-11 11:35:42 | # evogateway 3.0.5 An empty allow_list was enabled, so will be ignored An empty block_list was enabled, so will be ignored No allow_list was configured, but one is strongly recommended Traceback (most recent call last): File "evogateway.py", line 1009, in asyncio.run(main()) File "/usr/lib/python3.7/asyncio/runners.py", line 43, in run return loop.run_until_complete(main) File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete return future.result() File "evogateway.py", line 978, in main GWY = Gateway(serial_port, lib_kwargs)
File "/home/pi/.local/lib/python3.7/site-packages/ramses_rf/init.py", line 101, in init self.known_devices = load_system_schema(self,
schema) File "/home/pi/.local/lib/python3.7/site-packages/ramses_rf/schema.py", line 383, in load_system_schema _load_system_schema(gwy, kwargs[SCHEMA]) File "/home/pi/.local/lib/python3.7/site-packages/ramses_rf/schema.py", line 401, in _load_system_schema schema = SYSTEM_SCHEMA(schema) File "/home/pi/.local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 272, in call return self._compiled([], data) File "/home/pi/.local/lib/python3.7/site-packages/voluptuous/validators.py", line 215, in _run return self._exec(self._compiled, value, path) File "/home/pi/.local/lib/python3.7/site-packages/voluptuous/validators.py", line 267, in _exec self.msg, path=path) File "/home/pi/.local/lib/python3.7/site-packages/voluptuous/validators.py", line 260, in _exec return func(path, v) File "/home/pi/.local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict return base_validate(path, iteritems(data), out) File "/home/pi/.local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping raise er.MultipleInvalid(errors) voluptuous.error.MultipleInvalid: extra keys not allowed @ data['main_controller']

Starting ramses via CLI seems to work fine, though:

pi@iobroker:~/ramses_rf $ python3 -O client.py -rr listen /dev/ttyUSB0

client.py: Starting ramses_rf... 11:40:05.577 No allow_list was configured, but one is strongly recommended 11:40:05.584 Not using a device filter (an allow_list is strongly recommended) 2021-07-11T11:40:05.584593 # ramses_rf 0.10.5 2021-07-11T11:40:07.050381 # evofw3 0.7.0 11:40:48.768 || TRv:000517 | THm:126457 | I | setpoint | 0107D0 || {'parent_idx': '01', 'setpoint': 20.0} 11:41:18.837 || | THm:126457 | I | system_sync | 000BC2 || {'remaining_seconds': 301.0, '_next_sync': '11:46:19'} 11:41:18.850 || | THm:126457 | I | setpoint | 0107D... || [{'zone_idx': '01', 'setpoint': 20.0}, {'zone_idx': '02', 'setpoint': 18.0}] 11:41:18.862 || | THm:126457 | I | temperature | 017FFF || [{'zone_idx': '01', 'temperature': None}] 11:41:18.881 || | THm:126457 | I | zone_params | 01000... || [{'zone_idx': '01', 'min_temp': 5.0, 'max_temp': 30.0, 'local_override': True, 'openwindow_function': True, '

Ierlandfan commented 3 years ago

When first starting evogateway it will generate an ramses_rf_schema.json and devices.json. Updated 'devices.json' and ramses_rf schema files generated It looks like something is not right in the generation part. Delete devices.json an ramses_rf_schema.json and restart. As long as you don't quit it will start

Schorsch99 commented 3 years ago

That did the trick, thanks!