rhyst / linak-controller

A Python script to control Linak standing desks.
MIT License
346 stars 51 forks source link

Desk stutters when moving #48

Closed Daedren closed 8 months ago

Daedren commented 2 years ago

Hello! I'm trying out the program and I'm finding that the desk tends to move a bit then stop and resume moving, until it reaches the desired height. On the example below, the desk only at times reaches the full speed -62)

This is running on a Raspberry Pi 4 on Python 3.8, through Docker. It's an Ikea Idasen. Is there anything else I can provide to help out?

# idasen-controller --forward --move-to 670
Height:  970mm
Moving to height: 670
Height:  964mm Speed: -33mm/s
Height:  938mm Speed: -62mm/s
Height:  926mm Speed: -37mm/s
Height:  915mm Speed: -37mm/s
Height:  904mm Speed: -34mm/s
Height:  875mm Speed: -62mm/s
Height:  865mm Speed: -35mm/s
Height:  841mm Speed: -62mm/s
Height:  814mm Speed: -62mm/s
Height:  788mm Speed: -62mm/s
Height:  761mm Speed: -62mm/s
Height:  731mm Speed: -62mm/s
Height:  720mm Speed: -36mm/s
Height:  693mm Speed: -62mm/s
Height:  682mm Speed: -35mm/s
Height:  670mm Speed:  0mm/s
rhyst commented 2 years ago

It seems like most of these weird problems happen when using a raspberry pi but I don't have one to test with.

I don't really know where to begin debugging this it just sounds like the bluetooth chips or software on rpis is a bit dodgy. There's a fair few issues about rpis on the bleak repo which is the library this uses for bluetooth. You could try searching there for connection issues. Some people seem to have solved various issues by updating the bluez-firmware on their device.

If you have the time and ability you can mess with the source code and see if there's some way to make it work better. Perhaps sending commands more frequently would help.

lemisieur commented 11 months ago

Just as an FYI, I'm getting the same shuttering running on a Mac Mini (Catalina)

rhyst commented 8 months ago

Fixed by #73