* rpn: bump to rpnlib 0.24.1
- `i` and `u` suffixes for numbers in expressions, parse as Integer or Unsigned respectively
- `checkedTo...()` method variants for numeric conversions
- strings can contain escape sequences (\x61\x62\x63, \n, \t, \r)
- improve float number parsing
- more consistent whitespace checks, tokens also can be separated by \n or \t
- various parser fixes
* fix captures
## [0.23.0] 2020-07-26
### Added
- `p` operator to print the top of the stack via debug function
- `&var` syntax to create variable reference in expression
- `=` operator for variable assignment in expression
- `exists` operator to check for variable existance (only for references)
- `deref` operator to convert variable reference into a value (only for references)
- Allow to use either float or double as floating type, parse numbers in expressions as specified type
- Add boolean type, parse `true` and `false` in expressions
- Add null type, parse `null` in expressions
- Add string type, parse double-quoted `"string"` in expressions
- Add integer and unsigned integer type, used in operators
- Allow to configure underlying types from rpnlib\_config.h and -D... flags
- Return `rpn_error` from operators, split error types into categories
- Create a new stack by using `[` keyword. Move stack contents into the previous stack + size by using `]`.
### Changed
- Stack structure no longer holds raw `float`, but internal `rpn_value` type
- rpn\_... setter and getter methods use `rpn_value` type
- Operator functions return `rpn_error` type, allowing to return both value and operator errors
- Variables in expressions are no longer required to exist when using `&var`
Expression will automatically create the variable, set it to `null` and push it's reference on the stack
- It is possible to create 'reference' stack values
- Improve precision of `e` and `pi`
### Fixed
- Proper value for `e` constant
- Allow to use multiple contexts simultaniously, replace `rpn_error` and `rpn_debug_callback`
with the current `rpn_context` members `error` and `debug_callback` respectively
Change the underlying command line handling:
- switch to a custom parser, inspired by redis / sds
- update terminalRegisterCommand signature, pass only bare minimum
- clean-up `help` & `commands`. update settings `set`, `get` and `del`
- allow our custom test suite to run command-line tests
- clean-up Stream IO to allow us to print large things into debug stream (for example, `eeprom.dump`)
- send parsing errors to the debug log
As a proof of concept, introduce `TERMINAL_MQTT_SUPPORT` and `TERMINAL_WEB_API_SUPPORT`
- MQTT subscribes to the `<root>/cmd/set` and sends response to the `<root>/cmd`. We can't output too much, as we don't have any large-send API.
- Web API listens to the `/api/cmd?apikey=...&line=...` (or PUT, params inside the body). This one is intended as a possible replacement of the `API_SUPPORT`. Internals introduce a 'task' around the AsyncWebServerRequest object that will simulate what WiFiClient does and push data into it continuously, switching between CONT and SYS.
Both are experimental. We only accept a single command and not every command is updated to use Print `ctx.output` object. We are also somewhat limited by the Print / Stream overall, perhaps I am overestimating the usefulness of Arduino compatibility to such an extent :)
Web API handler can also sometimes show only part of the result, whenever the command tries to yield() by itself waiting for something. Perhaps we would need to create a custom request handler for that specific use-case.
* broker: declare and define per module
We no longer need to specify each Broker type in broker.h
But, we exchange that bit for explicit initialization of the instance
Define helper macros to generate boilerplate code
- namespace with Instance, Register(), Publish()
- forward Register(...) -> Instance.Register(...),
Publish(...) -> Instance.Publish(...)
* don't check for broker when deps enable it
- 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
* 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
- 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
- add experimental `relayDummy` to configure dummy relays at runtime
- add tuya-generic-dimmer #1729
- cleanup broker interface to allow Tuya module to properly receive events, modify broker methods to allow different function signatures
- add basic tests for Tuya frame and data protocol