mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 02:52:11 +01:00
Add support for 1 button gates #388
This commit is contained in:
parent
c528fda55a
commit
2b59f330a9
10 changed files with 83 additions and 22 deletions
|
|
@ -1 +1 @@
|
|||
2.4.4
|
||||
2.4.5
|
||||
|
|
@ -8,9 +8,9 @@
|
|||
<meta name="apple-mobile-web-app-title" content="ESPSomfy RTS App">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
|
||||
<link rel="stylesheet" href="main.css?v=2.4.4c" type="text/css" />
|
||||
<link rel="stylesheet" href="widgets.css?v=2.4.4c" type="text/css" />
|
||||
<link rel="stylesheet" href="icons.css?v=2.4.4c" type="text/css" />
|
||||
<link rel="stylesheet" href="main.css?v=2.4.5c" type="text/css" />
|
||||
<link rel="stylesheet" href="widgets.css?v=2.4.5c" type="text/css" />
|
||||
<link rel="stylesheet" href="icons.css?v=2.4.5c" type="text/css" />
|
||||
<link rel="icon" type="image/png" href="favicon.png" />
|
||||
|
||||
<!-- iPad retina icon -->
|
||||
|
|
@ -114,7 +114,7 @@
|
|||
rel="apple-touch-startup-image">
|
||||
|
||||
|
||||
<script type="text/javascript" src="index.js?v=2.4.4c"></script>
|
||||
<script type="text/javascript" src="index.js?v=2.4.5c"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="divContainer" class="container main" data-auth="false">
|
||||
|
|
@ -517,6 +517,10 @@
|
|||
<option value="11">Gate (left)</option>
|
||||
<option value="12">Gate (center)</option>
|
||||
<option value="13">Gate (right)</option>
|
||||
<option value="14">Gate (1-button left)</option>
|
||||
<option value="15">Gate (1-button center)</option>
|
||||
<option value="16">Gate (1-button right)</option>
|
||||
|
||||
</select>
|
||||
<label for="selShadeType">Type</label>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1270,7 +1270,7 @@ var security = new Security();
|
|||
|
||||
class General {
|
||||
initialized = false;
|
||||
appVersion = 'v2.4.4';
|
||||
appVersion = 'v2.4.5';
|
||||
reloadApp = false;
|
||||
init() {
|
||||
if (this.initialized) return;
|
||||
|
|
@ -1926,6 +1926,9 @@ class Somfy {
|
|||
{ type: 11, name: 'Gate (left)', ico: 'icss-lgate', lift: true, fcmd: true, fpos: true },
|
||||
{ type: 12, name: 'Gate (center)', ico: 'icss-cgate', lift: true, fcmd: true, fpos: true },
|
||||
{ type: 13, name: 'Gate (right)', ico: 'icss-rgate', lift: true, fcmd: true, fpos: true },
|
||||
{ type: 14, name: 'Gate (1-button left)', ico: 'icss-lgate', lift: true, fcmd: true, fpos: true },
|
||||
{ type: 15, name: 'Gate (1-button center)', ico: 'icss-cgate', lift: true, fcmd: true, fpos: true },
|
||||
{ type: 16, name: 'Gate (1-button right)', ico: 'icss-rgate', lift: true, fcmd: true, fpos: true },
|
||||
];
|
||||
init() {
|
||||
if (this.initialized) return;
|
||||
|
|
@ -3246,6 +3249,9 @@ class Somfy {
|
|||
if (obj.proto === 8 || obj.proto === 9) {
|
||||
switch (obj.shadeType) {
|
||||
case 5: // Garage 1-button
|
||||
case 14: // Gate left 1-button
|
||||
case 15: // Gate center 1-button
|
||||
case 16: // Gate right 1-button
|
||||
case 10: // Two button dry contact
|
||||
if (obj.proto !== 9 && obj.gpioUp === obj.gpioDown) {
|
||||
ui.errorMessage(document.getElementById('divSomfySettings'), 'For GPIO controlled motors the up and down GPIO selections must be unique.');
|
||||
|
|
@ -4140,6 +4146,9 @@ class Somfy {
|
|||
case 5:
|
||||
case 9:
|
||||
case 10:
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
return;
|
||||
}
|
||||
let tiltType = parseInt(shade.getAttribute('data-tilt'), 10) || 0;
|
||||
|
|
|
|||
|
|
@ -150,6 +150,9 @@
|
|||
.shadectl-buttons div.button-outline {
|
||||
display: inline-block;
|
||||
}
|
||||
.shadectl-buttons[data-shadetype="14"] > .cmd-button[data-cmd="sunflag"],
|
||||
.shadectl-buttons[data-shadetype="15"] > .cmd-button[data-cmd="sunflag"],
|
||||
.shadectl-buttons[data-shadetype="16"] > .cmd-button[data-cmd="sunflag"],
|
||||
.shadectl-buttons[data-shadetype="6"] > .cmd-button[data-cmd="sunflag"],
|
||||
.shadectl-buttons[data-shadetype="5"] > .cmd-button[data-cmd="sunflag"],
|
||||
.shadectl-buttons[data-shadetype="9"] > .cmd-button[data-cmd="sunflag"],
|
||||
|
|
@ -159,6 +162,15 @@
|
|||
.shadectl-buttons[data-shadetype="5"] > .button-outline[data-cmd="my"],
|
||||
.shadectl-buttons[data-shadetype="5"] > .button-outline[data-cmd="up"],
|
||||
.shadectl-buttons[data-shadetype="5"] > .button-outline[data-cmd="down"],
|
||||
.shadectl-buttons[data-shadetype="14"] > .button-outline[data-cmd="my"],
|
||||
.shadectl-buttons[data-shadetype="14"] > .button-outline[data-cmd="up"],
|
||||
.shadectl-buttons[data-shadetype="14"] > .button-outline[data-cmd="down"],
|
||||
.shadectl-buttons[data-shadetype="15"] > .button-outline[data-cmd="my"],
|
||||
.shadectl-buttons[data-shadetype="15"] > .button-outline[data-cmd="up"],
|
||||
.shadectl-buttons[data-shadetype="15"] > .button-outline[data-cmd="down"],
|
||||
.shadectl-buttons[data-shadetype="16"] > .button-outline[data-cmd="my"],
|
||||
.shadectl-buttons[data-shadetype="16"] > .button-outline[data-cmd="up"],
|
||||
.shadectl-buttons[data-shadetype="16"] > .button-outline[data-cmd="down"],
|
||||
.shadectl-buttons[data-shadetype="10"] > .button-outline[data-cmd="my"] {
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -174,10 +186,13 @@
|
|||
.shadectl-buttons[data-shadetype="10"] > .button-outline[data-cmd="down"] i {
|
||||
top:.3em;
|
||||
}
|
||||
.shadectl-buttons:not([data-shadetype="5"]):not([data-shadetype="9"]) > .button-outline[data-cmd="toggle"] {
|
||||
.shadectl-buttons:not([data-shadetype="5"]):not([data-shadetype="9"]):not([data-shadetype="14"]):not([data-shadetype="15"]):not([data-shadetype="16"]) > .button-outline[data-cmd="toggle"] {
|
||||
display: none;
|
||||
}
|
||||
.somfyShadeCtl[data-shadetype="5"] .shadectl-mypos,
|
||||
.somfyShadeCtl[data-shadetype="14"] .shadectl-mypos,
|
||||
.somfyShadeCtl[data-shadetype="15"] .shadectl-mypos,
|
||||
.somfyShadeCtl[data-shadetype="16"] .shadectl-mypos,
|
||||
.somfyShadeCtl[data-shadetype="9"] .shadectl-mypos,
|
||||
.somfyShadeCtl[data-tilt="3"] .shadectl-mypos .my-pos,
|
||||
.somfyShadeCtl:not([data-shadetype="1"]) .shadectl-mypos .my-pos-tilt,
|
||||
|
|
@ -239,12 +254,24 @@
|
|||
#somfyShade[data-proto="8"] #divGPIOMy,
|
||||
#somfyShade[data-bitlength="56"] #divStepSettings,
|
||||
#somfyShade[data-shadetype="5"] #divStepSettings,
|
||||
#somfyShade[data-shadetype="14"] #divStepSettings,
|
||||
#somfyShade[data-shadetype="15"] #divStepSettings,
|
||||
#somfyShade[data-shadetype="16"] #divStepSettings,
|
||||
#somfyShade[data-shadetype="6"] #divStepSettings {
|
||||
display: none;
|
||||
}
|
||||
#somfyShade[data-proto="9"][data-shadetype="5"] #divGPIOUp,
|
||||
#somfyShade[data-proto="9"][data-shadetype="5"] #divGPIOMy,
|
||||
#somfyShade[data-proto="8"][data-shadetype="5"] #divGPIOMy,
|
||||
#somfyShade[data-proto="9"][data-shadetype="14"] #divGPIOUp,
|
||||
#somfyShade[data-proto="9"][data-shadetype="14"] #divGPIOMy,
|
||||
#somfyShade[data-proto="8"][data-shadetype="14"] #divGPIOMy,
|
||||
#somfyShade[data-proto="9"][data-shadetype="15"] #divGPIOUp,
|
||||
#somfyShade[data-proto="9"][data-shadetype="15"] #divGPIOMy,
|
||||
#somfyShade[data-proto="8"][data-shadetype="15"] #divGPIOMy,
|
||||
#somfyShade[data-proto="9"][data-shadetype="16"] #divGPIOUp,
|
||||
#somfyShade[data-proto="9"][data-shadetype="16"] #divGPIOMy,
|
||||
#somfyShade[data-proto="8"][data-shadetype="16"] #divGPIOMy,
|
||||
#somfyShade[data-proto="9"][data-shadetype="9"] #divGPIOUp,
|
||||
#somfyShade[data-proto="9"][data-shadetype="9"] #divGPIOMy,
|
||||
#somfyShade[data-proto="8"][data-shadetype="9"] #divGPIOUp {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue