mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 11:02:12 +01:00
Added left and right drapery pulls.
This commit is contained in:
parent
90b247e7d8
commit
ac835305cb
7 changed files with 149 additions and 9 deletions
12
Somfy.cpp
12
Somfy.cpp
|
|
@ -2137,8 +2137,16 @@ bool SomfyShade::fromJSON(JsonObject &obj) {
|
||||||
if(obj["shadeType"].is<const char *>()) {
|
if(obj["shadeType"].is<const char *>()) {
|
||||||
if(strncmp(obj["shadeType"].as<const char *>(), "roller", 7) == 0)
|
if(strncmp(obj["shadeType"].as<const char *>(), "roller", 7) == 0)
|
||||||
this->shadeType = shade_types::roller;
|
this->shadeType = shade_types::roller;
|
||||||
else if(strncmp(obj["shadeType"].as<const char *>(), "drapery", 8) == 0)
|
else if(strncmp(obj["shadeType"].as<const char *>(), "ldrapery", 9) == 0)
|
||||||
this->shadeType = shade_types::drapery;
|
this->shadeType = shade_types::ldrapery;
|
||||||
|
else if(strncmp(obj["shadeType"].as<const char *>(), "rdrapery", 9) == 0)
|
||||||
|
this->shadeType = shade_types::rdrapery;
|
||||||
|
else if(strncmp(obj["shadeType"].as<const char *>(), "cdrapery", 9) == 0)
|
||||||
|
this->shadeType = shade_types::cdrapery;
|
||||||
|
else if(strncmp(obj["shadeType"].as<const char *>(), "garage1", 7) == 0)
|
||||||
|
this->shadeType = shade_types::garage1;
|
||||||
|
else if(strncmp(obj["shadeType"].as<const char *>(), "garage3", 7) == 0)
|
||||||
|
this->shadeType = shade_types::garage3;
|
||||||
else if(strncmp(obj["shadeType"].as<const char *>(), "blind", 5) == 0)
|
else if(strncmp(obj["shadeType"].as<const char *>(), "blind", 5) == 0)
|
||||||
this->shadeType = shade_types::blind;
|
this->shadeType = shade_types::blind;
|
||||||
else if(strncmp(obj["shadeType"].as<const char *>(), "awning", 7) == 0)
|
else if(strncmp(obj["shadeType"].as<const char *>(), "awning", 7) == 0)
|
||||||
|
|
|
||||||
7
Somfy.h
7
Somfy.h
|
|
@ -52,12 +52,13 @@ enum class group_types : byte {
|
||||||
enum class shade_types : byte {
|
enum class shade_types : byte {
|
||||||
roller = 0x00,
|
roller = 0x00,
|
||||||
blind = 0x01,
|
blind = 0x01,
|
||||||
drapery = 0x02,
|
ldrapery = 0x02,
|
||||||
awning = 0x03,
|
awning = 0x03,
|
||||||
shutter = 0x04,
|
shutter = 0x04,
|
||||||
garage1 = 0x05,
|
garage1 = 0x05,
|
||||||
garage3 = 0x06
|
garage3 = 0x06,
|
||||||
|
rdrapery = 0x07,
|
||||||
|
cdrapery = 0x08
|
||||||
};
|
};
|
||||||
enum class tilt_types : byte {
|
enum class tilt_types : byte {
|
||||||
none = 0x00,
|
none = 0x00,
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -610,6 +610,69 @@ i.icss-window-shade {
|
||||||
background-size: 0.05em 0.05em;
|
background-size: 0.05em 0.05em;
|
||||||
background-color: rgba(71, 212, 255, 0);
|
background-color: rgba(71, 212, 255, 0);
|
||||||
}
|
}
|
||||||
|
i.icss-ldrapery {
|
||||||
|
width: 1.1em;
|
||||||
|
height: .9em;
|
||||||
|
background-color: transparent;
|
||||||
|
border: .05em solid transparent;
|
||||||
|
border-width: 0 .1em;
|
||||||
|
box-shadow: inset 0 0 0 .01em, inset 0 .01em 0 .07em, 0 .07em 0;
|
||||||
|
margin: .1em 0 .07em;
|
||||||
|
}
|
||||||
|
|
||||||
|
i.icss-ldrapery:before {
|
||||||
|
width: 1.1em;
|
||||||
|
height: .2em;
|
||||||
|
border-bottom: .1em solid transparent;
|
||||||
|
box-shadow: inset 0 1em, 0 0em 0 -.1em;
|
||||||
|
top: -.05em;
|
||||||
|
left: -.09em;
|
||||||
|
}
|
||||||
|
|
||||||
|
i.icss-ldrapery:after {
|
||||||
|
width: var(--shade-position, 0%);
|
||||||
|
height: calc(100% - .05em);
|
||||||
|
left: 0em;
|
||||||
|
top: 0.025em;
|
||||||
|
border-bottom: solid 0.025em gray;
|
||||||
|
border-right:solid 0.025em gray;
|
||||||
|
background-image: repeating-conic-gradient(var(--shade-color, currentColor) 0% 25%, rgba(71, 212, 255, 0) 0% 50%);
|
||||||
|
background-position: 0 0, 100% 100%;
|
||||||
|
background-size: 0.05em 0.05em;
|
||||||
|
background-color: rgba(71, 212, 255, 0);
|
||||||
|
}
|
||||||
|
i.icss-rdrapery {
|
||||||
|
width: 1.1em;
|
||||||
|
height: .9em;
|
||||||
|
background-color: transparent;
|
||||||
|
border: .05em solid transparent;
|
||||||
|
border-width: 0 .1em;
|
||||||
|
box-shadow: inset 0 0 0 .01em, inset 0 .01em 0 .07em, 0 .07em 0;
|
||||||
|
margin: .1em 0 .07em;
|
||||||
|
}
|
||||||
|
|
||||||
|
i.icss-rdrapery:before {
|
||||||
|
width: 1.1em;
|
||||||
|
height: .2em;
|
||||||
|
border-bottom: .1em solid transparent;
|
||||||
|
box-shadow: inset 0 1em, 0 0em 0 -.1em;
|
||||||
|
top: -.05em;
|
||||||
|
left: -.09em;
|
||||||
|
}
|
||||||
|
|
||||||
|
i.icss-rdrapery:after {
|
||||||
|
width: var(--shade-position, 0%);
|
||||||
|
height: calc(100% - .05em);
|
||||||
|
left: calc(100% - var(--shade-position));
|
||||||
|
top: 0.025em;
|
||||||
|
border-bottom: solid 0.025em gray;
|
||||||
|
border-left: solid 0.025em gray;
|
||||||
|
background-image: repeating-conic-gradient(var(--shade-color, currentColor) 0% 25%, rgba(71, 212, 255, 0) 0% 50%);
|
||||||
|
background-position: 0 0, 100% 100%;
|
||||||
|
background-size: 0.05em 0.05em;
|
||||||
|
background-color: rgba(71, 212, 255, 0);
|
||||||
|
}
|
||||||
|
|
||||||
i.icss-shutter {
|
i.icss-shutter {
|
||||||
width: 1.1em;
|
width: 1.1em;
|
||||||
height: .75em;
|
height: .75em;
|
||||||
|
|
@ -816,6 +879,7 @@ i.icss-awning {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border-width: 0 0;
|
border-width: 0 0;
|
||||||
margin: .2em 0 .07em;
|
margin: .2em 0 .07em;
|
||||||
|
left:0.1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
i.icss-awning:before {
|
i.icss-awning:before {
|
||||||
|
|
@ -1025,7 +1089,7 @@ div.indicator-wind {
|
||||||
clip-path: polygon(48% 18%, 0% 95%, 110% 92%);
|
clip-path: polygon(48% 18%, 0% 95%, 110% 92%);
|
||||||
background:yellow;
|
background:yellow;
|
||||||
top:30%;
|
top:30%;
|
||||||
left:13px;
|
left:.8em;
|
||||||
}
|
}
|
||||||
div.indicator-sun {
|
div.indicator-sun {
|
||||||
color: darkorange;
|
color: darkorange;
|
||||||
|
|
|
||||||
|
|
@ -276,8 +276,8 @@
|
||||||
<div id="divSomfySettings" style="display:none;">
|
<div id="divSomfySettings" style="display:none;">
|
||||||
<div class="subtab-container"><span class="selected" data-grpid="divSomfyMotors">Shades</span><span data-grpid="divSomfyGroups">Groups</span></div>
|
<div class="subtab-container"><span class="selected" data-grpid="divSomfyMotors">Shades</span><span data-grpid="divSomfyGroups">Groups</span></div>
|
||||||
<div id="divSomfyMotors" class="subtab-content" style="padding-top:10px;">
|
<div id="divSomfyMotors" class="subtab-content" style="padding-top:10px;">
|
||||||
<div style="font-size:.8em;">Drag each item to set the order in which they appear in the list.</div>
|
|
||||||
<div id="divShadeListContainer">
|
<div id="divShadeListContainer">
|
||||||
|
<div style="font-size:.8em;">Drag each item to set the order in which they appear in the list.</div>
|
||||||
<div id="divShadeList" class="edit-motorlist"></div>
|
<div id="divShadeList" class="edit-motorlist"></div>
|
||||||
<div class="button-container">
|
<div class="button-container">
|
||||||
<button id="btnAddShade" type="button" onclick="somfy.openEditShade();">
|
<button id="btnAddShade" type="button" onclick="somfy.openEditShade();">
|
||||||
|
|
@ -312,7 +312,8 @@
|
||||||
<option value="0">Roller Shade</option>
|
<option value="0">Roller Shade</option>
|
||||||
<option value="4">Shutter</option>
|
<option value="4">Shutter</option>
|
||||||
<option value="1">Blind</option>
|
<option value="1">Blind</option>
|
||||||
<option value="2">Drapery</option>
|
<option value="2">Drapery (left)</option>
|
||||||
|
<option value="7">Drapery (Right)</option>
|
||||||
<option value="3">Awning</option>
|
<option value="3">Awning</option>
|
||||||
<option value="5">Garage (1-button)</option>
|
<option value="5">Garage (1-button)</option>
|
||||||
<option value="6">Garage (3-button)</option>
|
<option value="6">Garage (3-button)</option>
|
||||||
|
|
@ -457,8 +458,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="divSomfyGroups" class="subtab-content" style="display:none;padding-top:10px;">
|
<div id="divSomfyGroups" class="subtab-content" style="display:none;padding-top:10px;">
|
||||||
<div style="font-size:.8em;">Drag each item to set the order in which they appear in the list.</div>
|
|
||||||
<div id="divGroupListContainer">
|
<div id="divGroupListContainer">
|
||||||
|
<div style="font-size:.8em;">Drag each item to set the order in which they appear in the list.</div>
|
||||||
<div id="divGroupList" class="edit-grouplist"></div>
|
<div id="divGroupList" class="edit-grouplist"></div>
|
||||||
<div class="button-container">
|
<div class="button-container">
|
||||||
<button id="btnAddGroup" type="button" onclick="somfy.openEditGroup();">
|
<button id="btnAddGroup" type="button" onclick="somfy.openEditGroup();">
|
||||||
|
|
|
||||||
|
|
@ -1959,6 +1959,9 @@ class Somfy {
|
||||||
case 1:
|
case 1:
|
||||||
divCtl += ' icss-window-blind';
|
divCtl += ' icss-window-blind';
|
||||||
break;
|
break;
|
||||||
|
case 2:
|
||||||
|
divCtl += ' icss-ldrapery';
|
||||||
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
divCtl += ' icss-awning';
|
divCtl += ' icss-awning';
|
||||||
break;
|
break;
|
||||||
|
|
@ -1969,6 +1972,12 @@ class Somfy {
|
||||||
case 6:
|
case 6:
|
||||||
divCtl += ' icss-garage';
|
divCtl += ' icss-garage';
|
||||||
break;
|
break;
|
||||||
|
case 7:
|
||||||
|
divCtl += ' icss-rdrapery';
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
divCtl += ' icss-cdrapery';
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
divCtl += ' icss-window-shade';
|
divCtl += ' icss-window-shade';
|
||||||
break;
|
break;
|
||||||
|
|
@ -2529,14 +2538,32 @@ class Somfy {
|
||||||
case 1:
|
case 1:
|
||||||
document.getElementById('divTiltSettings').style.display = '';
|
document.getElementById('divTiltSettings').style.display = '';
|
||||||
if (ico.classList.contains('icss-window-shade')) ico.classList.remove('icss-window-shade');
|
if (ico.classList.contains('icss-window-shade')) ico.classList.remove('icss-window-shade');
|
||||||
|
if (ico.classList.contains('icss-ldrapery')) ico.classList.remove('icss-ldrapery');
|
||||||
|
if (ico.classList.contains('icss-rdrapery')) ico.classList.remove('icss-rdrapery');
|
||||||
|
if (ico.classList.contains('icss-cdrapery')) ico.classList.remove('icss-cdrapery');
|
||||||
if (ico.classList.contains('icss-awning')) ico.classList.remove('icss-awning');
|
if (ico.classList.contains('icss-awning')) ico.classList.remove('icss-awning');
|
||||||
if (ico.classList.contains('icss-shutter')) ico.classList.remove('icss-shutter');
|
if (ico.classList.contains('icss-shutter')) ico.classList.remove('icss-shutter');
|
||||||
if (!ico.classList.contains('icss-window-blind')) ico.classList.add('icss-window-blind');
|
if (!ico.classList.contains('icss-window-blind')) ico.classList.add('icss-window-blind');
|
||||||
if (ico.classList.contains('icss-garage')) ico.classList.remove('icss-garage');
|
if (ico.classList.contains('icss-garage')) ico.classList.remove('icss-garage');
|
||||||
break;
|
break;
|
||||||
|
case 2:
|
||||||
|
document.getElementById('divTiltSettings').style.display = 'none';
|
||||||
|
if (ico.classList.contains('icss-window-shade')) ico.classList.remove('icss-window-shade');
|
||||||
|
if (!ico.classList.contains('icss-ldrapery')) ico.classList.add('icss-ldrapery');
|
||||||
|
if (ico.classList.contains('icss-rdrapery')) ico.classList.remove('icss-rdrapery');
|
||||||
|
if (ico.classList.contains('icss-cdrapery')) ico.classList.remove('icss-cdrapery');
|
||||||
|
if (ico.classList.contains('icss-window-blind')) ico.classList.remove('icss-window-blind');
|
||||||
|
if (ico.classList.contains('icss-shutter')) ico.classList.remove('icss-shutter');
|
||||||
|
if (ico.classList.contains('icss-garage')) ico.classList.remove('icss-garage');
|
||||||
|
if (ico.classList.contains('icss-awning')) ico.classList.remove('icss-awning');
|
||||||
|
tilt = false;
|
||||||
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
document.getElementById('divTiltSettings').style.display = 'none';
|
document.getElementById('divTiltSettings').style.display = 'none';
|
||||||
if (ico.classList.contains('icss-window-shade')) ico.classList.remove('icss-window-shade');
|
if (ico.classList.contains('icss-window-shade')) ico.classList.remove('icss-window-shade');
|
||||||
|
if (ico.classList.contains('icss-ldrapery')) ico.classList.remove('icss-ldrapery');
|
||||||
|
if (ico.classList.contains('icss-rdrapery')) ico.classList.remove('icss-rdrapery');
|
||||||
|
if (ico.classList.contains('icss-cdrapery')) ico.classList.remove('icss-cdrapery');
|
||||||
if (ico.classList.contains('icss-window-blind')) ico.classList.remove('icss-window-blind');
|
if (ico.classList.contains('icss-window-blind')) ico.classList.remove('icss-window-blind');
|
||||||
if (ico.classList.contains('icss-shutter')) ico.classList.remove('icss-shutter');
|
if (ico.classList.contains('icss-shutter')) ico.classList.remove('icss-shutter');
|
||||||
if (ico.classList.contains('icss-garage')) ico.classList.remove('icss-garage');
|
if (ico.classList.contains('icss-garage')) ico.classList.remove('icss-garage');
|
||||||
|
|
@ -2546,6 +2573,9 @@ class Somfy {
|
||||||
case 4:
|
case 4:
|
||||||
document.getElementById('divTiltSettings').style.display = 'none';
|
document.getElementById('divTiltSettings').style.display = 'none';
|
||||||
if (ico.classList.contains('icss-window-shade')) ico.classList.remove('icss-window-shade');
|
if (ico.classList.contains('icss-window-shade')) ico.classList.remove('icss-window-shade');
|
||||||
|
if (ico.classList.contains('icss-ldrapery')) ico.classList.remove('icss-ldrapery');
|
||||||
|
if (ico.classList.contains('icss-rdrapery')) ico.classList.remove('icss-rdrapery');
|
||||||
|
if (ico.classList.contains('icss-cdrapery')) ico.classList.remove('icss-cdrapery');
|
||||||
if (ico.classList.contains('icss-window-blind')) ico.classList.remove('icss-window-blind');
|
if (ico.classList.contains('icss-window-blind')) ico.classList.remove('icss-window-blind');
|
||||||
if (ico.classList.contains('icss-awning')) ico.classList.remove('icss-awning');
|
if (ico.classList.contains('icss-awning')) ico.classList.remove('icss-awning');
|
||||||
if (ico.classList.contains('icss-garage')) ico.classList.remove('icss-garage');
|
if (ico.classList.contains('icss-garage')) ico.classList.remove('icss-garage');
|
||||||
|
|
@ -2556,6 +2586,9 @@ class Somfy {
|
||||||
case 5:
|
case 5:
|
||||||
document.getElementById('divTiltSettings').style.display = 'none';
|
document.getElementById('divTiltSettings').style.display = 'none';
|
||||||
if (ico.classList.contains('icss-window-shade')) ico.classList.remove('icss-window-shade');
|
if (ico.classList.contains('icss-window-shade')) ico.classList.remove('icss-window-shade');
|
||||||
|
if (ico.classList.contains('icss-ldrapery')) ico.classList.remove('icss-ldrapery');
|
||||||
|
if (ico.classList.contains('icss-rdrapery')) ico.classList.remove('icss-rdrapery');
|
||||||
|
if (ico.classList.contains('icss-cdrapery')) ico.classList.remove('icss-cdrapery');
|
||||||
if (ico.classList.contains('icss-window-blind')) ico.classList.remove('icss-window-blind');
|
if (ico.classList.contains('icss-window-blind')) ico.classList.remove('icss-window-blind');
|
||||||
if (ico.classList.contains('icss-awning')) ico.classList.remove('icss-awning');
|
if (ico.classList.contains('icss-awning')) ico.classList.remove('icss-awning');
|
||||||
if (ico.classList.contains('icss-shutter')) ico.classList.remove('icss-shutter');
|
if (ico.classList.contains('icss-shutter')) ico.classList.remove('icss-shutter');
|
||||||
|
|
@ -2564,9 +2597,37 @@ class Somfy {
|
||||||
sun = false;
|
sun = false;
|
||||||
tilt = false;
|
tilt = false;
|
||||||
break;
|
break;
|
||||||
|
case 7:
|
||||||
|
document.getElementById('divTiltSettings').style.display = 'none';
|
||||||
|
if (ico.classList.contains('icss-window-shade')) ico.classList.remove('icss-window-shade');
|
||||||
|
if (ico.classList.contains('icss-ldrapery')) ico.classList.remove('icss-ldrapery');
|
||||||
|
if (!ico.classList.contains('icss-rdrapery')) ico.classList.add('icss-rdrapery');
|
||||||
|
if (ico.classList.contains('icss-cdrapery')) ico.classList.remove('icss-cdrapery');
|
||||||
|
if (ico.classList.contains('icss-window-blind')) ico.classList.remove('icss-window-blind');
|
||||||
|
if (ico.classList.contains('icss-shutter')) ico.classList.remove('icss-shutter');
|
||||||
|
if (ico.classList.contains('icss-garage')) ico.classList.remove('icss-garage');
|
||||||
|
if (ico.classList.contains('icss-awning')) ico.classList.remove('icss-awning');
|
||||||
|
tilt = false;
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
document.getElementById('divTiltSettings').style.display = 'none';
|
||||||
|
if (ico.classList.contains('icss-window-shade')) ico.classList.remove('icss-window-shade');
|
||||||
|
if (ico.classList.contains('icss-ldrapery')) ico.classList.remove('icss-ldrapery');
|
||||||
|
if (ico.classList.contains('icss-rdrapery')) ico.classList.remove('icss-rdrapery');
|
||||||
|
if (!ico.classList.contains('icss-cdrapery')) ico.classList.add('icss-cdrapery');
|
||||||
|
if (ico.classList.contains('icss-window-blind')) ico.classList.remove('icss-window-blind');
|
||||||
|
if (ico.classList.contains('icss-shutter')) ico.classList.remove('icss-shutter');
|
||||||
|
if (ico.classList.contains('icss-garage')) ico.classList.remove('icss-garage');
|
||||||
|
if (ico.classList.contains('icss-awning')) ico.classList.remove('icss-awning');
|
||||||
|
tilt = false;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (ico.classList.contains('icss-window-blind')) ico.classList.remove('icss-window-blind');
|
if (ico.classList.contains('icss-window-blind')) ico.classList.remove('icss-window-blind');
|
||||||
if (ico.classList.contains('icss-awning')) ico.classList.remove('icss-awning');
|
if (ico.classList.contains('icss-awning')) ico.classList.remove('icss-awning');
|
||||||
|
if (ico.classList.contains('icss-ldrapery')) ico.classList.remove('icss-ldrapery');
|
||||||
|
if (ico.classList.contains('icss-rdrapery')) ico.classList.remove('icss-rdrapery');
|
||||||
|
if (ico.classList.contains('icss-cdrapery')) ico.classList.remove('icss-cdrapery');
|
||||||
if (!ico.classList.contains('icss-window-shade')) ico.classList.add('icss-window-shade');
|
if (!ico.classList.contains('icss-window-shade')) ico.classList.add('icss-window-shade');
|
||||||
if (ico.classList.contains('icss-garage')) ico.classList.remove('icss-garage');
|
if (ico.classList.contains('icss-garage')) ico.classList.remove('icss-garage');
|
||||||
if (ico.classList.contains('icss-shutter')) ico.classList.remove('icss-shutter');
|
if (ico.classList.contains('icss-shutter')) ico.classList.remove('icss-shutter');
|
||||||
|
|
@ -2641,6 +2702,11 @@ class Somfy {
|
||||||
ico.classList.remove('icss-window-shade');
|
ico.classList.remove('icss-window-shade');
|
||||||
ico.classList.add('icss-window-blind');
|
ico.classList.add('icss-window-blind');
|
||||||
break;
|
break;
|
||||||
|
case 2:
|
||||||
|
ico.classList.remove('icss-window-shade');
|
||||||
|
ico.classList.add('icss-ldrapery');
|
||||||
|
document.getElementById('divSunSensor').style.display = '';
|
||||||
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
ico.classList.remove('icss-window-shade');
|
ico.classList.remove('icss-window-shade');
|
||||||
ico.classList.add('icss-awning');
|
ico.classList.add('icss-awning');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue