The Great Thread of Fate - Formerly Cannot Resolve or Find Documentation
Searching for lights through HTTP Daemon not returning any lights present. Not sure where to go from here. WiFi is on, Lights should be discoverable and yet nothing shows up it just keeps refreshing.
Hi @Geefbird! Interesting... looking through the old versions of your post, it looks like you're using Windows. Can you see any of the unpaired Neewer lights in Windows' Bluetooth and Other devices control panel? If Windows can't see the lights, then NeewerLite-Python isn't going to be able to either.
Ok, editing this comment as well to just keep things short and not have 15 things to be read through. I have tried to see them in windows under bluetooth but they aren't coming up. They are BH30S lights which are both bluetooth capable and in the list of supported lights in your documentation. I don't know what is preventing them from being seen and I can't find any help with it on NEEWER or anywhere else for that matter. Appreciate any and all help that can be given.
Got you - although those other 15 comments help me to understand the problem better 🤣 Yeah, Neewer lights (except for a few of them that have a proprietary remote) don't use WiFi, the ones that communicate with the official Neewer app all use Bluetooth in one way or another, and those are the ones that NeewerLite-Python are written to work with. Your PC also needs to be able to use BLE (Bluetooth Low-Energy) devices, which most computers should be able to, although that's down to the Bluetooth chip on your motherboard or the Bluetooth dongle you use. How do you have Bluetooth set up on your PC?
Also, there is documentation for NeewerLite-Python, although I do admit, I need to update it badly
I just use the bluetooth chip in the MoBo but maybe that doesn't handle BLE so I might have to order one of these Neewer dongles for 20 dollars and give that a shot.
All personal issues aside thank you so much for writing this and putting together/out there for everyone I have wanted to do this for a really long time and have just never been able to sit down and give it an honest effortf. Plus my coding skills in general let alone in python are not great lol so something of this extent would take me months. Sincerely appreciative.
You're welcome, thanks for saying so! I've written several programs in other languages, but this project is actually my first grand-scale Python project actually, so I know what you mean 😊 This is the Bluetooth dongle I use, which is around $9 at Amazon and works pretty decently with the Neewer lights - or at least I've found it to work pretty well!
Wish I would have seen that before I ordered mine directly from NEEWER lol. It will be here tomorrow and then I will let you know how everything worked out and whether or not I was able to see my lights and get them set up. I really hope it works. This will be a total game changer for my lighting and stream immersion.
Ah, ha, timing is everything 😅 I hope it works too! I don't know if the Neewer dongles work with Bluetooth in general, or just a proprietary app that they use, but if it doesn't, I can definitely vouch for the TP-Link one.
the level of sadness that will be had if this one doesn't work is indescribeable lol
I know what you mean 😐 It wasn't this one, was it? That one doesn't do Bluetooth (it's for specific lights that use 2.5G control, but not Bluetooth... I think, I've not used one myself, so I'm not 100% sure on that one...)
Yea I think that is the one and now I am confused... and probably going to be very upset. That was the only dongle I found on NEEWER's site. I have been waiting 8 days for this stupid thing. Now I just want to cancel it
Well just to be safe I ordered the one you linked as well and it will be here today so if the one I got from NEEWER doesn't work then I have this one.
That's good, hopefully all works out with both of them honestly - yeah, sorry about the Neewer one, like I said, it might work, but I think it's working on a different standard than Bluetooth, so I'm doubting it.
I am trying to install the driver for the TP-Link dongle and it says it fails and asks if I have access to a Sys32 En-Us folder... which I am currently in right now but I keep hitting retry and it just keeps failing How did you get this driver installed lol
Ok so I got the driver to install, the dongle is set up my lights are turned on, I know they support bluetooth because they have infinity mode and are in infinity mode (which is NEEWER's Bluetooth) but it isn't finding my lights in the app, in the http server, or on the PC through the dongle. They are BH-30S lights so they should work. I can control them through bluetooth with my phone.
Appreciate any and all help, I am so worn out and frustrated lol
and when I run script I get OSError: WinError -2147020577 The device is not ready for use
and then to top off all of the annoying, frustrating, time wasting bits of the day as it turns out my motherboard does in fact support bluetooth low energy. So now I am extremely confused as to why I can't find these lights on my PC.
Hmm, so am I - I actually didn't need to install any drivers to get the dongle to work, it just showed up on my system. I'm not sure which version of Windows you're using, but it did auto-install on Windows 10. I'm curious why nothing is showing the light though, at the bare minimum, Windows itself should be seeing it - if you go to the Windows Bluetooth control panel (in Windows 10, it's Settings > Devices > Bluetooth & other devices > Add Bluetooth or other device > Bluetooth), does the light show up there? My lights do show up in that list (as well as a printer and a TV that isn't mine...)
NW-20220057&FFFFFFFF is a Neewer CL124, which is also an Infinity light.
Also, are you using the last released version (0.12d) of NeewerLite-Python, or the one that's currently the main commit? If Windows can see the light, but NeewerLite-Python can't, the older version (0.12) didn't have Infinity support - the new version I will be releasing soon (as well as the current main commit) do have Infinity support.
If you're not using the latest commit (last updated this morning), download the NeewerLite-Python.py file here and the ui_NeewerLightUI.py file here and see if that works any better.
Also (ha, multiple posts), you might already know this, but if the light is still connected to your phone's Neewer app (even if the program isn't currently the program running at the moment, but the light is still linked to it), nothing else will be able to access it, so that could also be an issue. You'd need to quit the Neewer app for the light to show up and be pairable on other devices.
Ok, so if the NW-2022 blah blah blah (lol) is a NEEWER light, then yes my computer is and has been seeing the lights, but the Python has never. I am going to replace the Python code with the codes in those two links. They don't actually go to a downloed but rather a text file so I will just copy and paste them and then run it. Maybe it was the lack of infinity support... I am hoping because I really want this to work lol. So so bad.
OMG OMG OMG OMG OMG!!! The change in the Python code to support Infinity totally fixed it! It found my lights immediately and linked them without issue! I am going to geek out now and try to get all of this stuff set up to work with StreamerBot and StreamDeck controlling them. Thank you so much! I don't even care that I wasted 30 dollars on dongles now lol. I am sure I can return them, or at least the one to Amazon.
Sooooooo lol, I feel terrible asking so many questions and feel like a huge pain in the ass... but I am trying to trigger the lights using the HTTP server Daemon, and it worked for the first request to turn on the light, but now when I try to trigger a second action to turn off the light or turn on the other light it says that the "Server requested an action, but we are already working on one. Please wait" and no matter how long I wait it just keeps saying that. Not sure what is going wrong or how to fix it. Even after turning off the HTTP server and switching back to the UI it says "Waiting to Send" when I try to do anything with the lights. Not sure what the deal with that is either. But hey! I Have them linked now lol. It is a great start.
Ahh! I'm glad you got it to work - I assumed you had the latest commit already, that's why I was confused why the lights weren't detecting. Yeah, I am very close to releasing a new version with all of that support baked in to it, but I have to test and troubleshoot all of the functionality to make sure it works perfectly before then, and the HTTP server is one that I admit I haven't fully put through its paces yet with all of the Infinity changes - I tend to focus on the GUI first, and then the HTTP server, and lastly the CLI. Apologies for the growing pains, I will try to check into that ASAP, because I'm getting the same result here. I might not have a chance to really get into it though until the weekend, but I will let you know how it's going when I have a moment to!
Yea no rush I can't imagine how long it takes to fully go through all of it and make sure all of the parts function properly. Looking forward to it with great excitement lol. I can try to figure out why it is breaking when an HTTP request is sent. I feel like it is continuing the request infinitely even once it is completed, processing it over and over without realizing it was successful or even if it fails, but I don't know for sure. I am just thankful for the code, the support, and as soon as it is working I am going to go nuts with this lol. Might even have to make a YouTube video about how amazing it is. Being able to have my wireless lights set up and turn them off from the UI is amazing as is, but when I can do all of the other stuff I have planned like triggering color changes, brightness, on/off, FX etc. with stream events, my heart rate and viewer interactions... yea, it's going to be a great day lol.
Thanks again for everything and best wishes on all of the checks and balances, I hope it doesn't take too much effort or cause nearly as much frustration as just trying to see the lights caused me lol.
You're welcome! I'm hoping you can get all of those things set up, it sounds like you have an awesome set up in mind! I actually might already have sorted the problem. I fixed one small error in the command processor for the HTTP server (I used the wrong variable name in one small section), and that should help the "The HTTP Server requested an action, but we're already working on one. Please wait..." error. Check the latest commit out and see if that resolves that - right click and choose to save the file for the NeewerLite-Python.py file. The ui_NeewerLightUI.py file hasn't changed, so you don't need to re-download that one.
Awesome!!
But this happened when I tried to run it lol
"Exception has occurred: ModuleNotFoundError
No module named 'winrt'
File "G:\Programs\NeewerLite-Python\NeewerLite-Python.py", line 51, in
I resolved that error but then there was another regarding python.lock, and then I ran the HTTP server and upon request it triggered the first, then said entering send mode or something and wouldn't let me send anymore requests.
Hmm - well, the winrt part of the program is only to solve a very old Windows error that would show up when launching the program on older versions of Windows that used _winrt as a Python library (Windows 7 basically), and the way I wrote the program, should not show that error (basically, what happens is - if the module exists, it does something that tells Windows that it's fine, and if it doesn't exist, it just goes past that part), so I'm not really sure why that showed up... because I didn't change anything with that section in that last edit, and honestly can just cut that section out completely on later Windows versions.
The python.lock error is usually when the program quits out, but when you go to start it up again, a lock file exists, as it didn't close properly the time before (I did this so that you could only run one instance of the program at a time, as only one instance can link to the lights at a time) - the best way to get around that is to use --force_instance on the command-line when launching the HTTP server.
python3 NeewerLite-Python.py --http --force_instance
Ha, still getting to the finish line... still getting there 🤣 The last version (the 0.12d one you were using before) is more or less rock-solid, although as you know, it's not Infinity-ready, so the latest commit is the best way to go at the moment.
Yea I just worked around it by changing it to winsdk since that works with more recent Python, and I am using 3.10 I no longer get that error as the library is current and working. I still get the another instance error but have just been deleting the file from appdata to move along with checking errors rather than forcing the instance and ignoring them. Once past the instance lock error I recieve
no running event loop
File "G:\Programs\NeewerLite-Python\NeewerLite-Python.py", line 1787, in setUpAsyncio
asyncioEventLoop = asyncio.get_running_loop()
File "G:\Programs\NeewerLite-Python\NeewerLite-Python.py", line 3791, in
I did take a screenshot of the terminal in a forced instance and what it is outputting when I send a command and then try to send another. The first "On" command works and then nothing after that, but it is no longer telling me it is already trying to process a command and to please wait.
Hmmmm! That's even more interesting - setUpAsyncio() is supposed to check for the running loop, and if it's not there, it creates it. So technically the RuntimeError is correct, but it's because of that exception that that function creates the loop directly afterwards. Also, NeewerLite-Python doesn't really need winrt or winsdk, that library is only imported for one very specific error with old versions of Windows (it used to complain something along the lines of "apartment was not disconnected", but everything would work completely fine), and I could probably just remove that entire section at this point with no issues at all, as that's literally its only function in my program.
How exactly are you running NeewerLite-Python, if you don't mind me asking? It sounds like you have it going through an IDE - or have a more stringent exception checker running (which is fine, I'm just curious where the errors are coming from, as both the _winrt and RuntimeError during setUpAsyncio() are correct, but in standard runtime, they're both handled in the script after those exceptions are thrown, so the Python interpreter is just saying "something's happening here, let's hope we have it handled"...) My usual runtime is Visual Studio Code, but I don't have as stringent an exception catcher running.
In your Terminal screenshot above, I see the last 2 URLs have %0A at the end of the address, which might also be adding to the issue of it not sending... It looks like you sent FA:06:FE:66:87:41 an on command, then CA:6F:17:4F:01:61 an off command twice, then sent FA:06:FE:66:87:41 another on command (but with that extra %0A at the end of the URL).