* emon: configure ratios without reboot
* settings: serialize() support
* debug: use vsnprintf from newlib, not from sdk
* settings/experimental: show defaults via `get`
* emon: override base methods, fix defaults
* sensor/emon: expose internal index calculation
- refactor configuration to use the correct index when accessing indexed
sensor methods. store index value on magnitude, refactor loops to
accomodate this new functionality
- rename slot(index) -> description(index), since we use 'slot' as
numeric value
This will add support for the KingArt Wifi Curtain Switch. There are no buttons in the web interface as I could not figure out how to create them (any help on that is welcome).
For now the switch can be controlled over MQTT:
"{hostname}/curtain/set"
"{hostname}/curtain"
c/p from the InoToCpp converter that uses scons file node path
while we write binary data as utf-8 (and assume it is utf-8!),
we only ever need this in CI and source is always relative.
with luck, this is on the safe side.
* hardware: Add support for Aoycocr X5P Plug.
This change allow espurna to control Aoycocr X5P Plug devices, which has
the same behaviour as the GOSUND WP3 but using different GPIO pins for
relay, button and leds.
* Update platformio.ini
Co-authored-by: Max Prokhorov <prokhorov.max@outlook.com>
- 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
* hlw8012: load hardware-specific ratios
* hlw8012: read energy in pre() callback
* dcz: nvalue should be integer
* sns: fix pressure constrain
* sns: load ratios based on index too
* sns: per-magnitude corrections (still limited by type)
* sns: attach units to index
* 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>
https://github.com/xoseperez/espurna/pull/1772#issuecomment-609847420
> Without the patch btnRepDel overrides every btnRepDel0, btnRepDel1 etc., btnRepDel0 read second, then hard-coded value.
With the patch btnRepDel0 is read first, then btnRepDel, then hard-coded value.
Indexed key can only be set via settings upload or in terminal, WebUI can change only the global override setting. Allow more 'specific' key to override global setting.
- Domoticz only accepts svalue <pressure>;<forecast>,
failing to display anything otherwise.
We don't have any forecast calculation (yet?), simply send dummy value.
- Move Domoticz code outside of sensor.ino
- Update sensor classes to support a generic way to store energy values
- Update sensor conversion code to deal with units and not magnitudes
- Add magnitude<->unit for sensors, generic way of defining used unit. Convert from sensor magnitude unit to the one used for display.
- Reset energy value based on index through external means (MQTT, HTTP)
- Rework energy timestamping, update webui with 'last saved' value
While this solves the energy conversion issues and we are finally seeing the real value, what I don't really like:
- KilowattHour and WattHour are separate enum tags, thus sort-of are different types altogether
- Conversion code in Energy object should probably use some generic 'ratio' calculation? (https://en.cppreference.com/w/cpp/numeric/ratio/ratio)
- We are still using runtime checks to do calculations and depend that sensor outputs only one specific value type.
Consider this a fix for energy display / storage and preliminary work on sensor.ino
Further sensor refactoring... soon.
* base envs
* CI: speed up release process (since we still want some .bin files)
* fixup! CI: speed up release process (since we still want some .bin files)
* release dry run
* fixup! release dry run
* adjust
* fix .bin name
* it works
* minor cleanup for current git
* use pio suggestion about ldscript, reduce build_flags impact
* fix linker
* parse ${vars} instead of ignoring them
* add filtering and override file (sneak peak into tasmota's pio config)
* don't generate secure client (for now)
* formatting
* codacy
* correct Gosund WP3 led color documentation; provide reasonable default actions for button and the two LEDs
* reverse red/blue led roles, as requested, to be consistent with other existing products
Co-authored-by: ziggurat29 <xxx@yyy.zzz>
* Fixes and updates for thermostat and display:
- Switch to original esp8266-oled-ssd1306 library
- Fixes and updates for thermostat and display
- Add display switching off after interval
- If THERMOSTAT_DISPLAY_SUPPORT enabled, then one click enable display, long click switch relay. This functionality also depend on fix for long click. See pull request https://github.com/xoseperez/espurna/pull/2172
* Move buttons definitions for display to dependencies.h
* Pin ThingPulse/esp8266-oled-ssd1306#3398c97
With uint8_t length function _buttonMapReleased never returned BUTTON_EVENT_LNGCLICK. BUTTON_EVENT_CLICK returned instesd. I verified that with uint16_t length it returns BUTTON_EVENT_LNGCLICK when correspondent delay passed.