ESPHomeLib not online

I have done my first esphomeyaml on a sonoff basic; it compiled; it uploaded via USB; I have integrated it into homeassistant and the controls show up and I can control it. The problem I have is when I go into the esphomeyaml web UI, the sonoff shows as being Offline, even though it is controllable by HA. This means that I cannot connect to it for OTA (even through that has been included). I am running HASSIO in a docker, would cause the problem or am I missing something?

Fixed. I had to set a static ip!