@chrille this thread might help you, I finally got an esp8266 gateway working tonight.