Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dsmr_parser.exceptions.ParseError: ("Invalid '%s' line for '%s'", '1-1:31.4.0(100.0*A,-100.0*A)\r\n', #108

Closed
kszys opened this issue Jun 12, 2022 · 4 comments

Comments

@kszys
Copy link

kszys commented Jun 12, 2022

I have been using the DSMR Slime Meter integration in Home Assistant for some time, with a Belgian electricity meter. Everything has been working fine until today. Today I get spammed by the errors:

Logger: dsmr_parser.parsers
Source: /usr/local/lib/python3.9/site-packages/dsmr_parser/parsers.py:61
First occurred: 15:27:52 (905 occurrences)
Last logged: 15:42:54

ignore line with signature \d-\d:31\.4\.0.+?\r\n, because parsing failed.
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/dsmr_parser/parsers.py", line 59, in parse
    telegram[signature] = parser.parse(match.group(0))
  File "/usr/local/lib/python3.9/site-packages/dsmr_parser/parsers.py", line 201, in parse
    return CosemObject(self._parse(line))
  File "/usr/local/lib/python3.9/site-packages/dsmr_parser/parsers.py", line 151, in _parse
    raise ParseError("Invalid '%s' line for '%s'", line, self)
dsmr_parser.exceptions.ParseError: ("Invalid '%s' line for '%s'", '1-1:31.4.0(100.0*A,-100.0*A)\r\n', <dsmr_parser.parsers.CosemParser object at 0xaf84ac58>)

Any ideas?

@lowdef
Copy link
Contributor

lowdef commented Jun 12, 2022

Well there is no pattern specified in the parser that knows how to parse this line '1-1:31.4.0(100.0A,-100.0A)\r\n'. Therefore you see this message, but this line is just ignored so it should not cause real problems.

Maybe the smartmeter has been upgraded and is now emitting this new line?

@kszys
Copy link
Author

kszys commented Jun 13, 2022

Yes - thanks. I realised afterwards that essentially issue #72 was related to it. However, it is still not closed for some reason... Anyway - thanks. I thought the other problems I was having was related to this error, but apparently not.

BTW - if the line is ignored and it does not stop the parser from working and parsing other lines - perhaps this could be downgraded to a Warning instead of an Error - would not be as scary when looking for issues in the logs ;)

@lowdef
Copy link
Contributor

lowdef commented Jun 13, 2022

I found the value here https://www.cdem.be/files/emucs.pdf, the nicest thing would be to implement a parser line for it.

Section 3.2.1:

Fuse supervision threshold (L1) 1-0:31.4.0.255 2 (Thresholds) 21 (Register Monitor) F3(0,0), tag 18 A

@dupondje
Copy link
Collaborator

dupondje commented Nov 9, 2023

Should be fixed since d05fe26

@dupondje dupondje closed this as completed Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants