DavidRisch / steamvr_utils

Utilities for SteamVR on Linux
GNU General Public License v3.0
98 stars 5 forks source link

Feature request: External commands for basestation management #8

Closed buxxi closed 3 years ago

buxxi commented 3 years ago

My PC that I use for VR doesn't have any bluetooth capabilities but I have lots of running raspberry pis which I could use for this.

Would it be possible to have a configuration for an external command to execute instead of the regular bluetooth to switch the basestation on/off? Then I could set up a copy of this on a rpi and execute the command over ssh.

I understand if it's way out of scope for this project.

DavidRisch commented 3 years ago

I can do that. Does ./scripts/steamvr_utils.py on (and off) already work on a raspberry pi?

buxxi commented 3 years ago

Probably should have tried that before opening this :)

Will report back with my findings.

buxxi commented 3 years ago

Yes, it absolutely works even on a raspberry pi 0!

Needed two additional dependencies with pip (psutil and pyyaml) and the package name for pip3 was python3-pip but otherwise worked like expected.

DavidRisch commented 3 years ago

I added the feature in 39183cfe. Please comment the relevant parts of your config here when you are done to help other who might want to copy your setup.

buxxi commented 3 years ago

And it works, excellent! (haven't tried it with daemon but delegating ./scripts/steamvr_utils.py off from my VR-PC to the raspberry works, will report back if I get any problem running it as daemon)

Here's the relevant part in my config:

basestation:
  enabled: true
  type: 'cmd' 
  command_on: [ 'ssh', 'user@host', '/home/user/steamvr_utils/scripts/steamvr_utils.py on' ] 
  command_off: [ 'ssh', 'user@host', '/home/user/steamvr_utils/scripts/steamvr_utils.py off' ]