Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device integration and updates #2437

Merged
merged 6 commits into from
Feb 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1870,13 +1870,19 @@ bool DeRestPluginPrivate::checkSensorBindingsForAttributeReporting(Sensor *senso
// Aurora
sensor->modelId().startsWith(QLatin1String("DoubleSocket50AU")) ||
// Bosch
sensor->modelId().startsWith(QLatin1String("ISW-ZDL1-WP11G")) ||
sensor->modelId().startsWith(QLatin1String("ISW-ZPR1-WP13")) ||
sensor->modelId().startsWith(QLatin1String("RFDL-ZB-MS")) ||
// Aqara Opple
sensor->modelId().contains(QLatin1String("86opcn01")) ||
// Salus
sensor->modelId().contains(QLatin1String("SP600")) ||
// Zen
sensor->modelId().contains(QLatin1String("Zen-01")))
sensor->modelId().contains(QLatin1String("Zen-01")) ||
// eCozy
sensor->modelId() == QLatin1String("Thermostat") ||
// Stelpro
sensor->modelId().contains(QLatin1String("ST218")))
{
deviceSupported = true;
if (!sensor->node()->nodeDescriptor().receiverOnWhenIdle() ||
Expand Down
11 changes: 8 additions & 3 deletions de_web_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ static uint MaxGroupTasks = 4;

const quint64 macPrefixMask = 0xffffff0000000000ULL;

const quint64 legrandMacPrefix = 0x0004740000000000ULL;
const quint64 ikeaMacPrefix = 0x000b570000000000ULL;
const quint64 emberMacPrefix = 0x000d6f0000000000ULL;
const quint64 instaMacPrefix = 0x000f170000000000ULL;
Expand All @@ -81,20 +82,20 @@ const quint64 deMacPrefix = 0x00212e0000000000ULL;
const quint64 keenhomeMacPrefix = 0x0022a30000000000ULL;
const quint64 zenMacPrefix = 0x0024460000000000ULL;
const quint64 heimanMacPrefix = 0x0050430000000000ULL;
const quint64 xiaomiMacPrefix = 0x04cf8c0000000000ULL;
const quint64 konkeMacPrefix = 0x086bd70000000000ULL;
const quint64 ikea2MacPrefix = 0x14b4570000000000ULL;
const quint64 stMacPrefix = 0x24fd5b0000000000ULL;
const quint64 samjinMacPrefix = 0x286d970000000000ULL;
const quint64 sinopeMacPrefix = 0x500b910000000000ULL;
const quint64 ecozyMacPrefix = 0x70b3d50000000000ULL;
const quint64 osramMacPrefix = 0x8418260000000000ULL;
const quint64 silabsMacPrefix = 0x90fd9f0000000000ULL;
const quint64 silabs2MacPrefix = 0xcccccc0000000000ULL;
const quint64 energyMiMacPrefix = 0xd0cf5e0000000000ULL;
const quint64 bjeMacPrefix = 0xd85def0000000000ULL;
const quint64 xalMacPrefix = 0xf8f0050000000000ULL;
const quint64 lutronMacPrefix = 0xffff000000000000ULL;
const quint64 legrandMacPrefix = 0x0004740000000000ULL;
const quint64 xiaomiMacPrefix = 0x04cf8c0000000000ULL;

struct SupportedDevice {
quint16 vendorId;
Expand Down Expand Up @@ -226,6 +227,8 @@ static const SupportedDevice supportedDevices[] = {
{ VENDOR_ZEN, "Zen-01", zenMacPrefix }, // Zen Thermostat
{ 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
Expand Down Expand Up @@ -5790,14 +5793,16 @@ void DeRestPluginPrivate::updateSensorNode(const deCONZ::NodeEvent &event)
i->modelId().startsWith(QLatin1String("motionv4")) ||// SmartThings motion sensor
i->modelId() == QLatin1String("Remote switch") || // Legrand switch
i->modelId() == QLatin1String("Zen-01") || // Zen thermostat
i->modelId() == QLatin1String("Thermostat") || // eCozy thermostat
i->modelId() == QLatin1String("Motion Sensor-A") || // Osram motion sensor
i->modelId().contains(QLatin1String("86opcn01")) || // Aqara Opple
i->modelId().contains(QLatin1String("SMSZB-120")) || // Develco smoke sensor
i->modelId().contains(QLatin1String("HESZB-120")) || // Develco heat sensor
i->modelId().contains(QLatin1String("MOSZB-130")) || // Develco motion sensor
i->modelId().contains(QLatin1String("WISZB-120")) || // Develco window sensor
i->modelId().contains(QLatin1String("FLSZB-110")) || // Develco water leak sensor
i->modelId().contains(QLatin1String("ZHMS101"))) // Wattle (Develco) magnetic sensor
i->modelId().contains(QLatin1String("ZHMS101")) || // Wattle (Develco) magnetic sensor
i->modelId().contains(QLatin1String("RFDL-ZB-MS"))) // Bosch motion sensor
{ }
else
{
Expand Down
3 changes: 3 additions & 0 deletions de_web_plugin_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
24 changes: 22 additions & 2 deletions general.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1560,8 +1560,28 @@ Note: It does not clear or delete previous weekly schedule programming configura
<!-- TODO -->
</cluster>
<cluster id="0204" name="Thermostat User Interface Configuration">
<description>sdfsdf</description>
<!-- TODO -->
<description>This cluster provides an interface to allow configuration of the user interface for a thermostat, or a thermostat
controller device, that supports a keypad and LCD screen.</description>
<server>
<attribute id="0x0000" name="Temperature Display Mode" type="enum8" access="rw" range="0x00,0x01" default="0x00" required="m">
<value name="Temperature in °C" value="0x00"></value>
<value name="Temperature in °F" value="0x01"></value>
</attribute>
<attribute id="0x0001" name="Keypad Lockout" type="enum8" access="rw" range="0x00,0x05" default="0x00" required="m">
<value name="No lockout" value="0x00"></value>
<value name="Level 1 lockout" value="0x01"></value>
<value name="Level 2 lockout" value="0x02"></value>
<value name="Level 3 lockout" value="0x03"></value>
<value name="Level 4 lockout" value="0x04"></value>
<value name="Level 5 lockout" value="0x05"></value>
</attribute>
<attribute id="0x0002" name="Schedule Programming Visibility" type="enum8" access="rw" range="0x00,0x01" default="0x00" required="o">
<value name="Local schedule programming enabled" value="0x00"></value>
<value name="Local schedule programming disabled" value="0x01"></value>
</attribute>
</server>
<client>
</client>
</cluster>
<cluster id="0xde42" name="DE Debug">
<description>Attributes and commands for debugging purposes.</description>
Expand Down