Commit Graph
2616 Commits
Author SHA1 Message Date
uwekaditz e1c8d8972c Merge branch 'UweKaditz' of https://github.com/uwekaditz/ESPEasy into UweKaditz 2020-03-13 19:56:13 +01:00
uwekaditz bec007abb7 merged with release mega-20200305
merged with release mega-20200305
2020-03-09 19:59:56 +01:00
TD-er b63ca294e4 Merge pull request #2930 from uzi18/patch-7
add support for space padding in transformations, #2928
2020-03-08 23:36:07 +01:00
Gijs Noorlander fdd054fca1 [Rules] Fix parsing new rules commands when building JSON string (#2932)
Fixes: #2932
2020-03-08 09:48:47 +01:00
Bartłomiej Zimoń 99e3538d84 add support for space padding in transformations
related to #2928
2020-03-06 21:39:36 +01:00
TD-er 1592e8f32c Merge pull request #2910 from tiomny/SetDatetime_1
Datetime command
2020-03-06 12:05:01 +01:00
Gijs Noorlander 483e83a3b6 Fix build in ArduinoIDE
As reported here: https://github.com/letscontrolit/ESPEasy/commit/6bc909f026fae2e859163080c704f1679e40e548#r37670612
2020-03-06 11:25:02 +01:00
TD-er 60b73096db Merge branch 'mega' into SetDatetime_1 2020-03-06 11:17:39 +01:00
Gijs Noorlander a8682e23ae [DateTime] Documented command + few fixes
- Argument number was incorrect
- did not set time source.  (so you had to set NTP which defeats the purpose of this command
- Added documentation
- Moved the command call to the correct first letter of the alphabet.
2020-03-06 01:33:14 +01:00
Gijs Noorlander 4e7cb1e32d [Build] Split controllers on minimal OTA builds
Split Domoticz and FHEM/HomeAssistant/OpenHAB into separate builds as these are most likely never used together.
2020-03-05 15:12:25 +01:00
Artem 2882d8d4d3 Change SetDatetime to Datetime command 2020-03-05 00:50:45 +03:00
Gijs Noorlander 8b8de9d865 [Build] Fix build issue ArduinoOTA ESP32 build 2020-03-04 15:10:19 +01:00
Gijs Noorlander f251b6ad42 Fix Append unit number to hostname (#2918)
Fixes: #2918

Known issue:
Currently we don't use this in controllers, so we must add that as a setting for controllers.
2020-03-04 13:49:39 +01:00
Gijs Noorlander 4e91083292 [Build] Set flash mode to DOUT for all ESP8266 builds
There does not seem to be much speed difference, but it may help in getting a few more nodes stable.
2020-03-04 00:11:07 +01:00
Artem 59b2902559 Added missed linefeeds 2020-03-03 23:18:49 +03:00
Artem f5e1ab25e8 Removed extra linefeed 2020-03-03 23:18:07 +03:00
Artem 9773166606 Remade using current code base 2020-03-03 23:16:47 +03:00
Artem de5ba6380b Removed serialPrintln 2020-03-03 22:27:40 +03:00
Artem f830d95aad Removed extra includes 2020-03-03 22:26:01 +03:00
Artem 03437e1544 Rolled back extra changes 2020-03-03 22:25:29 +03:00
Artem 6134f6d0ab SetDatetime command 2020-03-03 22:24:48 +03:00
Gijs Noorlander 1de135001b [Cleanup] Include _Plugin_Helper.h in all plugin INO files
This does include almost all needed for a plugin.
So it will make intellisense highlighting useful as otherwise almost each line in a plugin file will be marked red.
2020-03-03 16:42:07 +01:00
Gijs Noorlander 771a46757f [Cleanup] Use StringProvider to share more code + ESP32 core lib 1.11.2 2020-03-03 10:40:00 +01:00
Gijs Noorlander d55e466122 [Cleanup] Fix build errors due to forward declarations and includes 2020-03-03 09:57:38 +01:00
Gijs Noorlander 49308e3582 [Cleanup] Fix build issues in some plugins
Time related functions now should be interfaced via the global `node_time`
2020-03-03 08:33:25 +01:00
Gijs Noorlander da4bb18c7b [ESP32] Rename WebServer object to web_server to fix build issues
ESP32's WebServer class has the same name as our global object had.
So you could only define it in ESPEasy.ino.

Now it is renamed to `web_server` and now ESP32 and ESP8266 will happily build with the global object defined in .h/.cpp.
2020-03-03 01:23:27 +01:00
Gijs Noorlander 418e01320b [Cleanup] Fix build errors 2020-03-03 00:22:42 +01:00
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 a764b5e9e3 Merge pull request #2911 from tiomny/Extensions
WebServer determines more media types
2020-03-01 00:08:44 +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
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
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 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
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 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 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
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