Refactoring the script to uplaod sensor data to ZhyuIoT.