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

Enhancements and addition of various devices #2668

Merged
merged 22 commits into from
May 4, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
cf82575
Added support for further Heiman temp./hum. sensors
SwoopX Apr 7, 2020
ae67836
Added initial support for Sengled PAR38 bulbs
SwoopX Apr 8, 2020
90dbcf3
Updated Centralite thermostat model ID
SwoopX Apr 8, 2020
b0dcad6
Identified purpose of another Xiaomi specific attribute
SwoopX Apr 8, 2020
2100d64
Expose voltage and current for Xiaomi smart plug lumi.plug.mmeu01
SwoopX Apr 9, 2020
82d8e9a
Added initial support for Tuya smart plug (TS0121)
SwoopX Apr 11, 2020
491f8c7
Added support for innr SP 220 smart plug
SwoopX Apr 12, 2020
87e7538
Added IAS ACE cluster
SwoopX Apr 15, 2020
50df2ad
Added initial support for Heiman remote control HS1RC-M
SwoopX Apr 15, 2020
703cb1f
Added support for Immax NEO ZB3.0 smart plug 07048L
SwoopX Apr 15, 2020
da6d1d5
Corrected Sengled PAR38 Bulbs consumption unit
SwoopX Apr 15, 2020
5a16086
Prevent consumption sensor to expose power for certain devices
SwoopX Apr 15, 2020
c468b46
Enable light bindings for additional manufacturers
SwoopX Apr 16, 2020
0a41cc4
Minor corrections for already supported devices
SwoopX Apr 16, 2020
749bd2a
Whitelist Xiaomi smart plugs with Xiaomi MAC address
SwoopX Apr 17, 2020
46d4ef3
Identified purpose of another Xiaomi specific attribute
SwoopX Apr 19, 2020
0151f6f
Enable bindings and attribute reporting for IKEA Fyrtur and Kadrilj d…
SwoopX Apr 19, 2020
e91f53a
Enable IAS warning devices to automatically enroll
SwoopX Apr 19, 2020
acd7d49
Added support for Sercom siren SZ-SRN12N
SwoopX Apr 19, 2020
0d1ee63
Added initial support for WAXMAN LeakSMART v2
SwoopX Apr 22, 2020
8bdc35e
Update for Sercomm Siren SZ-SRN12N
SwoopX Apr 24, 2020
d36234d
Consider IKEA smart blinds with new mac prefix
SwoopX May 3, 2020
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
4 changes: 3 additions & 1 deletion bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2004,7 +2004,9 @@ bool DeRestPluginPrivate::checkSensorBindingsForAttributeReporting(Sensor *senso
// Hive
sensor->modelId() == QLatin1String("MOT003") ||
// Sengled
sensor->modelId().startsWith(QLatin1String("E13-")))
sensor->modelId().startsWith(QLatin1String("E13-")) ||
// Immax
sensor->modelId() == QLatin1String("Plug-230V-ZB3.0"))
{
deviceSupported = true;
if (!sensor->node()->nodeDescriptor().receiverOnWhenIdle() ||
Expand Down
3 changes: 2 additions & 1 deletion database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3185,7 +3185,8 @@ static int sqliteLoadAllSensorsCallback(void *user, int ncols, char **colval , c
return 0;
// hasVoltage = false;
}
else if (sensor.modelId() == QLatin1String("ZB-ONOFFPlug-D0005"))
else if (sensor.modelId() == QLatin1String("ZB-ONOFFPlug-D0005") ||
sensor.modelId() == QLatin1String("Plug-230V-ZB3.0"))
{
hasVoltage = false;
}
Expand Down
6 changes: 5 additions & 1 deletion de_web_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ static const SupportedDevice supportedDevices[] = {
{ VENDOR_ALERTME, "MOT003", tiMacPrefix }, // Hive Motion Sensor
{ VENDOR_SUNRICHER, "4512703", silabs2MacPrefix }, // Namron 4-ch remote controller
{ VENDOR_SENGLED_OPTOELEC, "E13-", zhejiangMacPrefix }, // Sengled PAR38 Bulbs
{ VENDOR_JENNIC, "Plug-230V-ZB3.0", silabs2MacPrefix }, // Immax NEO ZB3.0 smart plug
{ 0, nullptr, 0 }
};

Expand Down Expand Up @@ -5020,6 +5021,7 @@ void DeRestPluginPrivate::addSensorNode(const deCONZ::Node *node, const SensorFi
item = sensorNode.addItem(DataTypeInt16, RStatePower);
if ( (!modelId.startsWith(QLatin1String("Plug"))) &&
(!modelId.startsWith(QLatin1String("ZB-ONOFFPlug-D0005"))) &&
(modelId != QLatin1String("Plug-230V-ZB3.0")) &&
(node->nodeDescriptor().manufacturerCode() != VENDOR_LEGRAND) ) // OSRAM and Legrand plug don't have theses options
{
item = sensorNode.addItem(DataTypeUInt16, RStateVoltage);
Expand Down Expand Up @@ -7111,10 +7113,12 @@ void DeRestPluginPrivate::updateSensorNode(const deCONZ::NodeEvent &event)
if (i->modelId() == QLatin1String("SmartPlug") || // Heiman
i->modelId().startsWith(QLatin1String("PSMP5_")) || // Climax
i->modelId().startsWith(QLatin1String("SKHMP30"))) // GS smart plug
// Sengled PAR38 Bulbs
{
consumption += 5; consumption /= 10; // 0.1 Wh -> Wh
}
else if (i->modelId() == QLatin1String("SP 120")) // innr
else if (i->modelId() == QLatin1String("SP 120") || // innr
i->modelId() == QLatin1String("Plug-230V-ZB3.0")) // Immax
{
consumption *= 10; // 0.01 kWh = 10 Wh -> Wh
}
Expand Down
3 changes: 2 additions & 1 deletion de_web_plugin_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,8 @@ inline bool checkMacVendor(quint64 addr, quint16 vendor)
case VENDOR_INSTA:
return prefix == instaMacPrefix;
case VENDOR_JENNIC:
return prefix == jennicMacPrefix;
return prefix == jennicMacPrefix ||
prefix == silabs2MacPrefix;
case VENDOR_KEEN_HOME:
return prefix == keenhomeMacPrefix;
case VENDOR_LGE:
Expand Down
23 changes: 23 additions & 0 deletions general.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,14 @@
<attribute id="0x0032" name="Usertest" type="bool" default="0" access="rw" required="o" mfcode="0x100b"></attribute>
<attribute id="0x0033" name="LED Indication" type="bool" default="0" access="rw" required="o" mfcode="0x100b"></attribute>
</attribute-set>
<attribute-set id="0x4000" description="Manufacturer specific" mfcode="0x1037">
<attribute id="0x4001" name="128-Bit security key" type="seckey" access="r" required="m" mfcode="0x1037"></attribute>
<attribute id="0x4002" name="IEEE address" type="uid" access="rw" required="m" mfcode="0x1037"></attribute>
</attribute-set>
<attribute-set id="0x4000" description="Manufacturer specific" mfcode="0x1166">
<attribute id="0x4001" name="128-Bit security key" type="seckey" access="r" required="m" mfcode="0x1166"></attribute>
<attribute id="0x4002" name="IEEE address" type="uid" access="rw" required="m" mfcode="0x1166"></attribute>
</attribute-set>
<attribute-set id="0x8000" description="Develco Specific" mfcode="0x1015">
<attribute id="0x8000" name="Primary SW Version" type="ostring" access="r" required="m" mfcode="0x1015"></attribute>
<attribute id="0x8010" name="Primary Bootloader SW Version" type="ostring" access="r" required="m" mfcode="0x1015"></attribute>
Expand Down Expand Up @@ -2576,6 +2584,7 @@ devices can operate on either battery or mains power, and can have a wide variet
<attribute-set id="00" description="Reading Information Set">
<attribute id="0000" name="Current Summation Delivered" type="u48" access="r" required="m"></attribute>
<attribute id="0001" name="Current Summation Received" type="u48" access="r" required="o"></attribute>
<attribute id="041b" name="Unknown" type="u64" access="rw" required="o" mfcode="0x1037"></attribute>
<!-- TODO -->
</attribute-set>
<attribute-set id="01" description="TOU Information Set">
Expand Down Expand Up @@ -3055,6 +3064,20 @@ Fil pilote > Off=0001 - On=0002</description>
</client>
</cluster>

<!-- IMMAX -->
<cluster id="0xfc82" name="Immax" mfcode="0x1037">
<description>Immax specific attributes.</description>
<server>
<attribute id="0x0010" name="Turned on since" type="u32" mfcode="0x1037" access="r" required="m"> </attribute>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Want one!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:) Not to bad that you can see how log it has been turned on.

Hace silently hoped for something that can turn it off as well automatically.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That’s standard On/Off cluster functionality. Try a PUT to the state with a body of {"on": true, "ontime": 60}. Not sure if that’s in seconds or 0.1 seconds, though. This sends the On with Timed Off command (also used by the Trådfri motion sensors).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, tend to always overlook that, but I meant based on current power usage. Off after 5 mins < 5W.

<attribute id="0x0011" name="Turned on (total)" type="u32" mfcode="0x1037" access="r" required="m"> </attribute>
<attribute id="0x0012" name="Consumption since turned on" type="u32" mfcode="0x1037" access="r" required="m"> </attribute>
<attribute id="0x0013" name="Unknown" type="u32" mfcode="0x1037" access="rw" required="m"> </attribute>
<attribute id="0xfffd" name="Unknown" type="u16" mfcode="0x1037" access="r" required="m"> </attribute>
</server>
<client>
</client>
</cluster>

</domain>

<profile id="0104" name="Home Automation" description="This profile defines device descriptions and standard practices for applications needed in a residential or light commercial environment. Installation scenarios range from a single room to an entire home up to 20,000 square feet (approximately 1850m2)." version="1.0" rev="25" icon="ha.png">
Expand Down
3 changes: 2 additions & 1 deletion poll_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,8 @@ void PollManager::pollTimerFired()
if (!item->toString().startsWith(QLatin1String("SP 120")) && // Attribute is not available
!item->toString().startsWith(QLatin1String("lumi.plug.ma")) &&
!item->toString().startsWith(QLatin1String("ZB-ONOFFPlug-D0005")) &&
!item->toString().startsWith(QLatin1String("TS0121")))
!item->toString().startsWith(QLatin1String("TS0121")) &&
item->toString() != QLatin1String("Plug-230V-ZB3.0"))
{
attributes.push_back(0x0400); // Instantaneous Demand
}
Expand Down