sensor_emon .ipp for energy and kwh & ws objects
system_time .h for clock definitions. delay not implemented (yet)
ignoring energy calc for the current test, since samples are out-of-sync
also ignoring timeout state, as it syncs with the clock time
- do not completely fail when either sunrise or sunset missing
keep what is valid, fall through otherwise
- more event:: helpers for internal comparison
fix missing to_minutes when comparing update time
amends 8edb7b6333
- streamline event handling through time_point & to_minutes
instead of sometimes seconds, sometimes minutes and sometimes both
- minor refactoring cref -> value for time point and durations function args
- simplified abstraction for overflowing clock.
revert to core one (millis) for the mqtt loop
- fix duration type for readyflag, use native clock type directly
- drop redundant check 'now' ge 'until', since wrapping already implicitly does it
refactor mqtt root topic & topic handling, add external module for mqtt validation
check whether root topic contains #, error out when it is missing
check whether generic topics or suffixes contain # or +, error out when they are present
special handling for settings topic to pick a single level /+/ as a key and payload as a value
resolve#2617
tests for mqtt topic filtering and validation
repurpose sv string as an ok flag. nil when ok, non-nil for error.
consistent return state when exiting settings callback w/ raii helper
differentiate between errors and reconnects
consistent with string_view::substr behaviour, without the 'throw'ing part
allow to distinguish sv pointing to nothing and sv originating from some
kind of string (here, result of a slice) by comparing its pointer with nullptr
- customize will topic qos and retain, ref. #2616
- allow to fully replace will and json topics.
empty string means the default <root>/<name>
replacement is taken as-is, after applying placeholders
- validate will and data topic structure before connecting
- validate {suf,post}fix as {suf,post}fix, not as topic
- track 'network' connection, not wifi specifically
currently, there is only wifi, hence register a callback after sta event
- initial timer setup was counting from millis() zero when booting
count from network connection instead, like it would after disconnect
using timed flags for both skip and retry timers