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.9k stars 30.97k forks source link

Insteon: Unable to remove ALDB Record from a PLM. #131304

Open jbrought opened 1 day ago

jbrought commented 1 day ago

The problem

I was trying to remove a zombie Insteon device from my PLM'S ALBD. I marked the record as not "in_use" and then requested to write the update to the device. The operation silently failed, but the logs showed the following. A call was made with an invalid keyword.

I have a serial PLM, connected using the special FTDI cable from Universal Devices. It was able to load a database of ~40 active devices, and issues commands to devices. Logs showed that it was continuously trying to ping zombie device(s), which appeared to be affecting performance. The higher level problem was that the Insteon service would fail to recognize turning on/off a device (e.g. switch) locally immediately after issuing the opposite command through HA.

2024-11-22 10:38:05.814 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [281472189137968] Error handling message: Unknown error (unknown_error) Jeff Broughton from fe80::4c1:a19e:704c:9fdc (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1 Safari/605.1.15) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 28, in _handle_async_response await func(hass, connection, msg) File "/usr/src/homeassistant/homeassistant/components/insteon/api/aldb.py", line 184, in websocket_write_aldb await device.aldb.async_write() File "/usr/local/lib/python3.12/site-packages/pyinsteon/aldb/aldb_base.py", line 322, in async_write result = await self._write_manager.async_write(rec_to_write, force) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyinsteon/managers/aldb_im_write_manager.py", line 42, in async_write return await self._async_write_delete_standard(record) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyinsteon/managers/aldb_im_write_manager.py", line 97, in _async_write_delete_standard matching_recs = await self._aldb.async_find_records( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: ModemALDB.async_find_records() got an unexpected keyword argument 'target'

What version of Home Assistant Core has the issue?

core-2024.11.1

What was the last working version of Home Assistant Core?

None

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Insteon

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

Home assistant is running on a Green platform.

home-assistant[bot] commented 1 day ago

Hey there @teharris1, mind taking a look at this issue as it has been labeled with an integration (insteon) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `insteon` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign insteon` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


insteon documentation insteon source (message by IssueLinks)