@@ -0,0 +1,941 @@
+#!/usr/bin/python%0A%0Aimport pycarwings2%0Aimport time%0Aimport logging%0Aimport sys%0Afrom datetime import datetime%0A%0Aif len(sys.argv) %3C 2:%0A%09print %22Need input either 'start' or 'stop' as argument%22%0A%09exit()%0A%0Alogging.basicConfig(stream=sys.stdout, level=logging.ERROR)%0A%0A## Put in username and path to your log-file.%0A%0Ausername = %22username@dot.com%22%0Apassword = %22xxxxxx%22%0Apath = %22/home/pi/scripts/%22%0A%0A##%0A%0Alogging.debug(%22login = %25s , password = %25s%22 %25 ( username , password)  )%0A%0Aprint %22Prepare Session%22%0As = pycarwings2.Session(username, password , %22NE%22)%0Aprint %22Login...%22%0Al = s.get_leaf()%0A%0Aif str.lower(sys.argv%5B1%5D) == 'start':%0A%09print %22Starting climate control%22%0A%09result_key = l.start_climate_control()%0A%0Aif str.lower(sys.argv%5B1%5D) == 'stop':%0A%09print %22Stopping climate control%22%0A%09result_key = l.stop_climate_control()%0A%0Awith open(path + 'climate_control.log', 'a') as file:%0A%09file.write(datetime.now().strftime(%22%25Y-%25m-%25d %25H:%25M:%25S%22) + ',' + str.lower(sys.argv%5B1%5D) + '%5Cn')%0A

Create control_climate.py