Comments (2)
@MathijsG Thanks for the suggestion!
At first I tried with quite an old version which produced the issue I reported here. Then I updated and used a similar config as described here. This gave me a crash during the start which I couldn't figure out.
After you posted this I looked at it again and realised I used a wrong board. :/ It's an esp32 but the correct board would have been nodemcu-32s. After I updated it, the crash is gone and it's working with pretty much your configuration.
So everything good now :)
Closing this ticket.
from esphome-idasen-desk-controller.
It's working fine here!
What if you try this config? (Of course change it to your credentials on some places):
esphome:
name: idasen
platform: esp32
board: esp32dev # Replace with your board
# Starting with ESPHome 2021.10, libraries need to be included manually
libraries:
- "ESP32 BLE Arduino"
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
wifi:
ssid: !secret IoT_ssid
password: !secret IoT_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Idasen Fallback Hotspot"
password: aaaaaaaa
captive_portal:
## Begin van Ikea-specifieke dingen
external_components:
- source: github://j5lien/[email protected]
cover:
- platform: idasen_desk_controller
name: "Desk"
idasen_desk_controller:
# Reference to the ble client component id
# -----------
# Required
ble_client_id: idasen_desk
# Fallback to use only up and down commands (less precise)
# -----------
# Optional
only_up_down_command: false
esp32_ble_tracker:
globals:
# To store the Desk Connection Status
- id: ble_client_connected
type: bool
initial_value: 'false'
ble_client:
- mac_address: "DC:AC:28:84:21:E5"
id: idasen_desk
on_connect:
then:
# Update the Desk Connection Status
- lambda: |-
id(ble_client_connected) = true;
- delay: 5s
# Update desk height and speed sensors after bluetooth is connected
- lambda: |-
id(desk_height).update();
id(desk_speed).update();
on_disconnect:
then:
# Update the Desk Connection Status
- lambda: |-
id(ble_client_connected) = false;
sensor:
# Desk Height Sensor
- platform: ble_client
type: characteristic
ble_client_id: idasen_desk
id: desk_height
name: 'Desk Height'
service_uuid: '99fa0020-338a-1024-8a49-009c0215f78a'
characteristic_uuid: '99fa0021-338a-1024-8a49-009c0215f78a'
icon: 'mdi:arrow-up-down'
unit_of_measurement: 'cm'
accuracy_decimals: 1
update_interval: never
notify: true
lambda: |-
uint16_t raw_height = ((uint16_t)x[1] << 8) | x[0];
unsigned short height_mm = raw_height / 10;
return (float) height_mm / 10;
# Desk Speed Sensor
- platform: ble_client
type: characteristic
ble_client_id: idasen_desk
id: desk_speed
name: 'Desk Speed'
service_uuid: '99fa0020-338a-1024-8a49-009c0215f78a'
characteristic_uuid: '99fa0021-338a-1024-8a49-009c0215f78a'
icon: 'mdi:speedometer'
unit_of_measurement: 'cm/min' # I'm not sure this unit is correct
accuracy_decimals: 0
update_interval: never
notify: true
lambda: |-
uint16_t raw_speed = ((uint16_t)x[3] << 8) | x[2];
return raw_speed / 100;
binary_sensor:
# Desk Bluetooth Connection Status
- platform: template
name: 'Desk Connection'
id: desk_connection
lambda: 'return id(ble_client_connected);'
# Desk Moving Status
- platform: template
name: 'Desk Moving'
id: desk_moving
lambda: 'return id(desk_speed).state > 0;'
from esphome-idasen-desk-controller.
Related Issues (20)
- Desk Panel DPG1C connection not stable
- Desk not moving / Error reading char at handle 26, status=5 HOT 1
- Are you open to being sponsord? HOT 2
- Port to new Bluetooth integration HOT 5
- Second Desk HOT 1
- Error when installing component. HOT 6
- Installation of the cover component does not work
- new esphome version breaks compilation HOT 2
- Update compatibility HOT 2
- ESP32 keeps crashing on ESPHome 2022.11.2 HOT 1
- [Wemos ESP32 Mini] A working ESPHome yaml example with some adjustments. (Ikea Idasen Liank DL110)
- unable to move after a while HOT 4
- DPG1C woes: cannot move using Cover and wrong sensor height HOT 1
- updating firmware of the controller HOT 1
- Disconnections & not fully responding to requests
- Error sending write request for cover, status=259
- Height is received only at startup HOT 1
- cover.stop_cover service not supported HOT 1
- base hight?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esphome-idasen-desk-controller.