From b334872d9165fb0a0e74c601258f8bd1d8ea9c4c Mon Sep 17 00:00:00 2001 From: SwoopX Date: Tue, 11 Feb 2020 21:38:57 +0100 Subject: [PATCH] Added initial support for Stelpro ST218 thermostat --- bindings.cpp | 4 +++- de_web_plugin.cpp | 1 + de_web_plugin_private.h | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bindings.cpp b/bindings.cpp index 960863aff8..dee883d8dd 100644 --- a/bindings.cpp +++ b/bindings.cpp @@ -1880,7 +1880,9 @@ bool DeRestPluginPrivate::checkSensorBindingsForAttributeReporting(Sensor *senso // Zen sensor->modelId().contains(QLatin1String("Zen-01")) || // eCozy - sensor->modelId().contains(QLatin1String("Thermostat"))) + sensor->modelId() == QLatin1String("Thermostat") || + // Stelpro + sensor->modelId().contains(QLatin1String("ST218"))) { deviceSupported = true; if (!sensor->node()->nodeDescriptor().receiverOnWhenIdle() || diff --git a/de_web_plugin.cpp b/de_web_plugin.cpp index 26f492d08b..4c374a6c3b 100644 --- a/de_web_plugin.cpp +++ b/de_web_plugin.cpp @@ -228,6 +228,7 @@ static const SupportedDevice supportedDevices[] = { { VENDOR_C2DF, "3157100-E", emberMacPrefix }, // Centralite Thermostat { VENDOR_EMBER, "Super TR", emberMacPrefix }, // Elko Thermostat { VENDOR_ATMEL, "Thermostat", ecozyMacPrefix }, // eCozy Thermostat + { VENDOR_STELPRO, "ST218", xalMacPrefix }, // Stelpro Thermostat { VENDOR_DEVELCO, "SMSZB-120", develcoMacPrefix }, // Develco smoke sensor { VENDOR_DEVELCO, "HESZB-120", develcoMacPrefix }, // Develco heat sensor { VENDOR_DEVELCO, "SPLZB-131", develcoMacPrefix }, // Develco smart plug diff --git a/de_web_plugin_private.h b/de_web_plugin_private.h index cd7df5d829..77a531cdc1 100644 --- a/de_web_plugin_private.h +++ b/de_web_plugin_private.h @@ -283,6 +283,7 @@ #define VENDOR_LDS 0x1168 // Used by Samsung SmartPlug 2019 #define VENDOR_INSTA 0x117A #define VENDOR_IKEA 0x117C +#define VENDOR_STELPRO 0x1185 #define VENDOR_LEDVANCE 0x1189 #define VENDOR_SINOPE 0x119C #define VENDOR_119C 0x119C // Used by Sinope @@ -477,6 +478,8 @@ inline bool checkMacVendor(quint64 addr, quint16 vendor) return prefix == silabsMacPrefix || prefix == energyMiMacPrefix || prefix == ikeaMacPrefix; // belongs to SiLabs + case VENDOR_STELPRO: + return prefix == xalMacPrefix; case VENDOR_UBISYS: return prefix == ubisysMacPrefix; case VENDOR_VISONIC: