- replace JustWifi with a custom WiFi module
- re-implemented Core methods that deal with scanning, directly work with the SDK callback
- re-implemented Core method for opmode to avoid dealing with the 2.7.x pseudo modes
- re-implemented Core method for forced-(modem)-sleep (with the intention to merge with OpmodeNull... todo)
- disable reconnect and autoconnect from SDK, avoid unintentionally storing ssid & pass for these and
make connection routine watch for events instead. timeout is implemented as a local timer
- do not store runtime data that can be retrieved via SDK calls
- settings are loaded only when starting AP or STA, networks are no longer kept in memory
- settings STA ssidN must be unique
- remove char buffer from the event callback
- trigger station-disconnected event when actually disconnected, not when connecting or explicitly requesting it
- generic rssi sorting method for initial connection, do rssi checks while connected to find a better network
Drop (temporarily?) wps and smartconfig. Both are implementable with the new approach,
but come with some weird expectations from the SDK side (no extra heap with wps, broadcasting plain-text
passphrase with smartconfig, storing station config implicitly, etc.).
Both are sort-of fixed with RTOS SDK, but it is still a big question of whether to support them at all in the current state.
Namespace build configurations of modules, make more things into constexpr
(not fully finished though)
Unify code using ...Count() to parse IDs
Avoid using unsigned char aka uint8_t as index, prefer size_t
as most code already uses it anyway. Making sure we never accidentally
truncate the value or try to read it as 32bit-wide. Also, simplify
access to built in containers, since those use the wide type as well.
Renames led and button types, more consistent initialization and field access.
Move inline classes into a separate file.
Make serialize() into a basic function, support numeric conversions with base option
Refactor numeric conversions and add some more helper functions for the
build flags.
Send out keys as schema, fill given template based on the 4 common input types.
Also, refactor relayLastSch into schRestore and move into the schedule template.
Moving relayCount to a wide int, this will probably not build...
Custom provider cannot 'shadow' the relays from the config.
e.g. lights will use the id=0 when relay control is enabled, and
we should not use relayGpio0, relayPulse0, relayBoot0 and etc.
- fix relay-id check breaking group topics
- group -> pub and sub topics
- wildcard in subscription topic will be properly handled
- make sure on disconnect event only triggers when mqtt is changing
state from connected to disconnected, don't trigger every failed re-try
- replace receive-only mode with separate sub and pub topics
- some more build time settings (and some... questionable code to handle that)
Plus, heartbeat will send this regardless
For the clean session stuff... when changing configuration of something like RPN,
the old subscription never goes away and we also receive old messages when QoS > 0 is used
Pending changes in the MQTT client(s) to make this work more reliably
Make gamma & invert flags only apply to the transition itself.
Revert to previous behaviour, where the modified value is only ever seen
by the provider function.
- clamp values via helper functions
- unify channel access as long
slightly more ram, but we no longer cast values that are 32bit-wide anyway
- remove css option, send unconditionally as /hex
- reimplement hsv conversion functions (based on HA / python's colorsys)
simplify calculations and allow to return standalone value structs for
RGB and HSV
- named channel accessors
- implement HA color inputs / outputs
- return PID when sending and subscribing, allow to subscribe
to a special event when receiving acknowledgement from the broker
(separate from normal lifecycle callback, since we allow a generic callable)
- rework HomeAssistant to publish with QoS 1 and wait until the broker responds.
lwmqtt sync library already did that, so this change only affects async library
- re-add `ha.send` command
- don't send HomeAssistant config when disabled, unless requested
- some more comments
Make sure 'custom provider' `lightAdd()` scheduled function locks further channel modifications,
and take care of light sanity checks before the light update is even scheduled.
Reworked rtcmem reader / writer to use default values, instead of accidentaly using
the unitialized mem of the stack. Also, reworked const names used by the lights module
to distinguish them from the build flags.