Can't get lifx to work in kubernetes cluster

Trying to get lifx set up, but I think im having issues. I followed the directions here, but have some quesitons.

I’m running kubernetes (if you don’t know what that is, just think docker/vms). with the following ips/subnets:

Host: 192.168.1.21 / 255.255.255.0
HASSIO container: 10.44.0.28/255.240.0.0

my lifx bulbs are on wifi, which is 192.168.2.0/255.255.255.0

In the HA config, I’ve tried

  - platform: lifx
broadcast: 192.168.2.255
server: 192.168.1.21

But I’m not discovering any bulbs. the module loads fine though

2018-08-12 15:59:00 INFO (MainThread) [homeassistant.components.light] Setting up light.lifx
2018-08-12 15:59:00 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=light, service=lifx_set_state>
2018-08-12 15:59:00 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=light, service=lifx_effect_pulse>
2018-08-12 15:59:00 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=light, service=lifx_effect_colorloop>
2018-08-12 15:59:00 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=light, service=lifx_effect_stop>
2018-08-12 15:59:00 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=light, service=turn_on>
2018-08-12 15:59:00 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=light, service=turn_off>
2018-08-12 15:59:00 INFO (MainThread) [homeassistant.core] Bus:Handling <Event service_registered[L]: domain=light, service=toggle>
2018-08-12 15:59:00 INFO (MainThread) [homeassistant.setup] Setup of domain light took 7.5 seconds.
2018-08-12 15:59:00 INFO (MainThread) [homeassistant.core] Bus:Handling <Event component_loaded[L]: component=light>

is there a way to do this? the container can ping 192.168.2.104 (my first light), and i am able to nmap UDP 56700 from the HA container, so it should work. I’ve also tried adding 255.255.255.255 as the broadcast, but i dont see any traffic for 56700 on my firewall. Is there a way to add bulbs individually by IP?

I think you need --net=host for Docker, the LIFX protocol does not work with NAT.

dang. Thanks. I had to do that for Plex as well. Let me give that a whirl and see. I read another post on here somewhere ( cant find the link at the moment) where someone had issues with the bulbs being on a different vlan/subnet (192.168.2.x vs 192.168.1.x), I’ll have to give --net=host a shot first. If that doesn’t work I’m going to try to get smartthings integrated with the bulb and then see if I can control it via MQTT (which also isn’t working right at the moment).

Thanks!

Edit: another thought… I could plumb in a 192.168.2.x IP to the Kubernetes hosts by tagging a sub interface, and then using net=host option allow it to share that, if the first option doesnt work. Thanks for the idea!