Added shutter motor type and extended frequency range #77

This commit is contained in:
Robert Strouse 2023-06-25 08:48:36 -07:00
parent 415fec020e
commit e54621f171
10 changed files with 90 additions and 19 deletions

View file

@ -576,6 +576,37 @@ i.icss-window-shade {
background-size: 0.05em 0.05em;
background-color: rgba(71, 212, 255, 0);
}
i.icss-shutter {
width: 1.1em;
height: .75em;
background-color: transparent;
border: .05em solid transparent;
border-width: 0 .1em;
box-shadow: inset 0 0 0 0.01em, inset 0 0.01em 0px 0.04em;
margin: .2em 0 0;
}
i.icss-shutter:before {
width: 1.1em;
height: .2em;
border-bottom: .05em solid transparent;
box-shadow: inset 0 1em, 0 0em 0 -.1em;
top: -.1em;
left: -.09em;
}
i.icss-shutter:after {
width: calc(100% - .05em);
height: var(--shade-position, 0%);
left: 0.025em;
top: 0.025em;
border-bottom: solid 0.025em gray;
background-image: repeating-linear-gradient(var(--shade-color, currentColor) 0% 50%, rgba(71, 212, 255, 0) 0% 75%);
background-position: 0 0, 100% 100%;
background-size: 0.05em 0.05em;
background-color: rgba(71, 212, 255, 0);
}
i.icss-window-blind {
width: 1.1em;
height: .75em;

View file

@ -3,10 +3,10 @@
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8">
<link rel="stylesheet" href="main.css?v=1.7.2" type="text/css" />
<link rel="stylesheet" href="icons.css?v=1.7.2" type="text/css" />
<link rel="stylesheet" href="main.css?v=1.7.3" type="text/css" />
<link rel="stylesheet" href="icons.css?v=1.7.3" type="text/css" />
<link rel="icon" type="image/png" href="favicon.png" />
<script type="text/javascript" src="index.js?v=1.7.2"></script>
<script type="text/javascript" src="index.js?v=1.7.3"></script>
</head>
<body>
<div id="divContainer" class="container" style="user-select:none;position:relative;border-radius:27px;">
@ -238,6 +238,7 @@
<div class="field-group" style="margin-top:-10px;">
<select id="selShadeType" name="shadeType" style="width:100%;" onchange="somfy.onShadeTypeChanged(this);">
<option value="0">Roller Shade</option>
<option value="4">Shutter</option>
<option value="1">Blind</option>
<option value="2">Drapery</option>
<option value="3">Awning</option>
@ -389,7 +390,7 @@
</div>
<div class="field-group" style="display:inline-block;width:auto;min-width:247px;margin-top:-20px;vertical-align:top;">
<div class="field-group">
<input id="slidFrequency" name="frequency" type="range" min="433330" max="433499" step="1" style="width:100%;" oninput="somfy.frequencyChanged(this);" />
<input id="slidFrequency" name="frequency" type="range" min="433330" max="434399" step="1" style="width:100%;" oninput="somfy.frequencyChanged(this);" />
<label for="slidRxBandwidth" style="display:block;font-size:1em;margin-top:0px;margin-left:7px;">
<span>Base Frequency </span>
<span style="float:right;display:inline-block;margin-right:7px;">

View file

@ -378,7 +378,7 @@ async function reopenSocket() {
await initSockets();
}
class General {
appVersion = 'v1.7.2';
appVersion = 'v1.7.3';
reloadApp = false;
async init() {
this.setAppVersion();
@ -1069,6 +1069,9 @@ class Somfy {
case 3:
divCtl += ' icss-awning';
break;
case 4:
divCtl += ' icss-shutter';
break;
default:
divCtl += ' icss-window-shade';
break;
@ -1434,19 +1437,29 @@ class Somfy {
document.getElementById('divTiltSettings').style.display = '';
if (ico.classList.contains('icss-window-shade')) ico.classList.remove('icss-window-shade');
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-window-blind')) ico.classList.add('icss-window-blind');
break;
case 3:
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-blind')) ico.classList.remove('icss-window-blind');
if (ico.classList.contains('icss-shutter')) ico.classList.remove('icss-shutter');
if (!ico.classList.contains('icss-awning')) ico.classList.add('icss-awning');
break;
case 4:
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-blind')) ico.classList.remove('icss-window-blind');
if (ico.classList.contains('icss-awning')) ico.classList.remove('icss-awning');
if (!ico.classList.contains('icss-shutter')) ico.classList.add('icss-shutter');
break;
default:
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-window-shade')) ico.classList.add('icss-window-shade');
if (ico.classList.contains('icss-shutter')) ico.classList.remove('icss-shutter');
document.getElementById('divTiltSettings').style.display = 'none';
tilt = false;
break;
@ -1534,6 +1547,10 @@ class Somfy {
ico.classList.remove('icss-window-shade');
ico.classList.add('icss-awning');
break;
case 4:
ico.classList.remove('icss-window-shade');
ico.classList.add('icss-shutter');
break;
}
let tilt = ico.parentElement.querySelector('i.icss-window-tilt');
tilt.style.display = shade.tiltType !== 0 ? '' : 'none';

View file

@ -509,7 +509,7 @@ div.waitoverlay > .lds-roller {
}
.shade-name {
text-align:left;
width: 170px;
width: 100%;
padding-left: 2px;
padding-right: 2px;
display: inline-block;