add HTTP class, tweak sensor code