Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test V1 Base Station Support #6

Closed
DavidRisch opened this issue Jan 18, 2021 · 9 comments
Closed

Test V1 Base Station Support #6

DavidRisch opened this issue Jan 18, 2021 · 9 comments

Comments

@DavidRisch
Copy link
Owner

@Firestorm7893
I added support for V1 Base Stations in cb58f33.
Can you please test if works?
Your config:

basestation:
  enabled: true  # Boolean. Enable the Base Station component.

  # ==== FOR V1 AND V2 BASE STATIONS ====
  attempt_count_set: 5  # Int >0. Number of attempts to set the power state of Base Station.

  # ==== FOR V2 BASE STATIONS (from Valve) ONLY ====
  type: 'v1'  # Enum(v1, v2). Version of your Base Stations.
  attempt_count_scan: 5  # Int >0. Maximum number of attempts to find Base Stations.

  # ==== FOR V1 BASE STATIONS (from VIVE) ONLY ====
  lh_b_mac: '40:4E:36:BD:A8:45'  # String(XX:XX:XX:XX:XX:XX). Bluetooth MAC address of Lighthouse B.
  lh_b_id: '62F5DDD9'  # String(XXXXXXXX). ID of Lighthouse B (printed on the back).
  lh_c_mac: '40:4E:36:BD:A1:38'  # String(XX:XX:XX:XX:XX:XX). Bluetooth MAC address of Lighthouse C.
  lh_c_id: '0E97C927'  # String(XXXXXXXX). ID of Lighthouse C (printed on the back).
  # See https://github.com/risa2000/lhctrl for details.
@Firestorm7893
Copy link

i'll try it right now

@Firestorm7893
Copy link

It takes a while for lhctrl.py to stop. But it looks like it's working correctly, i'll play for a while and see how it goes

@DavidRisch
Copy link
Owner Author

It takes a while for lhctrl.py to stop

Some of that is probably due to the config value wait_after_quit. You can try setting that value to 0.

@Firestorm7893
Copy link

Yes i can confirm is due to that, but it's not a problem. It's all good if they eventually shutdown 😄
Anyway I played for an hour and nothing went wrong, started and stopped like they should.
I think you can add the vive stations to the supported list now.

@DavidRisch
Copy link
Owner Author

Thanks! I updated the readme.

Shout out to @risa2000 for his script and the open source license.

@risa2000
Copy link

Shout out to @risa2000 for his script and the open source license.

Great! Just for the record, I did a similar script to control V2 base stations (https://github.com/risa2000/lh2ctrl). There is nothing extraordinary, it just tries using the similar interface to V1 script. The consequence is it does not need root elevation (but needs MAC addresses instead).

@Firestorm7893 Once lhctrl.py receives Ctrl-C (or SIGTERM, SIGHUP) it sets the LH timeout to 1 second (which the smallest value possible). After that the bases should turn off.

@Firestorm7893
Copy link

@risa2000 Yeah i found out while looking at your code (thanks again for the script 😄 ).
Quick question, do you think it would be possible creating a similar script with the station in A/B mode?
It may be a whim of mine, but since I went trough the trouble of routing the link cable, might as well use it!

@risa2000
Copy link

@Firestorm7893 I admit I never run the bases in A/B mode (i.e. connected by a wire) and I do not have them (V1 bases) anymore, so I can only speculate, but I would simply try to supply A id for "LH_B" and B id for "LH_C" in the script, or simply use only A and omit B as I believe A should be controlling B in this particular setup. (Which BTW is true even in B/C setup.)

@Firestorm7893
Copy link

Confirmed it works even in A/B mode. But A and B are independent so you have to input bot ids and macs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants