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

Error when sending command in Home Assistant 0.90.2 #2

Open
nodomain opened this issue Apr 8, 2019 · 2 comments
Open

Error when sending command in Home Assistant 0.90.2 #2

nodomain opened this issue Apr 8, 2019 · 2 comments
Assignees

Comments

@nodomain
Copy link

nodomain commented Apr 8, 2019

Hi,

I managed to get the new version running but when I send a command, this error shows up

2019-04-08 06:52:35 INFO (Thread-3) [/srv/homeassistant/lib/python3.6/site-packages/pyduofern/duofern_stick.py] sending 0D01070100000000000000000000006f301140106e00 from write queue, 0 msgs left in queue
2019-04-08 06:52:35 ERROR (Thread-3) [/srv/homeassistant/lib/python3.6/site-packages/pyduofern/duofern_stick.py] 'id'
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/pyduofern/duofern_stick.py", line 577, in run
    self.process_message(in_data)
  File "/srv/homeassistant/lib/python3.6/site-packages/pyduofern/duofern_stick.py", line 227, in process_message
    self.duofern_parser.parse(message)
  File "/srv/homeassistant/lib/python3.6/site-packages/pyduofern/duofern.py", line 521, in parse
    chan = msg[sensorMsg['id']['chan'] * 2 + 2:sensorMsg['id']['chan'] * 2 + 4]
KeyError: 'id'

Config

duofern:
  serial_port: /dev/cuaU2
  code: !secret duofern_code

Any clue? :D

@nodomain
Copy link
Author

nodomain commented Apr 8, 2019

I assume this is the source for the GUI not being updated. The cover opened but cannot be closed again via the GUI.

@gluap gluap self-assigned this May 5, 2019
gluap added a commit that referenced this issue May 5, 2019
@gluap
Copy link
Owner

gluap commented May 5, 2019

@nodomain: Am I right in guessing that you use one of "Wandtaster, Funksender UP, Handsender, Sensoren"? I think I spotted the issue and tried to add a fix in the latest commit. Unfortunately I can't test it for lack of these devices. Could you check if you still get the same error message after upgrading your custom component?

Basically what happened on your end was that the thread processing messages from duofern tried to process a message from one of the devices and encountered an exception. After that, no duofern functions were available any more.

Disclaimer: currently I only have evidence that remote power switches and roller shutters work. These are also the only ones that have been implemented for homeassistant. Still I would want the code to work also in the presence of unknown devices.

PS: Sorry this reply took so long, I only now found out that I must accidentally have unwatched this repository so I wasn't getting any e-mail notifications.

gluap pushed a commit that referenced this issue Sep 28, 2020
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

2 participants