Commit Graph

4029 Commits

Author SHA1 Message Date
Maxim Prokhorov
24ebcb8430 sch: fix schedule discarded early w/ sun support 2024-08-22 23:40:31 +03:00
Maxim Prokhorov
868d4886ed sys: durations & parsing in the same namespace
not part of settings directly, move them some place else
types compilation unit grows, though...
2024-08-22 23:40:31 +03:00
Maxim Prokhorov
a439e023ef dt: export offset getter 2024-08-21 03:49:05 +03:00
Maxim Prokhorov
f82cd2211e sch: restore offset for closest, not earliest match in a day
ffs -> clz minus int size, otherwise multiple match order is broken
experiment with future masking, using ffs correctly this time
update tests to handle all branches of closest_delta, both future and past
2024-08-15 14:49:17 +03:00
Maxim Prokhorov
71493cc9cb webui: heartbeat select[multiple] with everything in view
explicit size aka number of rows
2024-08-14 13:42:09 +03:00
Maxim Prokhorov
4c005fa9a5 webui: fix password reveal pushed to the next line
narrow screens style rule makes input & span `display: block`
revert to `inline-block`, assume parent node properly separates stuff
2024-08-13 20:59:11 +03:00
Maxim Prokhorov
5334739469 webui: key->value element setters with node root
allow to init limited set of elements, not whole document
update tests for 08f521dc35
2024-08-13 17:53:26 +03:00
Maxim Prokhorov
08f521dc35 webui: ignore group inputs when using generic setters
input[name=foo] means input[name=foo#] in groups, never name as-is
resolve #2615
2024-08-11 13:58:10 +03:00
Maxim Prokhorov
6bfed33469 webui: some margin between checkboxes and info messages 2024-08-10 11:40:20 +03:00
Maxim Prokhorov
0c52a808cc sns: safeguard against size zero
probably would not happen b/c of config restrains, but...
2024-08-10 00:28:24 +03:00
Maxim Prokhorov
5f500ffb1c webui: apply pure-menu-selected style after menu item click
- distinguish heading and selected menu item, apply menu item
  background color after panel item is selected
  for now, both heading and :first-child use a different color
- add x3 transition time to stall animation from hover & focus
  otherwise, background colors may linger between clicks
2024-08-09 22:03:00 +03:00
Maxim Prokhorov
bd1f734494 sch: unused code 2024-08-09 15:03:59 +03:00
Maxim Prokhorov
47221ecd49 webui: rebuild blobs 2024-08-09 14:54:19 +03:00
Maxim Prokhorov
1041bcb26e webui: correctly send NaN and compress numeric strings
convert NaN into "nan" string for remote, since JSON does not have NaN type
always -2bytes from quotes surrounding the numeric value
2024-08-09 14:53:24 +03:00
Maxim Prokhorov
29787143bf webui: expected emon app keys leaking into settings
disable on-change listener for webui-only inputs
also assuming input[readonly]s never needs to be commited
2024-08-09 14:25:19 +03:00
Maxim Prokhorov
c4c31fc5f0 sns: numeric settings are using fixed ids
Fixing inconsistent handling of group and non-group settings after rewrite.
Assuming most of the time template would be for group, manually reset
dataset field controlling automatic key${id} generation
2024-08-09 13:46:04 +03:00
Maxim Prokhorov
018db60fbc sns: zero threshold check does not trigger report 2024-08-09 13:45:02 +03:00
Maxim Prokhorov
fc8ef5a298 sns: min & max threshold, revert zero threshold changes
- same as min & max delta, check the value itself before reporting
- refactor more of the report func, revert zero threshold to force the
  value to be zero. move condition check to the top, causing every other
  filter to check against zero.
- force zero threshold to be >= 0 in ui
2024-08-09 12:47:31 +03:00
Maxim Prokhorov
404a0ea17d webui: rebuild blobs 2024-08-09 12:47:31 +03:00
Maxim Prokhorov
68892a0066 all: remove extra whitespace 2024-08-09 12:47:31 +03:00
Maxim Prokhorov
658286f7b7 sns: no brackets for read and report values info 2024-08-09 12:46:10 +03:00
Maxim Prokhorov
66842bd3e7 sns: fix struct init
gcc4.8 is uncertain whether it is a double or a struct
2024-08-09 12:46:10 +03:00
Maxim Prokhorov
2d3bba9e01 utils: more duration types and shorter uptime string 2024-08-09 12:46:10 +03:00
Maxim Prokhorov
9acc95e952 sns: update tests 2024-08-09 12:46:10 +03:00
Maxim Prokhorov
5ad894b915 tspk: naming, required fields 2024-08-09 12:46:10 +03:00
Maxim Prokhorov
ba067f726e rules: inline units 2024-08-09 12:46:10 +03:00
Maxim Prokhorov
80d5007cea mqtt: config required fields 2024-08-09 12:46:10 +03:00
Maxim Prokhorov
cbef053f69 light: inline units 2024-08-09 12:46:10 +03:00
Maxim Prokhorov
14b05e67eb idb: config required fields 2024-08-09 12:46:10 +03:00
Maxim Prokhorov
ca2f6ff083 ha: clarify prefix config, mention components 2024-08-09 12:46:10 +03:00
Maxim Prokhorov
458b3b9b6e ha: swap publish and clear colors 2024-08-09 12:46:10 +03:00
Maxim Prokhorov
1ca0dcc76b ntp: more settings in webui
sntp startup and update delays & dhcp toggle
2024-08-09 12:45:37 +03:00
Maxim Prokhorov
70f214e2be sns: update filter api, actually calculate median
- sync with base class, implement required override methods
- make sure last, max, min and sum filters reset() and restart() are the same
- find a real median over the specified reading 'window' vs. averaged medians
  of every 3 elements that it was previously
- preserve list of inputs for average and median filters, handle updates
  like a circular buffer and return value based on previous readings
  (todo might be to have a more efficient storage instead of vector)

resolve #2543
2024-08-09 12:41:11 +03:00
Maxim Prokhorov
5ab317a9a0 sns: rework'ed report conditions, filter restart()
- preserve units for cached values, remove extra process() call for webui data
- reset magnitude filter state when value units change
- min & max delta checks only for report value, remove separate checks for read and report
- zero threshold only affects reports, amend ac993c7b4b
- pending BaseFilter::available() and BaseFilter::ready(), replacing BaseFilter::status()
  distinguish readiness between having *some* values and *enough* values
- pending BaseFilter::restart(), separate from BaseFilter::reset(), which
  should allow filter to drop existing value when it is not possible otherwise
  w/ just continuing normal BaseFilter::update()
2024-08-08 20:14:55 +03:00
Maxim Prokhorov
2cdc456a36 sns: min and max filters
also force status() to report value presence instead of ability to update()
2024-08-08 20:14:55 +03:00
Maxim Prokhorov
b11071cb9e sns: really reset readings on cfg reload
counter should start from scratch
amend 872f9b6534
2024-08-07 13:29:06 +03:00
Maxim Prokhorov
bc6af422ae sch: clarify location units 2024-08-06 15:30:42 +03:00
Maxim Prokhorov
e9497912e1 webui: duplicated error text 2024-08-06 13:28:09 +03:00
Maxim Prokhorov
fef05f9820 pio: sync decoder.py w/ esp8266/Arduino version 2024-08-03 03:19:40 +03:00
Maxim Prokhorov
08c4cdd3c0 webui: missing type="number" required
amend de2f96a7eb
2024-08-03 01:46:07 +03:00
Maxim Prokhorov
492b6e32df webui: rebuild blobs 2024-08-03 01:32:18 +03:00
Maxim Prokhorov
a0ed9b0e82 test: sync webui data 2024-08-03 01:31:45 +03:00
Maxim Prokhorov
af3f83841f emon: side-by-side current and expected values 2024-08-03 01:31:45 +03:00
Maxim Prokhorov
2c8470c11c sns: poll the remote until sensors are ready 2024-08-03 01:31:45 +03:00
Maxim Prokhorov
5f830c28ce sns: redundant code in units and energy ui
also fix template anonymous types warnings
2024-08-03 01:31:45 +03:00
Maxim Prokhorov
ac993c7b4b sns: zero threshold skips value instead of forcing it to be 0 2024-08-03 01:31:45 +03:00
Maxim Prokhorov
de2f96a7eb webui: disallow empty type[number]
...unless necessary, like with magnitude zero threshold
2024-08-03 01:31:45 +03:00
Maxim Prokhorov
8d8d60fb81 sns: nicer inputs and reworked units ws payload
send tuples per unit type, not per magnitude
fix label and span init order for magnitude settings
2024-08-03 01:31:45 +03:00
Maxim Prokhorov
4fda84082a setup: missing panel switch trigger
password panel should not show up on initial page load in normal mode
2024-08-03 01:30:53 +03:00
Maxim Prokhorov
8fcf4a842d webui: custom enumerable callback 2024-07-30 01:18:18 +03:00