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

alarmdecoder deprecated expressions with 2024.12.3 core update #133249

Open
gallarding opened this issue Dec 14, 2024 · 2 comments
Open

alarmdecoder deprecated expressions with 2024.12.3 core update #133249

gallarding opened this issue Dec 14, 2024 · 2 comments

Comments

@gallarding
Copy link

The problem

the following warnings in log file related to alarmdecoder integration after update to core 2024.12.3
2024-12-14 17:11:36.743 WARNING (ImportExecutor_0) [py.warnings] /usr/local/lib/python3.13/site-packages/alarmdecoder/decoder.py:605: SyntaxWarning: invalid escape sequence '.'
matches = re.match('^!Sending(.{1,5})done.*', data)

2024-12-14 17:11:36.764 WARNING (ImportExecutor_0) [py.warnings] /usr/local/lib/python3.13/site-packages/alarmdecoder/messages/panel_message.py:73: SyntaxWarning: invalid escape sequence '['
_regex = re.compile('^(!KPM:){0,1}([[a-fA-F0-9-]+]),([a-fA-F0-9]+),([[a-fA-F0-9]+]),(".+")$')

2024-12-14 17:11:36.804 WARNING (ImportExecutor_0) [py.warnings] /usr/local/lib/python3.13/site-packages/alarmdecoder/zonetracking.py:186: SyntaxWarning: invalid escape sequence '\d'
zone_regex = re.compile('^CHECK (\d+).*$')

What version of Home Assistant Core has the issue?

core-2024.12.3

What was the last working version of Home Assistant Core?

core-2024-11

What type of installation are you running?

Home Assistant OS

Integration causing the issue

alarmdecoder

Link to integration documentation on our website

https://www.home-assistant.io/integrations/alarmdecoder

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-12-14 17:11:36.743 WARNING (ImportExecutor_0) [py.warnings] /usr/local/lib/python3.13/site-packages/alarmdecoder/decoder.py:605: SyntaxWarning: invalid escape sequence '\.'
  matches = re.match('^!Sending(\.{1,5})done.*', data)

2024-12-14 17:11:36.764 WARNING (ImportExecutor_0) [py.warnings] /usr/local/lib/python3.13/site-packages/alarmdecoder/messages/panel_message.py:73: SyntaxWarning: invalid escape sequence '\['
  _regex = re.compile('^(!KPM:){0,1}(\[[a-fA-F0-9\-]+\]),([a-fA-F0-9]+),(\[[a-fA-F0-9]+\]),(".+")$')

2024-12-14 17:11:36.804 WARNING (ImportExecutor_0) [py.warnings] /usr/local/lib/python3.13/site-packages/alarmdecoder/zonetracking.py:186: SyntaxWarning: invalid escape sequence '\d'
  zone_regex = re.compile('^CHECK (\d+).*$')

Additional information

No response

@home-assistant
Copy link

@mbeaudoin
Copy link

mbeaudoin commented Jan 27, 2025

I have the same problem here. Version 3.13 of python is barfing on some regex expressions in the alarmdecoder source code , which is an add-on package to Home Assistant.

The error messages come from the Python code released by Nu Tech Software Solutions.
See here: https://github.com/nutechsoftware/alarmdecoder/tree/master/alarmdecoder

You can see the error being reported here: nutechsoftware/alarmdecoder#73

And a fix being contributed as a pull request 3 weeks ago, but still no action from Nu Tech.
See here: nutechsoftware/alarmdecoder#75

The last update to this source code was made over 4 years ago, so it smells like abandonware to me...

Maybe a fork of the Nu Tech source code + a new Integration released under HACS is starting to make sense...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants