Rewrite esp8266 hart handling from scratch