if len(sys.argv) == 1: SIM_STATE = True else: if sys.argv[1] == 'nosim': SIM_STATE = False else: SIM_STATE = True app = Bottle() app.devices = [] app.licht = 0 app.light_lock = threading.Lock() app.light_timer = None app.toggleState = False app.homebridge_last_rgb = [255, 255, 255] app.homebridge_last_hsv = [ 0, 0, 100] app.light_status = 0 # Add in SWIFT modules try: import swift.swift as swifty swift_obj = swifty.Swift(bottle=app) print "SWIFT capabilities" except ImportError: print "No SWIFT capabilities" #docroot = '/home/mpesce/iotas' #docroot = os.path.join(os.getcwd(), 'iotas') # Hopefully we startup in this directory if SIM_STATE == False: docroot = os.getcwd() # Bare startup directory else: