Test V1 Base Station Support
Closed this issue · 9 comments
@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.
i'll try it right now
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
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
.
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.
Thanks! I updated the readme.
Shout out to @risa2000 for his script and the open source license.
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.
@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!
@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.)
Confirmed it works even in A/B mode. But A and B are independent so you have to input bot ids and macs