@@ -209,6 +209,7 @@ static const SupportedDevice supportedDevices[] = {
209
209
{ VENDOR_EMBER, "3AFE140103020000", konkeMacPrefix }, // Konke Kit Pro-FT Temp Humidity Sensor
210
210
{ VENDOR_EMBER, "3AFE130104020015", konkeMacPrefix }, // Konke Kit Pro-Door Entry Sensor
211
211
{ VENDOR_NONE, "RICI01", tiMacPrefix}, // LifeControl smart plug
212
+ { VENDOR_JENNIC, "SN10ZW", jennicMacPrefix }, // ORVIBO motion sensor
212
213
{ 0, nullptr, 0 }
213
214
};
214
215
@@ -1547,6 +1548,7 @@ void DeRestPluginPrivate::addLightNode(const deCONZ::Node *node)
1547
1548
1548
1549
case DEV_ID_MAINS_POWER_OUTLET:
1549
1550
case DEV_ID_HA_ONOFF_LIGHT:
1551
+ case DEV_ID_LEVEL_CONTROL_SWITCH:
1550
1552
case DEV_ID_ONOFF_OUTPUT:
1551
1553
case DEV_ID_LEVEL_CONTROLLABLE_OUTPUT:
1552
1554
case DEV_ID_HA_DIMMABLE_LIGHT:
@@ -1760,6 +1762,24 @@ void DeRestPluginPrivate::addLightNode(const deCONZ::Node *node)
1760
1762
{ q->nodeUpdated(lightNode.address().ext(), QLatin1String("modelid"), lightNode.modelId()); }
1761
1763
}
1762
1764
1765
+ // "translate" ORVIBO vendor name
1766
+ if (lightNode.manufacturer() == QString("欧瑞博"))
1767
+ {
1768
+ lightNode.setManufacturerName(QLatin1String("ORVIBO"));
1769
+ lightNode.setNeedSaveDatabase(true);
1770
+ }
1771
+ // replace ORVIBO model IDs
1772
+ if (lightNode.modelId() == QLatin1String("abb71ca5fe1846f185cfbda554046cce"))
1773
+ {
1774
+ lightNode.setModelId(QLatin1String("T10D1ZW dimmer"));
1775
+ lightNode.setNeedSaveDatabase(true);
1776
+ }
1777
+ else if (lightNode.modelId() == QLatin1String("545df2981b704114945f6df1c780515a"))
1778
+ {
1779
+ lightNode.setModelId(QLatin1String("T10W1ZW switch"));
1780
+ lightNode.setNeedSaveDatabase(true);
1781
+ }
1782
+
1763
1783
// add light node to default group
1764
1784
GroupInfo *groupInfo = getGroupInfo(&lightNode, gwGroup0);
1765
1785
if (!groupInfo)
@@ -2097,6 +2117,7 @@ LightNode *DeRestPluginPrivate::updateLightNode(const deCONZ::NodeEvent &event)
2097
2117
case DEV_ID_ZLL_DIMMABLE_PLUGIN_UNIT:
2098
2118
case DEV_ID_Z30_DIMMABLE_PLUGIN_UNIT:
2099
2119
case DEV_ID_HA_ONOFF_LIGHT:
2120
+ case DEV_ID_LEVEL_CONTROL_SWITCH:
2100
2121
case DEV_ID_ONOFF_OUTPUT:
2101
2122
case DEV_ID_LEVEL_CONTROLLABLE_OUTPUT:
2102
2123
case DEV_ID_ZLL_ONOFF_LIGHT:
@@ -2473,6 +2494,17 @@ LightNode *DeRestPluginPrivate::updateLightNode(const deCONZ::NodeEvent &event)
2473
2494
QString str = ia->toString();
2474
2495
if (!str.isEmpty() && str != lightNode->manufacturer())
2475
2496
{
2497
+ if (str == QString("欧瑞博"))
2498
+ {
2499
+ if (lightNode->manufacturer() == QLatin1String("ORVIBO"))
2500
+ {
2501
+ continue; // skip if already 'translated'
2502
+ }
2503
+ else
2504
+ {
2505
+ str = QLatin1String("ORVIBO");
2506
+ }
2507
+ }
2476
2508
lightNode->setManufacturerName(str);
2477
2509
lightNode->setNeedSaveDatabase(true);
2478
2510
queSaveDb(DB_LIGHTS, DB_LONG_SAVE_DELAY);
@@ -2486,6 +2518,28 @@ LightNode *DeRestPluginPrivate::updateLightNode(const deCONZ::NodeEvent &event)
2486
2518
ResourceItem *item = lightNode->item(RAttrModelId);
2487
2519
if (item && !str.isEmpty() && str != item->toString())
2488
2520
{
2521
+ if (str == QLatin1String("abb71ca5fe1846f185cfbda554046cce"))
2522
+ {
2523
+ if (lightNode->modelId().startsWith(QLatin1String("T10D1ZW")))
2524
+ {
2525
+ continue; // skip if already replaced
2526
+ }
2527
+ else
2528
+ {
2529
+ str = QLatin1String("T10D1ZW dimmer");
2530
+ }
2531
+ }
2532
+ else if (str == QLatin1String("545df2981b704114945f6df1c780515a"))
2533
+ {
2534
+ if (lightNode->modelId().startsWith(QLatin1String("T10W1ZW")))
2535
+ {
2536
+ continue; // skip if already replaced
2537
+ }
2538
+ else
2539
+ {
2540
+ str = QLatin1String("T10W1ZW switch");
2541
+ }
2542
+ }
2489
2543
lightNode->setModelId(str);
2490
2544
item->setValue(str);
2491
2545
lightNode->setNeedSaveDatabase(true);
@@ -3508,6 +3562,11 @@ void DeRestPluginPrivate::addSensorNode(const deCONZ::Node *node, const deCONZ::
3508
3562
else if (modelId.isEmpty() && j->id() == 0x0005) // model id
3509
3563
{
3510
3564
modelId = j->toString().trimmed();
3565
+ // replace ORVIBO model ID
3566
+ if (modelId == QLatin1String("895a2d80097f4ae2b2d40500d5e03dcc"))
3567
+ {
3568
+ modelId = QLatin1String("SN10ZW motion sensor");
3569
+ }
3511
3570
}
3512
3571
}
3513
3572
}
@@ -3627,7 +3686,8 @@ void DeRestPluginPrivate::addSensorNode(const deCONZ::Node *node, const deCONZ::
3627
3686
}
3628
3687
else if (modelId.startsWith(QLatin1String("PIR_")) || // Heiman motion sensor
3629
3688
modelId == QLatin1String("3AFE14010402000D") || // Konke motion sensor
3630
- modelId.startsWith(QLatin1String("902010/22"))) // Bitron motion sensor
3689
+ modelId.startsWith(QLatin1String("902010/22")) || // Bitron motion sensor
3690
+ modelId.startsWith(QLatin1String("SN10ZW"))) // ORVIBO motion sensor
3631
3691
{
3632
3692
fpPresenceSensor.inClusters.push_back(ci->id());
3633
3693
}
@@ -5985,6 +6045,17 @@ void DeRestPluginPrivate::updateSensorNode(const deCONZ::NodeEvent &event)
5985
6045
{
5986
6046
if (i->modelId() != str)
5987
6047
{
6048
+ if (str == QLatin1String("895a2d80097f4ae2b2d40500d5e03dcc"))
6049
+ {
6050
+ if (i->modelId().startsWith(QLatin1String("SN10ZW")))
6051
+ {
6052
+ continue; // skip if already replaced
6053
+ }
6054
+ else
6055
+ {
6056
+ str = QLatin1String("SN10ZW motion sensor");
6057
+ }
6058
+ }
5988
6059
i->setModelId(str);
5989
6060
i->setNeedSaveDatabase(true);
5990
6061
checkInstaModelId(&*i);
@@ -7285,6 +7356,7 @@ bool DeRestPluginPrivate::processZclAttributes(LightNode *lightNode)
7285
7356
//case DEV_ID_ZLL_DIMMABLE_LIGHT: // same as DEV_ID_HA_ONOFF_LIGHT
7286
7357
case DEV_ID_ZLL_DIMMABLE_PLUGIN_UNIT:
7287
7358
case DEV_ID_Z30_DIMMABLE_PLUGIN_UNIT:
7359
+ case DEV_ID_LEVEL_CONTROL_SWITCH:
7288
7360
//fall through
7289
7361
7290
7362
case DEV_ID_MAINS_POWER_OUTLET:
0 commit comments