def __init__(self, pluginId, pluginDisplayName, pluginVersion, pluginPrefs): indigo.PluginBase.__init__(self, pluginId, pluginDisplayName, pluginVersion, pluginPrefs) self.debug = True self.allfans = {} self.updater = indigoPluginUpdateChecker.updateChecker(self, 'http://bruce.pennypacker.org/files/PluginVersions/SenseME.html', 7)
def __init__(self, pluginId, pluginDisplayName, pluginVersion, pluginPrefs): super(Plugin, self).__init__(pluginId, pluginDisplayName, pluginVersion, pluginPrefs) self.pluginIsInitializing = True self.pluginIsShuttingDown = False # ============================ Configure Logging ============================== self.debugLevel = int(self.pluginPrefs['showDebugLevel']) try: if self.debugLevel < 10: self.debugLevel *= 10 except ValueError: self.debugLevel = 30 self.plugin_file_handler.setFormatter( logging.Formatter( '%(asctime)s.%(msecs)03d\t%(levelname)-10s\t%(name)s.%(funcName)-28s %(msg)s', datefmt='%Y-%m-%d %H:%M:%S')) self.indigo_log_handler.setLevel(20) self.logger.info(u"") self.logger.info( u"{0:=^130}".format(" Initializing New Plugin Session ")) self.logger.info(u"{0:<30} {1}".format("Plugin name:", pluginDisplayName)) self.logger.info(u"{0:<30} {1}".format("Plugin version:", pluginVersion)) self.logger.info(u"{0:<30} {1}".format("Plugin ID:", pluginId)) self.logger.info(u"{0:<30} {1}".format("Indigo version:", indigo.server.version)) self.logger.info(u"{0:<30} {1}".format("Python version:", sys.version.replace('\n', ''))) self.logger.info(u"{0:<30} {1}".format("Process ID:", os.getpid())) self.logger.info(u"{0:=^130}".format("")) self.indigo_log_handler.setLevel(self.debugLevel) # ========================== Plugin Update Checker ============================ self.updater = indigoPluginUpdateChecker.updateChecker( self, "https://raw.githubusercontent.com/indigodomotics/GhostXML/master/ghostXML_version.html" ) self.updaterEmailsEnabled = self.pluginPrefs.get( 'updaterEmailsEnabled', False) # ================================== Other ==================================== self.managedDevices = {} # Managed list of plugin devices # Adding support for remote debugging in PyCharm. Other remote debugging # facilities can be added, but only one can be run at a time. # try: # pydevd.settrace('localhost', port=5678, stdoutToServer=True, stderrToServer=True, suspend=False) # except: # pass self.pluginIsInitializing = False
def __init__(self, pluginId, pluginDisplayName, pluginVersion, pluginPrefs): indigo.PluginBase.__init__(self, pluginId, pluginDisplayName, pluginVersion, pluginPrefs) self.debug = pluginPrefs.get("showDebugInfo", False) versionFileUrl = "https://raw.githubusercontent.com/blysik/indigo-heos/master/VersionInfo.html" self.updater = indigoPluginUpdateChecker.updateChecker( self, versionFileUrl) self.devices = {} self.refresh_speaker_list()
def __init__(self, pluginId, pluginDisplayName, pluginVersion, pluginPrefs): indigo.PluginBase.__init__(self, pluginId, pluginDisplayName, pluginVersion, pluginPrefs) self.Honeywell = Honeywell(self) self.debug = False self.StopThread = False self.updater = indigoPluginUpdateChecker.updateChecker( self, 'http://vulture.lagaros.com/IndigoPlugins/Honeywell/versionInfoFile.html' )
def __init__(self, pluginId, pluginDisplayName, pluginVersion, pluginPrefs): indigo.PluginBase.__init__(self, pluginId, pluginDisplayName, pluginVersion, pluginPrefs) self.debug = True self.allfans = {} self.updater = indigoPluginUpdateChecker.updateChecker( self, 'http://bruce.pennypacker.org/files/PluginVersions/SenseME.html', 7)
def __init__(self, pluginId, pluginDisplayName, pluginVersion, pluginPrefs): indigo.PluginBase.__init__(self, pluginId, pluginDisplayName, pluginVersion, pluginPrefs) self.debugLog(u"Initializing GhostXML plugin.") self.debug = self.pluginPrefs.get('showDebugInfo', False) self.debugLevel = self.pluginPrefs.get('showDebugLevel', "1") self.deviceNeedsUpdated = '' self.prefServerTimeout = int(self.pluginPrefs.get('configMenuServerTimeout', "15")) self.updater = indigoPluginUpdateChecker.updateChecker(self, "http://indigodomotics.github.io/GhostXML/ghostXML_version.html") self.updaterEmailsEnabled = self.pluginPrefs.get('updaterEmailsEnabled', False) # Convert old debugLevel scale to new scale if needed. # ============================================================= if not isinstance(self.pluginPrefs['showDebugLevel'], int): if self.pluginPrefs['showDebugLevel'] == "High": self.pluginPrefs['showDebugLevel'] = 3 elif self.pluginPrefs['showDebugLevel'] == "Medium": self.pluginPrefs['showDebugLevel'] = 2 else: self.pluginPrefs['showDebugLevel'] = 1
def __init__(self, pluginId, pluginDisplayName, pluginVersion, pluginPrefs): indigo.PluginBase.__init__(self, pluginId, pluginDisplayName, pluginVersion, pluginPrefs) self.debug = True self.initializing = {} self.MAC = {} self.fan_level = {} self.light_level = {} self.fan = {} self.fan_auto = {} self.light = {} self.light_auto = {} self.updater = indigoPluginUpdateChecker.updateChecker( self, 'http://bruce.pennypacker.org/files/PluginVersions/SenseME.html', 7)