Skip to content

Commit 4398b63

Browse files
committed
Merge pull request #289 from algernon2/master
LightwaveRF inline relay
2 parents 63f0ac7 + f9d7fba commit 4398b63

File tree

2 files changed

+33
-9
lines changed

2 files changed

+33
-9
lines changed

main/RFXNames.cpp

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2221,12 +2221,21 @@ bool GetLightCommand(
22212221
else if (dSubType!=sTypeLightwaveRF)
22222222
{
22232223
//Only LightwaveRF devices have a set-level
2224-
if (switchcmd=="Set Level")
2225-
switchcmd="On";
2226-
}
2227-
2228-
if (switchtype==STYPE_Doorbell)
2229-
{
2224+
if (switchcmd=="Set Level")
2225+
switchcmd="On";
2226+
}
2227+
// The LightwaveRF inline relay has to be controlled by Venetian blinds logic as it has a stop setting
2228+
else if ((dSubType==sTypeLightwaveRF)&&(switchtype==STYPE_VenetianBlindsEU)){
2229+
if (switchcmd=="On")
2230+
switchcmd="Close inline relay";
2231+
else if (switchcmd=="Off")
2232+
switchcmd="Open inline relay";
2233+
else if (switchcmd=="Stop")
2234+
switchcmd="Stop inline relay";
2235+
}
2236+
2237+
if (switchtype==STYPE_Doorbell)
2238+
{
22302239
if ((switchcmd=="On")||(switchcmd=="Group On"))
22312240
{
22322241
cmd=light5_sGroupOn;
@@ -2270,10 +2279,25 @@ bool GetLightCommand(
22702279
return true;
22712280
}
22722281
else if (switchcmd=="Group On")
2282+
{
2283+
cmd=light5_sGroupOn;
2284+
return true;
2285+
}
2286+
else if (switchcmd=="Close inline relay")
2287+
{
2288+
cmd=light5_sClose;
2289+
return true;
2290+
}
2291+
else if (switchcmd=="Stop inline relay")
22732292
{
2274-
cmd=light5_sGroupOn;
2293+
cmd=light5_sStop;
22752294
return true;
22762295
}
2296+
else if (switchcmd=="Open inline relay")
2297+
{
2298+
cmd=light5_sOpen;
2299+
return true;
2300+
}
22772301
else
22782302
return false;
22792303
break;

main/WebServer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7797,10 +7797,10 @@ namespace http {
77977797
)
77987798
{
77997799
root["result"][ii]["TypeImg"] = "blinds";
7800-
if (lstatus == "On") {
7800+
if ((lstatus == "On")||(lstatus=="Close inline relay")) {
78017801
lstatus = "Closed";
78027802
}
7803-
else if (lstatus == "Stop") {
7803+
else if ((lstatus == "Stop")||(lstatus=="Stop inline relay")) {
78047804
lstatus = "Stopped";
78057805
}
78067806
else {

0 commit comments

Comments
 (0)