-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FLEXISPOT EC5 - HS11A-1C0 + CB38M2H(PB)-1 compatibility ? #81
Comments
Update : Tested out the HS13B-1 pins conf since they seemed to correspond with the control panel wiring, took a LOLIN S3 Mini and a RJ45 connector, and it worked ! I had to adapt some parts of the config to match pins, min/max height and the 3rd preset Here is my yaml
Question is : What are the options if I want to keep the keypad ? |
Update 2
It works great, i get to automate my desk and keep the keypad I was getting some errors E07, E08 or Rst on the keypad, had to hold the down button till the desk reach the lowest height, but for now seems ok Sometimes the esp switches or keypad buttons seem to not respond, looks like the esp32 restart itself, don't know why, even with reset_reason didn't get to understand why
|
I'm glad to see I'm not the only one triying to work with this specific interface. I'm triying to make a "men in the middle" with an arduino mega, just to know how everything is moving (also, this is my first electronics experiment) |
Hey @M3te0r, I have the same controller, but my desks stops when sending one down or up command (0x9b, 0x06, 0x02, 0x02, 0x00, 0x0c, 0xa0, 0x9d). When moving the desk it stops between movements, making the move unsteady. Do you also have the same issue? Im using an |
Hi @Paulomart To simulate that hold behaviour you have to loop through a cycle of wake up, up/down, that's the intent behind the |
@M3te0r thanks I got it to work that way. An issue I was facing: the sensor for the height was firing to often. I debounced the sensor and that seemed to help with smoother movement. Here is my final setup: api:
encryption:
key: "xxxxxxx"
ota:
- platform: esphome
password: "xxxxxxxx"
substitutions:
min_height: "64" # cm
max_height: "124" # cm
screen_pin: D2
tx_pin: D5
rx_pin: D6
friendly_name: "Office 1 Desk 1"
name: "office-1-desk-1"
esphome:
name: ${name}
friendly_name: ${friendly_name}
includes:
- desk_height_sensor.h
on_boot:
priority: -10
then:
- switch.turn_on: switch_wake_up
external_components:
source: github://iMicknl/LoctekMotion_IoT@v2
components: [ loctekmotion_desk_height ]
logger:
esp8266:
board: nodemcuv2
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: "recover me ${friendly_name}"
captive_portal:
uart:
id: desk_uart
baud_rate: 9600
tx_pin: ${tx_pin}
rx_pin: ${rx_pin}
sensor:
- platform: wifi_signal
name: "WiFi Signal"
update_interval: 60s
- platform: uptime
name: Uptime
- platform: loctekmotion_desk_height
id: "desk_height"
name: Desk Height
filters:
- clamp:
min_value: ${min_height}
max_value: ${max_height}
ignore_out_of_range: true
- debounce: 10ms
on_value_range:
- below: ${min_height}
then:
- switch.turn_off: switch_down
- above: ${max_height}
then:
- switch.turn_off: switch_up
on_value:
then:
- component.update: set_desk_height
button:
- platform: uart
name: "Step Up"
id: button_up
icon: mdi:arrow-up-bold
data: [0x9b, 0x06, 0x02, 0x01, 0x00, 0xfc, 0xa0, 0x9d]
uart_id: desk_uart
- platform: uart
name: "Step Down"
id: button_down
icon: mdi:arrow-down-bold
data: [0x9b, 0x06, 0x02, 0x02, 0x00, 0x0c, 0xa0, 0x9d]
uart_id: desk_uart
switch:
- platform: gpio
name: "Virtual Screen"
pin:
number: ${screen_pin}
mode: OUTPUT
restore_mode: ALWAYS_ON
internal: true
- platform: uart
name: "Up"
id: switch_up
icon: mdi:arrow-up-bold
data: [0x9b, 0x06, 0x02, 0x01, 0x00, 0xfc, 0xa0, 0x9d]
uart_id: desk_uart
send_every: 1ms
on_turn_on:
then:
- switch.turn_off: switch_down
internal: true
- platform: uart
name: "Down"
id: switch_down
icon: mdi:arrow-down-bold
data: [0x9b, 0x06, 0x02, 0x02, 0x00, 0x0c, 0xa0, 0x9d]
uart_id: desk_uart
send_every: 1ms
on_turn_on:
then:
- switch.turn_off: switch_up
internal: true
- platform: uart
name: "(wake up)" # Not available on all control panels
id: switch_wake_up
icon: mdi:gesture-tap-button
data: [0x9b, 0x06, 0x02, 0x00, 0x00, 0x6c, 0xa1, 0x9d]
uart_id: desk_uart
internal: true
cover:
- platform: template
id: desk_cover
icon: mdi:table-chair
name: "Desk"
assumed_state: true
optimistic: true
# Move desk up
open_action:
- if:
condition:
- switch.is_on: switch_down
then:
- switch.turn_off: switch_down
- delay: 500ms
- switch.turn_on: switch_up
# Move desk down
close_action:
- if:
condition:
- switch.is_on: switch_up
then:
- switch.turn_off: switch_up
- delay: 500ms
- switch.turn_on: switch_down
stop_action:
then:
- switch.turn_off: switch_down
- switch.turn_off: switch_up
number:
- platform: template
name: "Desk Height"
id: set_desk_height
min_value: ${min_height}
max_value: ${max_height}
icon: "mdi:counter"
unit_of_measurement: "cm"
device_class: "distance"
step: 0.1
lambda: !lambda |-
return id(desk_height).state;
set_action:
- if:
condition:
- lambda: !lambda |-
return x > id(desk_height).state;
then:
# direction up
- cover.open: desk_cover
- wait_until:
lambda: |-
return id(desk_height).state >= x - 1;
- cover.stop: desk_cover
- delay: 1s
# move a little down again to adjust for momentum
- uart.write:
id: desk_uart
data: [0x9b, 0x06, 0x02, 0x02, 0x00, 0x0c, 0xa0, 0x9d] # down
else:
# direction down
- cover.close: desk_cover
- wait_until:
lambda: |-
return id(desk_height).state <= x + 3;
- cover.stop: desk_cover
- delay: 1s
# move a little up again to adjust for momentum
- uart.write:
id: desk_uart
data: [0x9b, 0x06, 0x02, 0x01, 0x00, 0xfc, 0xa0, 0x9d] # up
|
Thanks for the extensive documentation @M3te0r!!! and i have another Button PCB but it seems to be similiar. will test it in some time and report. |
I got my E5 and it came with HS36B-1 and CB38M2H(PB)-2, which seem identical to yours, @M3te0r. Got it working with @Paulomart's config + MQTT on an ESP8266 NodeMCU and am trying to implement the keypad passthrough. Whats the reason you didn't use the 5+v to power the ESP? |
Hi,



Do you know if the HS11A-1C0 + CB38M2H(PB)-1 combo is compatible? It has one RJ45 cable going from the control block to the control panel
Thanks!
The text was updated successfully, but these errors were encountered: