iMicknl / LoctekMotion_IoT

Learn how to connect your Flexispot (LoctekMotion) desk to the internet. This repository contains a collection of scripts to get your started, combined with research and instructions.
MIT License
580 stars 58 forks source link

Support request for Control Panels HCB213A-1 (‎E1W-EU model) #37

Open lboue opened 1 year ago

lboue commented 1 year ago

Hello,

The HCB213A-1 control panel (‎E1W-EU model) does not appear on the supported models page.

Here is a picture below:

HCB213A-1

Regards

horriblenoises commented 1 year ago

I just got an EN1B desk frame off amazon (in the US) with this model controller and connected a D1 mini to it with the ESPhome instructions and the e5b yaml file. It required minimal modifications (min/max height adjustment & adding preset 4) but I'm very happy to say it seems to work really well. Cover up/down travel the desk to min/max, the presets all work, and the height readout is correctly displayed in Home Assistant.

Screen Shot 2022-10-21 at 12 24 23 AM
renjithstalin commented 1 year ago

@horriblenoises Can you please share your preset 4 entry? also, does the down button work for you? Thanks in advance Got the P4 command list from the main page...still can't get the down button to work, everything else works just fine.

horriblenoises commented 1 year ago

@renjithstalin

Sorry. I got distracted from this project for a bit. Never added the problems I'd found after posting that. It seems like the up/down buttons don't work after a timeout occurs. Pin20 doesn't seem to wake it either. So I changed up/down to internal in the esphome yaml. My D1 mini also reboot a lot after a command is finished. I have to investigate if it's something I've done or something that isn't compatible.

This aside, it does work as well as I need it to. The preset buttons are not effected by the timeout issue so I set P1 to min, P4 to max, and if I need granularity beyond that, I can always add an automation to Home Assistant or the ESP to call for specified heights (send button press P4; if height = height requested -1, send button press P4 again to stop).

  - platform: uart
    name: "Preset 1"
    id: ${device_name}_preset1
    icon: mdi:numeric-1-box
    data: [0x9b, 0x06, 0x02, 0x04, 0x00, 0xac, 0xa3, 0x9d]
    uart_id: desk_uart

  - platform: uart
    name: "Preset 2"
    id: ${device_name}_preset2
    icon: mdi:numeric-2-box
    data: [0x9b, 0x06, 0x02, 0x08, 0x00, 0xac, 0xa6, 0x9d]
    uart_id: desk_uart

  - platform: uart
    name: "Preset 3"
    id: ${device_name}_preset3
    icon: mdi:numeric-3-box
    data: [0x9b, 0x06, 0x02, 0x10, 0x00, 0xac, 0xac, 0x9d]
    uart_id: desk_uart

  - platform: uart
    name: "Preset 4"
    id: ${device_name}_preset4
    icon: mdi:numeric-4-box
    data: [0x9b, 0x06, 0x02, 0x00, 0x01, 0xac, 0x60, 0x9d]
    uart_id: desk_uart

  - platform: uart
    name: "Up"
    id: ${device_name}_up
    icon: mdi:arrow-up-bold
    data: [0x9b, 0x06, 0x02, 0x01, 0x00, 0xfc, 0xa0, 0x9d]
    uart_id: desk_uart
    internal: true

  - platform: uart
    name: "Down"
    id: ${device_name}_down
    icon: mdi:arrow-down-bold
    data: [0x9b, 0x06, 0x02, 0x02, 0x00, 0x0c, 0xa0, 0x9d]
    uart_id: desk_uart
    internal: true
renjithstalin commented 1 year ago

Many thanks for the response. I have managed to get Preset 4 working. But my down button still doesn't work. I'm going to try this with esp32 and see if it works. And yes, my wemos d1 mini reboots too :( Thanks again.

sebPomme commented 1 year ago

It seems like the up/down buttons don't work after a timeout occurs.

I read somewhere on another model that UP/DOWN work only if the panel light are turn on before :thinking: so the trick was to send an impulsion to a pin that are link to the screen before doing an action .
I c'ant remember where.

Maybe we can apply the same pattern.

lourdrivera123 commented 1 year ago

Many thanks for the response. I have managed to get Preset 4 working. But my down button still doesn't work. I'm going to try this with esp32 and see if it works. And yes, my wemos d1 mini reboots too :( Thanks again.

Were you able to test it on esp32? We have the same model of control panel, but I don't know how to map it correctly with my RJ45 and ESP32 Devkit V1.

ThomDietrich commented 11 months ago

Hey guys, thanks for confirming that it works for the HCB213A-1. I bought the desk "Sanodesk EC4" (EC4B-EU) and it came with the controller box HCB223A-1. I expect it to be identical, except for the two-motor-drive. I'll try with the e5b yaml and an esp32 the next couple of days.

For who might find it useful, here are some pictures of the controller:

telegram-cloud-photo-size-2-5262495425334725914-y telegram-cloud-photo-size-2-5262495425334725915-y telegram-cloud-photo-size-2-5262495425334725916-y

ThomDietrich commented 11 months ago

Couldn't wait 😄

I've quickly thrown together an RJ45 to ESP32 cable and flashed the firmware. I can confirm that everything is working. 🎉 This includes the up and down commands - no wake-up or PIN20 needed (both of those seem to have no effect on my specific device).

The only bug I found is that "Desk Height" stays unknown after the ESP boots up. This can be resolved via a wake-up (display or programmatically) and isn't a bigger issue for my use cases. Still, I found another workaround for waking up the device: If a preset button is not programmed to a specific height, it will wake up the display but won't move the desk.

iMicknl commented 11 months ago

@ThomDietrich would you be willing to test https://github.com/iMicknl/LoctekMotion_IoT/issues/67? Hopefully this will also solve your issues.

Zagur commented 8 months ago

Couldn't wait 😄

I've quickly thrown together an RJ45 to ESP32 cable and flashed the firmware. I can confirm that everything is working. 🎉 This includes the up and down commands - no wake-up or PIN20 needed (both of those seem to have no effect on my specific device).

The only bug I found is that "Desk Height" stays unknown after the ESP boots up. This can be resolved via a wake-up (display or programmatically) and isn't a bigger issue for my use cases. Still, I found another workaround for waking up the device: If a preset button is not programmed to a specific height, it will wake up the display but won't move the desk.

I currently have an HCB213A-1 and I was testing with the configuration for e5b with what you have mentioned. I am using an ESP328266 Mod, what scheme should I follow to connect the cables correctly?

ThomDietrich commented 8 months ago

Hey @Zagur, you should find everything you need in https://github.com/iMicknl/LoctekMotion_IoT/issues/67

Zagur commented 8 months ago

First of all I want to thank everyone for this incredible project.

I have been reading several issues and have configured my ESP32 2866 to control the HCB213A-1 controller. Everything seems to be working correctly except for one thing I've seen in Home Assistant.

When I try to set the height to 90cm it always adds between 2 and 2.7cm extra. I use the mushroom-number-card to show the height but it doesn't work very well. A value is always set below or above what is indicated.

Doing some tests I get some ideas/doubts:

Regards!