You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been running with this library for a long time and first time I noticed this error, very strange character imbedded in this message.
2022-04-05 16:42:10,041 ELK-13367 elkm1_lib.elk ERROR elk:_got_data: Invalid message '0AZC2¼220040'
Traceback (most recent call last):
File "/var/polyglot/.local/lib/python3.8/site-packages/elkm1_lib/message.py", line 67, in decode
self.call_handlers(cmd, decoder(msg))
File "/var/polyglot/.local/lib/python3.8/site-packages/elkm1_lib/message.py", line 290, in _zc_decode
return {"zone_number": int(msg[4:7]) - 1, "zone_status": status}
ValueError: invalid literal for int() with base 10: '2¼2'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/var/polyglot/.local/lib/python3.8/site-packages/elkm1_lib/elk.py", line 139, in _got_data
self._message_decode.decode(data)
File "/var/polyglot/.local/lib/python3.8/site-packages/elkm1_lib/message.py", line 69, in decode
raise ValueError("Cannot decode message") from exc
ValueError: Cannot decode message
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Versions (please complete the following information):
ElkM1 version: [1.0.0]
Home Assistant version: [N/A]
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Well that is interesting! Does it happen all the time? Do you have a guess as to what zone you think it is?
I did a couple of quick checks. ¼ is hex BC or decimal 188. The checksum and length on the message are correct, which means that the Elk panel sent this bad message -- I don't see how the lib could have messed up the message. What version of the Elk software on you running on the panel? This is a Elk panel bug, so fix will have to come from them.
The lib could be smarter with guards on decoding. Something I will consider, but it won't help you either way.
I just took another look at the code. Looks like there are enough guards already there - I catch the ValueError and print the message of "Cannot decode...". So nothing for me to do with the lib as far as I can tell.
If you figure it out, I'd love to hear the cause of this from the panel.
Describe the bug
I've been running with this library for a long time and first time I noticed this error, very strange character imbedded in this message.
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Versions (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: