Commit Graph
4381 Commits
Author SHA1 Message Date
Gijs Noorlander b386b73bd2 [Cleanup] Refactor parseSystemVariables + move time functions to .h/.cpp
Trying to make the parseSystemVariables function smaller
Moved time related functions to their respective .h/.cpp classes.
This will make the code a bit more clean and also reduces the build size.
2020-03-03 00:01:45 +01:00
Gijs Noorlander 6bc909f026 [Webserver] Move Web_StreamingBuffer to its own .h/.cpp
To free up build size and other resources.
2020-03-02 23:58:54 +01:00
TD-er 6c04e3d01e automatically updated release notes for mega-20200301 mega-20200301 2020-03-01 19:50:36 +01:00
TD-er a764b5e9e3 Merge pull request #2911 from tiomny/Extensions
WebServer determines more media types
2020-03-01 00:08:44 +01:00
TD-er e196ecaa63 Merge pull request #2909 from TD-er/bugfix/reduce_build_size
[Build Size] Replace all TXBuffer += calls where possible
2020-02-29 23:51:25 +01:00
Artem becfb8c865 Add more MIME types 2020-03-01 00:23:13 +03:00
Gijs Noorlander 9b5defe204 [Build Size] Fix build issue in WebServer_FileList for SD card support 2020-02-28 11:09:14 +01:00
TD-er c47a0df893 automatically updated release notes for mega-20200228 mega-20200228 2020-02-28 02:30:24 +01:00
Gijs Noorlander 37538f4124 [Build Size] Replace all TXBuffer += calls where possible
The TXBuffer is a "header only" implementation.
This means it may be compiled "inline" and thus takes quite a bit of compiled code.
This makes the binary larger and slows the ESP down.

Now it is even possible to make core 2.6.3 builds using "minimal OTA".
The "Dev" build is roughly 55k smaller.
2020-02-28 02:28:03 +01:00
TD-er 84be380946 Merge pull request #2908 from TD-er/bugfix/P081_cron_memleak
[Cron] Fix memory leak and make it a bit easier to use
2020-02-27 20:03:36 +01:00
Gijs Noorlander bec65282de [Cron] Fix memory leak 2020-02-27 19:19:25 +01:00
Gijs Noorlander 9ef8fc89e4 [Cron] Use task data object to only parse expression when changed
Also included some debug helper logs to track the memory leak.
2020-02-27 12:01:42 +01:00
Gijs Noorlander 87a89c4c1b [Cron] Add warning about the memory leak 2020-02-26 22:56:32 +01:00
Gijs Noorlander 6a5e622d58 [docs] Document RTC memory 2020-02-26 22:54:58 +01:00
Gijs Noorlander e67fc02186 [Cron] Memory leak in calling Cron lib code
There are more leaks, but this at least does help a bit.
2020-02-26 22:54:27 +01:00
TD-er 479bd9499a Merge pull request #2905 from TD-er/bugfix/cron_plugin
[Cron] Fix handling bogus last/next times + restructure code
2020-02-26 14:43:14 +01:00
TD-er 861b7ca912 Merge pull request #2906 from TD-er/bugfix/ntp_result_2886
{NTP] Validate replies + store time in RTC
2020-02-26 14:42:19 +01:00
Gijs Noorlander 270004b1be [Cron] Only update last/next times if cron elapsed
When also updating the last/next times as the time is updated, a cron interval may be skipped while it was just about to be executed.
2020-02-26 14:27:47 +01:00
Gijs Noorlander 10093009fe [Cron] Call systmTimePresent() function to check if we have any time set
We do need to have some idea of time for this plugin.
2020-02-26 14:25:14 +01:00
Gijs Noorlander b15aeb16fc [Time] Store system time in RTC and restore at warm boot (no deep sleep)
Sometimes a unit may crash and is not able to connect to WiFi.
But time based rules or the cron daemon may not work when there is no concept of time.

This stores the last known system time in RTC memory to keep track of time.
It can also be used for some diagnostics while it is also sent to log what the last known time was before the crash/reboot.

Each normal reboot does cause a "shift" in time of roughly -1 second. Abnormal (warm) reboots may add more as those may have been the result of watchdog reboots.
2020-02-26 13:55:03 +01:00
Gijs Noorlander c345b10b5f [NTP] Validate returned NTP packet before using + rate limit requests
Fixes: #2886
2020-02-26 12:09:36 +01:00
Gijs Noorlander b994344bff [Cron] Fix mistake of generating incorrect event task name. 2020-02-26 02:10:50 +01:00
Gijs Noorlander ff53e7477a [Cron] Fix handling bogus last/next times + restructure code
The plugin was assuming the values stored in UserVar were correct.
After a cold boot, or when the NTP time (or via GPS) was not yet set, these values for last time or next time could be just about any value.
This means it was possible the Cron task would never fire an event if the next time was computed far in the future.

