mirror of
https://github.com/lumapu/ahoy.git
synced 2025-08-06 01:48:19 +02:00
improved stability
improved wifi initial connection - especially if station wifi is not available #509 removed new operators from web.h (reduce dynamic allocation) improved sun calculation #515, #505 fixed wifi auto reconnect #509 added disable night communication flag to MQTT #505 changed MQTT publish of `available` and `available_text` to sunset #468
This commit is contained in:
parent
5977bbaee6
commit
07bf947ff7
14 changed files with 324 additions and 262 deletions
|
@ -103,18 +103,21 @@
|
|||
}
|
||||
|
||||
function parseIndex(obj) {
|
||||
var h = div(["head", "p-2"]);
|
||||
var r = div(["row"]);
|
||||
r.appendChild(div(["col", "a-c"], "Sun"));
|
||||
h.appendChild(r);
|
||||
if(obj["ts_sunrise"] > 0) {
|
||||
var h = div(["head", "p-2"]);
|
||||
var r = div(["row"]);
|
||||
r.appendChild(div(["col", "a-c"], "Sun"));
|
||||
h.appendChild(r);
|
||||
|
||||
document.getElementById("sun").append (
|
||||
h,
|
||||
genTabRow("Sunrise", new Date(obj["ts_sunrise"] * 1000).toLocaleString('de-DE')),
|
||||
genTabRow("Sunset", new Date(obj["ts_sunset"] * 1000).toLocaleString('de-DE')),
|
||||
genTabRow("Communication start", new Date((obj["ts_sunrise"] - obj["ts_offset"]) * 1000).toLocaleString('de-DE')),
|
||||
genTabRow("Communication stop", new Date((obj["ts_sunset"] + obj["ts_offset"]) * 1000).toLocaleString('de-DE'))
|
||||
);
|
||||
document.getElementById("sun").append (
|
||||
h,
|
||||
genTabRow("Sunrise", new Date(obj["ts_sunrise"] * 1000).toLocaleString('de-DE')),
|
||||
genTabRow("Sunset", new Date(obj["ts_sunset"] * 1000).toLocaleString('de-DE')),
|
||||
genTabRow("Communication start", new Date((obj["ts_sunrise"] - obj["ts_offset"]) * 1000).toLocaleString('de-DE')),
|
||||
genTabRow("Communication stop", new Date((obj["ts_sunset"] + obj["ts_offset"]) * 1000).toLocaleString('de-DE')),
|
||||
genTabRow("Night Communication", ((obj["disNightComm"]) ? "disabled" : "enabled"))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function parse(obj) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue