Skip to content
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

LINAK Support #3

Open
BradleyFord opened this issue Aug 29, 2022 · 17 comments
Open

LINAK Support #3

BradleyFord opened this issue Aug 29, 2022 · 17 comments
Labels

Comments

@BradleyFord
Copy link

It would be great if it could support LINAK controllers, these are OEMed to many desk manufacturers and used an RJ45 connection. My IKEA desk is LINAK.

I will most likely buy a device from you when you launch, and can help provide whatever info you need to add support.

(Note their are a few github projects already for the LINAK)

@tjhorner
Copy link
Owner

Can you link me to the projects for the LINAK desk? It will give me a good idea of whether support is feasible or not. Thanks!

@BradleyFord
Copy link
Author

BradleyFord commented Aug 29, 2022

The projects I had looked at are:
https://github.com/anetczuk/LinakDeskApp
https://github.com/rhyst/idasen-controller
https://github.com/j5lien/esphome-idasen-desk-controller

"Idasen" is the Ikea desk, but it uses the Linak without any modification. Even the Android app is the Linak app (not an Ikea app)

@AABatteries
Copy link

+1 on this request, I was just about to ask about LINAK support :) I will be happy to help with hardware testing if need be.

@jshep321
Copy link

Hi guys, I was thinking along the same lines at @tjhorner here!

I measured my (~20yo) LINAK desk (from Kinnarps Sweden). It was a 29.13V common that simply needs to be connected to wire A for up or wire B for down. I bought a dirt cheap ESP01 dual relay from aliexpress and connected via ESPHome to HA.

I made a capacitive touch sensor from a different ESP32 (that is part of my office master control) and can control the up/down with that via HA.

My desk has no height sensing so I am currently in the middle of prototyping a ToF distance sensor using HC-SR04 (ultrasonic) and a (3rd!) ESP. I'm using node red to make Preset heights, but the sensor is currently too noisy to work properly. I might switch over to a different position sensing method when I reopen this project. I'm pretty surprised that everything is seamless except the ultrasound. Delays are imperceptible in this setup.

Do your LINAK desks have position sensors? My RJ11 is 3 wires only -- V+ (29v) and Up/Down sense.

Happy to share my yaml for the desk motor control if you want.

IMG_6411

IMG_6410

signal-2022-08-30-150115

IMG_6412

@h42y
Copy link

h42y commented Aug 30, 2022

There is high possibility that system is using hall quadrature encoders to keep the speed and position of the actuators in check. Just sniff them to get position.

@tjhorner
Copy link
Owner

tjhorner commented Sep 6, 2022

So it looks like all the existing projects use Bluetooth to communicate with the control box. I'd say that is the easiest path forward. Since the Upsy Desky has an ESP32 and thus Bluetooth, I recommend using this ESPHome component for now while I look into what it uses for the physical connection.

@AlexPotterOnGit
Copy link

+1 for LINAK. As others ready to do tests required. I don't think my controller has Bluetooth so I am after wired connection.
20220922_204120
20220922_204041
20220922_204052
20220922_204109

@tjhorner tjhorner changed the title Support for LINAK controllers LINAK Support Oct 2, 2022
@tjhorner tjhorner moved this to Todo in New Desk Support Oct 2, 2022
@Tam-Lin
Copy link

Tam-Lin commented Oct 7, 2022

I have an uppy desky now and a linak controller. For this controller, there are 4 wires, and some communication between the desk and controller that happens to communicate the current height.

@Tam-Lin
Copy link

Tam-Lin commented Oct 7, 2022

I've done a bit of investigation. There are 4 wires; from left to right:
1 2 3 x x x x 8

It looks like the wire color could be different, based on the picture above. In my case, it's
R B Y x x x x Bl

Measurements, which didn't trigger the desk to do anything:

1 - 2: -6.6 V
1 - 3: - 4.4 V
1 - 8: - 7.34 V

2 - 3: 0 V
2 - 8: 0 V

3 - 8: 0 V

If I do attach the upsy desky to the desk, it descends to the bottom.

I have a Linak DPG1C controller; I'm not sure about the motor control box.

@pi2madhatter
Copy link

pi2madhatter commented Feb 22, 2023

I would throw down the money here and now for LINAK support. I have one that looks identical to the others posted on this git, but with slightly different specs. I've attached an image of my label if it helps at all.

Image

In the meantime, if anyone can venture a guess if the production version of the Upsy Desky could be modified or use a custom converter cable to make it work, I'm listening!

@Ordspilleren
Copy link

Hi all!
I have been working on exactly this, and I am happy to report that I have a working solution which you can find in this repo. I didn't do this all by myself, so I have given credit where its due.

Integrating it directly within Upsy Desky is unlikely in its current form, simply because I believe esp-idf is a requirement to get the control we need over UART.

It's by no means done yet, but it works reliably for me.

@tjhorner
Copy link
Owner

Integrating it directly within Upsy Desky is unlikely in its current form, simply because I believe esp-idf is a requirement to get the control we need over UART.

@Ordspilleren You can actually compile your firmware directly for the Upsy Desky if you want; it's just an ESP32 module.

Why do you think ESP-IDF is required? ESPHome does support ESP-IDF but currently it's using the Arduino framework, which is default.

@Ordspilleren
Copy link

@Ordspilleren You can actually compile your firmware directly for the Upsy Desky if you want; it's just an ESP32 module.

Good point, that's certainly an option if someone wants to go that route. They would still need the custom circuit described in my repo however, unless Upsy Desky can support doing single wire RX and TX and bring the 12V down to 3.3V. I haven't looked at the options in-depth to be honest.

Why do you think ESP-IDF is required? ESPHome does support ESP-IDF but currently it's using the Arduino framework, which is default.

My solution relies on detecting a UART break signal and then clearing the UART FIFO buffer to get the first data byte in the data frame from the table. I also set a couple of ESP-IDF specific options to get the break detection working reliably. Not sure if that is possible with Arduino directly.

With that said, you can call IDF functions from within Arduino, so I guess it should be possible if someone was willing to put in the time.

@davidski
Copy link

It looks like HA is getting 1st party integration with IKEA IDASEN in the 2023.10, which should (not yet tested) include Linak devices. I'm excited to see this land! https://rc.home-assistant.io/integrations/idasen_desk

@Ordspilleren
Copy link

It looks like HA is getting 1st party integration with IKEA IDASEN in the 2023.10, which should (not yet tested) include Linak devices. I'm excited to see this land! https://rc.home-assistant.io/integrations/idasen_desk

Please note that this integration works via the Bluetooth functionality present in some Linak controllers. This has been possible for several years via esphome-idasen-desk-controller and LinakDeskEsp32Controller.

@giantorth
Copy link

Has anybody gotten Linak support working with an upsy yet? I suppose I should have checked the issues before I bought one of these ;)

@giantorth
Copy link

I'm not sure this is helpful, but the Linak desks did have a USB adapter for PC control, the USB2LIN06 cable.
You can see pictures of it here: https://github.com/UrbanskiDawid/usb2lin06-HID-in-linux-for-LINAK-Desk-Control-Cable/tree/master/PHOTOS/usb2lin06-HID

I'm curious if it would be possible to use this cable as some sort of bridge for the hardware compatibility issues with the upsy and a linak controller, perhaps with a bit of soldering if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests