core
core copied to clipboard
Failed to connect to Switchmate
The problem
HA fails to connect to Switchmate... Ive tried to do upper and lowercase. They both come up with the same error. Im also using a pi4.
From the looks of it, It seems to be an issue with the integration being outdated? But it also seems like it works? https://github.com/home-assistant/core/issues/77813 https://github.com/home-assistant/core/issues/78004 https://github.com/home-assistant/core/issues/76839
https://www.reddit.com/r/homeassistant/comments/wuf06e/comment/in49u5o/?utm_source=share&utm_medium=web2x&context=3
Thank you.
What version of Home Assistant Core has the issue?
core-2023.5.4
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
Switchmate
Link to integration documentation on our website
https://www.home-assistant.io/integrations/switchmate/
Diagnostics information
2023-06-04 12:11:05.908 WARNING (MainThread) [homeassistant.helpers.frame] Detected integration that attempted to call BleakClient with an address instead of a BLEDevice. Please report issue for switchmate using this method at homeassistant/components/switchmate/switch.py, line 71: await self._device.update() 2023-06-04 12:11:05.918 ERROR (MainThread) [switchmate] Failed to connect to Switchmate 2023-06-04 12:11:05.921 ERROR (MainThread) [switchmate] Failed to connect to Switchmate 2023-06-04 12:11:05.923 ERROR (MainThread) [switchmate] Cannot communicate with Switchmate
Example YAML snippet
switch:
- platform: switchmate
mac: "e0:bf:c1:9b:ef:do"
name: LowerLights
Anything in the logs that might be useful for us?
No response
Additional information
No response
Hey there @danielhiversen, @qiz-li, mind taking a look at this issue as it has been labeled with an integration (switchmate
) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of switchmate
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 switchmate
Removes the current integration label and assignees on the issue, add the integration domain after the command.
(message by CodeOwnersMention)
switchmate documentation switchmate source (message by IssueLinks)
I'm have a similar issue. only one Switchmate can be connected to the home assistant at a time
I'm have a similar issue. only one Switchmate can be connected to the home assistant at a time
at least you can control it... I cant... and there hasn't been any type of updates from @Danielhiversen
I'm having the same issue, is there any news about the fix?
This is the error from the log file:
Detected that integration 'switchmate' attempted to call BleakClient with an address instead of a BLEDevice at homeassistant/components/switchmate/switch.py, line 71: await self._device.update(), please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+switchmate%22
According to #77813 you should make sure your MAC address is in all caps. May not fix it though.
According to #77813 you should make sure your MAC address is in all caps. May not fix it though.
I was having the same issue and can confirm that entering MAC address in all caps fixed the issue for me.
I've never gotten this integration to work, even with the MAC address in all caps.
Upgraded my BT adapter, now it works.
As I stated in the first post, I did try the MAC in all caps, and all lower. they did not work...
Sorry to hear that. It may be a bluetooth adapter issue. I upgraded to one that supports Bluetooth 5 and I no longer get the log error in the OP. The switch works quickly and reliably now, even more so than Switchmate's app, lol.
I also turned on Passive Scanning in the Bluetooth integration configuration.
You can test connection to a bluetooth device by SSH with bluetoothctl
, e.g.:
bluetoothctl
connect FC:74:63:35:1A:66
Attempting to connect to FC:74:63:35:1A:66
Connection successful
Since it's Bluetooth, you need to restart the HA machine between changes, not just reload core.
Having the same issue here - can't seem to get HA to talk to this, I have the MAC in caps.. added manually and the device shows up in HA but it is always offline.
Have also tried spinning up a BT Proxy on ESP32 and I can see it talk to it in its debug log, but it never translates to Home Assistant.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.