home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.98k stars 31.02k forks source link

Current release of pylacrosse command is not executable since Python >=3.11 #130268

Open spacepope opened 2 weeks ago

spacepope commented 2 weeks ago

The problem

Current Home Assistant documentation for Lacrosse integration states one "can check what sensor IDs are available by using the command-line tool pylacrosse".

But pylacrosse cli tool tries to import SafeConfigParser which was depracted since Python 3.2 and finally removed in Python 3.11. So calling docker exec -it <containername> pylacrosse -d /dev/ttyUSB0 scan results in ImportError: cannot import name 'SafeConfigParser' from 'configparser' (/usr/local/lib/python3.12/configparser.py).

So currently there is no possibility to scan for lacrosse device ids.

What version of Home Assistant Core has the issue?

core-2024.11.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Lacrosse

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

The original Pylacrosse repo seems to be stale since 2 years, but there are already forks which fixed the issue causing this pylacrosse cli error, f.e. https://github.com/ohessel/python-lacrosse

maybe it would be possible to include a fixed pylacrosse cli in home assistant..

home-assistant[bot] commented 2 weeks ago

lacrosse documentation lacrosse source

dom192 commented 5 days ago

I run into the same issue today :( To see sensor ID this worked for me: socat stdio /dev/ttyUSB0 The result you get is: OK 9 20 1 4 176 47 On the second position is the ID in my case 9.