-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Hello, I’m interested in knowing if this is supported on Debian 12. I’ve tried connecting it via USB to RS232 (second tried) or directly to the serial port RS232 (9-pin) (first tried) with a null modem cable, but I’m encountering an issue. I’m using a Hanazeder FP-3.
(hanazeder_env) root@debian:~# python -m hanazeder_server.mqtt --serial-port /dev/ttyS0 --mqtt-server 192.168.1.10 --mqtt-user mqttusr --mqtt-password mqttpass --debug --home-assistant
- Serving Quart app 'mqtt'
- Environment: production
- Please use an ASGI server (e.g. Hypercorn) directly in production
- Debug mode: False
- Running on http://127.0.0.1:5000 (CTRL + C to quit)
[2025-02-22 16:27:50 +0100] [13835] [INFO] Running on http://127.0.0.1:5000 (CTRL + C to quit)
2025-02-22 16:27:50,190 Running on http://127.0.0.1:5000 (CTRL + C to quit)
2025-02-22 16:27:52,191 Request #0 has timed out
2025-02-22 16:27:54,192 Request #0 has timed out
2025-02-22 16:28:03,249 Request #0 has timed out
^CClosed connection: SerialTransport(<_UnixSelectorEventLoop running=True closed=False debug=False>, <hanazeder.Hanazeder.FPProtocol object at 0x7f82aba714d0>, Serial<id=0x7f82aae0e080, open=True>(port='/dev/ttyS0', baudrate=38400, bytesize=8, parity='N', stopbits=1, timeout=0, xonxoff=False, rtscts=True, dsrdtr=False))
2025-02-22 16:30:11,956 The server closed the connection
Closed connection: SerialTransport(None, None, None)
Error while reading, will sleep and retry
(hanazeder_env) root@debian:~# python -m hanazeder_server.mqtt --serial-port /dev/ttyUSB0 --mqtt-server 192.168.1.10 --mqtt-user mqttusr --mqtt-password mqttpass --debug --home-assistant
- Serving Quart app 'mqtt'
- Environment: production
- Please use an ASGI server (e.g. Hypercorn) directly in production
- Debug mode: False
- Running on http://127.0.0.1:5000 (CTRL + C to quit)
[2025-02-22 16:33:12 +0100] [13855] [INFO] Running on http://127.0.0.1:5000 (CTRL + C to quit)
2025-02-22 16:33:12,202 Running on http://127.0.0.1:5000 (CTRL + C to quit)
2025-02-22 16:33:12,206 Exception in callback SerialTransport._read_ready()
handle: <Handle SerialTransport._read_ready()>
Traceback (most recent call last):
File "/usr/lib/python3.11/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/root/hanazeder_env/lib/python3.11/site-packages/serial_asyncio/init.py", line 120, in _read_ready
self._protocol.data_received(data)
File "/root/hanazeder_env/lib/python3.11/site-packages/hanazeder/Hanazeder.py", line 177, in data_received
self.device.read_bytes(data)
File "/root/hanazeder_env/lib/python3.11/site-packages/hanazeder/Hanazeder.py", line 263, in read_bytes
self.handle_packet(packet)
File "/root/hanazeder_env/lib/python3.11/site-packages/hanazeder/Hanazeder.py", line 306, in handle_packet
req.result = req.decoder(packet)
^^^^^^^^^^^^^^^^^^^
File "/root/hanazeder_env/lib/python3.11/site-packages/hanazeder/Hanazeder.py", line 334, in parse_information_packet
self.device_type = DeviceType(response[0])
~~~~~~~~^^^
Thanks for your help, Patrik
Metadata
Metadata
Assignees
Labels
No labels