tjhorner / upsy-desky

Make your standing desk smarter
https://upsy-desky.tjhorner.dev
Other
478 stars 24 forks source link

LogicData Compact Support #4

Open DanielHoughtaling opened 1 year ago

DanielHoughtaling commented 1 year ago

Any possibility of a patch cable to connect to a LogicData Compact controller?
https://www.logicdata.net/wp-content/uploads/2017/05/Datasheet_Compact_English-Rev4.pdf

tjhorner commented 1 year ago

I will definitely look into this. I've been wanting to create adapters for desks that use different physical connectors or different pinouts, so I will add it to the list!

DanielHoughtaling commented 1 year ago

Awesome thanks. Would love to add your device to my desk if at all possible.

tjhorner commented 1 year ago

Just wanted to let you know that I am in touch with a custom cable manufacturer to get some adapter cable prototypes made. That datasheet you linked is super helpful, btw!

You can follow my progress here: #5

h42y commented 1 year ago

Oke Compact can have 2 types of Handsets:

  1. Parallel handset (older) Table is controlled via 4 parallel lines, current position of the table (can be inch or cm, depends on the region) is received over serial interface (Baud 9600, 8E1). Parallel lines are idle high 5V, press -> button pull down to drive. There are 4 different types of parallel handsets 4M2, 4M4 (most common), 6M2, 6M4
4M2 4M4 6M2 6M4 HS4 HS3 HS2 HS1
no input no input no input no input 0 0 0 0
Up1 Up1 Up1 Up1 0 0 0 1
Down1 Down1 Down1 Down1 0 0 1 0
S S Mem2 Mem2 0 0 1 1
Mem1 Mem1 Mem1 Mem1 0 1 0 0
Up1 alt. Up2 Up1 alt. Up2 0 1 0 1
Mem4 Mem4 S S 0 1 1 0
Mem2 Mem2 Mem3 Mem3 1 0 0 0
Down1 alt. Down2 Down1 alt. Down2 1 0 0 1
Mem3 Mem3 Mem5 Mem5 1 0 1 0
unassigned unassigned unassigned unassigned 1 0 1 1
unassigned unassigned Mem4 Mem4 1 1 0 0
Mem1+Mem2+Up1 Mem1+Mem2+Up1 Mem1+Mem3+Up1 Mem1+Mem3+Up1 1 1 0 1
unassigned unassigned Mem6 Mem6 1 1 1 0
  1. Serial handset (newer) Table is controlled entirely over serial interface with serial settings:
Baud: 115200
Parity: even
Start-bit 1
Stop-bit 1
Flow-control none

Will sniff out data packets when/if needed.

DanielHabenicht commented 10 months ago

While searching for my implementation I found this document: http://web.archive.org/web/20230814225435/http://logicoffice.at/download/datasheets/communication_en.pdf which goes into detail about the serial protocol.

However, I found some mismatches between my measurements and the official documentation as well as the table of @h42y (regarding the baud rate and used lines per action, maybe different revisions?). I have the basic controls working (but still have to implement the height): https://github.com/DanielHabenicht/logicdata-standing-desk

Furthermore, to integrate the config into upsy-desky some base configuration files would have to change. As the logicdata controller encodes its signals across multiple lines for one command, whereas the other desks seem to use one line per action.

@tjhorner I can draft a PR but I think the changes would be better discussed beforehand, as I am relatively new to esphome and the changes seem to be substantial. To support more tables the uart specification needs to be customized per table. Also, the actions and pinouts need to be dynamically connected (I did it with switches). All of those would need to be included in a per table yaml file (maybe by using substitute-include-variables).

DanielHabenicht commented 10 months ago

And another short update, as it was easier as anticipated, the desk height now also works (see the sane repo).

h42y commented 10 months ago

@DanielHabenicht great find! Can you give me more information about your desk / controller build year, maybe FW version.

DanielHabenicht commented 10 months ago

@h42y its in the first sentence of my repository: https://github.com/DanielHabenicht/logicdata-standing-desk

This repository is about reverse engineering a standing desk from Kinnarps. It applies to all hight adjustable tables with the LOGICDATA COMPACT-e-2L-O-V-EU Revision 2/1.9.14 main units with the controller LOGICDATA HSF MDF 4M4 Rev3 (click the link for pictures).

RomRider commented 4 months ago

@DanielHabenicht, I'm looking to build this. Could you please point me to the modified component you updated which would make it work with a logicdata desk?

DanielHabenicht commented 4 months ago

You already found the https://github.com/DanielHabenicht/esphome-standing-desk repository. Just use the example_sensor.yml instead of the example.yaml in this repository and flash the ESP with it. The Development.md gives the commands to do it: https://github.com/DanielHabenicht/esphome-standing-desk/blob/master/DEVELOPMENT.md

mirkokg commented 1 week ago

@DanielHabenicht Newer desks do not use RJ45. I have Steelcase branded desk, which uses LogicData dmp240. It came with most basic, touch basic controller (DMUI-touch-B-UD-LD), but there are options for more capable controllers with bluetooth, height memory etc. Controller uses mini-fit cable (4 pin molex) to connect to the main unit.

https://www.logicdata.net/wp-content/uploads/2017/04/Manual_DMP240-EU-US_Doc1_EN.pdf https://www.logicdata.net/wp-content/uploads/2020/03/datasheet_dmp240_us_doc3_en.pdf https://www.logicdata.net/wp-content/uploads/2017/04/LOGICproducts-2019_EN_digital_07-2019.pdf https://www.logicdata.net/wp-content/uploads/2019/05/Manual_DMUIX-LD-family_Doc2_EN.pdf