Also restructured the code a bit, to make it more readable.
2020-02-26 01:57:38 +01:00
TD-er 18f5ff9492 Merge pull request #2904 from TD-er/feature/enable_disable_command
[Commands] Update docs + add task/controller enable/disable commands
2020-02-25 17:08:06 +01:00
Gijs Noorlander 6ce3e74029 [docs] Document P036 Framed OLED 2020-02-25 17:06:51 +01:00
Gijs Noorlander 1094144f1a [docs] Document P081_Cron 2020-02-25 15:33:36 +01:00
Gijs Noorlander 5f11850bb8 [Commands] Update docs + add task/controller enable/disable commands
Also removed ProtocolIndex from the event struct as it is redundant information which can easily be forgotten to set.

Sorted the described commands in the documentation and added a few missing commands.
2020-02-25 11:56:08 +01:00
TD-er 27d52de861 Merge pull request #2902 from TD-er/bugfix/remove_div100ths
Bugfix/remove div100ths
2020-02-25 00:22:14 +01:00
TD-er 19d05a5949 Merge pull request #2900 from Grovkillen/benchmakr_rule
[Benchmark] fixed incorrect syntax in rule
2020-02-25 00:15:44 +01:00
TD-er 0397eae003 [Rules] Use curly braces for string conversion commands 2020-02-24 23:40:04 +01:00
TD-er 6022fc5837 [Rules] Remove [div100ths:...] as it is too specific
Will add a more generic variant later.
2020-02-24 22:50:10 +01:00
Grovkillen 9425eb8bea [benchmark] fixed incorrect syntax 2020-02-24 20:52:30 +01:00
Grovkillen d1cf9f977d Merge pull request #4 from letscontrolit/mega
update
2020-02-24 19:58:42 +01:00
TD-er 5d3813bd3c Merge pull request #2828 from crathje/mega
[Rules] [Feature Request] Adding support for substring and hex parsing
2020-02-24 13:05:26 +01:00
Gijs Noorlander 079e84b3d3 [Rules] Make nested string modification commands possible 2020-02-24 13:02:12 +01:00
Gijs Noorlander 99bb53753e Add note to optimize code 2020-02-24 01:57:44 +01:00
Gijs Noorlander 4a19cc8b77 [docs] Document string handling in rules (PR #2828 )
Closes: #2828
2020-02-24 01:46:35 +01:00
TD-er 9146a282ca Merge branch 'mega' into mega 2020-02-24 01:39:35 +01:00
TD-er abc1149abc Merge pull request #2898 from TD-er/revert_workaround
Revert "Work-around for breaking change in Arduino core lib"
2020-02-23 23:18:29 +01:00
Gijs Noorlander 62437c0aee Revert "Work-around for breaking change in Arduino core lib"
This reverts commit fc5d674f66.
2020-02-23 23:16:44 +01:00
TD-er 7dc4101faa Merge pull request #2630 from TD-er/feature/CC811
[CCS811] Plugin 089 CCS811 TVOC/eCO2
2020-02-23 11:09:37 +01:00
Gijs Noorlander 9e960fe5be [Travis] Remove Unicode characters from source code 2020-02-23 00:59:55 +01:00
Gijs Noorlander 32c7ee2509 Remove a inadvertently added change for schedule_all_task_device_timers
No idea how that change of removing the comments on that line was included in this PR.
2020-02-23 00:53:08 +01:00
Gijs Noorlander a15955979a [CCS811] Act on each reading, but only send to controller on PLUGIN_READ
The same as been done in P083_SGP30.
2020-02-23 00:11:52 +01:00
Gijs Noorlander 4b8c1b8a53 [CCS811] remove nonsense <TD>
As reported by @dimov-cz
2020-02-22 22:53:27 +01:00
Gijs Noorlander 7886b9af11 [CCS811] Rename P089 to P090 2020-02-22 22:53:27 +01:00
Gijs Noorlander 0fb9b3c9db [CC811] Rename file to _P090... 2020-02-22 22:53:27 +01:00
Gijs Noorlander 1735ea5bfb [CCS811] Fix compile error unused variable 2020-02-22 22:53:27 +01:00
Gijs Noorlander 05f1134d9c [CCS811] Plugin 089 CCS811 TVOC/eCO2
Taken from Playground and adapted a bit to use modern coding style
2020-02-22 22:53:27 +01:00
stefan 8cb52d2e62 Auto stash before merge of "mega" and "origin/mega" 2020-02-22 22:51:39 +01:00