settings.save() # Force display to desired user setting display.enable(True, True) # Load services services = ServiceManager(settings) # Spin until we have internet, check every 10s while True: settings.set('local-ip', helper.getIP()) if settings.get('local-ip') is None: logging.error( 'You must have functional internet connection to use this app') display.message('No internet') time.sleep(10) else: break # Let the display know the URL to use display.setConfigPage('http://%s:%d/' % (settings.get('local-ip'), 7777)) # Prep random random.seed(long(time.clock())) colormatch = colormatch(settings.get('colortemp-script'), 2700) # 2700K = Soft white, lowest we'll go slideshow = slideshow(display, settings, colormatch) timekeeper = timekeeper(display.enable, slideshow.start) slideshow.setQueryPower(timekeeper.getDisplayOn) slideshow.setServiceManager(services)
settings.save() # Force display to desired user setting display.enable(True, True) # Load services services = ServiceManager(settings) # Spin until we have internet, check every 10s while True: settings.set('local-ip', helper.getIP()) if settings.get('local-ip') is None: logging.error( 'You must have functional internet connection to use this app') display.message('No internet\n\nCheck wifi-config.txt or cable') time.sleep(10) else: break # Let the display know the URL to use display.setConfigPage('http://%s:%d/' % (settings.get('local-ip'), 7777)) # Prep random random.seed(long(time.clock())) colormatch = colormatch(settings.get('colortemp-script'), 2700) # 2700K = Soft white, lowest we'll go slideshow = slideshow(display, settings, colormatch) timekeeper = timekeeper(display.enable, slideshow.start) slideshow.setQueryPower(timekeeper.getDisplayOn) slideshow.setServiceManager(services)
width, height, tvservice = display.setConfiguration(settings.getUser('tvservice'), settings.getUser('display-special')) settings.setUser('tvservice', tvservice) settings.setUser('width', width) settings.setUser('height', height) settings.save() # Force display to desired user setting display.enable(True, True) # Spin until we have internet, check every 10s while True: settings.set('local-ip', helper.getIP()) if settings.get('local-ip') is None: logging.error('You must have functional internet connection to use this app') display.message('No internet') time.sleep(10) else: break # Once we have IP, show for 30s cd = 10 while (cd > 0): display.message('Starting in %d seconds\n\nFrame configuration\n\nhttp://%s:7777' % (cd, settings.get('local-ip'))) cd -= 1 time.sleep(1) def oauthGetToken(): return settings.get('oauth_token') def oauthSetToken(token):