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

Can't start effects (animations) in HTTP mode #90

Open
pinkord opened this issue Aug 10, 2024 · 1 comment
Open

Can't start effects (animations) in HTTP mode #90

pinkord opened this issue Aug 10, 2024 · 1 comment

Comments

@pinkord
Copy link

pinkord commented Aug 10, 2024

I'm trying to control lights with ToushDesigner, and the easiest way is to use HTTP server, but when I try to start the animation, server first gives an error, after which for each request it writes “The HTTP Server requested an action, but we're already working on one. Please wait…”, actually stopping executing commands until the server is restarted.

ERROR log: 
127.0.0.1 - - [10/Aug/2024 19:36:15] "GET /NeewerLite-Python/doAction?light=CC:B7:F4:0A:FA:B8&mode=ANM&scene=1&bri=55 HTTP/1.1" 200 -
[19:36:15] Processing HTTP arguments
Exception in thread htmlProcessThread:
Traceback (most recent call last):
  File "C:\Users\danya\.conda\envs\dsp_venv\lib\threading.py", line 980, in _bootstrap_inner
    self.run()
  File "C:\Users\danya\.conda\envs\dsp_venv\lib\threading.py", line 917, in run
    self._target(*self._args, **self._kwargs)
  File "D:\programs\neewerlite-python\NeewerLite-Python.py", line 3301, in processHTMLCommands
    calculateByteString(colorMode=paramsList[3], effect=paramsList[4], brightness=paramsList[5])
  File "D:\programs\neewerlite-python\NeewerLite-Python.py", line 2140, in calculateByteString
    computedValue.extend([effect, brightness, temp, speed])
UnboundLocalError: local variable 'temp' referenced before assignment
127.0.0.1 - - [10/Aug/2024 19:36:42] "GET /NeewerLite-Python/doAction?light=CC:B7:F4:0A:FA:B8&mode=HSI&hue=220&bri=50 HTTP/1.1" 200 -
[19:36:42] Processing HTTP arguments
[19:36:42] The HTTP Server requested an action, but we're already working on one.  Please wait...

I tried to use various variants of HTTP requests (like http://127.0.0.1:8080/NeewerLite-Python/doAction?ligth=1&scene=7 or http://127.0.0.1:8080/NeewerLite-Python/doAction?light=CC:B7:F4:0A:FA:B8&mode=ANM&scene=1&bri=55), but they all either lead to this error or do not produce results

@taburineagle
Copy link
Owner

Hi @pinkord - which version of NeewerLite-Python are you using? Try it out with the files from this branch and let me know if you still have the issue -

NeewerLite-Python.py
ui_NeewerLiteUI.py

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

2 participants