I am running Home Assistant 2023.1.1 in a Docker container on a Synology NAS. I have zwaveJS running in a Docker container on a raspberry Pi. TLDR: suddenly, I lost the ability to list triggers associated with devices when creating new automations. Every device says “No triggers” and I see the error below in the logs. I also lost the ZWave Info dropdown from the Device Info page (see screenshot below).
(Sorry for the very long explanation, the next two paragraphs are likely not relevant, but I wanted to provide the context).
I was previously using an older raspberry Pi with Homeseer Smartstick+ ZWave USB stick, but the whole setup suddenly got incredibly flaky—the stick would suddenly not be present as a device on the raspberry Pi at times, the stick seemed to be resetting constantly, the Raspberry Pi was constantly at 100% CPU, and Home Assistant could only connect intermittently. I couldn’t see any ZWave devices on HA.
After a long and painful process of debugging, I moved to a new Zooz 800-series stick. I excluded and re-added all my devices to avoid potential issues with backing up and restoring when moving to an 800 series stick. This was only partly successful with the old Pi, so I finally got a new Raspberry Pi as well, moved the stick and copied over the store
directory. Perhaps stupidly, I gave the new Pi a different IP address and added a new Zwave integration (disabling the old one) rather just leaving the old integration in place and changing the associated IP address, which probably would have been the better way. Anyway, finally, everything was working except for one small thing and tugging that thread unraveled the sweater.
(Here is the most relevant stuff)
For some reason, automations involving one of my Zooz ZEN32 scene controllers failed to work after the move (another one was working fine). In the UI, it said “Unknown trigger” for automations involving the scene buttons (other triggers were listed, just not the ones involving the scene buttons). I tried to exclude and re-add the device. Despite the Zooz stick being right next to the switch, this failed repeatedly and right after the first failed attempt to remove the device was when I started having the issue I’m asking for help with: suddenly, when creating automations, I couldn’t see the list of triggers for any device when creating a new automation, though existing automations were still working (and I suspect that I could probably create new automations in YAML editing mode).
After a few days of trying, I was able to finally exclude the ZEN32 and re-add it, after which that device was fully functioning again and was now the only device for which I could list triggers!
Looking at the logs, anytime I try to add a device as a trigger in a new automation, the follow error occurs.
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 331, in with_error_handling
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 458, in websocket_device_automation_get_trigger_capabilities
capabilities = await _async_get_device_automation_capabilities(
File "/usr/src/homeassistant/homeassistant/components/device_automation/__init__.py", line 303, in _async_get_device_automation_capabilities
capabilities = await getattr(platform, function_name)(hass, automation)
File "/usr/src/homeassistant/homeassistant/components/zwave_js/device_trigger.py", line 466, in async_get_trigger_capabilities
node = async_get_node_from_device_id(hass, config[CONF_DEVICE_ID])
File "/usr/src/homeassistant/homeassistant/components/zwave_js/helpers.py", line 225, in async_get_node_from_device_id
raise ValueError(f"Device {device_id} config entry is not loaded")
ValueError: Device 99a683a52e75baadcc700f1d50659c94 config entry is not loaded
I could trace it to this line of code on my version of HA:
I have Googled this error and related phrases repeatedly, getting very few hits and nothing that seems related to my issue. I can guess what it means that the config entry is not loaded, but I don’t know why.
What the function seems to be doing is trying to convert the device ID in HA to a Device ID on the ZwaveJS server (this is just an index from 1 to 89 on my server). It apparently needs this to query the server for a list of triggers, which are not cached locally in HA. So perhaps the most important symptom that has nothing to do with automations is that the ZWave Info drop-down that used to in the Device Info for every device just suddenly disappeared (except for the two devices that are working). These screen shots show what I mean.
The one above has no ZWave Info section, while the one below does have it (and you can see the ZwaveJS server ID listed there: 89). They all had it before this issue arose.
I back up my home assistant configuration daily so I’ve done a diff of all the files in the config/.storage
directory from before and after. There were many more differences than I would have expected, especially in core.entity_registry
, but most look pretty innocuous and there was no smoking gun I could see.
I also tried updating to the latest version of the HA container, but that did not go smoothly (perhaps due to the same corruption that is causing my current issue) and I decided it’s best to try to debug this in the version I have, which is working smoothly except for the fact that I can’t add mew automations (using the UI).
I’m sure that someone familiar with the code and exactly how all this hangs together will be able to help me figure out this error easily. It’s got to be something “obvious.” I really enjoy the DIY nature of HA and this is the very first thing I’ve come up against that I was not able to figure out on my own. I can’t believe this is a problem unique to only me. Anyone out there have any ideas?