Giter Club home page Giter Club logo

Comments (12)

klowdo avatar klowdo commented on September 23, 2024 4

Found this comment in a homeassistant thread.. this worked for me! first pair with old libs and one paired flash with new!

Work-around

so this is not a soulution but a work-around

from esphome-idasen-desk-controller.

ammmze avatar ammmze commented on September 23, 2024 1

but is it a esphome bug or a bug in this lib @simonszu ?

Depends on how you look at it I guess. In the 1.x series of this custom component, the custom component managed the bluetooth connection on it's own using the arduino library. Looking at the source for that, it they have implemented support for SMP (Security Manager Protocol). In the 2.x+ versions, all the manual bluetooth connection stuff was dropped in favor of the ble_client implementation in esphome. BUT the esphome implementation doesn't yet support SMP, so in the 2.x+ series, you probably cannot actually fully pair the device. So esphome basically initiates a connection, but doesn't fully establish the connection, so then it disconnects after about 30s when the desk drops out of pairing mode.

I'm in the process of trying to implement some of the SMP stuff so that this should work...though i'm not normally a C++ developer, so there's a bit of learning curve. I can verify that during the connection process, we (esphome) are receiving a ESP_GAP_BLE_SEC_REQ_EVT event, that the current esphome implementation does nothing with. This event is basically the desk telling the esphome that it wants security stuff set up.

So I guess, technically it's a bug that this custom component swapped the bluetooth implementation pre-maturely, given that esphome doesn't support the pairing stuff the desk is attempting to do. But the fix is ultimately that esphome needs to be updated to support the security protocol.

from esphome-idasen-desk-controller.

jdrozdnovak avatar jdrozdnovak commented on September 23, 2024

Hello,
I tried to replicate your problem and got the same thing, the latest ESPhome version.

from esphome-idasen-desk-controller.

simonszu avatar simonszu commented on September 23, 2024

Hi,
same here.

