public TasmotaDeviceManager(IHsController HS, MqttServerDetails hostedMQTTServerDetails, CancellationToken cancellationToken) { this.HS = HS; this.hostedMQTTServerDetails = hostedMQTTServerDetails; this.combinedToken = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); importDevices = GetCurrentDevices().ToImmutableDictionary(); }
public static string GetName(IHsController HS, int refId) { try { return(HS.GetNameByRef(refId)); } catch { return($"RefId:{refId}"); } }
public TasmotaDevice(IHsController HS, int refId, MqttServerDetails hostedServerDetails, CancellationToken cancellationToken) : base(HS, refId) { this.hostedServerDetails = hostedServerDetails; this.cancellationToken = cancellationToken; Utils.TaskHelper.StartAsyncWithErrorChecking(Invariant($"Device Start {refId}"), UpdateDeviceProperties, cancellationToken, TimeSpan.FromSeconds(15)); }
protected PluginConfigBase(IHsController HS) { this.HS = HS; debugLogging = GetValue(DebugLoggingKey, false); logToFile = GetValue(LogToFileKey, false); }
public HomeSeerTarget(IHsController hsController) { this.loggerWeakReference = new WeakReference <IHsController>(hsController); }
protected DeviceBase(IHsController HS, int refId) { this.HS = HS; RefId = refId; }
public PluginConfig(IHsController HS) : base(HS) { this.mQTTServerConfiguration = LoadDBSettings(); }
public AnalyticsClient(HSPI plugin, IHsController hs) { _plugin = plugin; _hs = hs; }
public static void UpdateDeviceValue(IHsController HS, int refId, in double?data)
public static string?GetDeviceTypeFromPlugInData(IHsController HS, int refId) { var plugInExtra = HS.GetPropertyByRef(refId, EProperty.PlugExtraData) as PlugExtraData; return(GetDeviceTypeFromPlugInData(plugInExtra)); }