Hello,
I am running HASS 0.45 on RaPi 3 B connected via LAN to my WiFi router.
My HASS has IP 192.168.100.220 and strip has 192.168.100.212
Only thing I added to my config file is:
light:
platform: lifx
I tried added:
server: 192.168.100.220
broadcast: 192.168.100.255
but it didn’t help and there is no error in log.
I know Strip is connected because I can see it in my router config page and I can control it via Android App and using voice via Google Assistant.
It’s possible that your Android App is using cloud access to get to the LIFX but HASS can only do direct LAN access. If the strip does not see broadcast messages from the server, things will not work.
So if you have guest mode, network isolation or something like that enabled, try turning it off.
Are you able to ping the strip, i.e. ping 192.168.100.212 from the server?
Okay, so some connectivity is present. When you say it does not show up, what exactly do you mean? Did you check the State view (the one with a <> icon) in HASS Developer Tools?
Another thought: do you have a firewall enabled on the RaPi?
Hello,
yes, I checked State view but Lifx is not there.
I added this to my iptables.firewall.rules file:
filter
# Allow ALL loopback traffic and drop all traffic to 127/8 that doesn't use lo0
-A INPUT -i lo -j ACCEPT
-A INPUT -d 127.0.0.0/8 -j REJECT
# Accept all established inbound connections
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# Allow all outbound traffic - you can modify this to only allow certain traffic
-A OUTPUT -j ACCEPT
# Allow all outbound establised traffic
-A OUTPUT -m conntrack --ctstate ESTABLISHED -j ACCEPT
# Allow HTTP and HTTPS connections from your local subnet (leaving 80,443,8080 enabled however for home assistant only 8123 is needed here until we add SSL)
-A INPUT -s 192.168.100.0/24 -p tcp --dport 80 -j ACCEPT
-A INPUT -s 192.168.100.0/24 -p tcp --dport 443 -j ACCEPT
-A INPUT -s 192.168.100.0/24 -p tcp --dport 8080 -j ACCEPT
-A INPUT -s 192.168.100.0/24 -p tcp --dport 8123 -j ACCEPT
#Allow uPnP requests - this is for the net disco service built into Home Assistant and is a fail safe
-A INPUT -s 192.168.100.0/24 -p tcp --dport 2869 -j ACCEPT
-A INPUT -s 192.168.100.0/24 -p udp --dport 1900 -j ACCEPT
#Allow SSH connections
# The -dport number should be the same port number you set in sshd_config
-A INPUT -p tcp -m state --state NEW --dport 22 -j ACCEPT
# Allow ping
-A INPUT -p icmp -j ACCEPT
# Log iptables denied calls (this is especially needed if you are going to use fail2ban on DMZ connected home automation servers)
-A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7
# Drop all other inbound - default deny unless explicitly allowed policy
-A INPUT -j DROP
-A FORWARD -j DROP
COMMIT
But I just copied it and changed IPs so I am not sure what exactly everything does.
I’m having a similar issue. Running Hassbinan on a RPi, HA 4.9.0. Just got LIFX Z installed (first LIFX device). HASS IP is 192.168.1.20, strip is 192.168.1.38. I have tried lifx and lifx_legacy components. I can ping the strip from HASS. I don’t have iptables.firewall.rules on my RPi.
I did get this in the logs at one point:
2017-07-22 17:08:28 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.4/asyncio/tasks.py”, line 235, in _step
result = coro.send(value)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/light/lifx.py”, line 334, in async_register
if lifxwhite(device):
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/light/lifx.py”, line 162, in lifxwhite
return not aiolifx().products.features_map[device.product][“color”]
KeyError: None
Okay, so after spending the last two days sniffing traffic, disabling firewalls, testing different APIs, and lots of reboots of the lights and HASS I finally got it working. All I did was disable all other light components (hue and osramlightify), after a reboot the LIFX light appeared in HASS, and after re-enabling the other light components it’s still there. Very strange…