Open aredon opened 4 years ago
Phase 2...
2020-02-01 06:12:27.644653
Traceback (most recent call last):
File "/etc/motioneye/sunrise.py", line 77, in <module>
light.set_color([6400,0,65535,6500], (step2*1000))
File "/usr/local/lib/python2.7/site-packages/lifxlan/light.py", line 82, in set_color
self.req_with_ack(LightSetColor, {"color": color, "duration": duration})
File "/usr/local/lib/python2.7/site-packages/lifxlan/device.py", line 477, in req_with_ack
self.req_with_resp(msg_type, Acknowledgement, payload, timeout_secs, max_attempts)
File "/usr/local/lib/python2.7/site-packages/lifxlan/device.py", line 526, in req_with_resp
raise WorkflowException("WorkflowException: Did not receive {} from {} (Name: {}) in response to {}".format(str(response_type), str(self.mac_addr), str(self.label), str(msg_type)))
lifxlan.errors.WorkflowException: WorkflowException: Did not receive [<class 'lifxlan.msgtypes.Acknowledgement'>] from [MAC ADDRESS] (Name: None) in response to <class 'lifxlan.msgtypes.LightSetColor'>
Having been monitoring this issue for some time now I can safely say:
I'm not sure how I can tell the difference between a packet failing to transmit and just timing out but I would like to be able to modify timeout_secs & max _attempts. I suspect there is a timeout issue here.
I have a single A12 bulb and a Z strip that I am sending commands from the same script. I am running a script I call sunrise.py that slowly fades the lights in over a series of color commands. I'm very happy with it right now but recently it has stopped being reliable. At first I had issues with discovery randomly not finding lights but I mostly resolved that by just trying discovery again.
At the moment the lights (and by lights I mean, usually one gets stuck and the other keeps going) get through "initialization" and "phase 1" but fail to reach "phase 2". I have checked my network and as far as I can tell there's been no packets dropped or disconnections. Mind you this is completely random and most of the time it works fine.
I have also noticed that I can duplicate the issue (kind of - for both lights at the same time) by turning the router off when the script reaches "phase 1" and then I get acknowledgement errors. Is there a way I can wait for an acknowledgement and try to send the command again a certain number of times? I feel like that would drastically improve reliability. At the moment the script just ends when acknowledgement fails to come back so I added rapid flags to "hall light" because "window sunshine" is the more important one in this script.