mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 11:02:12 +01:00
Add support for RTW protocols #38
This commit is contained in:
parent
ac6d6ee34d
commit
65e4caf3b2
10 changed files with 106 additions and 34 deletions
|
|
@ -1 +1 @@
|
|||
1.5.4
|
||||
1.6.0
|
||||
|
|
@ -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.5.4" type="text/css" />
|
||||
<link rel="stylesheet" href="icons.css?v=1.5.4" type="text/css" />
|
||||
<link rel="stylesheet" href="main.css?v=1.6.0b" type="text/css" />
|
||||
<link rel="stylesheet" href="icons.css?v=1.6.0b" type="text/css" />
|
||||
<link rel="icon" type="image/png" href="favicon.png" />
|
||||
<script type="text/javascript" src="index.js?v=1.5.4"></script>
|
||||
<script type="text/javascript" src="index.js?v=1.6.0b"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="divContainer" class="container" style="user-select:none;position:relative;border-radius:27px;">
|
||||
|
|
@ -219,8 +219,15 @@
|
|||
<div>
|
||||
<div class="field-group" style="width:127px;display:inline-block;margin-top:-20px;float:left;">
|
||||
<div class="field-group">
|
||||
<div class="field-group">
|
||||
<select id="selShadeBitLength" name="bitLength" style="width:100%;" onchange="somfy.onShadeBitLengthChanged(this);">
|
||||
<div class="field-group" style="margin-top:-10px;">
|
||||
<select id="selShadeProto" name="proto" style="width:50%;">
|
||||
<option value="0">RTS</option>
|
||||
<option value="1">RTW</option>
|
||||
</select>
|
||||
<label for="selShadeBitLength">Protocol</label>
|
||||
</div>
|
||||
<div class="field-group" style="margin-top:-10px;">
|
||||
<select id="selShadeBitLength" name="bitLength" style="width:50%;" onchange="somfy.onShadeBitLengthChanged(this);">
|
||||
<option value="56">56-BIT</option>
|
||||
<option value="80">80-BIT</option>
|
||||
</select>
|
||||
|
|
@ -318,7 +325,14 @@
|
|||
<div id="somfyTransceiver" style="display:none;position:relative;">
|
||||
<form>
|
||||
<div id="divRadioSettings" name="divRadioSettings" class="field-group1" style="display:block;position:relative">
|
||||
<div class="field-group" style="">
|
||||
<div class="field-group" style="display:inline-block;margin-right:7px;">
|
||||
<label for="selRadioProto">Protocol</label>
|
||||
<select id="selRadioProto" name="radioType" style="width:77px;">
|
||||
<option value="0">RTS</option>
|
||||
<option value="1">RTW</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="field-group" style="display:inline-block;">
|
||||
<label for="selRadioType">Radio</label>
|
||||
<select id="selRadioType" name="radioType" style="width:77px;">
|
||||
<option value="none" selected>None</option>
|
||||
|
|
|
|||
|
|
@ -378,7 +378,7 @@ async function reopenSocket() {
|
|||
await initSockets();
|
||||
}
|
||||
class General {
|
||||
appVersion = 'v1.5.4';
|
||||
appVersion = 'v1.6.0beta';
|
||||
reloadApp = false;
|
||||
async init() {
|
||||
this.setAppVersion();
|
||||
|
|
@ -924,6 +924,7 @@ class Somfy {
|
|||
document.getElementById('selTransTXPin').value = somfy.transceiver.config.TXPin.toString();
|
||||
document.getElementById('selTransRXPin').value = somfy.transceiver.config.RXPin.toString();
|
||||
document.getElementById('selRadioType').value = somfy.transceiver.config.type;
|
||||
document.getElementById('selRadioProto').value = somfy.transceiver.config.proto;
|
||||
document.getElementById('spanMaxShades').innerText = somfy.maxShades;
|
||||
document.getElementById('spanRxBandwidth').innerText = (Math.round(somfy.transceiver.config.rxBandwidth * 100) / 100).fmt('#,##0.00');
|
||||
document.getElementById('slidRxBandwidth').value = Math.round(somfy.transceiver.config.rxBandwidth * 100);
|
||||
|
|
@ -961,6 +962,7 @@ class Somfy {
|
|||
let obj = {
|
||||
enabled: document.getElementsByName('enableRadio')[0].checked,
|
||||
type: parseInt(document.getElementById('selRadioType').value, 10),
|
||||
proto: parseInt(document.getElementById('selRadioProto').value, 10),
|
||||
SCKPin: getIntValue('selTransSCKPin'),
|
||||
CSNPin: getIntValue('selTransCSNPin'),
|
||||
MOSIPin: getIntValue('selTransMOSIPin'),
|
||||
|
|
@ -1446,6 +1448,7 @@ class Somfy {
|
|||
document.getElementById('divLinkedRemoteList').innerHTML = '';
|
||||
document.getElementById('btnSetRollingCode').style.display = 'none';
|
||||
document.getElementById('selShadeBitLength').value = shade.bitLength || 56;
|
||||
document.getElementById('selShadeProto').value = shade.proto || 0;
|
||||
document.getElementById('slidStepSize').value = shade.stepSize || 100;
|
||||
document.getElementById('spanStepSize').innerHTML = shade.stepSize.fmt('#,##0');
|
||||
}
|
||||
|
|
@ -1472,6 +1475,7 @@ class Somfy {
|
|||
document.getElementById('btnLinkRemote').style.display = '';
|
||||
document.getElementById('selShadeType').value = shade.shadeType;
|
||||
document.getElementById('selShadeBitLength').value = shade.bitLength;
|
||||
document.getElementById('selShadeProto').value = shade.proto;
|
||||
document.getElementsByName('shadeAddress')[0].value = shade.remoteAddress;
|
||||
document.getElementsByName('shadeName')[0].value = shade.name;
|
||||
document.getElementsByName('shadeUpTime')[0].value = shade.upTime;
|
||||
|
|
@ -1532,6 +1536,7 @@ class Somfy {
|
|||
shadeType: parseInt(document.getElementById('selShadeType').value, 10),
|
||||
tiltTime: parseInt(document.getElementById('fldTiltTime').value, 10),
|
||||
bitLength: parseInt(document.getElementById('selShadeBitLength').value, 10) || 56,
|
||||
proto: parseInt(document.getElementById('selShadeProto').value, 10) || 0,
|
||||
stepSize: parseInt(document.getElementById('slidStepSize').value, 10) || 100
|
||||
};
|
||||
if (obj.shadeType === 1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue