Skip to content

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

@pinkord

Description

@pinkord

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    HTTP serverbugSomething isn't workinglook intoThings to look in to for implementing later

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions