DavidRisch/steamvr_utils

Feature request: External commands for basestation management

Closed this issue · 5 comments

buxxi commented

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.

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

buxxi commented

Probably should have tried that before opening this :)

Will report back with my findings.

buxxi commented

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.

I added the feature in 39183cf.
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

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' ]