-
Notifications
You must be signed in to change notification settings - Fork 124
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
Feature Request: Desky | Support Height Decoder Variant #40
Comments
Hello @ssieb, I stumbled across the HA project. I’m one of those users who would need this improvement. Would be amazing to add a second variant vor 9byte. I posted all my infos here: I will also look into your code. Maybe I’m able to implement it myself. Greetings, |
Any idea what the other bytes of the message are for? |
Not really. I actually really new to this topic. Maybe the display? My display is black when requesting the height. I only can confirm that 5 and 6 is necessary for calculating the heigh. At least for this desk. |
I looked into your code. Not really familiar with cpp. Are you combining byte 3 and 4 to calculate the height in the following part?
|
Similar to the most common protocol, I don''t think we ever decoded all bytes. Interesting some controllers (like mine) appear to use the "common protocol" on the rj45 port and the "Other protocol" on the rj12 port. On some controllers that rj12 port is for a bluetooth dongle. |
Is there an easy way to add the "Other protocol" config? |
That's part of the suggested feature request... So not yet. |
ok, it should now auto-detect and use the correct protocol. |
Auto detect!! Classic ssieb... Over achieving on the solution!😜 @hraschan can you please report back here and on the HA thread with how you go with testing? I might be able to help out a bit with minor config/hardware issues... |
Omg wow. Thats amazing. I will try that later and let you know. |
@ssieb I tried it at my desk. i get a value in home assistant. But its way off maybe the calculation is wrong?
Byte 5 and 6 409.1mm in Home Assistant on more information. When i move up the desk the height in home assistant is decreasing instead of increasing. Also the "Desky is moving" value is always off. |
Are you using just the basic config @hraschan ? Best to start with that if not. Maybe share your config as next step. https://github.com/ssieb/esphome_components/blob/master/components%2Fdesky%2FREADME.md Can you confirm that the 742mm value you manually calculated from the log is consistent with what's shown on the desk display? |
Yea 742 is the value my desk is showing. [10:55:55][D][uart_debug:176]: <<< 242,242,1,3,2,230,15,251,126 15, 251 15*256 + 251 = 4091mm => 409.1cm So the calculation is off. I'm using the config from Mahko_Mahko
But this code looks fine to me. Doesn't it? |
Cool let's see what ssieb reckons. Btw I'm Mahko_Mahko;) I use a more customised config. But probably ssieb will find it easier to debug using his intended / designed config. |
Ohhh hahah. Sorry man. I didn't read your name correctly. If @ssieb is requesting his config I can try any time. |
Sorry, I forgot to account for the first two bytes being missing, so the offsets were wrong. Try again. |
Thanks tho 😍 I will try tomorrow. |
Thank you @ssieb and @OkhammahkO it works like a charm. You can close this issue. I will also comment in the HA Thread. |
I'm also going to give it a try just need to get the latest config setup! thank you all |
@ssieb @hraschan I think everything is working perfectly, except for the height sensor, which sometimes shows the correct value but sometimes shows very random numbers (even out of range of what the desk is capable of moving). If you want, let me know how I can help with debugging this! (using the same config as @hraschan, but with an ESP8266) |
I found a detailed description of the "9" byte protocol, so it looks like I can add checksum verification and also check that it's receiving the correct message type. For now, if you can see in the uart debug log what happens with the bad values, that would be helpful. |
Absolutely, let me know if this video helps. Memory 1 is 70.1 cm (as shown on the screen) |
That video shows that you're losing data, probably because of software serial on the 8266. |
looks like now it's working a bit better, at least showing sometimes the right height. I can swap the 8266 for an ESP32 tomorrow (actually, it's the latest 8266 I have at home haha) |
@jcastro why is it getting the 4 byte protocol now? And what is that "request desk height" switch? |
I have no idea tbh! but here's my config (from @hraschan)
|
Maybe your 8266 is falty. You could also try the esp32 |
I'm curious about this protocol. Do you have a link? There's some more info about the protocol from another project here. |
@jcastro consider using a basic config for debugging so that ssieb doesn't have to navigate all the details of a more complex setup. https://github.com/ssieb/esphome_components/blob/master/components%2Fdesky%2FREADME.md Per my advice under software heading here. |
I wonder if the controller might switch protocol depending on the outcome of a handset startup sequence? And there have been other reports of this protocol switching behavior. That thread mentions also one protocol is broadcast based and the other packet based. Which doesn't mean much to me but might to you. It also mentions the messages for the 9 byte protocol it can be between 6 and 9 bytes. |
That's the one I was referring to.
I thought this was intercepting the display interface, so there's no handset involved.
Yes, that's why I'm also checking the message type in case something else shows up. |
@OkhammahkO @ssieb I've switched to a simple configuration (pasting it below) on an ESP32-S3 and it seems to work fine, except for the desk moving sensor This video shows me changing the height on the desk controller and then tapping on the Memory 1 button Current config
|
From memory, the desk moving sensor per ssiebs config example only actually works when using the move_to function (ie not when you press a physical button etc). So you could test and confirm that. On mobile so check indenting etc.
If you dig around in my config you'll see how I've added an alternative sensor if you need it.
|
Thanks @OkhammahkO, but if I add this code I get a validation error
|
|
Omg that explains it, sorry I didn’t even take a look at the code just copy paste. I will take a look at the options tomorrow but overall the height seems to be correct for now (only moving it from the desk controller) |
@jcastro once you've confirmed your desk is working with the basic move_to function and the 'Desky moving' sensor is working when using move_to we can confirm this feature request as working and then I can give you a hand with a more detailed set up on the main HA thread if you like. A simple way to test the move_to is to put it under a button and use the on_press action with a hard coded distance in there (make sure the value is within the upper and lower range of your desk - desk will error out if sent beyond limits and need resetting). Below should work (But it would be wise at this point to start understanding what the configs are doing a bit more).
|
I have added this to the config, but it looks like after flashing, the height sensor is not working anymore, and I get a checksum mismatch error on the logs when I press up and down on the desk controller. simpleconfig2.mp4EDIT: I could try restarting the desk and the ESP32 but wanted to share this first |
Hmm probably needs @ssieb for that. Seems to relate to newer checksum validation code. If you don't have it in your config it's worth adding back the config for uart debug and posting logs.
|
thanks @OkhammahkO! Added it back. Tapping up and down on the desk controller 👇🏼 |
So unfortunate my height isn't working anymore. I updated yesterday since then it isn't working anymore. I think i just got the checksum commit in. I think the validation is not working properly. @ssieb Edit: I forked your project and reverted your checksum commit. I can confirm it is now working again. So something is off with your validation. Please let me know if you need any assistance. I can provide logs ect. |
You need to enable the uart debugging so I can see what data is being received. |
Pasted from our discord chat. Let me know if you need any more info.
We’ve come across a desk which appears to be slightly different in one area.
In summary (and to refresh)...
Most desks send:
https://discord.com/channels/429907082951524364/952464939480645642/957101799528095774
https://discord.com/channels/429907082951524364/952464939480645642/957107106492850246
But what we’ve found with some Jarvis desks is that they appear to actually send the second “9 byte message” over the RJ45 port. Everything else appears to be the same (including how the bytes are used to calculate height.
https://community.home-assistant.io/t/desky-standing-desk-esphome-works-with-desky-uplift-jiecang-assmann-others/383790/105?u=mahko_mahko
So I think the feature request is to be able to select/switch the protocol.
My thought was the revised config might look a bit like below?
Thank you!
The text was updated successfully, but these errors were encountered: