upsy-desky
upsy-desky copied to clipboard
LoctekMotion/FlexiSpot Support
Looks like most of the work is already done: https://github.com/iMicknl/LoctekMotion_IoT I think it would be awesome to have some sort of merge between these projects so that a clean all-in-one (no soldering) solution might also exist for Loctek desks. I would want to test, but unfortunately they're out of stock ;)
Definitely on the roadmap! Will need an adapter cable as noted in #5.
Awesome! So same connector, different pinout. That's a bit more tricky than expected, but at least it's the same connector :)
I ordered one! Order number #351096 If you already have access to an adapter for that desk for me to try, please let me know! Otherwise I'm also willing to wait for the upsy desky until you can ship it together with an adapter. That's fine by me :) let me know how I can be of help @tjhorner
Upsy desky in the house! Now I just need an adapter :) (or a small guide on how to rewire the cables and make an adapter cable)
I'll move my software findings here, so the adapter research (https://github.com/tjhorner/upsy-desky/issues/5) can happen in the right issue. Using the adapter described in that issue and my adapted version from LoctekMotion_Iot: https://github.com/Jolanrensen/LoctekMotion_IoT/tree/main
I now have the following working:
- up/down switch (requires virtual screen to be turned on)
- min/max height
- cover up/down/stop and target height in %
- target height in cm
- 90% of the time smooth motion and no crashes anymore on the upsy desky
I did find that we probably cannot use the upsy desky templates atm, since those assume setting a pin on/off will control the desk, while LoctekMotion (and more) desks require uart streams instead. We could however maybe generalize that to a switch that should be turned on instead since that's how I got it to work. Also, the target height seems to work very accurately :), no +0.4 needed.
Now, getting the screen and buttons to work is next. I'm curious to see what I can do with those. Since the target height works so well from home assistant, I might connect the buttons directly to home assistant as well, allowing them to map to anything you'd like to happen... Don't know yet. The LocktekMotion_Iot project simply captures the signal from the buttons and activates a switch which then sends the signal to the desk again, but the preset buttons don't seem to do anything for me atm, so I'm not sure where those presets are physically saved.
@tjhorner btw, is there a reason you use "return id(desk_height)->get_last_read() > x;" instead of "return id(desk_height).state > x;"? Is that for performance or for something else?
@Jolanrensen It's so the automation is more responsive. The state is published less often than the height is read.