[09:57:02][D][ble_client:047]: Found device at MAC address [F5:4D:1B:8E:41:9B]
[09:57:02][I][ble_client:085]: Attempting BLE connection to f5:4d:1b:8e:41:9b
[09:57:03][I][idasen_desk_controller:042]: [Desk] Connected successfully!
[09:57:03][I][ble_sensor:033]: [Desk Height] Connected successfully!
[09:57:03][I][ble_sensor:033]: [Desk Speed] Connected successfully!
[09:57:03][D][binary_sensor:036]: 'Desk Connection': Sending state ON
[09:57:04][I][ble_client:161]: Service UUID: 0x1800
[09:57:04][I][ble_client:162]:   start_handle: 0x1  end_handle: 0x9
[09:57:04][I][ble_client:341]:  characteristic 0x2A00, handle 0x3, properties 0xa
[09:57:04][I][ble_client:341]:  characteristic 0x2A01, handle 0x5, properties 0x2
[09:57:04][I][ble_client:341]:  characteristic 0x2A04, handle 0x7, properties 0x2
[09:57:04][I][ble_client:341]:  characteristic 0x2AA6, handle 0x9, properties 0x2
[09:57:04][I][ble_client:161]: Service UUID: 0x1801
[09:57:04][I][ble_client:162]:   start_handle: 0xa  end_handle: 0xd
[09:57:04][I][ble_client:341]:  characteristic 0x2A05, handle 0xc, properties 0x20
[09:57:04][I][ble_client:161]: Service UUID: 99FA0001-338A-1024-8A49-009C0215F78A
[09:57:04][I][ble_client:162]:   start_handle: 0xe  end_handle: 0x13
[09:57:04][I][ble_client:341]:  characteristic 99FA0002-338A-1024-8A49-009C0215F78A, handle 0x10, properties 0xc
[09:57:04][I][ble_client:341]:  characteristic 99FA0003-338A-1024-8A49-009C0215F78A, handle 0x12, properties 0x12
[09:57:04][I][ble_client:161]: Service UUID: 99FA0010-338A-1024-8A49-009C0215F78A
[09:57:04][I][ble_client:162]:   start_handle: 0x14  end_handle: 0x17
[09:57:04][I][ble_client:341]:  characteristic 99FA0011-338A-1024-8A49-009C0215F78A, handle 0x16, properties 0x1e
[09:57:04][I][ble_client:161]: Service UUID: 99FA0020-338A-1024-8A49-009C0215F78A
[09:57:04][I][ble_client:162]:   start_handle: 0x18  end_handle: 0x1f
[09:57:04][I][ble_client:341]:  characteristic 99FA0021-338A-1024-8A49-009C0215F78A, handle 0x1a, properties 0x12
[09:57:04][I][ble_client:341]:  characteristic 99FA0029-338A-1024-8A49-009C0215F78A, handle 0x1d, properties 0x2
[09:57:04][I][ble_client:341]:  characteristic 99FA002A-338A-1024-8A49-009C0215F78A, handle 0x1f, properties 0x2
[09:57:04][I][ble_client:161]: Service UUID: 99FA0030-338A-1024-8A49-009C0215F78A
[09:57:04][I][ble_client:162]:   start_handle: 0x20  end_handle: 0xffff
[09:57:04][I][ble_client:341]:  characteristic 99FA0031-338A-1024-8A49-009C0215F78A, handle 0x22, properties 0xc
[09:57:04][W][ble_client:172]: No descriptor found for notify of handle 0x1a
[09:57:04][W][ble_client:172]: No descriptor found for notify of handle 0x1a
[09:57:04][D][esp32_ble_tracker:214]: Starting scan...
[09:57:05][D][esp32_ble_tracker:719]: Found device 2B:A2:00:F0:01:24 RSSI=-67
[09:57:05][D][esp32_ble_tracker:740]:   Address Type: RANDOM
[09:57:05][D][esp32_ble_tracker:719]: Found device F3:33:82:8E:C9:0C RSSI=-90
[09:57:05][D][esp32_ble_tracker:740]:   Address Type: RANDOM
[09:57:05][D][esp32_ble_tracker:742]:   Name: 'B4E5532C2EAA33AEE9'
[09:57:05][D][esp32_ble_tracker:744]:   TX Power: 2
[09:57:06][D][esp32_ble_tracker:719]: Found device E7:E7:D3:34:21:E7 RSSI=-81
[09:57:06][D][esp32_ble_tracker:740]:   Address Type: RANDOM
[09:57:06][D][esp32_ble_tracker:742]:   Name: 'F8B3C54C704333A3E9'
[09:57:06][D][esp32_ble_tracker:744]:   TX Power: 2
[09:57:06][D][esp32_ble_tracker:719]: Found device 20:92:87:1B:39:2E RSSI=-66
[09:57:06][D][esp32_ble_tracker:740]:   Address Type: RANDOM
[09:57:07][D][esp32_ble_tracker:719]: Found device F3:33:35:98:C3:AD RSSI=-87
[09:57:07][D][esp32_ble_tracker:740]:   Address Type: RANDOM
[09:57:07][D][esp32_ble_tracker:742]:   Name: 'B4E553393F8030AEE9'
[09:57:07][D][esp32_ble_tracker:744]:   TX Power: 2
[09:57:08][W][idasen_desk_controller:104]: Error reading char at handle 26, status=5
[09:57:08][W][ble_sensor:082]: Error reading char at handle 26, status=5
[09:57:08][W][ble_sensor:082]: Error reading char at handle 26, status=5
[09:57:08][W][idasen_desk_controller:104]: Error reading char at handle 26, status=5
[09:57:08][W][ble_sensor:082]: Error reading char at handle 26, status=5
[09:57:08][W][ble_sensor:082]: Error reading char at handle 26, status=5
[09:57:09][W][idasen_desk_controller:104]: Error reading char at handle 26, status=5
[09:57:09][W][ble_sensor:082]: Error reading char at handle 26, status=5
[09:57:09][W][ble_sensor:082]: Error reading char at handle 26, status=5
[09:57:10][D][esp32_ble_tracker:719]: Found device 68:9E:97:1E:68:23 RSSI=-66
[09:57:10][D][esp32_ble_tracker:740]:   Address Type: RANDOM
[09:57:10][D][esp32_ble_tracker:744]:   TX Power: 2
[09:57:16][D][esp32_ble_tracker:719]: Found device 31:57:68:8E:4C:F1 RSSI=-99
[09:57:16][D][esp32_ble_tracker:740]:   Address Type: RANDOM
[09:57:17][D][esp32_ble_tracker:719]: Found device 76:CB:9B:09:AC:40 RSSI=-65
[09:57:17][D][esp32_ble_tracker:740]:   Address Type: RANDOM
[09:57:17][D][esp32_ble_tracker:744]:   TX Power: 2
[09:57:19][D][esp32_ble_tracker:719]: Found device 18:B9:05:C8:AE:50 RSSI=-38
[09:57:19][D][esp32_ble_tracker:740]:   Address Type: PUBLIC
[09:57:19][D][esp32_ble_tracker:742]:   Name: 'LEDnetWF010033C8AE4F'
[09:57:20][D][esp32_ble_tracker:719]: Found device 50:DE:06:75:20:37 RSSI=-67
[09:57:20][D][esp32_ble_tracker:740]:   Address Type: PUBLIC
[09:57:20][D][esp32_ble_tracker:744]:   TX Power: 2
[09:57:37][W][idasen_desk_controller:049]: [Desk] Disconnected!
[09:57:37][W][ble_sensor:039]: [Desk Height] Disconnected!
[09:57:37][D][sensor:113]: 'Desk Height': Sending state nan cm with 1 decimals of accuracy
[09:57:37][W][ble_sensor:039]: [Desk Speed] Disconnected!
[09:57:37][D][sensor:113]: 'Desk Speed': Sending state nan cm/min with 0 decimals of accuracy
[09:57:38][D][binary_sensor:036]: 'Desk Connection': Sending state OFF

