Max Prokhorov
945652f806
btn: key0 should override key
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.
4 years ago
Max Prokhorov
43c2c41cba
mqtt(async): buffer some data ( #2181 )
* mqtt: enum state
* mqtt: async client buffer with MQTT_MAX_PACKET_SIZE
* mqtt: rework debug messages
* mqtt: MQTT_BUFFER_MAX_SIZE
* mqtt/test: debug log for async callback
* mqtt/test: don't log things we don't handle
* button: fix typo
4 years ago
Maxim Prokhorov
032f921fc4
btn: store actions as uint8_t instead of uint16_t
4 years ago
Maxim Prokhorov
2172bc6cb1
btn: rename pin status / state -> value
4 years ago
Maxim Prokhorov
ee7356b91a
relay: clean-up for ota .bin
4 years ago
Max Prokhorov
3243dafb61
cfg: check for led and button GPIO settings ( #2177 )
In case board configuration is empty, loop should try to check at least once
4 years ago
Max Prokhorov
ba3e6267e6
Button pin provider & runtime settings ( #2162 )
* wip
* cleanup buttons-through-serial code, remove hw mention from button module
* remove wip
* implement mqtt settings
* fixup struct members, dual no longer allocates debouncer
* add missing debounceevent lib
* fix missing event_handler, update names
* fix namespace
* drop lib
* fix int<->bool comparison
* Move gpio16 handling from DigitalPin to EventHandler
* Cleanup debounceevent headers
* Don't expect system headers to be included
* re 70b54c489f
- no allocation, for real
* Adjust settings names
* dont retain by default
* unused
* typo
* Fix length type (ref 6017ad9474
)
* Move pin class outside of debounce lib, lowercase ns
* move event handling inside of button_t
* refactor config. ..._MODE -> _CONFIG, ..._MODE_... -> ..._ACTION_...
* fix test
* naming
* move indexed value to header
* refactor actions into direct opts
* fix webui, fix buttons not respecting old user setting
* change button config format from bitmask to a struct, adjust settings conversion
* proxy some more header defautls, fix web kv
* gpiopin
* adjust webui func to support every setting
* clarify single-return event->string
* fix dual setting
* fix dual packet condition, de-duplicate funcs
* fix bogus warning
4 years ago
DmitryBlinov
373dd27d60
Fixes and updates for thermostat and display ( #2173 )
* 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
4 years ago
Maxim Prokhorov
712bd8a5e1
Buttons: small optimization for vector
4 years ago
Maxim Prokhorov
2ff50169b9
Static configuration for LED and Buttons
- use similar to relay & wifi, configuration through helper methods that
use indexed defines
- clock cycles for led delay polling
- button mode defaults
4 years ago
Max Prokhorov
298ce8cac2
Refactor get/set/del/hasSetting ( #2048 )
* experimental: refactor get/set/del/hasSetting
* sensors
* lights
* cleaup
* r
* tuya
* fixup! sensors
* fixup! tuya
* header defaults types
* fix lights
* setup already checks for max
* helper for flashstring
* fix overload
* oops
* refactor includes
* warnings
* test with migrate
* add ids in a separate file
* cleanup
rev: crash
rev: domoticz
rev: encoder
rev: loopdelay
rev: hass
rev: i2c
rev2: hass
rev: mqtt
rev: rfm69
rev: relay
rev: rpn
rev: settings setup
rev: hb settings
rev: telnet preprocessor fix
rev: settings wrap
rev: tspk bool style
rev: wifi types
rev: util hb
rev: settings
fixup! rev: settings
* rev: cleanup wifi injections based on new getters
* hasSetting now can return true for empty key
* show hardcoded network in web
* oops
* fix ws referencing wrong index
* ensure empty strings are written
* c/p
* use experimental schema style for payload, mark network as not deletable
* allow to customize converter
* shorter syntax, try using with wifi
* use proper #if syntax to handle definitions that are missing
* fixup ota sc checks getter, cast schEnabled to bool
* add utils header to sensors
4 years ago
Maxim Prokhorov
03e6443ac6
system: move prototypes to a separate header
5 years ago
Maxim Prokhorov
9f4329dc1a
relay: replace eeprom 8bit with 32bit bitmask stored in settings
- 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
5 years ago
Max Prokhorov
8dda0072f2
WiFi: allow button action to also disable softAP ( #1942 )
5 years ago
Xose Pérez
8b7eea6c72
ESPurna base image for Tuya Convert
5 years ago
Max Prokhorov
cf4540ae90
lights: module declarations in the header
5 years ago
Max Prokhorov
21423431ce
Fixed size json payload & other WS bugfixes ( #1843 )
- 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
5 years ago
Xose Pérez
175fcbf6cf
Support for WPS in core build. Using UNUSED macro to prevent warnings
5 years ago
Malachi Soord
c8231860ac
[copyright-update] Update for 2019
5 years ago
Xose Pérez
628968cafa
Add dim up and down actions to button handler ( #1250 )
5 years ago
Andrey F. Kupreychik
4202d3769c
First try for LightFox dual
6 years ago
ValCob
30285b3a72
we should send only buttons events that have actions assigned to them or set BUTTON_MQTT_SEND_ALL_EVENTS to 1 to send everything
6 years ago
Xose Pérez
152bf22fdd
Option to disable button support
6 years ago
Xose Pérez
81eb809d4f
Support for Smart Config via JustWifi
6 years ago
Xose Pérez
aeb03282c6
Disable WPS by default, saves ~50Kb
6 years ago
Xose Pérez
e6570fe1bb
Triple click to enter WPS mode, fast LED blinking
6 years ago
Xose Pérez
104caa93fa
Fix warnings
6 years ago
Xose Pérez
fa20c47f29
Check which keys should be saved and which ones shouldn't ( #730 )
6 years ago
Lazar Obradovic
3c2b2017c0
Buttons should not retain in MQTT
6 years ago
Xose Pérez
4029ee73da
Trying to fix some issues reported by codacy
6 years ago
Xose Pérez
b082d14c59
Loop hooks
6 years ago
Xose Pérez
2dc2b7d176
Checking code with cppcheck
6 years ago
Xose Pérez
ce9e2a6482
Refactor settings module, added settingsCommandRegister
6 years ago
Xose Pérez
3e811c8138
Changed button event debug message
6 years ago
Xose Pérez
af805ab045
Update copyright notices
7 years ago
Xose Pérez
01770e48e1
Fix casting issue in buttonStore ( #327 )
7 years ago
Xose Pérez
1a68f89bbf
Fix mqtt group sync with different switches sharing same group
7 years ago
Xose Pérez
b3336871bf
Boot mode and pulse mode per relay
7 years ago
Xose Pérez
d1abe1fc65
Option to disable MQTT at build time
7 years ago
Xose Pérez
e83c5495de
Unify reset calls
7 years ago
Xose Pérez
68c90c1cc0
Fix bug using snprintf
7 years ago
Xose Pérez
f7cf9a691f
Replaced sprintf with safer snprintf
7 years ago
Xose Pérez
9750bf26bb
Moved strings to PROGMEM, 160 bytes saved in memory
7 years ago
Xose Pérez
eb79642f2e
Major refactor of device flags
7 years ago
Xose Pérez
c6b26efbb7
Merge
7 years ago
Xose Pérez
66131bbafd
ON and OFF actions for button events
7 years ago
Xose Pérez
f5b3f9f62e
Fix typo
7 years ago
Xose Pérez
e6e9f9d6d4
Change the double click delay from the web interface
7 years ago
Xose Pérez
0535fcee5e
Issue #170 . Using updated DebounceEvent library to allow disabling double click option and get faster click responses
7 years ago
Xose Pérez
e349c6991b
Added custom reset messages
7 years ago