node code for internet of hats