Homeassistant unstable connection to Homegear

Hello,

as mentioned in my other post, I’m new to Homeassistant, so please be patient with me :slight_smile:

I’m running Home ASsistant in a Docker Container, not in network mode, but with Ports exposed.
I want to connect my Home Assistant to my Homegear box (running on a dedicated RPI3) to manage my homematic devices.

my configuration yml looks like:

homematic:
  local_port: 3001
  interfaces:
    wireless:
      host: 192.168.1.161 # ip of homegear box
      port: 2001    
      callback_ip: 192.168.1.114 # ip of docker host running HomeAssistant in the container
      callback_port: 3001

Docker exposes the port 3001 and it’s bond the 3001 on the host machine.

The connection is actually working, I see all my homematic devices.
But after some time (After restart of homeassistant) it’s starts to get bugy, meaning i can still control my lights from homeassistant, but if i press the switch manually (old-school) home assistant doesn’t recognize the state change.
I assume it has something todo with the callback ports and docker, but cannot really narrow it down yet.

Has anyone a tipp for me? especially regards my config?

thanks
martin

This typically happens when you restart Homegear, but don’t restart Home Assistant afterwards. Homegear doesn’t remember that it previously was sending events to Home Asisstant. Hence Home Assistant has to re-subscribe to receive the events again. That either happens by restarting Home Assistant, or by calling the homematic.reconnect service.

Hello,
I havn’t restarted homegear. but the next time it happend i’löl give the homematic.reconnect service a try. if everything comes back it could be an option to just issue it every couple of hours…

thanks
martin

Have a look at this section of the documentation. Instead of reconnecting based on time it makes more sense to watch a sensor that’s frequently updating, and then reconnect if it hasn’t changed for a while.