from esphome-idasen-desk-controller.

fabiosoft avatar fabiosoft commented on September 23, 2024

Same for me

from esphome-idasen-desk-controller.

FlatTangelo avatar FlatTangelo commented on September 23, 2024

Same for me!

from esphome-idasen-desk-controller.

MagnusPihl avatar MagnusPihl commented on September 23, 2024

Same problem here.

EDIT: I had originally tried with the newest version of ESPHome (2022.1.1).
When that failed, I tried with version 2021.10.0 since that's specifically mentioned for this project - but got the exact same result.

My desk was a recent purchase (January 2022). I don't know if it's possible that the Linak firmware is of a newer make that's somehow incompatible?

from esphome-idasen-desk-controller.

fabiosoft avatar fabiosoft commented on September 23, 2024

Maybe i found a solution for updating position while moving... but it's arduino code and no ESPHome... how can i convert the code?

from esphome-idasen-desk-controller.

FlatTangelo avatar FlatTangelo commented on September 23, 2024

Found this comment in a homeassistant thread.. this worked for me! first pair with old libs and one paired flash with new!

Work-around

so this is not a soulution but a work-around

This work-around worked for me! Thanks for the tips!

from esphome-idasen-desk-controller.

fabiosoft avatar fabiosoft commented on September 23, 2024

Finally! Worked for me too :)

from esphome-idasen-desk-controller.

simonszu avatar simonszu commented on September 23, 2024

Did at least someone open a bug in esphome since they need to fix that apparently?

from esphome-idasen-desk-controller.

klowdo avatar klowdo commented on September 23, 2024

but is it a esphome bug or a bug in this lib @simonszu ?

from esphome-idasen-desk-controller.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.