update to terser v5
replace gulp-remove-code with a rough equivalent in the gulpscript itself
replace gulp-inline with gulp-inline-source-html
remove base64 modules as redundant when running inline-source (does both)
remove crass as redundant when running inline-source (uses csso)
fixup jquery source map comment (but still keep the actual file)
at least now this seems stable enough to start more of the ui tweaking
pure-css 1.0.0 -> 2.0.3
datatable 1.10.16 -> 1.10.23
generic jquery-slim -> custom jquery/jquery@a32cf6324f8f2190e66a687e94be9687ebf840b7 slim build with an addition of -sizzle
does not seem to be breaking anything (yet)
ref. https://github.com/xoseperez/espurna/issues/1132#issuecomment-431868924
it is slightly bigger, but better looking and no jquery dependency
rework colorpicker style as well, hide to prevent sending garbage when
lights are off. update lights module to send `lightState()` and separate
state from status payloads
yes, input[type="color"] is an option, but it does not look good
- gpio module now tracks the known providers (right now, hardware and mcp expander)
- refactored relay struct to use 'Provider' implementing setup,notify,change,boot instead of just BasePin actions
- refactored button module to use gpio provider instead of referencing types itself
- removed dual & stm code from buttons, migrate both to relay module
- added status notify and change callbacks for relayStatus (i.e. 'notify' when relay status was called, but not changed. and 'changed' when it did)
- relays runtime configuration keys
- relay command now shows configured relays and current & target statuses
- refactor the code using relayStatus(0, blah) under LIGHT_PROVIDER check to use lightState instead
- remove rfbridge code form relay module. implement through a basic state listener in the rfbridge module, depend on RELAY_SUPPORT
- allow to bind rf codes to real relays
- drop tuya-specific lights provider, remove tuya code from relays and lights modules
- integrate tuya via relay listeners and providers, use lights custom provider
- implement channel transitions for tuya. disabled by default, and transition time and step are overridden to 2000 + 100. needs to be set to some value below the total time (i.e. `total transition time / step time == number of steps`, we need to figure out a correct time that serial comms could handle)
- lights custom provider (global, not per-pin) and state listeners
- remove lights code from relay module. implement through providers & listeners in the lights module, depend on RELAY_SUPPORT
- lights per-channel relay provider (unused atm), depend on RELAY_SUPPORT
- refactored channel transition - calculate step only once, make sure time + step values are sane, generate quick transitions with very small delay (10ms hardcoded) for transitions during OFF state i.e. we no longer waste 500ms (or whatever transition time is set to) on boot doing nothing
- transition time + step parameter for the lightUpdate
- report mask parameter for the lightUpdate
- minor fixes across the board
resolve#2222
resolve#2327, #2220
- remove legacy support in the webui
- format datetime strings on the device, use NTP panel to display them both
- migrate from the old ntpOffset + ntpDST + ntpRegion to ntpTZ
- support 32 byte hostname / ssid
- support 64 byte passphrase
- slightly reduce amount of memory allocations
- tweak initialization paths to call persistent(false) as early as possible
* Completed kingart curtain switch support:
Added Web UI controls and view in status
Added power up behaviour (nothing, close, open, last position)
Added curtain style (Roller, etc...) for UI status and to be used in MQTT
* Checked commit before PR. Added html gulp static files generated.
* Corrected a code refactor error which make the MQTT messages not handling position from received messages. Added comment to debug tab to show how to enable debug
* Use the maximum compression for gzip. A byte is a byte :)
* Update code/espurna/curtain_kingart.cpp
Co-authored-by: Max Prokhorov <prokhorov.max@outlook.com>
* Variable name prefix update
Added public set position function and curtain count
* Added Scheduler new type : curtain
* Add curtain schedule support and correct the 12h bug when adding a slot (00:00 after refresh). Default Hour is 12h
* Code cleaning.
Schedule support.
Light support is having an issue with new schedules corrected here.
* I let do better by the specialists
* Curtain init statues
* Coding style corrections
* Removed debug stuff from now - will be back later with the right way
* rebuild webui
* revert 435f1c5e03 schHour default, rebuild ui
Co-authored-by: Eric Chauvet <eric.chauvet@test-tree.com>
Co-authored-by: Max Prokhorov <prokhorov.max@outlook.com>
- 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.
* Permit thingspeak urn edit
* Update thinkspeak.ino
* Update index.html
* Replace Host, Port, and URL with Address in Thingspeak
* Create AsyncThingspeak object
Create AsyncThingspeak object to contain the url of the component.
* replace pointer by class member
Thingspeak class improvement to answer Max's question:
why use a pointer when it can be a class member?
So now address parameter isn't a pointer anymore.
* Update Thingspeak address on post
* 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
* added data-settings-max value to html
* fixed: use the value and not the defenition of the function
* the schedules variable already starts from 0 not need to increment
* another misuse of function as variable
- use setOriginalsFromValues function right after elements had changed and
**only** with those elements
- add checkbox handling to setOriginalsFromValues to match hasChanged
- apply hasChanged after value is set to refresh originals after saving
- change parts that already set 'original' attribute manually
This was sort-of broken, because original attr never worked as intended.
Also fix possible OOM for large WebUI images, since sending full config each time means that we need more memory to buffer and parse it.
* Added restore last schedule support
* Merged RestoreLastScheduleState function into the _schCheck function
* handle lights in restore action
* hide webui chbox when not using scheduler
* use settings instead of struct member, hide under ifdef scheduler_support
* relayLastSchedule uses SCHEDULER_RESTORE_LAST_SCHEDULE as default
* Changed all the variable names to be the same so there would be no confusions
* Fixed client side to create an array from relayLastschedule
* Fixed cosmetic issue with the toggle display in webui
* Fixed variable name and disabled comparison at the end
* Added another check if the switch type is light provider
* Changed variables naming
* Naming mistake
- remove optional RFRAW_SUPPORT
- enable module when RF_SUPPORT=1, optionally enable RCSwitch
- reorder ifdef checks to treat RFB_DIRECT and old RF_SUPPORT the same
- rename RF_PIN to RFB_RX_PIN
- depend on RF_SUPPORT instead of ITEAD_SONOFF_RFBRIDGE
- runtime TX & RX PIN setting
1. Add thermostat to the espurna_modules in progmem.h
2. Add thermostat to webui, gulp, html, js.
3. in general.h MQTT_USE_JSON returned to 0 by default and 1 if thermostat enabled.
- Heartbeat mode and interval configuration added to WebUI ADMIN page
- New option HEARTBEAT_REPEAT_STATUS: on device startup full heartbeat information and after HEARTBEAT_INTERVAL only STATUS report.
- Enhanced first heartbeat message - on device startup it will send heartbeat after ntpSynced will be true to get device time.
P.S. Code is tested. Web part is not compiled, and not tested. I hope it will work :)