Javscript IO library for IoT device, companion device and development host