Skip to content

Commit

Permalink
Merge pull request #643 from visualapproach/development_v4
Browse files Browse the repository at this point in the history
Development v4
  • Loading branch information
visualapproach authored Oct 16, 2023
2 parents 1975b32 + f0aac5a commit 4a764f1
Show file tree
Hide file tree
Showing 48 changed files with 1,031 additions and 1,648 deletions.
94 changes: 1 addition & 93 deletions Code/data/chkupdatefw.html
Original file line number Diff line number Diff line change
@@ -1,93 +1 @@
<!DOCTYPE html>
<html>
<head>
<title>Lay-Z-Spa Module | Check firmware update!</title>
<meta charset="utf-8">
<link rel="icon" type="image/png" sizes="48x48" href="favicon.png">
<link rel="manifest" href="manifest.json">
<link rel="stylesheet" href="main.css">
<meta name="theme-color" content="#0066BF">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
<script src="function.js" type="text/javascript"></script>
</head>

<body>
<div id="site">
<header>
<span>Firmware</span>
<a href="javascript:void(0);" class="topnavicon" onclick="topNav()"></a>
</header>

<div class="topnav" id="topnav">
<a href="./">Home</a>
<a href="hwconfig.html">Hardware Config</a>
<a href="config.html">SPA Config</a>
<a href="webconfig.html">Web Config</a>
<a href="wifi.html">Network Config</a>
<a href="mqtt.html">MQTT Config</a>
<a href="/dir/">Directory</a>
<a href="upload.html">File Uploader</a>
<a href="remove.html">File Remover</a>
<!--<a href="/restart/" class="bgred">Restart ESP</a>
<a href="javascript:void(0);" class="bgred" onclick="reboot()">Restart ESP</a>-->
</div>

<section>
<p>Only update if:<br>
You have a NodeMCU12E<br>
You are at the spa so you can fix it if something goes wrong<br>
Communication with the pump will pause, so 4-wire pumps will throw an error and needs to be restarted.<br>
</p>
Do not power off or reset the ESP until finished! It will take a few minutes!
Files will always be downloaded. FW only if different.
</section>
<!-- <section>
<input type="radio" id="master" name="branch" checked="checked">
<label for="master">Master (stable)</label><br>
<input type="radio" id="dev" name="branch">
<label for="dev">Beta (development)</label><br>
</section> -->
<section>
<p id="current">Loading...</p>
<p id="stable">Loading...</p>
<p id="beta">Loading...</p>
</section>

<footer>
<p class="center"><a class="button" href="/">Home</a></p><br>
<p class="center"><a class="button_red" href="/update/" onclick="buttonConfirm(this, 'Wait until main page is loaded!', 150)">MASTER: Update data files, then firmware</a></p>
<p class="center"><a class="button_red" href="/update_beta/" onclick="buttonConfirm(this, 'Wait until main page is loaded!', 150)">BETA: Update data files, then firmware</a></p>
</footer>
</div>
<script>
document.addEventListener("load", loadversions());
function loadversions()
{
var req = new XMLHttpRequest();
req.open('POST', '/getversions/');
req.send();
req.onreadystatechange = function()
{
if (this.readyState == 4 && this.status == 200)
{
var json = JSON.parse(req.responseText);
console.log(json);
document.getElementById('current').innerHTML = "Current: " + json.current;
document.getElementById('stable').innerHTML = "Master: " + json.available; //name-orgy I know...
document.getElementById('beta').innerHTML = "Beta: " + json.beta;
}
}
}

// function update()
// {
// var req = new XMLHttpRequest();
// if(document.getElementById('master').checked)
// req.open('POST', '/update/');
// else
// req.open('POST', '/update_beta/');
// req.send();
// }
</script>
</body>
</html>
This feature is removed. It was too demanding for the ESP8266 and I couldn't get github to send smaller chunks that the ESP8266 could handle. Sad, because it worked earlier, but I think something changed on the github side.
18 changes: 15 additions & 3 deletions Code/data/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,24 @@ <h2>Totals:</h2>
<script>
// loading functions from a .js (in the <head> section)
// and calling the function here can cause problems on laggy connections
// hence this code
document.onreadystatechange = function ()
{
if (document.readyState == "complete")
{
initApplication();
}
}

if (localStorage.getItem('showSectionTemperature'))
function initApplication()
{
setWebConfig();
if (localStorage.getItem('showSectionTemperature'))
{
setWebConfig();
}
loadWebConfig();
connect();
}
loadWebConfig();

function setWebConfig()
{
Expand Down
2 changes: 1 addition & 1 deletion Code/data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ updateAmbState = false;
updateBrtState = false;

// initial connect to the web socket
connect();
// connect();

function connect()
{
Expand Down
1 change: 1 addition & 0 deletions Code/data/weekender
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"LEN":11,"CMD":[16,0,4,3,4,3,4,3,4,3,0],"VALUE":[1,30,0,1,0,1,0,1,0,1,38],"XTIME":[1693087200,1693180800,1693195200,1693256400,1693281600,1693342800,1693368000,1693429200,1693454400,1693515600,1693515660],"INTERVAL":[86400,604800,604800,604800,604800,604800,604800,604800,604800,604800,604800],"TXT":["","","","","","","","","","",""]}
Binary file removed Code/datazip/calib.html.gz
Binary file not shown.
Binary file removed Code/datazip/chkupdatefw.html.gz
Binary file not shown.
Binary file removed Code/datazip/config.html.gz
Binary file not shown.
Binary file removed Code/datazip/favicon.ico.gz
Binary file not shown.
Binary file removed Code/datazip/favicon.png
Binary file not shown.
24 changes: 0 additions & 24 deletions Code/datazip/filelist.txt

This file was deleted.

Binary file removed Code/datazip/function.js.gz
Binary file not shown.
144 changes: 0 additions & 144 deletions Code/datazip/furelise.mel

This file was deleted.

Binary file removed Code/datazip/hwconfig.html.gz
Binary file not shown.
Binary file removed Code/datazip/hwtest1.jpg
Binary file not shown.
Binary file removed Code/datazip/hwtest2.jpg
Binary file not shown.
Binary file removed Code/datazip/hwtestinfo.html.gz
Binary file not shown.
Binary file removed Code/datazip/index.html.gz
Binary file not shown.
Binary file removed Code/datazip/index.js.gz
Binary file not shown.
Binary file removed Code/datazip/main.css.gz
Binary file not shown.
11 changes: 0 additions & 11 deletions Code/datazip/manifest.json

This file was deleted.

Binary file removed Code/datazip/menu.png
Binary file not shown.
Binary file removed Code/datazip/mqtt.html.gz
Binary file not shown.
Loading

0 comments on commit 4a764f1

Please sign in to comment.