alex20465 / bluedesk

CLI tool to control lower energy actuator systems (office desks) via bluetooth.
MIT License
3 stars 3 forks source link

Move to position is pretty inaccurate #4

Closed noxhirsch closed 4 years ago

noxhirsch commented 4 years ago

When I use move --to XX (the only reason for me to use this piece software is to add autodrive to Idasen)) the position is pretty inaccurate. Between 82 and 83 percent the desk moves 6 cm but in theory it should only be 0.64 cm (if I divide the height range into percent). Between 0 and 1 percent its 3 cm. And if I enter the same height again it also moves 3 cm.

noxhirsch commented 4 years ago

It is really weard. I messed alot with the code and tried things like longer delays and shorter delays. I also added position output inside the loop.

pi@raspberrypi:/usr/local/lib/python3.7/dist-packages/bluedesk/desks $ bluedesk move --to 17
30.784615384615385
30.753846153846155
30.53846153846154
30.092307692307692
29.446153846153845
28.56923076923077
27.76923076923077
26.676923076923078
25.523076923076925
24.353846153846153
23.184615384615384
22.03076923076923
20.861538461538462
19.692307692307693
18.523076923076925
17.353846153846153
pi@raspberrypi:/usr/local/lib/python3.7/dist-packages/bluedesk/desks $ bluedesk move --to 17
Connection failed: Failed to connect to peripheral f8:e1:03:4c:06:84, addr type: random
12.138461538461538
12.169230769230769
12.4
12.707692307692307
13.323076923076924
14.092307692307692
14.907692307692308
15.753846153846155
16.615384615384617
17.523076923076925
18.43076923076923
pi@raspberrypi:/usr/local/lib/python3.7/dist-packages/bluedesk/desks $

There seems to be an overshoot of 3 cm all the time. I don't know how the app handles that - maybe stopping 3 cm before the aim? Is it maybe possible to have different speeds? Then it could speed until 5 cm before the aim and slow down for the last 2 cm to get more precision.

alex20465 commented 4 years ago

I will no longer maintain bluedesk, checkout the rewrite: https://github.com/alex20465/deskbluez

But even deskblueZ is not 100% accurate, there is inaccuracy of 0.78 Inc, since the device is closed-source and I have no clue how to control the speed to get a better result.