07-13-2019, 01:30 AM
(This post was last modified: 07-13-2019, 01:33 AM by TheOldPresbyope.)
Well, Python is single-threaded and this loop blocks its thread. There's machinery in the evdev package to do this asynchronously within the Python program. AFAICT the extra effort gains me nothing in this single-purpose script. I hope to test it soon.
I see the process pop up in top/htop when it starts but it then falls off the bottom of the chart in terms of CPU usage. None of the 4 RPi3B+ CPUs is running even close to 10 percent.
You asked if it makes sense to integrate this device into moOde. I withhold judgment until I get a better handle on the apparently slow startup.
It would be nice if we had a solution which applies to more than one make/model remote.
If we assume other BT multimedia remotes emit the same keycodes (ala the USB spec) then the script could be generalized. I think this may be a safe assumption since these devices seem interchangeable with consumer devices (like smart phones).
I'm uncertain about the udev rules, though. I specialized mine to the advertised name of the endpoint "Bluetooth Media Control & Camera Shutter Click Consumer Control" cuz it was low-hanging fruit. If it turns out that media remotes have a common signature then the rules could be generalized too.
Regards,
Kent
I see the process pop up in top/htop when it starts but it then falls off the bottom of the chart in terms of CPU usage. None of the 4 RPi3B+ CPUs is running even close to 10 percent.
You asked if it makes sense to integrate this device into moOde. I withhold judgment until I get a better handle on the apparently slow startup.
It would be nice if we had a solution which applies to more than one make/model remote.
If we assume other BT multimedia remotes emit the same keycodes (ala the USB spec) then the script could be generalized. I think this may be a safe assumption since these devices seem interchangeable with consumer devices (like smart phones).
I'm uncertain about the udev rules, though. I specialized mine to the advertised name of the endpoint "Bluetooth Media Control & Camera Shutter Click Consumer Control" cuz it was low-hanging fruit. If it turns out that media remotes have a common signature then the rules could be generalized too.
Regards,
Kent