-
Notifications
You must be signed in to change notification settings - Fork 5
Description
I have a LIFX mini W, which appears to be gen 4, which only just got an updated firmware for me: 3.60
I think this coincides with lazylights now failing get_state() for that bulb (still works for a LIFX A19).
tcpdumping at my router shows the working bulb always responding to port 56700:
23:07:29.514312 IP 192.168.1.2.58762 > 192.168.1.54.56700: UDP, length 36
23:07:29.516658 IP 192.168.1.54.56700 > 255.255.255.255.56700: UDP, length 88
But the new firmware responds to the port we opened the communication from, which isn't listening:
23:08:22.308758 IP 192.168.1.2.58112 > 192.168.1.52.56700: UDP, length 36
23:08:22.316400 IP 192.168.1.52.56700 > 192.168.1.2.58112: UDP, length 88
23:08:22.317095 IP 192.168.1.2 > 192.168.1.52: ICMP 192.168.1.2 udp port 58112 unreachable, length 124
I can make lazylights work for both these cases by forcing outgoing comms to go out via 56700 (tradeoff will be it now becomes exclusive use and I can't run this as part of a daemon without retry upon failure):
--- a/lazylights.py 2018-08-28 22:55:32.687390081 +1000
+++ b/lazylights.py 2020-09-17 23:08:47.493875184 +1000
@@ -140,6 +140,7 @@
discovery). On exit, the socket is closed.
"""
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
+ sock.bind(ADDR_LISTEN)
if broadcast:
sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
with closing(sock):
Communication looks like this:
23:09:31.362724 IP 192.168.1.2.56700 > 192.168.1.52.56700: UDP, length 36
23:09:31.367141 IP 192.168.1.52.56700 > 192.168.1.2.56700: UDP, length 88