svalouch / rctmon

Pulls data from RCT Power GmbH devices for use with monitoring systems.
https://rctmon.readthedocs.io
GNU General Public License v3.0
17 stars 8 forks source link

UnicodeDecoderError #26

Closed suncarver closed 2 years ago

suncarver commented 2 years ago

Hi and thanks for the good work.

I'm using the rctmon docker on a Raspberry PI 4 with 64 Bit bullseye. The rctmon container start fails with following error:

: File "/usr/local/lib/python3.10/site-packages/rctmon/cli.py", line 33, in cli config_data = yaml.safe_load(config.read()) File "/usr/local/lib/python3.10/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecoderError: 'utf-8' codec can't decode byte 0xfc in position 810: invalid start byte

Then the container stops. I don't get more info if I set level from INFO to DEBUG in config.yaml

Any help what I can try?

sfudeus commented 2 years ago

I'd say it has a problem parsing your config file. It might be that you somewhere added the german umlaut ü and the file is iso-8859-encoded while the parser expected or assumed utf8 encoding. If you cannot find the problematic part in the config, try to restart with the example config in this repo and tune it step by step. Usually you needn't deviate much from the default. Feel free to attach your current config to allow us checking it.

suncarver commented 2 years ago

Thanks - that's it. The 'ü' were in several comment lines. After replacing by "ue", the container starts and writes data to my influxdb 2.0.

Now the container is permanenty running and I will observe when (how often) rctmon reads data. Goal is to have grafana as an aleternative dashboard to rct power app. This gives the possibility to graphically correlate more information from e.g. power heater.

Thanks Stephan!