nouser2013 / lighthouse-v2-manager

This python script helps you switch your Steam HMD lighthouses V2 on and into stand-by.
GNU General Public License v3.0
111 stars 12 forks source link

Not working on Windows 11 #7

Open Fatalution opened 2 years ago

Fatalution commented 2 years ago

The exe just halts in a loop after running the shortcut. Worked fine on Windows 10. image

Can something be done?

nouser2013 commented 2 years ago

Hi, best guess is that the bleak version is not compatible with windows 11 BLE stack or that the stack is not fully developed yet. I don't have a windows 11 install available (and likely will not switch to it for a long time).

So, if going back to Win10 is not an option, you could always setup python on your machine, install the required packages with probably higher version numbers in the meantime, and try the pure script solution. The commandline arguments are the same.

pooyashahidi commented 2 years ago

just wanted to confirm that the python version works fine on windows 11 (build 22489) thanks :)

MirkoHuf commented 2 years ago

Hi, installed under Win 11

python 3.9.9 bleak-0.14.1-py2.py3-none-any.whl bleak_winrt-1.1.0-cp39-cp39-win_amd64.whl pythonnet-2.5.2-cp39-cp39-win_amd64.whl pycparser-2.21-py2.py3-none-any.whl

but:

python.exe .\lighthouse-v2-manager.py discover

=== LightHouse V2 Manager ===

>> MODE: discover suitable V2 lighthouses

>> Discovering BLE devices...
>> Sorry, not suitable V2 Lighthouses found.
=== LightHouse V2 Manager ===

>> MODE: switch lighthouses OFF
   * F0:39:C1:9F:2E:4C

>> Trying to connect to BLE MAC 'F0:39:C1:9F:2E:4C'...
>> ERROR: System.IO.FileNotFoundException: Das System kann die angegebene Datei nicht finden. (Ausnahme von HRESULT: 0x80070002)

With the last windows version it found at least one device (but can't turn it on or off). Any hints? Thanks in advance.

veryoldboy commented 2 years ago

Arghh... indeed not working under Win11 .... hope someone fixes it

nouser2013 commented 2 years ago

Sorry, I don't have Win11. It seems BLE stack related, so given that all the libs are the latest versions, I'm afraid we're out of luck for the moment. In case you're wondering what it does, I put all that in the PiMAX forum here:

Maybe you can whip something up with a different / windows-native C++ code app?

nouser2013 commented 2 years ago

One additional remark: mannix has created a new project for BS V1 and V2, here:

Maybe this works for you guys as well.

voipmonitor commented 2 years ago

this works for me on w11

download python 3.10 (normally through windows app store) and run:

pip3 install --pre pythonnet pip3 install bleak

then run the script like this (do not use the .exe)

python lighthouse-v2-manager.py discover

and so on

AphLute commented 1 year ago

Thanks for all the ideas here. I got it working on Windows 11 using voip's instructions.

I also installed pip3 install nest_asyncio to fix an error about the loop.

I was still getting crashes about a NoneType so I created a patch that fixes it. I don't know if that's Windows 11, or maybe there are just weird unnamed bluetooth devices around or something. https://github.com/nouser2013/lighthouse-v2-manager/pull/11

nouser2013 commented 1 year ago

Hi all, there have been some commits to apparently fix win11 and bleak issues. Could you verify that it now works? Then I could close the issue.

benbiron commented 1 year ago

Worked for me. I installed Python 3.11 from the Windows store, then: pip3 install bleak pip3 install winshell pip3 install pywin32 python lighthouse-v2-manager.py discover -cs And I now have 2 desktop shortcuts that can be used to toggle the light houses on/off.

Thanks!