Skip to content

Commit 0cdad1e

Browse files
committed
new RFXCom sdk implemented
1 parent c1e602c commit 0cdad1e

File tree

5 files changed

+119
-12
lines changed

5 files changed

+119
-12
lines changed

main/RFXNames.cpp

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,9 @@ const char *RFX_Type_Desc(const unsigned char i, const unsigned char snum)
351351
{ pTypeLimitlessLights, "Lighting Limitless/Applamp" , "lightbulb" },
352352
{ pTypeCurtain, "Curtain" , "blinds" },
353353
{ pTypeBlinds, "Blinds" , "blinds" },
354-
{ pTypeSecurity1, "Security" , "security" },
355-
{ pTypeCamera, "Camera" , "unknown" },
354+
{ pTypeSecurity1, "Security", "security" },
355+
{ pTypeSecurity2, "Security", "security" },
356+
{ pTypeCamera, "Camera", "unknown" },
356357
{ pTypeRemote, "Remote & IR" , "unknown" },
357358
{ pTypeThermostat1, "Thermostat 1" , "temperature" },
358359
{ pTypeThermostat2, "Thermostat 2" , "temperature" },
@@ -458,6 +459,7 @@ const char *RFX_Type_SubType_Desc(const unsigned char dType, const unsigned char
458459
{ pTypeWIND, sTypeWIND4, "TFA" },
459460
{ pTypeWIND, sTypeWIND5, "UPM WDS500" },
460461
{ pTypeWIND, sTypeWIND6, "LaCrosse WS2300" },
462+
{ pTypeWIND, sTypeWIND7, "Alecto WS4500" },
461463
{ pTypeWIND, sTypeWINDNoTemp, "Weather Station" },
462464

463465
{ pTypeUV, sTypeUV1, "UVN128,UV138" },
@@ -513,6 +515,8 @@ const char *RFX_Type_SubType_Desc(const unsigned char dType, const unsigned char
513515
{ pTypeBlinds, sTypeBlindsT6, "T6 DC106" },
514516
{ pTypeBlinds, sTypeBlindsT7, "Forest" },
515517
{ pTypeBlinds, sTypeBlindsT8, "Chamberlain CS4330CN" },
518+
{ pTypeBlinds, sTypeBlindsT9, "Sunpery" },
519+
{ pTypeBlinds, sTypeBlindsT10, "Dolat DLM-1" },
516520

517521
{ pTypeSecurity1, sTypeSecX10, "X10 security" },
518522
{ pTypeSecurity1, sTypeSecX10M, "X10 security motion" },
@@ -526,6 +530,8 @@ const char *RFX_Type_SubType_Desc(const unsigned char dType, const unsigned char
526530
{ pTypeSecurity1, sTypeSA30, "Alecto SA30 smoke detector" },
527531
{ pTypeSecurity1, sTypeDomoticzSecurity, "Security Panel" },
528532

533+
{ pTypeSecurity2, sTypeSec2Classic, "KeeLoq" },
534+
529535
{ pTypeCamera, sTypeNinja, "Meiantech" },
530536

531537
{ pTypeRemote, sTypeATI, "ATI Remote Wonder" },
@@ -542,6 +548,7 @@ const char *RFX_Type_SubType_Desc(const unsigned char dType, const unsigned char
542548

543549
{ pTypeThermostat3, sTypeMertikG6RH4T1, "Mertik G6R-H4T1" },
544550
{ pTypeThermostat3, sTypeMertikG6RH4TB, "Mertik G6R-H4TB" },
551+
{ pTypeThermostat3, sTypeMertikG6RH4TD, "Mertik G6R-H4TD" },
545552

546553
{ pTypeRadiator1, sTypeSmartwares, "Smartwares" },
547554
{ pTypeRadiator1, sTypeSmartwaresSwitchRadiator, "Smartwares Mode" },
@@ -610,6 +617,7 @@ const char *RFX_Type_SubType_Desc(const unsigned char dType, const unsigned char
610617
{ pTypeChime, sTypeByronMP001, "Byron MP001" },
611618
{ pTypeChime, sTypeSelectPlus, "SelectPlus" },
612619
{ pTypeChime, sTypeSelectPlus3, "SelectPlus3" },
620+
{ pTypeChime, sTypeEnvivo, "Envivo" },
613621

614622
{ pTypeTEMP_RAIN, sTypeTR1, "Alecto WS1200" },
615623

@@ -720,6 +728,7 @@ const char *RFX_Type_SubType_Values(const unsigned char dType, const unsigned ch
720728
{ pTypeWIND, sTypeWIND4, "Direction,Direction string,Speed,Gust,Temperature,Chill" },
721729
{ pTypeWIND, sTypeWIND5, "Direction,Direction string,Speed,Gust,Temperature,Chill" },
722730
{ pTypeWIND, sTypeWIND6, "Direction,Direction string,Speed,Gust,Temperature,Chill" },
731+
{ pTypeWIND, sTypeWIND7, "Direction,Direction string,Speed,Gust,Temperature,Chill" },
723732
{ pTypeWIND, sTypeWINDNoTemp, "Direction,Direction string,Speed,Gust,Temperature,Chill" },
724733

725734
{ pTypeUV, sTypeUV1, "UV,Temperature" },
@@ -773,6 +782,8 @@ const char *RFX_Type_SubType_Values(const unsigned char dType, const unsigned ch
773782
{ pTypeBlinds, sTypeBlindsT6, "Status" },
774783
{ pTypeBlinds, sTypeBlindsT7, "Status" },
775784
{ pTypeBlinds, sTypeBlindsT8, "Status" },
785+
{ pTypeBlinds, sTypeBlindsT9, "Status" },
786+
{ pTypeBlinds, sTypeBlindsT10, "Status" },
776787

777788
{ pTypeSecurity1, sTypeSecX10, "Status" },
778789
{ pTypeSecurity1, sTypeSecX10M, "Status" },
@@ -802,6 +813,7 @@ const char *RFX_Type_SubType_Values(const unsigned char dType, const unsigned ch
802813

803814
{ pTypeThermostat3, sTypeMertikG6RH4T1, "Status" },
804815
{ pTypeThermostat3, sTypeMertikG6RH4TB, "Status" },
816+
{ pTypeThermostat3, sTypeMertikG6RH4TD, "Status" },
805817

806818
{ pTypeRadiator1, sTypeSmartwares, "Status" },
807819
{ pTypeRadiator1, sTypeSmartwaresSwitchRadiator, "Status" },
@@ -870,6 +882,7 @@ const char *RFX_Type_SubType_Values(const unsigned char dType, const unsigned ch
870882
{ pTypeChime, sTypeByronMP001, "Status" },
871883
{ pTypeChime, sTypeSelectPlus, "Status" },
872884
{ pTypeChime, sTypeSelectPlus3, "Status" },
885+
{ pTypeChime, sTypeEnvivo, "Status" },
873886

874887
{ pTypeTEMP_RAIN, sTypeTR1, "Temperature,Total rain" },
875888

main/RFXtrx.h

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,21 @@ portions of this file.
2727
*/
2828

2929
/*
30+
SDK version 8.02
31+
Blinds Dolat added
32+
Mertik G6R_H4TD added
33+
34+
SDK version 8.01
35+
Blinds Sunpery changed
36+
37+
SDK version 8.00
38+
Security2 - KeeLoq added
39+
Envivo Chime added
40+
msg6 - mode bits added
41+
sTypeUselectplus added
42+
Blinds Sunpery added
43+
TH14,RAIN7,WIND7 - Alecto WS4500 added
44+
3045
SDK version 7.02/7.03
3146
msg3_RFU changed to msg3_IMAGINTRONIX
3247
IRESPONSE.RFU6enabled changed to IRESPONSE.IMAGINTRONIXenabled
@@ -315,6 +330,15 @@ SDK version 4.9
315330
#define msg5_ATI 0x40
316331
#define msg5_VISONIC 0x80
317332

333+
#define msg6_KeeLoq 0x01
334+
#define msg6_RFU1 0x02
335+
#define msg6_RFU2 0x04
336+
#define msg6_RFU3 0x08
337+
#define msg6_RFU4 0x10
338+
#define msg6_RFU5 0x20
339+
#define msg6_RFU6 0x40
340+
#define msg6_RFU7 0x80
341+
318342
#define pTypeRecXmitMessage 0x02
319343
#define sTypeReceiverLockError 0x00
320344
#define sTypeTransmitterResponse 0x01
@@ -342,6 +366,7 @@ SDK version 4.9
342366
#define sTypeUfineoffset 0x12
343367
#define sTypeUrgb 0x13
344368
#define sTypeUrfy 0x14
369+
#define sTypeUselectplus 0x15
345370

346371
//types for Lighting
347372
#define pTypeLighting1 0x10
@@ -472,6 +497,7 @@ SDK version 4.9
472497
#define sTypeByronMP001 0x1
473498
#define sTypeSelectPlus 0x2
474499
#define sTypeSelectPlus3 0x3
500+
#define sTypeEnvivo 0x4
475501
#define chime_sound0 0x1
476502
#define chime_sound1 0x3
477503
#define chime_sound2 0x5
@@ -509,6 +535,8 @@ SDK version 4.9
509535
#define sTypeBlindsT6 0x6 //DC106, YOOHA, Rohrmotor24 RMF
510536
#define sTypeBlindsT7 0x7 //Forest
511537
#define sTypeBlindsT8 0x8 //Chamberlain CS4330CN
538+
#define sTypeBlindsT9 0x9 //Sunpery
539+
#define sTypeBlindsT10 0x10 //Dolat DLM-1
512540

513541
#define blinds_sOpen 0x0
514542
#define blinds_sClose 0x1
@@ -520,6 +548,15 @@ SDK version 4.9
520548
#define blinds_sChangeDirection 0x7
521549
#define blinds_sLeft 0x8
522550
#define blinds_sRight 0x9
551+
#define blinds_s9ChangeDirection 0x6
552+
#define blinds_s9ImA = 0x7
553+
#define blinds_s9ImCenter = 0x8
554+
#define blinds_s9ImB = 0x9
555+
#define blinds_s9EraseCurrentCh = 0xA
556+
#define blinds_s9EraseAllCh = 0xB
557+
#define blinds_s10LearnMaster = 0x4
558+
#define blinds_s10EraseCurrentCh = 0x5
559+
#define blinds_s10ChangeDirection = 0x6
523560

524561
//types for RFY
525562
#define pTypeRFY 0x1A
@@ -590,6 +627,10 @@ SDK version 4.9
590627
#define sStatusMotionTamper 0x84
591628
#define sStatusNoMotionTamper 0x85
592629

630+
//types for Security2
631+
#define pTypeSecurity2 0x21
632+
#define sTypeSec2Classic 0x0
633+
593634
//types for Camera
594635
#define pTypeCamera 0x28
595636
#define sTypeNinja 0x0 //X10 Ninja/Robocam
@@ -637,6 +678,7 @@ SDK version 4.9
637678
#define pTypeThermostat3 0x42
638679
#define sTypeMertikG6RH4T1 0x0 //Mertik G6R-H4T1
639680
#define sTypeMertikG6RH4TB 0x1 //Mertik G6R-H4TB
681+
#define sTypeMertikG6RH4TD 0x2 //Mertik G6R-H4TD
640682
#define thermostat3_sOff 0x0
641683
#define thermostat3_sOn 0x1
642684
#define thermostat3_sUp 0x2
@@ -703,6 +745,7 @@ SDK version 4.9
703745
#define sTypeTH11 0xB //EW109
704746
#define sTypeTH12 0xC //Imagintronix
705747
#define sTypeTH13 0xD //Alecto WS1700 and compatibles
748+
#define sTypeTH14 0xE //Alecto
706749

707750
//types for barometric
708751
#define pTypeBARO 0x53
@@ -725,6 +768,7 @@ SDK version 4.9
725768
#define sTypeRAIN4 0x4 //UPM
726769
#define sTypeRAIN5 0x5 //WS2300
727770
#define sTypeRAIN6 0x6 //TX5
771+
#define sTypeRAIN7 0x7 //Alecto
728772

729773
//types for wind
730774
#define pTypeWIND 0x56
@@ -734,6 +778,7 @@ SDK version 4.9
734778
#define sTypeWIND4 0x4 //TFA
735779
#define sTypeWIND5 0x5 //UPM
736780
#define sTypeWIND6 0x6 //WS2300
781+
#define sTypeWIND7 0x7 //Alecto WS4500
737782

738783
//types for uv
739784
#define pTypeUV 0x57
@@ -1174,6 +1219,44 @@ typedef union tRBUF {
11741219
#endif
11751220
} SECURITY1;
11761221

1222+
struct {
1223+
BYTE packetlength;
1224+
BYTE packettype;
1225+
BYTE subtype;
1226+
BYTE seqnbr;
1227+
BYTE id1;
1228+
BYTE id2;
1229+
BYTE id3;
1230+
BYTE id4;
1231+
BYTE id5;
1232+
BYTE id6;
1233+
BYTE id7;
1234+
BYTE id8;
1235+
BYTE id9;
1236+
BYTE id10;
1237+
BYTE id11;
1238+
BYTE id12;
1239+
BYTE id13;
1240+
BYTE id14;
1241+
BYTE id15;
1242+
BYTE id16;
1243+
BYTE id17;
1244+
BYTE id18;
1245+
BYTE id19;
1246+
BYTE id20;
1247+
BYTE id21;
1248+
BYTE id22;
1249+
BYTE id23;
1250+
BYTE id24;
1251+
#ifdef IS_BIG_ENDIAN
1252+
BYTE rssi : 4;
1253+
BYTE battery_level : 4;
1254+
#else
1255+
BYTE battery_level : 4;
1256+
BYTE rssi : 4;
1257+
#endif
1258+
} SECURITY2;
1259+
11771260
struct {
11781261
BYTE packetlength;
11791262
BYTE packettype;

main/mainworker.cpp

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2293,6 +2293,9 @@ unsigned long long MainWorker::decode_Wind(const CDomoticzHardwareBase *pHardwar
22932293
case sTypeWIND6:
22942294
WriteMessage("subtype = WIND6 - LaCrosse WS2300");
22952295
break;
2296+
case sTypeWIND7:
2297+
WriteMessage("subtype = WIND7 - Alecto WS4500");
2298+
break;
22962299
case sTypeWINDNoTemp:
22972300
WriteMessage("subtype = Weather Station");
22982301
break;
@@ -4387,6 +4390,13 @@ unsigned long long MainWorker::decode_Chime(const CDomoticzHardwareBase *pHardwa
43874390
sprintf(szTmp, "ID = %02X%02X", pResponse->CHIME.id1, pResponse->CHIME.id2);
43884391
WriteMessage(szTmp);
43894392
break;
4393+
case sTypeEnvivo:
4394+
WriteMessage("subtype = Envivo");
4395+
sprintf(szTmp, "Sequence nbr = %d", pResponse->CHIME.seqnbr);
4396+
WriteMessage(szTmp);
4397+
sprintf(szTmp, "ID = %02X%02X", pResponse->CHIME.id1, pResponse->CHIME.id2);
4398+
WriteMessage(szTmp);
4399+
break;
43904400
default:
43914401
sprintf(szTmp,"ERROR: Unknown Sub type for Packet type= %02X:%02X", pResponse->CHIME.packettype, pResponse->CHIME.subtype);
43924402
WriteMessage(szTmp);
@@ -4598,7 +4608,7 @@ unsigned long long MainWorker::decode_BLINDS1(const CDomoticzHardwareBase *pHard
45984608
unsigned char devType=pTypeBlinds;
45994609
unsigned char subType=pResponse->BLINDS1.subtype;
46004610

4601-
if ((subType == sTypeBlindsT6) || (subType == sTypeBlindsT7))
4611+
if ((subType == sTypeBlindsT6) || (subType == sTypeBlindsT7) || (subType == sTypeBlindsT9) || (subType == sTypeBlindsT10))
46024612
{
46034613
sprintf(szTmp, "%02X%02X%02X%02X", pResponse->BLINDS1.id1, pResponse->BLINDS1.id2, pResponse->BLINDS1.id3, pResponse->BLINDS1.id4);
46044614
}
@@ -4650,6 +4660,12 @@ unsigned long long MainWorker::decode_BLINDS1(const CDomoticzHardwareBase *pHard
46504660
case sTypeBlindsT8:
46514661
WriteMessage("subtype = Chamberlain CS4330CN");
46524662
break;
4663+
case sTypeBlindsT9:
4664+
WriteMessage("subtype = Sunpery");
4665+
break;
4666+
case sTypeBlindsT10:
4667+
WriteMessage("subtype = Dolat DLM-1");
4668+
break;
46534669
default:
46544670
sprintf(szTmp,"ERROR: Unknown Sub type for Packet type= %02X:%02X:", pResponse->BLINDS1.packettype, pResponse->BLINDS1.subtype);
46554671
WriteMessage(szTmp);
@@ -6661,6 +6677,9 @@ unsigned long long MainWorker::decode_Thermostat3(const CDomoticzHardwareBase *p
66616677
case sTypeMertikG6RH4TB:
66626678
WriteMessage("subtype = Mertik G6R-H4TB");
66636679
break;
6680+
case sTypeMertikG6RH4TD:
6681+
WriteMessage("subtype = Mertik G6R-H4TD");
6682+
break;
66646683
default:
66656684
sprintf(szTmp,"ERROR: Unknown Sub type for Packet type= %02X:%02X", pResponse->THERMOSTAT3.packettype, pResponse->THERMOSTAT3.subtype);
66666685
WriteMessage(szTmp);
@@ -9213,7 +9232,7 @@ bool MainWorker::SwitchLightInt(const std::vector<std::string> &sd, std::string
92139232
lcmd.BLINDS1.packettype=dType;
92149233
lcmd.BLINDS1.subtype=dSubType;
92159234

9216-
if ((dSubType == sTypeBlindsT6) || (dSubType == sTypeBlindsT7))
9235+
if ((dSubType == sTypeBlindsT6) || (dSubType == sTypeBlindsT7) || (dSubType == sTypeBlindsT9) || (dSubType == sTypeBlindsT10))
92179236
{
92189237
lcmd.BLINDS1.id1 = ID1;
92199238
lcmd.BLINDS1.id2 = ID2;

msbuild/domoticz.vcxproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@
158158
<ClInclude Include="..\hardware\Teleinfo.h" />
159159
<ClInclude Include="..\hardware\ToonThermostat.h" />
160160
<ClInclude Include="..\hardware\VolcraftCO20.h" />
161-
<ClInclude Include="..\hardware\VolcraftCO20Tool.h" />
162161
<ClInclude Include="..\hardware\WOL.h" />
163162
<ClInclude Include="..\hardware\Wunderground.h" />
164163
<ClInclude Include="..\hardware\ZWaveBase.h" />
@@ -302,7 +301,6 @@
302301
<ClCompile Include="..\hardware\Teleinfo.cpp" />
303302
<ClCompile Include="..\hardware\ToonThermostat.cpp" />
304303
<ClCompile Include="..\hardware\VolcraftCO20.cpp" />
305-
<ClCompile Include="..\hardware\VolcraftCO20Tool.cpp" />
306304
<ClCompile Include="..\hardware\WOL.cpp" />
307305
<ClCompile Include="..\hardware\Wunderground.cpp" />
308306
<ClCompile Include="..\hardware\ZWaveBase.cpp" />

msbuild/domoticz.vcxproj.filters

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,6 @@
363363
<ClInclude Include="..\hardware\VolcraftCO20.h">
364364
<Filter>Devices\VolcraftCO20</Filter>
365365
</ClInclude>
366-
<ClInclude Include="..\hardware\VolcraftCO20Tool.h">
367-
<Filter>Devices\VolcraftCO20</Filter>
368-
</ClInclude>
369366
<ClInclude Include="..\hardware\1Wire.h">
370367
<Filter>Devices\1-Wire</Filter>
371368
</ClInclude>
@@ -764,9 +761,6 @@
764761
<ClCompile Include="..\hardware\VolcraftCO20.cpp">
765762
<Filter>Devices\VolcraftCO20</Filter>
766763
</ClCompile>
767-
<ClCompile Include="..\hardware\VolcraftCO20Tool.cpp">
768-
<Filter>Devices\VolcraftCO20</Filter>
769-
</ClCompile>
770764
<ClCompile Include="..\hardware\1Wire.cpp">
771765
<Filter>Devices\1-Wire</Filter>
772766
</ClCompile>

0 commit comments

Comments
 (0)