core: Snooz integration is unable to set up devices
The problem
When adding a device the integration instantly moves from Submit to Created configuration for Snooz DFEA, without allowing any time to process the configuration or even allowing the Snooz device to be put into pairing mode. Any commands sent a Snooz device returns the following error:
homeassistant.exceptions.HomeAssistantError: Command TurnOn failed with status UNEXPECTED_ERROR after 0:00:00.521068 2023-08-28 12:20:46.901 ERROR (MainThread) [root] A message handler raised an exception: “Can’t trigger event device_disconnected from state DISCONNECTED!”.
To troubleshoot I moved one of the devices right next to the bluetooth beacon, but received the same results. I also installed a fresh HAOS build onto different device, then configured all of my Snooz devices correctly which were able to successfully receive all commands.
I then did a full system restore onto the new HAOS device. This required me to set up the Snooz integration once again, at which point I began seeing the same error messages.
What version of Home Assistant Core has the issue?
core-2023.8.4
What was the last working version of Home Assistant Core?
core-2023.7.1
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Snooz
Link to integration documentation on our website
https://www.home-assistant.io/integrations/snooz/
Diagnostics information
home-assistant_snooz_2023-08-28T19-12-29.745Z.log
Example YAML snippet
No response
Anything in the logs that might be useful for us?
ile "/usr/src/homeassistant/homeassistant/components/snooz/fan.py", line 132, in async_turn_on
await self._async_execute_command(turn_on(percentage))
File "/usr/src/homeassistant/homeassistant/components/snooz/fan.py", line 162, in _async_execute_command
raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Command TurnOn failed with status UNEXPECTED_ERROR after 0:00:00.521068
2023-08-28 12:20:46.901 ERROR (MainThread) [root] A message handler raised an exception: "Can't trigger event device_disconnected from state DISCONNECTED!".
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Reactions: 1
- Comments: 31 (14 by maintainers)
I’ve identified the issue and I’m hoping to release a fix by the end of the week. I’ll update this thread when that release is available.
I decided to do a clean install of HAOS to resolve the problem, so I’m going to mark this one closed. @AustinBrunkhorst I can’t thank you enough for everything you’ve done to try to help me resolve this issue, and for developing such a great integration. Be well my friend!
Try disabling any other integration that uses bluetooth. Unplug the Snooz device for at least 5 seconds then plug back in. In my experiences, sometimes the Snooz takes a bit for whatever reason to become discoverable. Also make sure the mobile app (including LightBlue that I had you use previously) is not connected.
Ok looks like the logging is working better now, but I don’t see the 183E device that is sitting a couple feet from the bluetooth receiver.
I hope you get a good laugh about the randomly assigned name of one of my Sonos devices. 5 letters and starts with N.
When I download the full log the only relative thing I can see is the bluetooth component starting.
Yes, unzip this in
config/custom_components/snoozto use the pysnooz version that introduces a fix for your issue. You’ll want to remove this folder once you update Home Assistant otherwise you’ll be stuck with the version in thecustom_componentsfolder.There’s also this version which will eventually be merged into core. It could be some time at this rate, as there’s around 3-4 PRs worth of changes to get reviewed. This version adds:
You’re the man! Have a great week my friend.
On Wed, Sep 6, 2023, 6:19 PM Austin Brunkhorst @.***> wrote:
Here’s what I could find with a matching MAC. Please let me know if there’s anything else I can provide. I really appreciate your help with this!
Hey @AustinBrunkhorst. The issue has persisted in 2023.9.0. When I clicked “Disable Debugging Logs” on the Snooz integration these logs automatically downloaded, so I’m hoping that’s what you’re looking for. Please let me know if there’s anything else I can do to help and I’ll jump right on it.
I tested this on a Snooz device that was ~ 1 meter from the bluetooth controller, so range should not impacted the results.
home-assistant_snooz_2023-09-06T20-30-52.472Z.log
Thank you so much for your help with this, Austin! Looking forward to installing 2023.9.0 and reporting back.