happycodelucky / rocket-nuimo-node

Nuimo Control device discovery, connection manager, and interface control for Node.js
MIT License
12 stars 4 forks source link

Controller sleep mode / rotate events are not dispatched after 5 min of inactivity #4

Closed thedriveman closed 4 years ago

thedriveman commented 4 years ago

I'm building an app that listens to rotate events, and I've noticed that after about 5 minutes of inactivity (i.e., not touching the controller), rotate events stop getting dispatched . However, once I press the controller surface, a select event is getting dispatched, after which rotate events start dispatching again. It does look like the Bluetooth connection remains connected during the entire time, as no disconnected event is dispatched.

Does the controller hardware go to "light" sleep after 5 minutes, where only a select event wakes it up?

happycodelucky commented 4 years ago

Yes, although I’m not sure of the exact timing. It’s been a while, but you can try sending heart beat message to the device. Like updating the display once a minute.

There wasn’t anything obvious to prevent this sleep (nothing in the GATT).

If you just want a dial, check out the Teenage Engineering Ortho Remote. It uses BLE Midi out of the box, so paint with a mac gives you volume control. It’s also nicer designed, but there’s no project there :)

On Thu, Jul 2, 2020 at 15:50 thedriveman notifications@github.com wrote:

I'm building an app that listens to rotate events, and I've noticed that after about 5 minutes of inactivity (i.e., not touching the controller), rotate events are not getting dispatched. However, once I press the controller surface, a select event is getting dispatched, after which rotate events start dispatching again. It does look like the Bluetooth connection remains connected during the entire time, as no disconnected event is dispatched.

Does the controller hardware go to "light" sleep after 5 minutes, where only a select event wakes it up?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pryomoax/rocket-nuimo-node/issues/4, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABCAEEZOV3WBUM2356V4RTRZUFMVANCNFSM4OPJTPBQ .

thedriveman commented 4 years ago

I've tested it and sending a periodic display update as a "keep alive" indeed keeps the controller from falling asleep. I'm going explore this option further, and also assess what is the battery drainage toll. Thanks a lot!

DrCWO commented 3 years ago

I've tested it and sending a periodic display update as a "keep alive" indeed keeps the controller from falling asleep. I'm going explore this option further, and also assess what is the battery drainage toll. Thanks a lot!

I'm building an app that listens to rotate events, and I've noticed that after about 5 minutes of inactivity (i.e., not touching the controller), rotate events stop getting dispatched . However, once I press the controller surface, a select event is getting dispatched, after which rotate events start dispatching again. It does look like the Bluetooth connection remains connected during the entire time, as no disconnected event is dispatched.

Does the controller hardware go to "light" sleep after 5 minutes, where only a select event wakes it up?

Did you really solve this issue? I Did output a character to the display every 10 seconds to keep it alive. No matter how long I wait, sometimes rotation events were created sometimes not. Seems to be random for me.

Comments will be appreciated. Thanks