rhyst / linak-controller

A Python script to control Linak standing desks.
MIT License
359 stars 50 forks source link

Removed user_id from config #69

Closed kaml123 closed 1 year ago

kaml123 commented 1 year ago

There is no need to store user_id in the configuration file because we can read from controller and modify only one byte. Storing in a configuration file may also cause some issues when someone incorrectly set the byte responsible for the ability to move the desk. I also noticed that BASE_HEIGHT offset is different for my desk so I added a read from the controller to be fully synchronized.

rhyst commented 1 year ago

Thank you!

How do you know that the first byte of the user id must be 1. On my Idasen the user ID was all zeros and it still worked. Is it specific to DPG1C?

kaml123 commented 1 year ago

I tested this on my DPG1C and setting this byte to 1 solve the issue. I can write any values to the rest of bytes but first byte must be 1 to be able to move desk.