-
-
Notifications
You must be signed in to change notification settings - Fork 32k
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
Switchbot new Integration Aborted Unexpected error message when trying to set it up #57250
Comments
I’m getting the same. some additional details: I already was using SwitchBot via manual yaml config without issues prior to this upgrade. I have tried upgrading with the SwitchBot entities already defined in configuration.yaml and I have tried removing the SwitchBot entries from config and then upgrading. in both scenarios the new SwitchBot ui element shows up under integrations with the same error reported in this issue for both of my SwitchBot devices. I’m using two SwitchBot button pressers, if the device type matters. Both devices are using SwitchBot 4.9 firmware. |
I have tried upgrading with the SwitchBot entities already defined in configuration.yaml and I have tried removing the SwitchBot entries from config and then upgrading. Same goes for me. Now i get the error no matter what . |
Out of curiosity, if you don’t mind sharing, are you also using the button pressers or are you having issues with a different SwitchBot device type? |
Nope just button pressers. I haven't found a way to add my humidifier yet. Lets hope someone will answer for our issue.. |
Same for me with a unexpected exception error. Unexpected exception |
@RenierM26 any chance you could help us out? |
I am also getting an error following this upgrade: 021-10-07 15:46:07 ERROR (MainThread) [homeassistant.components.switchbot.coordinator] Unexpected error fetching switchbot data: 'temp' |
switchbot broke for me as well; first with a permission denied error which I tracked down to needing to setcap… but then I got this:
I just have the “switchbot bot”s and they’re password protected (both MAC and password defined in config file) |
Hey there @Danielhiversen, @RenierM26, mind taking a look at this issue as it has been labeled with an integration ( switchbot documentation |
Same issue while trying to integrate switchbot. |
It seems that an error occurs when a password is set. However, using it without a password is a risk. |
I'm afraid I really don't understand what you mean. A password is set where? And what is "the surrounding area". |
I believe he means the Switchbot app, inside the bot settings. You need to have physical access to the device though. |
Thanks, but definitely no passwords used in my switchbot setup for any devices. |
So I have 2 switchbot pressers, and I tried to add the switchbot integration many times and finally got 2 of those added. But even with the configured presser, it will switch on, but the status will turn to "off" immediately, so there is a consistency mismatch on the status. By the way, I have no password set on the device. |
Same here, switchbot broke for me when upgrading to 2021.10. First I got the Permission error which needed the setcap, and now the "can't decode byte" error, both described earlier. It had been working for a very long time previously (with passwords). |
Also broken here, has been working for months configured via yaml with password. Now getting the "can't decode byte" error. Have tried commenting the yaml and using the integration directly, adding and removing the integration, I always end up with the same error no matter what I do. |
+1 |
Hi All, I found the issue and have opened a pull request on the switchbot api github repository. Basically there are two issues:
Thank you for the feedback and stack traces. |
This is most likely caused by low signal strength. You could try bringing the SB device closer to your hassio server for setup. |
Once the device is added, you can play around with the entry options to increase the scan interval and retry timeouts. These options will help with devices with weak signal. |
Hi @RenierM26, Could you please share the link to the repository so I can find the PR? |
Hi All, The dependency (api) changes have been merged and I have opened a hass pull request to bump the dependency. Kudos to Danielhiversen for the help with this issue! |
OK, thanks. Will wait for it to make its way into a HA release. |
Thanks for your suggestion. However, for the switchbot integration before 2021.10, I had zero issue and no signs for weak signal. Haven't changed the switchbot location at all after I installed 2021.10. I will try for the updated one mentioned above after it is released. |
The problem
I have tried a lot of things but nothing worked and the logs don't get me anywhere.. Here they are:
Unexpected exception
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/switchbot/config_flow.py", line 96, in async_step_user
self._discovered_devices = await self._get_switchbots()
File "/usr/src/homeassistant/homeassistant/components/switchbot/config_flow.py", line 62, in _get_switchbots
_btle_adv_data = await self.hass.async_add_executor_job(_btle_connect)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/switchbot/config_flow.py", line 36, in _btle_connect
switchbot_devices = GetSwitchbotDevices().discover()
File "/usr/local/lib/python3.9/site-packages/switchbot/init.py", line 138, in discover
_model = binascii.unhexlify(value[4:6]).decode()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc8 in position 0: unexpected end of data
Please help
What is version of Home Assistant Core has the issue?
core-2021.10.0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Switchbot
Link to integration documentation on our website
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: