maxime1992 / linak-2-mqtt

41 stars 8 forks source link

Desk stutters as it moves #3

Closed Daedren closed 2 years ago

Daedren commented 2 years ago

Hello! I've been trying out this program. Unfortunately when I move the desk, it starts and stops several times until it reaches the desired height. Logs don't really show anything, though there's an error at the end, I don't think it's related. Any ideas? Is there any way in which I can help? This doesn't happen when using the Linak app.

linak-2-mqtt     | client message. Topic "linak-2-mqtt/set-desk-height", value: 97                                                                                                                    
linak-2-mqtt     | Attempt to move desk to 97cm                                                                                                                                                       
linak-2-mqtt     | Received command                                                                                                                                                                   
linak-2-mqtt     |                                                                                                                                                                                    
linak-2-mqtt     | Height:  950mm                                                                                                                                                                     
linak-2-mqtt     | Moving to height: 970                                                                                                                                                              
linak-2-mqtt     |                                                                                                                                                                                    
linak-2-mqtt     | returned 950       
linak-2-mqtt     | publishing updated height { absolute: 95, 'process.env.DESK_LOWEST_HEIGHT_CM':                                                                                                    
62, relative: 33 }                                                                                                                                              
linak-2-mqtt     | Height:  957mm Speed: 37mm/s                                                                                                                                                       
linak-2-mqtt     |                                                                                                                                               
linak-2-mqtt     | returned 957                                                                                                                                                                      
linak-2-mqtt     | publishing updated height { absolute: 96, 'process.env.DESK_LOWEST_HEIGHT_CM':                                                                                                     
62, relative: 34 }                                                                                                                                                                               
linak-2-mqtt     | Height:  970mm Speed:  0mm/s                                                                                                                                                  
linak-2-mqtt     |                                                                                                                                                                                 
linak-2-mqtt     | returned 970                                                                                                                                                                      
linak-2-mqtt     | publishing updated height { absolute: 97, 'process.env.DESK_LOWEST_HEIGHT_CM':                                                                                                    
62, relative: 35 }                                                                                                                                                                                
linak-2-mqtt     | Error handling request                                                                                                                                                             
linak-2-mqtt     | Traceback (most recent call last):                                                                                                                                                 
linak-2-mqtt     |   File "/usr/local/lib/python3.8/dist-packages/aiohttp/web_protocol.py", line 4                                                                                                    
35, in _handle_request                                                                                                                                          
linak-2-mqtt     |     resp = await request_handler(request)                                                                                                                                          
linak-2-mqtt     |   File "/usr/local/lib/python3.8/dist-packages/aiohttp/web_app.py", line 504, i                                                                                                    
n _handle                                                                                                                                                                                             
linak-2-mqtt     |     resp = await handler(request)                                                                                                                                                  
linak-2-mqtt     |   File "/usr/local/lib/python3.8/dist-packages/idasen_controller/main.py", line                                                                                                    
 433, in run_forwarded_command                                                                                                                                                 
linak-2-mqtt     |     await run_command(client, merged_config, log)                                                                                                                                  
linak-2-mqtt     |   File "/usr/local/lib/python3.8/dist-packages/idasen_controller/main.py", line                                                                                                    
 359, in run_command                                                                                                                                             
linak-2-mqtt     |     await move_to(client, target, log=log)                                                                                                                                         
linak-2-mqtt     |   File "/usr/local/lib/python3.8/dist-packages/idasen_controller/main.py", line                                                                                                    
 294, in move_to                                                                                                                                                 
linak-2-mqtt     |     await unsubscribe(client, UUID_HEIGHT)                                                                                                                                         
linak-2-mqtt     |   File "/usr/local/lib/python3.8/dist-packages/idasen_controller/main.py", line                                                                                                    
 263, in unsubscribe                                                                                                                                                                                  
linak-2-mqtt     |     await client.stop_notify(uuid)                                                                                                                                                 
linak-2-mqtt     |   File "/usr/local/lib/python3.8/dist-packages/bleak/backends/bluezdbus/client.                                                                                                    
py", line 963, in stop_notify                                                                                                                                                                         
linak-2-mqtt     |     assert_reply(reply)                                                                                                                                                            
linak-2-mqtt     |   File "/usr/local/lib/python3.8/dist-packages/bleak/backends/bluezdbus/utils.p                                                                                                    
y", line 23, in assert_reply                                                                                                                                                                          
linak-2-mqtt     |     raise BleakDBusError(reply.error_name, reply.body)                                                                                                                             
linak-2-mqtt     | bleak.exc.BleakDBusError: [org.bluez.Error.Failed] No notify session started                                                                                                       
linak-2-mqtt     |                                                                                                                                                                                    
linak-2-mqtt     | Ping to get the height and make sure the desk appears as connected             
maxime1992 commented 2 years ago

Hello. Oh that's odd :thinking:

That said, I doubt the issue is one my side of this project. Behind the scenes I'm using this: https://github.com/rhyst/idasen-controller so I suspect you may need to ask there instead

Daedren commented 2 years ago

I confirm it happens when using idasen-controller commands directly, so I opened an issue there. Thanks.