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

Read/set favorite values from the desk provided from the Linak Desk Control app #68

Open
TermoZour opened this issue Sep 2, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@TermoZour
Copy link

I just got an Ikea Idasen and I also installed the Desk Control app from Linak that is also compatible. The app allows you to set 3 predefined profiles and after that, you can use the controls on the desk to "snap" to those profiles while also allowing you to move between them.

Would "setting" profiles be something you're interested in implementing? Maybe even getting those profiles from the desk itself (like you're reading the height) so they are always in sync.

Let's say the desk is at height 741. You have a set a profile from the app to height 758 and another at 1152.
You pull the button up so you start raising the desk. It will keep rising until it reaches 758, then wait a second. If the button is still pressed, it will start rising again until it reaches 1152, at which point it will wait for a second again.

It would be really cool to have 3 profiles from the config sync with the 3 profiles set from the app, as well as being able to set new values from the CLI which can then be used with the hardware controls as well. This way, I can either control the desk and the profiles via it's hardware buttons, my personal laptop, or my phone when I'm using the work laptop.

@rhyst rhyst added enhancement New feature or request need hardware and removed need hardware labels Sep 5, 2023
@rhyst
Copy link
Owner

rhyst commented Sep 5, 2023

It's been a long time since I used the official app! They must have updated it since I last used it. I might have a look if this is something that can be done with the standard Idasen that I have though no promises. I would definitely accept a PR to implement this if anyone else is interested.

@TermoZour
Copy link
Author

TermoZour commented Sep 11, 2023

Found the code for an app that already seems to implement setting favorite values here

I will test the app and follow along the lines to see if I can figure it out. I did send a packet with nRF Connect Android app but it seemed to clear all my favorites instead, so I might have done something wrong with the data I sent.

EDIT: It doesn't want to connect to Idasen Desk. Maybe it was made for a different Linak controller (the app also has 4 favorite slots and not just 3). It keeps spamming some errors about how it's trying to write some stuff to certain characteristics that don't seem to work for our desk.

I'll try to decompile the Linak app and see if I can understand anything from it (unless the code is obfuscated).

@rhyst
Copy link
Owner

rhyst commented Oct 31, 2023

Thanks to the DPG1C issue I think I understand enough to implement this. Do you have suggestions for how it would work?

One idea, we have some special favourite names "favourite-1", "favourite-2" etc. which correspond to the favourite slots in the desk/app.

If you do not set these in the idasen controller config then using them in the --move-to favourite-1 argument will check the value from the desk first, and then move to it.

If you do set these values in the idasen controller config then using them in the --move-to favourite-1 will move to that height and write the value to the desk favourite.

@TermoZour
Copy link
Author

Honestly, this sounds like the best behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants