Encode and Decode MQTT packets the node way