upsy-desky icon indicating copy to clipboard operation
upsy-desky copied to clipboard

WN17CM2 Support

Open AnalogAyub opened this issue 2 years ago • 19 comments

I was able to set up the UpsyDesky easily, but the unit would not power on with just the RJ45 from the desk controller box. Once connecting a USB-C, the unit was detected by Home Assistant but would not control the desk or detect a height. Additionally, the desk keypad daisy-chained through the UpsyDesky would not control the desk.

Here's what the box looks like: Screenshot 2022-09-05 at 15 59

AnalogAyub avatar Sep 05 '22 20:09 AnalogAyub

Interesting, could you verify that the +5V and GND lines are on the correct positions? You can find the RJ45 pinout here. If they aren't in the correct place, you may need a special cable.

tjhorner avatar Sep 06 '22 07:09 tjhorner

Same for the WN17CM3, which I assume will have the same pinout. This is the controller for the Monoprice desks.

seanford avatar Sep 06 '22 17:09 seanford

https://www.kontive.com/products/lifting_table_part/17.html

Maybe they can help.

seanford avatar Sep 06 '22 22:09 seanford

Interesting, could you verify that the +5V and GND lines are on the correct positions? You can find the RJ45 pinout here. If they aren't in the correct place, you may need a special cable.

Honestly, I'm out of my depth here 😬

Providing power through USB-C was no problem, though.

AnalogAyub avatar Sep 07 '22 16:09 AnalogAyub

If anyone figures out the pin out for the controller, I can make a cable and test it out.

seanford avatar Sep 26 '22 17:09 seanford

Any instructions on how to test the pinouts so I can help move this along?

seanford avatar Oct 15 '22 12:10 seanford

@seanford I recommend getting an RJ45 breakout board like this one so you have somewhere to attach multimeter leads. Then follow this guide: https://github.com/tjhorner/wifi-desk-controller/wiki/Desk-Compatibility

Basically, just use a multimeter to find the position of the +5V and GND pins. After that we can start figuring out which pins transfer which data, if it uses serial, etc.

tjhorner avatar Oct 16 '22 20:10 tjhorner

I have a desk with a WN17CM3 controller. The control pad is wired with an RJ45. I have found the following pinouts and color coding.

Control panel wires

Wire color Pin label
Red Vin
Blue Rx
Yellow Tx
Black Gnd

RJ45 pinout

RJ45 pin Wire color Note
1 Orange
2 Blue Rx from control panel
3 Black Gnd from control panel
4 Yellow Tx from control panel
5 Red Vin from control panel
6 Orange
7 Orange
8 Orange

Below are pictures of my evidence:

  1. the disassembled control pad, where the circuit board labels the wires Image

  2. the RJ45 cable coming from the control pad (bottom and top, since it was difficult to see the colors on all the wires from the bottom) Image Image

Jaharmi avatar Nov 18 '22 18:11 Jaharmi

With my just-arrived Upsy Desky, I see the same thing as @AnalogAyub.

  1. I was able to set up the UpsyDesky easily.
  2. Connected USB-C, the unit was adopted by ESPHome and detected by Home Assistant.
  3. The unit would not control the desk or detect a height. I tried both decoders.
  4. The desk keypad daisy-chained through the Upsy Desky would not control the desk.
  5. The unit stopped responding with just the RJ45 from the desk controller box. I tried connecting to the Upsy Desky Web interface and it timed out.

I will double-check for the +5V and GND pins from the controller box.

Once I've found that, will the device need a debug firmware installed? Or is there something I can change in the (very minimal) ESPHome config?

Jaharmi avatar Jan 31 '23 15:01 Jaharmi

I think RJ45 pin 2 is +5v and 3 is GND. I've also posted in the reverse engineering discussions area.

Jaharmi avatar Jan 31 '23 16:01 Jaharmi

i reverse enginieered the pinout and protocol some time ago, maybe this will help you: https://github.com/swoga/standingdesk

swoga avatar Aug 28 '23 17:08 swoga

@swoga Awesome. I’ve been wondering about this for years! Do you have any thoughts on how this could integrate into Upsy-Desky / ESPHome?

Jaharmi avatar Feb 02 '24 22:02 Jaharmi

@Jaharmi My plan is to write a custom component for ESPHome, but I haven't gotten around to it yet. It's definitely still on my to-do list.

swoga avatar Feb 02 '24 22:02 swoga

@swoga If this fit in with Upsy-Desky, I’d be a fan. :) That would give it things like the Upsy-Desky local Web interface. I already have an Upsy-Desky and just never figured out how to get from beyond the pinouts to do anything else.

Looking at the related component, the C++ part is currently beyond me.

Jaharmi avatar Feb 02 '24 23:02 Jaharmi

@swoga Does this state diagram seem to handle what you found in the serial protocol for the WN17CM3? I am trying to understand the protocol and maybe do something with it. This is probably my first state diagram ever so I may have mixed it with a flow chart.

stateDiagram
    [*] --> CMDBEGIN
    CMDBEGIN --> CMD: colon
    CMD --> DISPLAY: D
    CMD --> KEY: K
    CMD --> REQUEST: R
    CMD --> ACKNOWLEDGE: A
    DISPLAY --> HEIGHT
    HEIGHT --> HEIGHTCKSUM: decimal number as string
    HEIGHTCKSUM --> CMDEND: semicolon
    HEIGHT --> COMMAOPT: comma
    COMMAOPT --> HEIGHTCKSUM
    KEY --> DONTCARE
    REQUEST --> DONTCARE
    ACKNOWLEDGE --> DONTCARE
    DONTCARE --> CMDEND: semicolon
    CMDEND --> CHKSUM

Jaharmi avatar Feb 03 '24 16:02 Jaharmi

Vin from control panel

@tjhorner it seems that the pinouts for this controller are the same as other controllers, but the protocol is different. With the information provided by @swoga, is it possible to write a new decoder for this controller? I'd do it myself if I thought I could...lol

seanford avatar Feb 05 '24 17:02 seanford

hi @swoga could yo develop the custom component? I been trying for several weeks and nothing worked.

KiloHotl avatar Apr 05 '24 18:04 KiloHotl