LiFXLan mclarkk help

I’ve had a couple of python scripts running without issue for a few months now. Now they have started throwing errors when executed. It seems like it’s not receiving confirmation from the bulbs, but I’m not sure. First it wasn’t working at all, when I saw the error below, I commented out the set.power commands I was using leaving only the set.color commands. That allowed the script to run and now it dims and changes color as expected. Yet it still throws the errors below.

Traceback (most recent call last):
  File "LightsDown.py", line 30, in <module>
    lightLamp.set_color(color, 5000)
  File "/usr/local/lib/python2.7/dist-packages/lifxlan/light.py", line 65, in set_color
    self.req_with_ack(LightSetColor, {"color": color, "duration": duration})
  File "/usr/local/lib/python2.7/dist-packages/lifxlan/device.py", line 387, in req_with_ack
    self.req_with_resp(msg_type, Acknowledgement, payload, timeout_secs, max_attempts)
  File "/usr/local/lib/python2.7/dist-packages/lifxlan/device.py", line 427, in req_with_resp
    raise IOError("WorkflowException: Did not receive {} in response to {}".format(str(response_type), str(msg_type)))
IOError: WorkflowException: Did not receive <class 'lifxlan.msgtypes.Acknowledgement'> in response to <class 'lifxlan.msgtypes.LightSetColor'>

The Script: (I’ve masked the MAC addresses)

#!/usr/bin/env python

import requests
import sys

machine_id = sys.argv[1]
media_type = sys.argv[2]

if machine_id == "43cn4uqj2tzcy" and media_type == "movie":
	from lifxlan import *
	
	#LiFX Lights
	lightFirst = Light("XX:XX:XX:XX:XX:XX", "172.16.4.5")
	lightSecond = Light("XX:XX:XX:XX:XX:XX", "172.16.4.6")
	lightLamp = Light("XX:XX:XX:XX:XX:XX", "172.16.4.7")

	color = [43634, 65535, 16384, 3500]
	
#	lightFirst.set_power("on")
#	lightSecond.set_power("on")
#	lightLamp.set_power("on")
	lightFirst.set_color(color, 5000)
	lightSecond.set_color(color, 5000)
	lightLamp.set_color(color, 5000)

Thanks

This could be because the acknowledgement isn’t being received within the timeout of 0.5 seconds. Maybe due to network latency or some new wifi interference.

If you don’t care about acknowledgements a workaround may be to set the rapid flag in your commands.

lightFirst, set_color(color, 5000, rapid=True).

I’d be insightful to see wireshark traffic on port 56700 if you could provide it.

Btw I’m not affiliated with mclarkk just a interested party.

Same thing is happening to me. And I bet Agentkt is on the right track.

So I noticed the ChromeCast’s hidden network was on the same channel as the router WiFi when I was scanning. Not sure if that was the issue, but disabling Guest mode on the CC, which turned off that hidden network seems to have fixed my issue with the script. Thanks for the help!