core
core copied to clipboard
Keymitt MicroBot Push error
The problem
Since last HA release, "Keymitt MicroBot Push" not always respond and 3 errors into the log
What version of Home Assistant Core has the issue?
2024.2.0b7
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
Keymitt MicroBot Push
Link to integration documentation on our website
https://rc.home-assistant.io/integrations/keymitt_ble
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Logger: py.warnings
Source: components/keymitt_ble/switch.py:50
First occurred: 17:58:57 (3 occurrences)
Last logged: 18:04:50
/usr/local/lib/python3.12/site-packages/microbot/__init__.py:240: RuntimeWarning: coroutine 'MicroBotApiClient.is_connected' was never awaited if self.is_connected():
------------------------------------
Logger: microbot
Source: components/keymitt_ble/switch.py:55
First occurred: 18:00:02 (16 occurrences)
Last logged: 18:04:43
Failed to set token: Characteristic {char_specifier} was not found!
Failed to push: Characteristic {char_specifier} was not found!
Failed to set token: Peripheral D6:DE:71:E3:3F:9C changed connection status while waiting for BluetoothGATTWriteResponse, BluetoothGATTErrorResponse: Unknown error (0)
Peripheral D6:DE:71:E3:3F:9C changed connection status while waiting for BluetoothGATTNotifyResponse, BluetoothGATTErrorResponse: Unknown error (22)
Bluetooth GATT Error address=D6:DE:71:E3:3F:9C handle=23 error=-1 description=Not connected
------------------------------------
Logger: microbot
Source: components/keymitt_ble/switch.py:50
First occurred: 18:02:32 (5 occurrences)
Last logged: 18:04:43
'bool' object is not callable
Failed to push: Peripheral D6:DE:71:E3:3F:9C changed connection status while waiting for BluetoothGATTWriteResponse, BluetoothGATTErrorResponse: Unknown error (0)
Failed to set token: Peripheral D6:DE:71:E3:3F:9C changed connection status while waiting for BluetoothGATTWriteResponse, BluetoothGATTErrorResponse: Unknown error (0)
Failed to push: Characteristic {char_specifier} was not found!
Additional information
No response
Hey there @spycle, mind taking a look at this issue as it has been labeled with an integration (keymitt_ble
) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of keymitt_ble
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 keymitt_ble
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)
keymitt_ble documentation keymitt_ble source (message by IssueLinks)
Should be fixed by
https://github.com/home-assistant/core/pull/109644 and https://github.com/home-assistant/core/pull/109628
@spycle if you encounter a bug you fix during beta period please ask to add it to the next milestone. I have added your fixes for now hopefully they won't have merge conflicts as beta was just shipped 3 hours ago.
Hello @spycle I have integrated into my HA, now I have no error into log but "switch.microbot_push" have no effect. Only works few seconds if I press de keymit button before keymitt_ble.zip
I have this warning
Cette erreur provient d'une intégration personnalisée
Logger: py.warnings Source: custom_components/keymitt_ble/switch.py:50 Integration: Keymitt MicroBot Push First occurred: 08:41:27 (6 occurrences) Last logged: 08:52:25
/usr/local/lib/python3.12/site-packages/microbot/__init__.py:241: RuntimeWarning: coroutine 'MicroBotApiClient.is_connected' was never awaited if self.is_connected():
/usr/local/lib/python3.12/site-packages/microbot/__init__.py:207: FutureWarning: is_connected has been changed to a property. Calling it as an async method will be removed in a future version self._client.is_connected(),
I'll have a look later but have you removed and re added the integration?
No I have not removed or re added the integration
Can you try please?
- As your code have been merged to 2024.2.0b9, I have removed code from custom_component
- I have removed integration, restart ha and wait.
- Button not auto discovered after 20minutes.
- Wake it pressing button, auto discovered immediately.
- Add button
- Switch works 2 minutes and became unavailable
Logger: microbot Source: components/keymitt_ble/switch.py:55 First occurred: 10:14:15 (10 occurrences) Last logged: 10:17:14
Peripheral D6:DE:71:E3:3F:9C changed connection status while waiting for BluetoothGATTNotifyResponse, BluetoothGATTErrorResponse: Unknown error (22)
Failed to set token: Characteristic {char_specifier} was not found!
Failed to push: Characteristic {char_specifier} was not found!
'bool' object is not callable
Logger: py.warnings
Source: components/keymitt_ble/switch.py:55
First occurred: 10:19:46 (2 occurrences)
Last logged: 10:21:12
/usr/local/lib/python3.12/site-packages/microbot/__init__.py:241: RuntimeWarning: coroutine 'MicroBotApiClient.is_connected' was never awaited if self.is_connected():
Logger: microbot Source: components/keymitt_ble/switch.py:50 First occurred: 10:14:15 (4 occurrences) Last logged: 10:14:15
Failed to set token: Peripheral D6:DE:71:E3:3F:9C changed connection status while waiting for BluetoothGATTWriteResponse, BluetoothGATTErrorResponse: Unknown error (0)
Failed to push: Characteristic {char_specifier} was not found!
Failed to push: Peripheral D6:DE:71:E3:3F:9C changed connection status while waiting for BluetoothGATTWriteResponse, BluetoothGATTErrorResponse: Unknown error (0)
Logger: microbot Source: components/keymitt_ble/switch.py:55 First occurred: 10:14:15 (25 occurrences) Last logged: 10:21:12
Peripheral D6:DE:71:E3:3F:9C changed connection status while waiting for BluetoothGATTNotifyResponse, BluetoothGATTErrorResponse: Unknown error (22)
Failed to set token: Characteristic {char_specifier} was not found!
Failed to push: Characteristic {char_specifier} was not found!
'bool' object is not callable
Failed to connect:
Logger: py.warnings
Source: components/keymitt_ble/switch.py:50
First occurred: 10:14:15 (1 occurrences)
Last logged: 10:14:15
/usr/local/lib/python3.12/site-packages/microbot/__init__.py:241: RuntimeWarning: coroutine 'MicroBotApiClient.is_connected' was never awaited if self.is_connected():
The only way I found to make it works is to add to esphome this snipped of code to maintain the connection
ble_client:
- mac_address: ${microbot_mac_address}
id: microbot_client
on_connect:
then:
- logger.log: "Connected to MicroBot"
on_disconnect:
then:
- logger.log: "Disconnected from MicroBot"
but this solution consume a lot of battery
Ok I'm not using esphome so this might be tricky to diagnose. I do have brief periods where it appears unavailable for a few seconds, but then it comes back. About every 10 minutes. I guess that's the problem.
The 241: RuntimeWarning error I've fixed in pyMicrobot 0.0.11. I'll create a pull for that tomorrow but I see you've been trying it as a custom component so you could just point your manifest to this and give it a go? Actually this could be the more likely culprit as esphome is probably not disconnecting properly...
@home-assistant reopen
I have tried custom component when your code was not merged, now I have removed it. If I remove esphome, keymit integration never connect (integration failed)
The fix for at least one of the errors in your log has been released in 2024.2.1. I suspect it may solve the rest and therefore your connectivity issues. Let me know how it goes
Hello, the 2024.2.1 not resolve my issue, Keymit desconnect after few minutes and does not work until I wake it pressing the physical button
#110502 made it into 2024.2.2 but unfortunately it's no help without #110506. Just waiting on that to be approved. I have it working locally
sorry still waiting for https://github.com/home-assistant/core/pull/110506 to be reviewed.
I actually bought myself an esphome to make sure it was all working this time, and it's working perfectly. Just need someone to have a bit of time and inclination to approve it
@jflefebvre06 if you still have the integration installed then you may find that 2024.2.4 fixes it.
I don't know how it will behave without https://github.com/home-assistant/core/pull/110506 which is yet to be reviewed. Config flow is definitely broken without it.
Hello, 2024.2.4 does not solve the problem. If I remove my esphome device wich maintain bluetooth connection, keymit device not respond few minutes after HA restart
Can you try to install the HA beta 2024.3.0b from today and see if there's still an issue?
Can you try to install the HA beta 2024.2.3b0 from today and see if there's still an issue?
2024.3.0b0
Hello, 2024.2.4 does not solve the problem. If I remove my esphome device wich maintain bluetooth connection, keymit device not respond few minutes after HA restart
@jflefebvre06 apologies, it turned out that the required dependency bump wasn't released in 2024.2.4. It is in the beta >2024.3.0b0 however. Can you confirm if it works for you?
I am running on 2024.3.0, still the same problem, anavailable after 3minutes, wake if I puh the physical button
Any errors in the logs?
Nothing
All I can suggest is removing and re-adding the integration and experimenting with proximity of the esphome.
I can't reproduce your issue on my system with esphome.
Hello, since 2024.24 integration works, thanks a lot