Skip to content

Commit f16f94d

Browse files
lbussythorrak
andauthored
Feature Release 1.3.0 (#202)
* Remove kegscreen service advertisement * Fix mDNS keys * Fix for #146 * Use proper div * Add scanNetworks() to reconnect * Go back to platform package 1.0.6 * Stub this in for later * Explicit python decl * Add post process to zip data files * Add .gz handler * Update uptime refresh * Update proper version.json * Update Copyright date * Change partition setup * Fix active links * Fix fan control enabled assignment * Fix button delay/spin * Fix for #152 * Fix for #149 * Fix for #150 * Restructure reconnect * Restart serial and telnet * Restart mDNS * Restart Web Server * Reset main loop and filesystem * Add playDead() for failures * Cleanup * Cleanup logging * Updated Async * Add some delays to allow Serial to start * Lockout * Change logging to use ArduinoLog * Separate stop and start * Fix prefixes * CONFIZG_ASYNC in lib * Loop logic * Set autoconnect off * Initial conversion to MyST * Update Bootswatch * Stub in hourly reboots * Dis/reconnect on iter * Reverse temperature menu order * Reboot every 1 hour to avoid panic * Logging cleanup * Clean filesystem defines * Change to 2 hour reboot * Standardize logic * Fix for #165 * Tag new alpha * Close FS after use * Rearrange menu * Use single open/close * Add delay to see startup Serial * Add drd back in * Fix John's 'feature' * Refactor return * Move theme to info * Add file list endpoint * Get rid of some harmless 404 erors * Reset to 42 day reboot * No longer need _delay() * Add new file handler * Fixed asynch error * Add notice about 404 * Update LCBUrl to HEAD * Reverse order of debug * Reconnect on connecton loss * Remove debug * Change execution order * Rearranged to allow flow load * Add realm to authentication * Stylize file buttons * Stylize filesystem info * Add link to /fs/ * Style other buttons * Change type * Exclude delete/download buttons * Style/cancel upload * Toggle sections * Fix concatenation * Fix file upload * Add default TIO labels * Fix label default * Limit debug printing when file is missing * Fix download/delete * Replace missing file * Nail down LCBUrl version * Current versions of libs * Replace appconfig keys * Additional FS cleanup - stopping point * Restyle file list * Disable/enable buttons * Timeout messages * Add confirm * Disable uploads * Restore file upload (#182) * Rearrange events * Create new file upload * Add secret to fs actions * Add filename to prompt * Toggle both elements * Document fs (#183) * Document fs page * Self-document fs API * Fix file status display * Update image * Add fs api documentation * Queue saves (#184) * 404 retry (#185) * Use updated ArduinoJson * Add a better 404 handler * Littlefs (#186) * Avoid non-reentrant code (#187) * Fix viewport (#188) * Logging (#189) * Rearrange fatal error * Reset log priorities * Backup config (#190) * Add failure detect to app load * Add copy file function * Handle LittleFS or SPIFFS * Use arguments for JSON load/save functions * Create backup after good file save * Attempt config reload * Add config for debug settings * Add handler for debug settings * Add loglevel to serial init * Change URL Target to Generic Rest (#191) * Add Telnet and Loglevel Config (#192) * Add debug to models * Add config for debug settings * Add handler for debug settings * Add loglevel to serial init * Update telnet lib * Set telnet on app load * Add telnet to web handler * Add loglevel to web handler * Add debug config handler to web pages * Add telnet and loglevel info * Fix docs requirements * Fix settings debug (#193) * Restore saving theme * Wrap debug settings in form * Move telnet changes out of async * Fs errors (#194) * Use explicit paths * Compress PNG too * Reorder page handlers * Fix routes * Turn off core debug * Home asst (#199) * Switch MQTT Libs (#198) * Set up to use generic push * Protect Includes & Defines (#197) * New RPints push * Address templating and push logic * Get rid of 24hr timer * Fix RPints template * Fix pulse reports * Fix hostname, user, pass * Add HA config to settings * Add Home Assist settings to pages * Add Mosquitto setup steps to troubleshooting * Update documentation for HA context * Handle HA config post * Change field to password * Initial device discovery * Overloads for state and discovery * Allow single tics in templates for clarity * Add non-blocking delay * Queue HASS functions * Queue HASS at proper times * Update MQTT documentation * Use initial and ongoing timer for HASS * Externalize tickers * Base HASS timer to 5 mins * Add single point re-broadcast * MQTT update for only selected sensor * MQTT update for unavailable too * Make change on tap post * Reset control state on sensor unavail * Kill DRD when we pop portal * Disable CP when sensor is disabled * Config kick detect (#200) * Add kickdetect to model * Add kickdetect to web settings * Add kickdetect to settings * Add kickdetect to API * Allow skipping kickdetect * Change verbiage * Fix context link in temp page * Templink (#201) * Allow a reconect * Fix temp page control link --------- Co-authored-by: John <jbeeler@optictheory.com>
1 parent 18b27a2 commit f16f94d

File tree

172 files changed

+8059
-3520
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+8059
-3520
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
*.code-workspace
77
*.log
88
rpints-arduino/
9-
/firmware
9+
/firmware/
10+
/data/
1011

1112
# Documentation working files
1213
docs/_build/

LICENSE.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
The MIT License (MIT)
2+
=====================
3+
4+
Copyright © 2019-2023 Lee Bussy
5+
6+
Permission is hereby granted, free of charge, to any person
7+
obtaining a copy of this software and associated documentation
8+
files (the “Software”), to deal in the Software without
9+
restriction, including without limitation the rights to use,
10+
copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
copies of the Software, and to permit persons to whom the
12+
Software is furnished to do so, subject to the following
13+
conditions:
14+
15+
The above copyright notice and this permission notice shall be
16+
included in all copies or substantial portions of the Software.
17+
18+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
19+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
20+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25+
OTHER DEALINGS IN THE SOFTWARE.

TODO.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# TODO
2+
3+
- [ ] Enter keg contents by weight

data/.exclude.files

Lines changed: 0 additions & 6 deletions
This file was deleted.

data/version.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

data/404.htm renamed to data_source/404.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ <h4 >404 - Page Not Found</h4>
9393

9494
<footer class="footer mt-auto py-3 bg-light">
9595
<div class="container text-center">
96-
<span class="text-muted">Copyright &copy; 2019-2022, Lee C. Bussy</span>
96+
<span class="text-muted">Copyright &copy; 2019-2023, Lee C. Bussy</span>
9797
</div>
9898
</footer>
9999

File renamed without changes.

data/about.htm renamed to data_source/about.htm

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,27 @@
1313

1414
<link rel="canonical" href="https://www.kegcop.com">
1515

16-
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
17-
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
18-
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
19-
<link rel="manifest" href="site.webmanifest">
20-
<link rel="mask-icon" href="safari-pinned-tab.svg" color="#5bbad5">
16+
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
17+
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
18+
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
19+
<link rel="manifest" href="/site.webmanifest">
20+
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
2121
<meta name="msapplication-TileColor" content="#da532c">
2222
<meta id="theme_color" name="theme-color" content="#ffffff">
2323

2424
<link id="theme" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootswatch@5/dist/cerulean/bootstrap.min.css">
25-
<link id="theme_aux" rel="stylesheet" href="cerulean_aux.css">
26-
<link rel="stylesheet" href="kegcop.css">
25+
<link id="theme_aux" rel="stylesheet" href="/cerulean_aux.css">
26+
<link rel="stylesheet" href="/kegcop.css">
2727
<script src="https://kit.fontawesome.com/e51821420e.js" crossorigin="anonymous"></script>
28-
<script src="kegcop_pre.js"></script>
28+
<script src="/kegcop_pre.js"></script>
2929
</head>
3030

3131
<body class="d-flex flex-column h-100">
3232

3333
<header>
3434
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
3535
<a class="navbar-brand" href="/index/">
36-
<img src="mstile-150x150.png" style="width:25px;height:25px;">
36+
<img src="/mstile-150x150.png" style="width:25px;height:25px;">
3737
&nbsp;Keg Cop
3838
</a>
3939
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor01"
@@ -54,8 +54,8 @@
5454
<li class="nav-item">
5555
<a class="nav-link" href="/help/">Help</a>
5656
</li>
57-
<li class="nav-item active">
58-
<a class="nav-link" href="/about/">About <span class="visually-hidden">(current)</span></a>
57+
<li class="nav-item">
58+
<a class="nav-link active" href="/about/">About <span class="visually-hidden">(current)</span></a>
5959
</li>
6060
</ul>
6161
<ul class="navbar-nav ms-auto">
@@ -76,11 +76,11 @@
7676

7777
<div class="loader" id="loader"></div> <!-- Load Page Load Spinner Container -->
7878

79-
<div class="container" id="settingsapp"> <!-- Container -->
79+
<div class="container" id="aboutapp"> <!-- Container -->
8080

8181
<div class="card border-dark mb-3">
82-
<!-- About Keg Cop Information -->
83-
<div class="card-header d-flex">
82+
83+
<div class="card-header d-flex"> <!-- About Keg Cop Information -->
8484
<ul class="navbar me-auto">
8585
<h4 >
8686
About Keg Cop:
@@ -127,6 +127,7 @@ <h4 >
127127
</tr>
128128
</tbody>
129129
</table>
130+
<p>Access <a href="/fs/">filesystem information</a>.</p>
130131
</div>
131132
</div> <!-- About Keg Cop Information -->
132133

@@ -136,7 +137,7 @@ <h4 >
136137

137138
<footer class="footer mt-auto py-3 bg-light">
138139
<div class="container text-center">
139-
<span class="text-muted">Copyright &copy; 2019-2022, Lee C. Bussy</span>
140+
<span class="text-muted">Copyright &copy; 2019-2023, Lee C. Bussy</span>
140141
</div>
141142
</footer>
142143

@@ -150,8 +151,8 @@ <h4 >
150151
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous">
151152
</script>
152153

153-
<script src="kegcop_post.js"></script>
154-
<script src="about.js"></script>
154+
<script src="/kegcop_post.js"></script>
155+
<script src="/about.js"></script>
155156

156157
</body>
157158

data/about.js renamed to data_source/about.js

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ toggleLoader("off");
66
var numReq = 4 + numReqPre;
77
var loaded = 0;
88
// Page Variables
9-
var aboutReloadTimer = 60000;
9+
var aboutReloadTimer = 10000;
1010
// Semaphores
1111
var loadUptimeRunning = false;
1212
var loadHeapRunning = false;
@@ -124,7 +124,7 @@ function loadUptime(callback = null) { // Get uptime information
124124
setTimeout(loadUptime, 10000);
125125
})
126126
.always(function () {
127-
loadUptimerunning = false;
127+
loadUptimeRunning = false;
128128
if (typeof callback == "function") {
129129
callback();
130130
}
@@ -222,24 +222,28 @@ function loadResetReason(callback = null) { // Get last reset reason
222222

223223
function uptimeReload() {
224224
loadUptime(function callFunction() {
225-
setTimeout(uptimeReload, aboutReloadTimer);
225+
setTimeout(uptimeReload, aboutReloadTimer + getRandomInt(3));
226226
});
227227
}
228228

229229
function heapReload() {
230230
loadHeap(function callFunction() {
231-
setTimeout(heapReload, aboutReloadTimer);
231+
setTimeout(heapReload, aboutReloadTimer + getRandomInt(3));
232232
});
233233
}
234234

235235
function reasonReload() {
236236
loadResetReason(function callFunction() {
237-
setTimeout(reasonReload, aboutReloadTimer);
237+
setTimeout(reasonReload, aboutReloadTimer + getRandomInt(3));
238238
});
239239
}
240240

241241
function finishPage() { // Display page
242-
setTimeout(heapReload, aboutReloadTimer);
243-
setTimeout(uptimeReload, aboutReloadTimer);
244-
setTimeout(reasonReload, aboutReloadTimer);
242+
setTimeout(heapReload, aboutReloadTimer + getRandomInt(3));
243+
setTimeout(uptimeReload, aboutReloadTimer + getRandomInt(3));
244+
setTimeout(reasonReload, aboutReloadTimer + getRandomInt(3));
245+
}
246+
247+
function getRandomInt(max) {
248+
return Math.floor(Math.random() * max);
245249
}

0 commit comments

Comments
 (0)