Open noxhirsch opened 3 years ago
Is the new version based on ESPHome BLE Client fixes your issue ?
In the new version, the height sensor never updates and because of that, the script is stuck in an endless loop, too (but the desk stops at the right position if I set a target).
This is the log while and after moving to position:
[20:47:58][D][idasen_desk_controller:194]: Update Desk - Move from 22 to 82
[20:47:58][D][idasen_desk_controller:194]: Update Desk - Move from 22 to 82
[20:47:58][D][idasen_desk_controller:194]: Update Desk - Move from 22 to 82
[20:47:59][D][idasen_desk_controller:194]: Update Desk - Move from 22 to 82
[20:47:59][D][idasen_desk_controller:194]: Update Desk - Move from 22 to 82
[20:47:59][D][idasen_desk_controller:194]: Update Desk - Move from 22 to 82
[20:47:59][D][idasen_desk_controller:194]: Update Desk - Move from 22 to 82
[20:47:59][D][idasen_desk_controller:194]: Update Desk - Move from 22 to 82
[20:48:00][D][idasen_desk_controller:194]: Update Desk - Move from 22 to 82
[20:48:00][D][idasen_desk_controller:194]: Update Desk - Move from 22 to 82
When adding an update_interval
, the loop stops, but I don't know if it's the best solution to spam the bluetooth connection with update requests 24/7.
Do you see this error in your logs esp_ble_gattc_register_for_notify failed
?
No, I can't find this error. I can only see multiple Unhandled type: advType: 0x12
Here's the complete log on verbose level:
Still seems to be an issue in v2.0.1
@noxhirsch is the v2.0.1 fixes some of your problems ?
@spyfly could you share logs after your device just booted ?
@spyfly could you share logs after your device just booted ?
It seems like the issue has been resolved. Desk Height now properly updates both when changing it manually or via HA.
@j5lien for me nothing has changed with the update. Do I need to add a setting so that the controller knows that notifications are not available? I tried that, but that didn't help either:
sensor:
# Desk Height Sensor
- platform: ble_client
notify: false
# Desk Speed Sensor
- platform: ble_client
notify: false
@noxhirsch Have you try the latest release with the option only_up_down_command
set to true
?
https://github.com/j5lien/esphome-idasen-desk-controller#not-moving-using-cover-component
@j5lien I just tried that out. Unfortunately, it only made it worse. The height is not updated here either and the desk moves several centimeters past the target.
I think the simplest fallback solution would be to have the cover component periodically trigger a sensor update while the desk is in motion.
It supposed to be the case. When the bluetooth notification can't be setup, it supposed to retrieve the height when the desk moves.
On your log, what notification state can you see ?
[C][idasen_desk_controller:027]: Notifications :
Notifications seem to be enabled:
[15:20:59][C][idasen_desk_controller:026]: Notifications : enable
Maybe the notification format is slightly different in some countries, so it can not get parsed? @spyfly seems to have the same problem and is also from Germany.
since some of us can only use 1.2.0 of this component, this bug lingers on there too.
Clicking on the preset of the linak-desk-card sent the controller to the endless loop of "speed 0.0" and I could not interve from the physical controls either. However downloading and compiling a custom version with @noxhirsch's fix was the solution that can be found here: https://github.com/j5lien/esphome-idasen-desk-controller/pull/18 I downloaded his repository and referenced the component using this page as a guide: https://esphome.io/components/external_components.html#external-components-local . I believe I'm in the same situation as @angadsingh that I cannot use the ble_client version.
thanks @hoborm. i had to do the same. 1.2.0 with @noxhirsch's patch is perfect - except no ble notifications so when moving desk manually HA doesn't know its height.
@hoborm & @angadsingh My workaround with the ble_client is to set the update_interval
for the height sensor to 5s (or faster if you want to "annoy" the desk more ;) ). That way, the manual controls are only "locked" for a few seconds - and additionally you always have the most up to date height, even if you move the desk manually.
thanks @noxhirsch however the ble_client version doesn't even connect to the desk for some of us: https://github.com/j5lien/esphome-idasen-desk-controller/issues/29
I merged @noxhirsch's patch on the v1.2.0 and created the v1.2.1 with it.
@hoborm & @angadsingh My workaround with the ble_client is to set the
update_interval
for the height sensor to 5s (or faster if you want to "annoy" the desk more ;) ). That way, the manual controls are only "locked" for a few seconds - and additionally you always have the most up to date height, even if you move the desk manually.
Two years later... I had to upgrade my HA Core to HAOS to have it all integrated in 1 RPi instead of scattered throughout my Docker containers. One of the things was upgrading the ESP instance to 7.0 and using the latest controller.
It got stuck updating the height, but with this update_interval
it's all smooth as before! Many thanks :)
To move the desk with millimeter precision, I created a service, since moving the cover with float values doesn't seem to work with Home Assistant directly.
Often when moving the desk only a small amount it moves to the target position and then keeps trying to move the desk in an endless loop. The same happens when the desk is already at the target position and also if the desk is stopped manually with the old "dumb" control switch while moving.
I think the easiest solution here would be to break the loop if the speed is 0 twice in a row.
Log: