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.
- shrink utils source file, move heartbeat and boot management into system
- improvise with 'heartbeat' functionality. include scheduler implementation that will
manage the per-module heartbeat callbacks with individual 'mode' and
'interval' settings. current ones are mqtt (including relays, lights, thermostat), debug and
influxdb. preserve heartbeat NONE, ONCE and REPEAT, REPEAT_STATUS is effectively a hbReport & status bit.
- mqtt heartbeat is managed through mqttHeartbeat() callbacks
- tweak mqtt callbacks to use lists instead of the vector, slighly reducing the size of the .bin
- update WebUI, include report setting and update hbMode values
- make sure general.h settings include new heartbeat,
move constant definitions outside of the header
- correctly include dependencies through the .cpp, avoid leaking
internal details.
- as a side-effect, base headers are no longer included recursively
Provide safe fallback *only* when char is out-of-range
As it is, numeric 0 was equal to else { ... }, so 00 was never parsed.
Previously, it was assumed that we never try to parse leading / trailing zeroes,
but in turn we also ignored zeroes in the middle of the number...
- for some reason we were never checking it's output
no need to increase +1 since we write the exact number
- allow hexEncode output be decoded, enforce even-ness
- raw msg must have at least 3 bytes - start+code+end
Add new V3.0 version of PZEM004T, not tested. Default to factory default address 0xf8, configurable through pzemv30Addr 8-bit number
Add 'frequency' measurement & 'hz' unit
Add pz.address that configures address
Implemented energy reset
Right now we only support a single device. No way to test this properly (mostly, how exactly we need to connect this stuff), so left as not implemented.
* wip based on early draft. todo benchmarking
* fixup eraser, assume keys are unique
* fix cursor copy, test removal at random
* small benchmark via permutations. todo lambdas and novirtual
* fix empty condition / reset
* overwrite optimizations, fix move offsets overflows
* ...erase using 0xff instead of 0
* test the theory with code, different length kv were bugged
* try to check for out-of-bounds writes / reads
* style
* trying to fix mover again
* clarify length, defend against reading len on edge
* fix uncommited rewind change
* prove space assumptions
* more concise traces, fix move condition (agrh!!!)
* slightly more internal knowledge (estimates API?)
* make sure cursor is only valid within the range
* ensure 0 does not blow things
* go back up
* cursor comments
* comments
* rewrite writes through cursor
* in del too
* estimate kv storage requirements, return available size
* move raw erase / move into a method, allow ::set to avoid scanning storage twice
* refactor naming, use in code
* amend storage slicing test
* fix crash handler offsets, cleanup configuration
* start -> begin
* eeprom readiness
* dependencies
* unused
* SPI_FLASH constants for older Core
* vtables -> templates
* less include dependencies
* gcov help, move estimate outside of the class
* writer position can never match, use begin + offset
* tweak save_crash to trigger only once in a serious crash
* doh, header function should be inline
* foreach api, tweak structs for public api
* use test helper class
* when not using foreach, move cursor reset closer to the loop using read_kv
* coverage comments, fix typo in tests decltype
* ensure set() does not break with offset
* make codacy happy again
- general conversion from .ino modules into a separate .cpp files
- clean-up internal headers, place libraries into .h. guard .cpp with _SUPPORT flags
- fix some instances of shared variables instead of public methods
- tweak build system to still build a single source file via os environment variable ESPURNA_BUILD_SINGLE_SOURCE
* ADC_VCC is not macro
* In esp.h ADC_VCC and ADC_TOUT is not macro, so define macro.
* ADC_VCC and ADC_TOUT fixes in utils.ino and sensors.h
* Adding support for I2C temperature and humidity sensor HDC1080 / 831R
* Added HDC1080 to test\build\sensor.h and arduino.h
* added brackets
* Revert ADC_MODE_VALUE to initial values
* Eof newline
* Eof newline
Co-authored-by: Max Prokhorov <prokhorov.max@outlook.com>
* ntp: try using sntp app from lwip, drop ntpclientlib
* fix display
* thermostat: fix day and month getters
* test build sizes with scheduler
* use system timers for once-a-minute scheduling, no polling
* tick
* avoid timestamps, use tm
* drop utc rpn operator, add utc_hour and utc_dow
* try to build with old implementation too
* dep
* notify ws
* progmem
* cleanup types
* offset tm values by 1 to match existing schedules
* avoid using ntpclientlib with rpn
* test. show debug strings in sch
* fix secureclient
* consts, fix unsyncing when changing tz (and not triggering sntp after reinit for some reason)
* startup time in seconds
* same delay as lwip
* header
* assume build timestamp is unixtime
* cache server value
* fmt
* typo
* handle dhcp request
* rename
* web
* TZ.h
* add notice about what alias means
* fix disabling NTP_SUPPORT
* scheduled ticker
* same behaviour as old module
* rollback rpn dependency check, utc_ prefixes
* ...
* comments, refactor naming
* debug: store boot log
* order
* roll single header
* hide when not implemented
* fix capacity check
* dependencies
* refactor names, can just use malloc
* settings formatting
* dbgBuf prefix
* show size
* release memory after buffer is displayed
* fix uptime unused warning, combine printer
* comments
* use arg flag instead of static to handle boot
* ci test fix
* Hide whole info() without debug
* typo
* cleanup setDebugOutput condition
- mask is defined as (relay# status << number)
- transparently handle base-2 and base-10 numbers
- if the relay mode requires us to save the mask, it will be saved as base-2
* utils/version: use git description token as version, add memoization
* pio: move extra scripts to a separate directory
* pio: add -DAPP_REVISION=... as local build flag
- remove "platform" key, see #1440. this implicitly sets schema to "basic". pending some other clean-up regarding json and mqtt queueing, other schema can be added down the line
- updated ws module queue elem to capture callbacks list, allows to pass more than one callback (for example, when they are generated on the fly as lambdas, see ha wsPost usage)
- modified method to send ha config to use global ws queue, fix#1762 problem with empty topics and ensure json allocation is consistent.
- use existing defines to set mqtt payload options. amend #1085, #1188, #1883 to use the set payload value. drop HOMEASSISTANT_PAYLOAD... defines.
- update MQTT_STATUS_ONLINE/OFFLINE and RELAY_MQTT_ON/OFF with runtime configuration
- filter payload strings so that the resulting yaml value is not interpreted as bool (python True, False)
- helper method for settings to streamline string values manipulation
* Core 2.6.0+ fixes
* fix env -> config, run travis04 job
* don't duplicate free heap in frag data, use single stats struct
* fix dtostrf warnings, bump buffer sizes
* ...and even less words for fragmentation stat
- update every dynamicjsonbuffer with fixed size constructor argument
- change to ws callback registration to use a class builder (just cosmetic)
- test multiple ws data callbacks for each module
- remove some of the static strings in favour of ws data callback
- improve sensor ws callback data size, remove duplicated strings
- use static buffer in wsDebugSend
- postpone wsSend until loop, implement wsPost to allow other modules to queue message callbacks. remove Ticker based ws callbacks for data
- update WebUI files
- add httpupdate ota impelementation
- move async ota into a separate module
- support bearssl & axtls through wificlientsecure
- allow to disable arduino ide ota module
* Thingspeak: async client fixes
- remove memory management in async client callbacks
- instead of global one, reference asyncclient from callback argument
- transfer temporary data-buffer to the global scope, avoid accidental String copy
- implement strnstr to search onData payload
* fixup format strings
* update retry time each attempt
* start with default attempts value
* trying to work with lwip2-536
* count time from last request
* promptly run flush
* debug: heap fragmentation stat
* Rework method detection
- return check integral type as a result of detection instead of method type
- type-tagging instead of enable_if
* fix alias
* typo
* only need one bool_type instance
* Move heap debug into HeapStats header
- don't show fragmentation stats on the first call
- prettify fragmentation display
- pack function params into helper struct
- naming
* pass external flag instead
* add missing prototypes
- store system crash counter and reset reason in rtcmem instead of eeprom
- store relay state mask in rtc in addition to the eeprom
- store relay state in eeprom only when boot mode requires it
- simplify relay state mask calculation / reading using std::bitset
- light state save and restore
- energy total save and restore