Tradfri: Multiple gateways

I’m trying to get HASS working with a second Tradfri gateway (they are in different locations). It seems that the gateway is discovered on connected, but I can’t see any lights connected to this gateway.
Is this a limitation of the Tradfri component? Any chance this can be fixed?

I also see this in the log file:
Oct 15 10:38:15 nuc-ha hass[8169]: Traceback (most recent call last):
Oct 15 10:38:15 nuc-ha hass[8169]: File “/usr/lib/python3.5/asyncio/tasks.py”, line 241, in _step
Oct 15 10:38:15 nuc-ha hass[8169]: result = coro.throw(exc)
Oct 15 10:38:15 nuc-ha hass[8169]: File “/usr/local/lib/python3.5/dist-packages/homeassistant/components/tradfri.py”, line 92, in gateway_discovered
Oct 15 10:38:15 nuc-ha hass[8169]: keys = yield from hass.async_add_job(_read_config, hass)
Oct 15 10:38:15 nuc-ha hass[8169]: File “/usr/lib/python3.5/asyncio/futures.py”, line 361, in iter
Oct 15 10:38:15 nuc-ha hass[8169]: yield self # This tells Task to wait for completion.
Oct 15 10:38:15 nuc-ha hass[8169]: File “/usr/lib/python3.5/asyncio/tasks.py”, line 296, in _wakeup
Oct 15 10:38:15 nuc-ha hass[8169]: future.result()
Oct 15 10:38:15 nuc-ha hass[8169]: File “/usr/lib/python3.5/asyncio/futures.py”, line 274, in result
Oct 15 10:38:15 nuc-ha hass[8169]: raise self._exception
Oct 15 10:38:15 nuc-ha hass[8169]: File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
Oct 15 10:38:15 nuc-ha hass[8169]: result = self.fn(*self.args, **self.kwargs)
Oct 15 10:38:15 nuc-ha hass[8169]: File “/usr/local/lib/python3.5/dist-packages/homeassistant/components/tradfri.py”, line 152, in _read_config
Oct 15 10:38:15 nuc-ha hass[8169]: return json.loads(f_handle.read() or ‘{}’)
Oct 15 10:38:15 nuc-ha hass[8169]: File “/usr/lib/python3.5/json/init.py”, line 319, in loads
Oct 15 10:38:15 nuc-ha hass[8169]: return _default_decoder.decode(s)
Oct 15 10:38:15 nuc-ha hass[8169]: File “/usr/lib/python3.5/json/decoder.py”, line 342, in decode
Oct 15 10:38:15 nuc-ha hass[8169]: raise JSONDecodeError(“Extra data”, s, end)
Oct 15 10:38:15 nuc-ha hass[8169]: json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 47)
Oct 15 10:38:15 nuc-ha hass[8169]: 2017-10-15 10:38:15 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Oct 15 10:38:15 nuc-ha hass[8169]: Traceback (most recent call last):
Oct 15 10:38:15 nuc-ha hass[8169]: File “/usr/lib/python3.5/asyncio/tasks.py”, line 241, in _step
Oct 15 10:38:15 nuc-ha hass[8169]: result = coro.throw(exc)
Oct 15 10:38:15 nuc-ha hass[8169]: File “/usr/local/lib/python3.5/dist-packages/homeassistant/components/tradfri.py”, line 92, in gateway_discovered
Oct 15 10:38:15 nuc-ha hass[8169]: keys = yield from hass.async_add_job(_read_config, hass)
Oct 15 10:38:15 nuc-ha hass[8169]: File “/usr/lib/python3.5/asyncio/futures.py”, line 361, in iter
Oct 15 10:38:15 nuc-ha hass[8169]: yield self # This tells Task to wait for completion.
Oct 15 10:38:15 nuc-ha hass[8169]: File “/usr/lib/python3.5/asyncio/tasks.py”, line 296, in _wakeup
Oct 15 10:38:15 nuc-ha hass[8169]: future.result()
Oct 15 10:38:15 nuc-ha hass[8169]: File “/usr/lib/python3.5/asyncio/futures.py”, line 274, in result
Oct 15 10:38:15 nuc-ha hass[8169]: raise self._exception
Oct 15 10:38:15 nuc-ha hass[8169]: File “/usr/lib/python3.5/concurrent/futures/thread.py”, line 55, in run
Oct 15 10:38:15 nuc-ha hass[8169]: result = self.fn(*self.args, **self.kwargs)
Oct 15 10:38:15 nuc-ha hass[8169]: File “/usr/local/lib/python3.5/dist-packages/homeassistant/components/tradfri.py”, line 152, in _read_config

When you say different locations do you mean different buildings? If not trådfri creates a mesh network so placing additional lamps between the locations should mesh the network so you only need one hub. (each lamp can forward the signal)

If that is no option you could try something like tradfri-mqtt and use that for the second gateway. (I have not tried it my self as I only have one gateway)

I can’t use a single gateway as the lamps are in different locations. Having workaround like MQTT or a second HA instance might work, but will complicate things a lot. Therefore, I would like to see HASS working with multiple gateways.

Did you ever get a working setup with multiple tradfri gateways? Could you post the yaml part of your tradfri config? Thank you!

Never got it running with multiple gateways :frowning: