Compare commits

...
Author SHA1 Message Date
ESPEasy release bot a7f1d6153c automatically updated release notes for mega-20181220 2018-12-20 04:00:08 +01:00
Gijs NoorlanderandGitHub dcfc8ffd01 Merge pull request #2184 from TD-er/feature/2180_APmodeEnabledEvent
[WiFi] Add WiFi#APmodeDisabled & WiFi#APmodeEnabled #2180
2018-12-19 23:42:15 +01:00
TD-er fd9f63aab9 [WiFi] Documentation of new WiFi#APmodeEnabled / Disabled events 2018-12-19 22:13:53 +01:00
TD-er 8b8174daef [WiFi] Add WiFi#APmodeDisabled & WiFi#APmodeEnabled #2180
Added events:
- WiFi#APmodeEnabled
- WiFi#APmodeDisabled
2018-12-19 21:56:23 +01:00
Gijs NoorlanderandGitHub 708adf2190 Merge pull request #2182 from TD-er/feature/AddTimers_core250
Feature/add timers core250
2018-12-19 16:05:09 +01:00
TD-er f4a98ea43c [TimingStats] Add handle_schedule() to the timingstats. 2018-12-19 15:25:42 +01:00
TD-er 9affa6b1c4 [TimingStats] Add timing stats for controllers
As requested here:
https://github.com/esp8266/Arduino/issues/5513#issuecomment-448558292
2018-12-19 15:06:48 +01:00
Gijs NoorlanderandGitHub 17f403db5d Merge pull request #2177 from Grovkillen/UpdateDocs
[docs] P005 added to RTD
2018-12-19 11:53:41 +01:00
Gijs NoorlanderandGitHub 7d135716dd Merge pull request #2181 from TD-er/mega
[PUYA] Support for PUYA now in core 2.5.0
2018-12-19 11:52:58 +01:00
TD-er 6c747d15fc [PUYA] Support for PUYA now in core 2.5.0
See: https://github.com/esp8266/Arduino/pull/5504
2018-12-19 11:25:00 +01:00
Grovkillen 6c838846c4 [docs] fixed better value name in P003
MomentaryConsumption changed to W
2018-12-18 12:17:36 +01:00
Grovkillen 3a647a9ab1 [docs] P005 DHT11 + DHT22 hardware added 2018-12-18 12:13:08 +01:00
GrovkillenandGitHub 255f297f8a Merge pull request #2 from letscontrolit/mega
update from mega
2018-12-18 11:30:17 +01:00
ESPEasy release bot 398f805a3a automatically updated release notes for mega-20181218 2018-12-18 04:00:10 +01:00
Gijs NoorlanderandGitHub 395abb6e7b Merge pull request #2171 from Grovkillen/UpdateDocs
[docs] Pulse counter (P003) + Dallas (P004) added
2018-12-17 23:54:13 +01:00
Gijs NoorlanderandGitHub c32ee98cda Merge pull request #2173 from TD-er/bugfix/reduce_size_minimal_build
[Minimal build] Reduce file size of minimal build for 1MB OTA
2018-12-17 23:53:40 +01:00
TD-er 2973f32f5a [Minimal build] Reduce file size of minimal build for 1MB OTA
In order to get the build size down, a number of things had to be done:

- Removed notifications
- Reduce favicon.ico size
- Reduce flash string usage
- No SVG images on buttons.

Also made the OTA load button visible but disabled when OTA not possible.
2018-12-17 23:25:17 +01:00
TD-er 680f60e167 [Core 2.5.0] Update label to core "2.5.0-beta2" 2018-12-17 23:19:59 +01:00
TD-er 9a46820d40 [PUYA] Prepare for upcoming PUYA patch in core library
See https://github.com/esp8266/Arduino/pull/5504
This needs a little change in the detect script to see if the previous patch already was applied.
2018-12-17 23:18:28 +01:00
Grovkillen 25b2269e6b [docs] fixed search box on RTD + added HW links in the plugin categories 2018-12-17 20:04:18 +01:00
Grovkillen 7c3bcabe1d [docs] P004 (DS18b20) added 2018-12-17 15:13:42 +01:00
Grovkillen e1d2832195 [docs] P003 documented (generic pulse counter)
Hardware
YFS401
TCR5000
LJ12A3
2018-12-17 14:29:35 +01:00
GrovkillenandGitHub cdeaeeaf14 Merge pull request #1 from letscontrolit/mega
update from mega
2018-12-17 09:18:20 +01:00
ESPEasy release bot 36d6c7d448 automatically updated release notes for mega-20181217 2018-12-17 04:00:07 +01:00
Gijs NoorlanderandGitHub 52893300f7 Merge pull request #2169 from letscontrolit/bugfix/2m256_flash
[2M flash] Change 2M128 into 2M256 for 256k SPIFFS
2018-12-17 01:15:54 +01:00
TD-er 8a984e6e78 [2M flash] Update deploy script to match 2M256 flash layout 2018-12-16 21:12:30 +00:00
Gijs NoorlanderandGitHub e7e4aa1acb [2M flash] Change 2M128 into 2M256 for 256k SPIFFS
See: https://github.com/letscontrolit/ESPEasy/issues/2162#issuecomment-447674460
2018-12-16 22:08:03 +01:00
ESPEasy release bot f8ae031be7 automatically updated release notes for mega-20181216 2018-12-16 04:00:10 +01:00
Gijs NoorlanderandGitHub a516892ce6 Merge pull request #2167 from TD-er/bugfix/restore_wroom02_config
[#2162] Restore PlatformIO config for WROOM02 + new 2M128 flash layout
2018-12-16 01:06:37 +01:00
TD-er caa7e12eb7 [#2162] Restore PlatformIO config for WROOM02 + new 2M128 flash layout
See #2162
Also added a WROOM02 core 2.5.0 beta test build using the new 2M128k flash layout. (allowing OTA)
Using the new layout will remove any existing 2M1M layout.
2018-12-16 00:41:29 +01:00
ESPEasy release bot 9b1151baa6 automatically updated release notes for mega-20181214 2018-12-14 04:00:20 +01:00
Gijs NoorlanderandGitHub 40009a49f9 Merge pull request #2161 from TD-er/revert/GPIO_to_20181204
Revert/GPIO to 20181204 & prepare for easier merge future GPIO fixes
2018-12-14 02:02:34 +01:00
TD-er 0a4f7cf174 [core 2.5.0-beta1] Add core 2.5.0 IR build and normal 1M VCC
This commit was added: https://github.com/esp8266/Arduino/commit/8ede8f14593def949aeee9a2ada1c01bbe9afd52
Which allows the IR build to be linked too.

Also the disabled plugins in previous test builds could be enabled again (P003, P008 and Servo)
2018-12-14 01:41:11 +01:00
TD-er b13541cf58 [GPIO] Track output value in plugin overview
Quick fix to see the output value of a GPIO pin in the plugin overview and be able to query its value.
2018-12-14 01:05:33 +01:00
Gijs Noorlander c8094bbecd Merge remote-tracking branch 'origin/revert/GPIO_to_20181204' into revert/GPIO_to_20181204 2018-12-13 17:21:08 +01:00
Gijs Noorlander 98c4905827 Revert GPIO, prepare for easier merge later GPIO fixes
This commit is to cherry-pick all fixes in the reverted commits to make future GPIO related fixes be as easy as possible.
These also contain small fixes which were in the reverted commits, but not really related to the issues for which this revert is meant.
2018-12-13 17:20:46 +01:00
Gijs Noorlander c298c5a457 Revert "[GPIO] GPIO commands with long duration will be stopped async."
This reverts commit 0c0db4f401.
2018-12-13 17:19:48 +01:00
Gijs Noorlander 3bcfb5b0f5 Revert "[GPIO] Add some checks to what GPIO pin can be used."
This reverts commit 77b283197d.
2018-12-13 17:19:13 +01:00
Gijs Noorlander 7824466685 Revert "[GPIO] Move "inputswitchstate" back to Switch plugin"
This reverts commit 8db694bde6.
2018-12-13 17:19:13 +01:00
Gijs Noorlander f30530d470 Revert "[GPIO] Move all GPIO commands out of Switch plugin"
This reverts commit c304efb1b4.
2018-12-13 17:19:13 +01:00
Gijs NoorlanderandGitHub 02ef853e1e Merge pull request #2148 from Grovkillen/UpdateDocs
[docs] Re-added changes reverted due to merge fix + new flasher version
2018-12-13 17:16:18 +01:00
Gijs NoorlanderandGitHub ed50071953 Merge pull request #2157 from TD-er/feature/testbuild_core2_5_0_beta1
Feature/testbuild core2 5 0 beta1
2018-12-13 17:15:18 +01:00
Gijs Noorlander 122c1932e8 [core 2.5.0-beta1] Update build names in deploy script
Must include the "core_250_beta" builds
2018-12-13 16:55:31 +01:00
Gijs Noorlander 59b5adfeee [core 2.5.0-beta1] Clean up PlatformIO.ini & add some 2.5.0 beta builds 2018-12-13 15:54:57 +01:00
Gijs Noorlander 4de68afc7a [Rules] Modulo operator '%' only works on int
As reported here: https://github.com/letscontrolit/ESPEasy/pull/2157#issuecomment-446976418
2018-12-13 15:51:53 +01:00
Gijs Noorlander 5a768fb094 Revert GPIO, prepare for easier merge later GPIO fixes
This commit is to cherry-pick all fixes in the reverted commits to make future GPIO related fixes be as easy as possible.
These also contain small fixes which were in the reverted commits, but not really related to the issues for which this revert is meant.
2018-12-13 12:20:38 +01:00
Gijs Noorlander fd272367f2 Revert "[GPIO] GPIO commands with long duration will be stopped async."
This reverts commit 0c0db4f401.
2018-12-13 11:37:33 +01:00
Gijs Noorlander 20635e91c8 Revert "[GPIO] Add some checks to what GPIO pin can be used."
This reverts commit 77b283197d.
2018-12-13 11:34:43 +01:00
Gijs Noorlander 9b71379687 Revert "[GPIO] Move "inputswitchstate" back to Switch plugin"
This reverts commit 8db694bde6.
2018-12-13 11:33:16 +01:00
Gijs Noorlander 4476bd1016 Revert "[GPIO] Move all GPIO commands out of Switch plugin"
This reverts commit c304efb1b4.
2018-12-13 11:31:46 +01:00
Gijs Noorlander 3b49dca5f5 [core 2.5.0-beta1] Add core number and disable some 1MB builds
Disabling dev/test builds for 1 MB chips, since the bin files will be too big to fit on 1 MB modules.
We have to decide later how to make the plugins in dev/test state available for 1 MB modules.
2018-12-12 16:08:03 +01:00
Gijs Noorlander 3c1c84b288 [build] Add option to give a PR number at command line. 2018-12-12 15:17:15 +01:00
Gijs Noorlander 1d005250c5 [Tools] Set executable bits to scripts 2018-12-12 13:47:01 +01:00
Gijs Noorlander 8c0ded31be [core 2.5.0-beta1] Allow building against core 2.5.0
See: https://github.com/esp8266/Arduino/issues/5476
2018-12-12 13:40:22 +01:00
Gijs Noorlander 63d6b3944f [core 2.5.0-beta1] Test build using platformIO
Created own PIO platform to test 2.5.0-beta1
2018-12-11 13:03:51 +01:00
Grovkillen e6f24edd32 [docs] added hardware Ventus W266 (P046) 2018-12-10 14:13:56 +01:00
Grovkillen 827ef08f50 [flasher] 0.03.002 forgot to add pixel per inch settings (defaulted 144) 2018-12-09 20:49:05 +01:00
Grovkillen f4e84ea4c6 [flasher] 0.03.001 new window layout for long file names in dropdown 2018-12-09 20:19:07 +01:00
Grovkillen 520cee5d0d [docs] fixed the command reference list (looks better on small screens) 2018-12-08 20:09:09 +01:00
Grovkillen 5b80edb943 [docs] Up to date with the info before the merge fix on 181207 2018-12-08 19:04:15 +01:00
ESPEasy release bot 6256cb5255 automatically updated release notes for mega-20181208 2018-12-08 04:00:13 +01:00
Gijs NoorlanderandGitHub 2fbe1a2655 Max OTA filesize on 1MB = 616448 bytes. 2018-12-07 21:25:27 +01:00
Gijs NoorlanderandGitHub d9028a732c [#2144] Extend check for file size of ESP32 images 2018-12-07 21:20:45 +01:00
Gijs NoorlanderandGitHub 09a79a5892 [#2144] Only include OTA images that fit (<600 k)
Added a check to the script that makes the ZIP file, to only add image files that will fit in the sketch space.
See https://github.com/letscontrolit/ESPEasy/issues/2144
2018-12-07 21:06:58 +01:00
GrovkillenandGitHub 8ed77ffb01 Merge pull request #2142 from Grovkillen/UpdatedFlasher0003000
[flasher] Updated flasher with custom serial commands
2018-12-07 15:16:25 +01:00
Grovkillen a7142f4a3c Fixed merge conflict 2018-12-07 15:15:50 +01:00
Grovkillen 9d7750b881 [docs] added hardware tSense 2018-12-07 14:52:47 +01:00
Grovkillen 89da79bbdc Revert "[docs] added commented references to commands list"
This reverts commit e52f85e893.
2018-12-07 13:27:30 +01:00
Grovkillen 2add0fcae2 [flasher] 0.03.000 added custom serial commands. 2018-12-07 13:19:07 +01:00
Grovkillen e1495f9520 Merge remote-tracking branch 'letscontrolit/mega' into DocumentationUpdate 2018-12-07 10:02:02 +01:00
Grovkillen e52f85e893 [docs] added commented references to commands list 2018-12-07 10:00:56 +01:00
ESPEasy release bot e26cf54e47 automatically updated release notes for mega-20181207 2018-12-07 04:00:13 +01:00
Gijs NoorlanderandGitHub af9d4d925e Merge pull request #2111 from chunter1/mega
HX711 load cell plugin now supports dual channel
2018-12-06 09:00:55 +01:00
Gijs NoorlanderandGitHub fc950b141f Merge pull request #2126 from wdonker/mega
Fix P029 - MQTT Helper: device status not updated when GPIO is (#1708)
2018-12-06 08:55:56 +01:00
Gijs NoorlanderandGitHub 331462877f Merge pull request #2129 from Grovkillen/DocumentationUpdate
[docs] look and feel (headlines css) + P001 hardware + script for screenshots of GUI
2018-12-06 08:55:26 +01:00
Gijs NoorlanderandGitHub 50635d8024 Merge pull request #2131 from TD-er/bugfix/split_gpio_from_switch
Split GPIO commands from switch plugin
2018-12-06 08:54:38 +01:00
Grovkillen 108bdb4b01 [docs] fixed "ESP Easy" logo margin bug
The logo in the top left corner was being pushed down because of my CSS of images in general. Fixed now.
2018-12-05 22:08:19 +01:00
Gijs Noorlander 0c0db4f401 [GPIO] GPIO commands with long duration will be stopped async.
Implemented a GPIO timer for the scheduler to schedule a GPIO state change.

These will be stopped async:

- Tone > 50 msec duration
- Longpulse and longpulse_ms

Also implemented a frequency parameter for the `pwm` command.
2018-12-04 22:38:17 +01:00
Gijs Noorlander 77b283197d [GPIO] Add some checks to what GPIO pin can be used.
Not all pins should be used.
For example GPIO 6 - 11 are often connected to flash and thus not usable.
2018-12-04 22:38:17 +01:00
Gijs Noorlander 021374bf09 [GPIO] Add GPIO pin description page
And some other GPIO related updates.
2018-12-04 22:38:17 +01:00
Gijs Noorlander 8db694bde6 [GPIO] Move "inputswitchstate" back to Switch plugin
And added some checks + documentation.
2018-12-04 22:38:17 +01:00
Gijs Noorlander c304efb1b4 [GPIO] Move all GPIO commands out of Switch plugin
Currently only "gpio", "pwm" , "pulse" and "servo" work
2018-12-04 22:38:17 +01:00
Grovkillen 60edd5208e [docs] Test if arrows (unicode) work with RTD 2018-12-04 15:23:41 +01:00
Grovkillen b6e96a0086 [docs] P052 sensair S8 hardware page updated 2018-12-04 15:03:42 +01:00
Grovkillen 72862e7169 [docs] syntax error fixed. 2018-12-04 14:03:11 +01:00
Grovkillen 25c2f55219 [docs] updated headlines (css) + added P001 hardware 2018-12-04 13:58:34 +01:00
Grovkillen 65d072dcf7 [docs] added phantomJS script to streamline the screenshots 2018-12-04 13:07:00 +01:00
wdonkerandGitHub 89b30dcd88 Update _C002.ino 2018-12-04 12:40:44 +01:00
ESPEasy release bot 7948efb6fe automatically updated release notes for mega-20181204 2018-12-04 04:00:08 +01:00
GrovkillenandGitHub 05723163cc Merge pull request #2123 from Grovkillen/DocumentationUpdate
[docs] added P001 hardware
2018-12-03 14:38:20 +01:00
Grovkillen 79123392a9 Merge remote-tracking branch 'Grovkillen/DocumentationUpdate' into DocumentationUpdate 2018-12-03 14:35:56 +01:00
Grovkillen ccf2929e69 [docs] Added P001 (hardware) 2018-12-03 14:35:41 +01:00
ESPEasy release bot 8ae51cda1c automatically updated release notes for mega-20181203 2018-12-03 04:00:11 +01:00
Gijs NoorlanderandGitHub ebe11246a1 Merge pull request #1813 from workgroupengineering/feature/Issue_1771
Increase the rule speed
2018-12-02 23:39:17 +01:00
Gijs Noorlander 43dfa03f2f [HLW8012] Make reading Sonoff POW non blocking ( #2097 )
See #2097
Timings are now less than a msec per iteration and interrupt driven.
Also settings are no longer saved every time the plugin gets initialized. (flash wear out)
2018-12-02 23:13:20 +01:00
Gijs Noorlander ce1ab3e718 [HLW8012] Update library to 1.1.1 2018-12-02 23:11:05 +01:00
Gijs Noorlander c9fa53914a [webserver CORS] #2119 Allow commands to be scripted
See #2119
2018-12-02 21:21:00 +01:00
Gijs Noorlander 4acedced42 [PWM] #2117 PWM stops after about 80 msec in core 2.4.1
See #2117
2018-12-02 16:41:51 +01:00
Gijs Noorlander dd8a67adcd [ESP32] Disable RTOS Multitasking option (multi_heap_poisoning)
When enabled, we now get crashes and CORRUPT HEAP messages.
2018-12-02 12:15:56 +01:00
Gijs Noorlander ab893a7d14 [Rules] GetArgv should clear the return string before filling it
The `GetArgv` function should clear the return string, since it is re-used in `parseCommandString`

See: https://github.com/letscontrolit/ESPEasy/issues/2112#issuecomment-443494191
2018-12-02 11:07:52 +01:00
Gijs Noorlander aaae79c8d9 [Memory] Pass String as reference or const reference, not deepcopy
A number of functions was given a String parameter as a deepcopy instead of a (const) reference.
This will use a lot more memory and time, where it isn't needed.
Also those deepcopy actions may fail silently and thus lead to crashes.
2018-12-02 01:25:32 +01:00
Gijs Noorlander 6ae627b32a [Uncrustify] Make rules source code files better readable
Since the `ESPEasyRules.ino` file is newly introduced in this branch, now is the best moment to tidy up the source code.
Also included the used Uncrustify.cfg file.
2018-12-02 00:35:00 +01:00
Gijs Noorlander 8369c330de [Stack] P035_IRTX reduction of memory usage & speed improvement
- Parsed commands or IR codes now only use amount of memory needed, no fixed allocation on the stack.
- Strings passed to functions via const reference instead of deepcopy
- Massive checks for brand name is now done on lower case, to improve speed.
2018-12-02 00:31:57 +01:00
Gijs Noorlander 2290de3c98 [Stack] Optimize GetArgv to only allocate what is needed.
And also only allocate on the heap, not on the stack.
2018-12-01 22:51:43 +01:00
ESPEasy release bot 3f00ef5dde automatically updated release notes for mega-20181201 2018-12-01 04:00:09 +01:00
Gijs Noorlander afeed445ca [Stack] Make IP-address formatting simpler 2018-11-30 22:41:56 +01:00
Gijs Noorlander b76e8b4e8b [Stack] Reduce allocations on stack 2018-11-30 17:32:38 +01:00
chunter1andGitHub dab8c16e05 HX711 load cell plugin now supports dual channel support
Channel A and B can now be used completely independently.
2018-11-30 14:49:33 +01:00
Gijs Noorlander 84a31c0af9 [Rules engine] Set UseOldRulesEngine as default
Changed to use one of the VariousBits in the settingsfile, not adding an extra bit.
2018-11-30 14:13:53 +01:00
Saverio CisterninoandGijs Noorlander bdfa4b7eec Adding flag to settings for switch from old to new rules engine (Default engine old). 2018-11-30 13:51:09 +01:00
Saverio CisterninoandGijs Noorlander 99a77ad343 Fixed ESP32 build 2018-11-30 13:51:09 +01:00
Saverio CisterninoandGijs Noorlander 0b4c605f43 Change menu url from relative to absolute 2018-11-30 13:51:09 +01:00
Saverio CisterninoandGijs Noorlander eabf79be54 Redefine Rules WebUi 2018-11-30 13:51:09 +01:00
Saverio CisterninoandGijs Noorlander b14fe5de32 Added addButton, addFormTextBox overload and addSaveButton, AddDeleteButton functions 2018-11-30 13:51:09 +01:00
Saverio CisterninoandGijs Noorlander ed3d8f5371 implement matching of rule file 2018-11-30 13:51:09 +01:00
Saverio CisterninoandGijs Noorlander 459e103a73 Moved the rules related functions from Misc.ino to ESPEasyRules.ino 2018-11-30 13:51:09 +01:00
Gijs NoorlanderandGitHub c62fab5eec Merge pull request #2110 from TD-er/bugfix/1970_remove_newline_HTTP_header
[#1970] Fix: HTTP Header broken in 'Generic HTTP Advanced' controller
2018-11-30 12:20:04 +01:00
Gijs Noorlander ecba3c79e2 [#1970] Fix: HTTP Header broken in 'Generic HTTP Advanced' controller
Also replaced a number of short strings not to use F() macro to reduce binary footprint.
2018-11-30 11:34:53 +01:00
Gijs Noorlander 5146803833 [Docs] Update to Sphinx 1.8.2 2018-11-30 11:33:34 +01:00
ESPEasy release bot 2b5a822cd5 automatically updated release notes for mega-20181130 2018-11-30 04:00:11 +01:00
Gijs NoorlanderandGitHub 5ee53a49f5 Merge pull request #2106 from TD-er/feature/espeasy_p2p_protocol
[Docs] Document ESPeasy p2p controller
2018-11-30 00:18:17 +01:00
Gijs NoorlanderandGitHub b49921eb9a New data structures for P001, P019, P009, etc. plugins
See #2057 

Currently this version works with P001 and P019.

Main changes:
Added a new command to SWITCH 001: unmonitor,pcf,port#
Added two new commands to PCF 019: monitor,pcf,port# and unmonitor,pcf,port#
Added two new http commands: monitor and unmonitor
Added a new rules command: logPortStatus that will print the port status
Added the "SafeButton" functionality to 001 and 019 that will avoid false positives
Added more checks to all commands in WRITE function to avoid possible overflows
Added two more PIN STATUS: OFFLINE and INPUT_PULLUP
Modified SendStatus function so that it will be called only when needed (#1593)
Redesign of the pinstate page
Optimized the WRITE function, changing the serie of 'if' with 'else if'
2018-11-30 00:05:57 +01:00
Gijs Noorlander b9f999d79f [Docs] Split Sphinx plugin substitutions to speed-up build
Split the plugin related substitutions into separate files (per 10) to speed-up building docs.

Please note the use of indirect paths used in includes, needed to link those replacements from other directories.
2018-11-29 23:55:22 +01:00
Gijs Noorlander 776277b179 [Docs] Move Sphinx substitutions to separate file to speed-up build 2018-11-29 22:37:58 +01:00
Gijs Noorlander 56fb47b6a8 [Docs] Document ESPeasy p2p controller
And renamed some structs
2018-11-29 18:41:36 +01:00
Plebs 6d9ea14d6c final cleanup
removed debug strings and functions.
2018-11-29 15:44:59 +01:00
Gijs NoorlanderandGitHub f74ea5f8c8 [Readme] Add badge for ReadTheDocs build status 2018-11-29 09:30:56 +01:00
ESPEasy release bot ee1a9f7cef automatically updated release notes for mega-20181129 2018-11-29 04:00:15 +01:00
Gijs NoorlanderandGitHub c3b1247f9d Merge pull request #2099 from workgroupengineering/feature/embed_files_enhanced
Embed files enhanced
2018-11-29 00:35:48 +01:00
Gijs NoorlanderandGitHub 742aec9598 Merge pull request #2100 from clumsy-stefan/patch-1
Allow for duplicate task names again
2018-11-29 00:33:53 +01:00
GrovkillenandGitHub 496e9443b0 Merge pull request #2101 from Grovkillen/DocumentationUpdate
[docs] Small update, fixed some typos
2018-11-28 14:47:29 +01:00
Grovkillen d708a62efe Merge remote-tracking branch 'letscontrolit/mega' into DocumentationUpdate 2018-11-28 14:46:10 +01:00
Grovkillen 3f1deeef96 [docs] Small update, fixed some typos 2018-11-28 14:45:19 +01:00
clumsy-stefanandGitHub 385bb23484 Allow for duplicate task names again
Only warn if a task name is duplicate but allow it to be saved without clearing the value-names of that task.
2018-11-28 14:22:57 +01:00
Saverio Cisternino f30977f6f3 [Embed Files] Avoid redirect http to https of minify_html_css 2018-11-28 13:26:34 +01:00
Saverio Cisternino a3aa944988 [Embed Files] Append zero termination 2018-11-28 13:26:34 +01:00
Saverio Cisternino 52c1e1243e [Embed Files] Add exit code 1 when minify failed 2018-11-28 13:26:24 +01:00
ESPEasy release bot 12852c39d6 automatically updated release notes for mega-20181128 2018-11-28 04:00:07 +01:00
Gijs NoorlanderandGitHub 35b7f586d1 Merge pull request #2089 from TD-er/bugfix/stop_serial_output
[Serial] Redirect all Serial.print/println to a buffer
2018-11-28 00:14:24 +01:00
Gijs NoorlanderandGitHub 4f08ebbf1a Merge pull request #2096 from TD-er/bugfix/MQTT_clientID_setting
[MQTT] change client-id at reconnect - #1918
2018-11-28 00:13:13 +01:00
Gijs NoorlanderandGitHub 45e302c4ee Merge pull request #2095 from TD-er/cleanup/Sonoff_POW_build_merges
[Sonoff POW] Merge POW r1/r2 in the same build
2018-11-27 23:48:09 +01:00
Gijs Noorlander fd6ba18c36 [MQTT] change client-id at reconnect - #1918
As discussed here: https://github.com/letscontrolit/ESPEasy/issues/1918#issuecomment-441203285
2018-11-27 23:45:19 +01:00
Gijs Noorlander f008accd4e [Sonoff POW] Merge POW r1/r2 in the same build
Sonoff POW build now is usable for both POW and POW r2.
Use the Reset Factory default to select proper pre-defined setup for keys and relay.
Both power sensors are included as plugin.
2018-11-27 23:05:06 +01:00
Gijs Noorlander 24f661f80a [Serial] Remove code to detect if serial port is read
See discussion here: https://github.com/letscontrolit/ESPEasy/pull/2089#issuecomment-442066980
2018-11-27 22:10:26 +01:00
GrovkillenandGitHub 98c2c1e6eb Merge pull request #2094 from Grovkillen/DocumentationUpdate
[docs] Added servo motor and plugin sections
2018-11-27 15:58:03 +01:00
Grovkillen f9c9557384 [docs] Added servo motor and plugin sections 2018-11-27 15:54:36 +01:00
Gijs Noorlander 5b5c1f224b [Commands] No longer run commands from scheduler
Problem appeared to be a stack overflow.
There were a lot of large arrays allocated on the stack to parse commands or their arguments.
These are now only temporary allocated and de-allocated as soon as possible.
2018-11-27 13:44:27 +01:00
Gijs Noorlander 3e367c020f [Serial] Forgot the Serial.printf 2018-11-27 13:44:27 +01:00
Gijs Noorlander 80b8b03869 [Serial] Replace serial port activity marker with unprintable marker
Now use ASCII code `1` as char value to detect reading activity.
2018-11-27 13:44:27 +01:00
Gijs Noorlander d3f1dbd934 [Serial] Redirect all Serial.print/println to a buffer
Writing data to the serial port while it is not being read may cause all kinds of issues and maybe even Watchdog Resets.
All `Serial.print` and `Serial.println` calls in our own code is now sent to a dynamic buffer.
This buffer will try to only send data to the serial port when its buffer permits it.
After a while, unread data will be dropped.
2018-11-27 13:44:27 +01:00
GrovkillenandGitHub defdc8215b [flasher] Warning if baud rate too high + info post-flash 2018-11-27 08:44:14 +01:00
ESPEasy release bot 8e1f89035e automatically updated release notes for mega-20181127 2018-11-27 04:00:10 +01:00
Gijs NoorlanderandGitHub c7b2052298 [Travis] make clean + build only once
As suggested here: https://github.com/letscontrolit/ESPEasy/pull/2089#issuecomment-441805148
2018-11-26 23:30:26 +01:00
Gijs NoorlanderandGitHub 0e7c8e4fa0 [PlatformIO] Lower upload_speed to 115200
As suggested here: https://github.com/letscontrolit/ESPEasy/pull/2089#issuecomment-441779773 by @ivankravets
2018-11-26 22:45:05 +01:00
GrovkillenandGitHub fd228119a3 [docs] Fix relative path for command list 2018-11-26 22:15:22 +01:00
Gijs NoorlanderandGitHub d3cf913ece [PlatformIO] Change to LWIP2_LOW_MEMORY
As advised by @ivankravets
See https://github.com/letscontrolit/ESPEasy/pull/2089#issuecomment-441697474
2018-11-26 17:17:47 +01:00
GrovkillenandGitHub 57232e819c Merge pull request #2091 from Grovkillen/DocumentationUpdate
[docs] Core commands added + relay,buzzer etc. etc.
2018-11-26 15:33:11 +01:00
Grovkillen 5630bf83da [docs] command list updated with internal commands 2018-11-26 15:30:14 +01:00
Grovkillen 125bc51ac2 Merge remote-tracking branch 'letscontrolit/mega' into DocumentationUpdate 2018-11-26 12:57:47 +01:00
Grovkillen 3984823de6 [docs] Added GPIO handling pages (tones, relay etc.) 2018-11-26 12:46:21 +01:00
Gijs NoorlanderandGitHub f8e2e34f6f Merge branch 'mega' into new/monitor2 2018-11-25 22:47:57 +01:00
Plebs f1b41d903e more bugfixing 2018-11-25 19:23:51 +01:00
ESPEasy release bot 592e6afd60 automatically updated release notes for mega-20181125 2018-11-25 04:00:07 +01:00
Gijs NoorlanderandGitHub 937fce0fe5 Merge pull request #2087 from TD-er/feature/RTD_links_plugins
[Documentation] Add link to RTD for plugins
2018-11-25 01:50:01 +01:00
Unknown 30bee983b0 [Documentation] Add link to RTD for plugins
Since the documentation at RTD is yet still very preliminary, both Wiki and RTD links will be presented.
2018-11-25 01:49:25 +01:00
Gijs NoorlanderandGitHub 9579cb45b7 Merge pull request #2082 from letscontrolit/feature/lcd_german_umlaute
LCD P012_LCD Plugin German Umlaute #2081
2018-11-24 23:40:58 +01:00
Gijs NoorlanderandGitHub 1cc3889127 Merge pull request #2083 from TD-er/feature/factory_reset_page
Feature/factory reset page
2018-11-24 23:40:16 +01:00
Unknown 376104a8b4 [Factory Reset] Add some documentation 2018-11-24 23:39:57 +01:00
Gijs NoorlanderandGitHub 44a23fb574 Add -mtarget-align to common build_flags
See https://github.com/arendst/Sonoff-Tasmota/issues/3678#issuecomment-419712437
Probably related: #2084 #2008
2018-11-24 14:49:12 +01:00
Gijs NoorlanderandGitHub 2f50cfe26b P012_LCD Remove duplicate lines 2018-11-24 12:02:40 +01:00
ESPEasy release bot d8e4f9d850 automatically updated release notes for mega-20181124 2018-11-24 04:00:07 +01:00
Unknown 222397ea7a [Sysinfo] Add init to P026_sysinfo to set initial config only 1 active. 2018-11-24 01:24:48 +01:00
Gijs NoorlanderandGitHub 73b69d0ca2 LCD P012_LCD Plugin German Umlaute #2081
Thanks to @StefanRied 
See https://github.com/letscontrolit/ESPEasy/issues/2081#issue-383903764
2018-11-24 00:16:27 +01:00
Unknown 78cc4a3d52 [Factory Reset] Show page again after saving. 2018-11-23 22:23:40 +01:00
Unknown bbbbecab56 [Factory Reset] Add more categories not to clear
Settings to keep:
- Keep Unit/Name
- Keep WiFi config
- Keep Network config
- Keep NTP/DST config
- Keep log config
2018-11-23 22:05:46 +01:00
Plebs a451a876e4 bugfixing 2018-11-23 20:48:32 +01:00
Unknown 8ebf6a3c88 [Factory Reset] Add Factory reset page and allow to keep some settings 2018-11-23 17:21:24 +01:00
GrovkillenandGitHub a99ff721d8 Merge pull request #2080 from Grovkillen/DocumentationUpdate
[docs] Fixed some syntax error
2018-11-23 15:53:55 +01:00
Grovkillen 5058d326c7 [docs] Fixed some syntax error 2018-11-23 15:52:44 +01:00
GrovkillenandGitHub 9d4c4b5ea4 Merge pull request #2079 from Grovkillen/DocumentationUpdate
[docs] Added hardware pages
2018-11-23 15:50:53 +01:00
Grovkillen 54c0acf80d [docs] Added hardware pages 2018-11-23 15:49:05 +01:00
GrovkillenandGitHub 915a7beaea Merge pull request #2078 from Grovkillen/DocumentationUpdate
[docs] Added donation links in footer
2018-11-23 13:04:24 +01:00
Grovkillen 0ed9f204ab [docs] Added donation links in footer 2018-11-23 13:03:30 +01:00
GrovkillenandGitHub 601eeb529e Merge pull request #2077 from Grovkillen/DocumentationUpdate
[docs] Added plugin names to plugin pages + fixed "site map"
2018-11-23 11:38:54 +01:00
Grovkillen 541c0bba41 [docs] Added plugin names to plugin pages + fixed "site map" 2018-11-23 11:36:26 +01:00
GrovkillenandGitHub 49a95d06e7 Merge pull request #2075 from Grovkillen/DocumentationUpdate
[docs] fixed the TOC + added changelogs to all plugins + core
2018-11-23 10:46:13 +01:00
Grovkillen 153267b8c5 [docs] fixed the TOC + added changelogs to all plugins + core 2018-11-23 10:44:22 +01:00
ESPEasy release bot 8a2c35d15d automatically updated release notes for mega-20181123 2018-11-23 04:00:08 +01:00
Unknown 5ed2ebf7f7 [Factory Reset] Add initial structure to set defaults for a device model 2018-11-23 00:49:41 +01:00
Plebs 05245ac0da Merge branch 'new/monitor2' of https://github.com/giig1967g/ESPEasy into new/monitor2 2018-11-22 21:25:49 +01:00
Plebs c0c95deb30 fixed pcf8574 to avoid #702 2018-11-22 21:25:46 +01:00
GrovkillenandGitHub 0fcd810074 Merge pull request #2074 from Grovkillen/DocumentationUpdate
[docs] Documentation update (generic plugin pages)
2018-11-22 15:29:02 +01:00
Grovkillen 12f7c559b5 [docs] added all plugins to global + generated generic pages for them 2018-11-22 15:28:01 +01:00
Grovkillen 49271bebf5 [docs] Global variables for plugins + added raw plugin files 2018-11-22 11:40:16 +01:00
Unknown 05963c0f22 [HTML Footer] Change to "Powered by LetsControlIt community"
It is not powered by a website, but by the community.
2018-11-22 10:20:43 +01:00
Gijs NoorlanderandGitHub 417b62e064 Merge branch 'mega' into new/monitor2 2018-11-22 10:00:04 +01:00
Grovkillen 686b9ead85 [docs] Fixed error in image path 2018-11-22 09:24:46 +01:00
ESPEasy release bot 28706197b9 automatically updated release notes for mega-20181122 2018-11-22 04:00:12 +01:00
GrovkillenandGitHub b772c34911 Merge pull request #2065 from Grovkillen/DocumentationUpdate
[docs] Documentation update (first hardware page)
2018-11-21 16:18:41 +01:00
Gijs NoorlanderandGitHub 5ce7abbe56 [P073_7DGT] new commands (7dst, 7dsd, 7dtext), new options to show 12h or 24h clock
Adding new commands (7dst, 7dsd, 7dtext), new options to show 12h or 24h clock and fixing some bugs
2018-11-21 16:03:44 +01:00
papperoneandGitHub 0decde6fd0 Update _P073_7DGT.ino 2018-11-21 14:32:35 +01:00
ESPEasy release bot 2664dae375 automatically updated release notes for mega-20181121 2018-11-21 04:00:13 +01:00
Gijs NoorlanderandGitHub f65fd64c84 Merge pull request #2069 from TD-er/bugfix/Disable_SSDP
[SSDP] Disable SSDP checkbox
2018-11-21 01:03:38 +01:00
Unknown 5e65f18235 [HTML] Made HTML layout more uniform and optimize CSS
- Replaced all <TH> with functions
- Optimized CSS (removed some errors too)
- Uniform rendering of pages (TH, width first column)
- Added some metadata to timing stats page
- Reduction in used flash strings.
2018-11-21 00:29:52 +01:00
Unknown 8f350fcd0c [SSDP] Disable SSDP checkbox
See #1998
2018-11-20 19:49:33 +01:00
ESPEasy release bot 24a7330e5d automatically updated release notes for mega-20181120 2018-11-20 04:00:07 +01:00
Gijs NoorlanderandGitHub a8e8c39fa3 Update build_ESPeasy.sh 2018-11-20 01:23:19 +01:00
Gijs NoorlanderandGitHub e986c8a8e1 Merge pull request #2068 from TD-er/feature/build_scripts
Feature/build scripts
2018-11-20 01:16:40 +01:00
Unknown 63f01e7d9b [Build] Add test_ESP8266_1024_VCC to deploy script 2018-11-20 01:15:35 +01:00
Unknown a5f50fda5a [Build scripts] Add build script for Linux and include docs 2018-11-20 01:12:42 +01:00
Gijs NoorlanderandGitHub 0a2f8f9ccf Merge pull request #2066 from TD-er/bugfix/2063_LCD2004
Reduce stack usage on some plugins and fix LCD2004
2018-11-19 21:44:01 +01:00
Unknown 28f321d5c7 [Timing stats] Add LoadCustomTaskSettings() to the timing stats
These may get called quite often by some plugins (e.g. OLED)
2018-11-19 16:55:53 +01:00
Unknown af237c3e42 [P075 Nextion] Do not keep display lines allocated on stack
Large memory block was allocated on the (system) stack.
2018-11-19 16:26:41 +01:00
Grovkillen 84caa6939c [docs] added a first device page
If we like this one I will go ahead and convert the rest.
2018-11-19 15:55:07 +01:00
Unknown c8c9aab308 [OLED framed] Do not keep display lines allocated on stack
Was allocated on (system) stack, even when plugin was not used.
2018-11-19 15:41:54 +01:00
Unknown a06ade4979 [issue 2063] Incorrect saving settings on LCD2004
A bug introduced when renaming internal strings to reduce size of binary.
2018-11-19 15:40:48 +01:00
Plebs 691977c1dd Update _P009_MCP.ino 2018-11-19 15:34:37 +01:00
Plebs fda673ce9d Added support for P011, P022, P059, P063
I would call this version, beta 1 version :)
2018-11-19 15:33:59 +01:00
Plebs cec00400f2 Fixed write function in PCF8574 2018-11-17 18:48:39 +01:00
ESPEasy release bot 125155a9b9 automatically updated release notes for mega-20181117 2018-11-17 04:00:10 +01:00
TD-er 6d45860aa0 [P073_7DGT] Fix uninitialized p073_dispdigit 2018-11-16 21:31:03 +01:00
Gijs NoorlanderandGitHub fbb1f2c9c6 [PlatformIO] Use 2.4.2 platform for Sonoff builds
Sonoff builds were set to use 2.4.1 platform.
Now we're using the same `common` for all ESP82xx builds
2018-11-16 21:10:57 +01:00
TD-er d4206d37f9 [P073_7DGT] Removed old (duplicate) content
The old version was still present in the file, so I removed the duplicate (old) part
2018-11-16 20:30:12 +01:00
Grovkillen 375274b208 [docs] Plugins (added real name) 2018-11-16 15:27:45 +01:00
GrovkillenandGitHub addbcb29d0 Merge pull request #2059 from Grovkillen/UpdateFavicon
[docs] Inverted icon for easy to navigate browser tabs
2018-11-16 14:00:41 +01:00
Grovkillen 818a64b74e [docs] Inverted icon for easy to navigate browser tabs 2018-11-16 13:45:10 +01:00
Gijs NoorlanderandGitHub 31178ef206 Update Sphinx to 1.8.1 2018-11-16 13:32:19 +01:00
Gijs NoorlanderandGitHub 6398aefa63 Merge pull request #2054 from Grovkillen/UpdateDocs
Update docs (wiki ---> rst/sphinx based)
2018-11-16 13:13:38 +01:00
GrovkillenandGitHub 88df0a3417 [fix] reverted test code 2018-11-16 13:12:28 +01:00
Gijs NoorlanderandGitHub a90b9af463 Merge pull request #2050 from stephenhouser/HT16K33_LED_12hour
Update P057 to allow 12-hour clock in addition to existing 24-hour clock
2018-11-16 13:10:47 +01:00
Grovkillen cef698ad36 [docs] Removed some test code 2018-11-16 13:09:02 +01:00
Gijs NoorlanderandGitHub 432655d50b Merge pull request #2024 from jimmys01/mega
Add new IR protocols and some bug fixes
2018-11-16 13:08:07 +01:00
Grovkillen 23005543ef [docs] Plugin list + update to config.py + some CSS 2018-11-16 13:08:05 +01:00
Gijs NoorlanderandGitHub 26defa8700 Merge pull request #2045 from TD-er/feature/build_1024_vcc
Feature/build 1024 vcc
2018-11-16 13:05:46 +01:00
TD-er 34e839477d [Travis] ESP32 does not support timeout on DNS lookups 2018-11-16 12:27:42 +01:00
Grovkillen bbb3275bd1 [docs] Plugins list 2018-11-16 12:21:01 +01:00
Grovkillen 797c1a235e [docs] About us, month as XX
Also some rephrasing of parts. Commented out the release of 2+.
2018-11-16 10:06:57 +01:00
Grovkillen c88b04cd98 [docs] Rules, fixed compile error 2018-11-16 09:51:45 +01:00
TD-er 07c0509dee [Statistics] Add timing statistics on connect and DNS lookup 2018-11-15 22:12:45 +01:00
PlebsandGitHub a42017157f Merge branch 'mega' into new/monitor2 2018-11-15 11:55:41 +01:00
Plebs 25b3e93ddc added P019 PCF support 2018-11-14 22:20:23 +01:00
papperoneandGitHub 4c862c0747 Update _P073_7DGT.ino
Adding new commands (7dst, 7dsd, 7dtext), new options to show 12h or 24h clock and fixing some bugs
2018-11-13 23:50:30 +01:00
Plebs d97335e289 fixing Safebutton 2018-11-13 20:43:24 +01:00
Grovkillen 05d79ce854 [docs] More spelling
Still some compile error...
2018-11-13 19:59:55 +01:00
Grovkillen 89d65c6dd2 [docs] Spelling + syntax fix 2018-11-13 19:14:46 +01:00
Grovkillen cbe9a6de50 [docs] Merged main 2018-11-13 18:59:52 +01:00
Grovkillen 7864863df8 [docs] History converted to rst 2018-11-13 18:55:22 +01:00
Plebs b6f8085170 Added SafeButton feature 2018-11-13 15:58:44 +01:00
Stephen Houser 564eb040ac add comments for new clock functions 2018-11-12 18:53:26 -05:00
Stephen Houser c3e5ece07e Remove update every second 2018-11-12 16:09:47 -05:00
Stephen Houser 3163c589d2 Add 12/24 hour time to clock 2018-11-12 16:06:51 -05:00
Stephen Houser 9f027d14cb initial 12/24 hour config 2018-11-12 13:39:33 -05:00
Plebs a33e4b55d0 added monitor support 2018-11-12 19:05:04 +01:00
Grovkillen bf28625eca [docs] Rules converted from wiki 2018-11-12 13:43:59 +01:00
Plebs 3f6e90229b new data structures
First release for P001
2018-11-12 11:41:09 +01:00
ESPEasy release bot 616115d7e3 automatically updated release notes for mega-20181112 2018-11-12 04:00:07 +01:00
TD-er 7735ea1cf9 [Input check] Add check when copying input texts
Make sure allocated buffers cannot be overflown when entering strings which are too long.
2018-11-12 01:43:41 +01:00
TD-er c04ffaa1f4 [1024 VCC] Add test_ESP8266_1024_VCC
See #2044
2018-11-12 01:41:34 +01:00
Gijs NoorlanderandGitHub bb208c34bd Merge pull request #2043 from uzi18/patch12
Eastron fix for model selection
2018-11-11 19:32:22 +01:00
Bartlomiej Zimon 8c344593b9 Eastron fix for model selection
issue #1684
2018-11-11 17:40:59 +00:00
Gijs NoorlanderandGitHub b54311db2e Merge pull request #2042 from TD-er/bugfix/delay_writespifs_pagebreak
WiFi events and delay(0) during write SPIFFS
2018-11-11 17:23:08 +01:00
TD-er b23a9245da [WiFi] Make sure unhandled WiFi events will be processed 2018-11-11 15:56:31 +01:00
TD-er 936b729b46 Improve comments 2018-11-11 15:19:47 +01:00
TD-er c2d9a03a54 [SPIFFS] perform delay during save per page break
Saving the settings file may sometimes take a few 100 msec.
Added a `delay(0)` per page written to make sure background tasks are dealt with.
These system background tasks should not perform writes to SPIFFS, so this delay should be fine.
2018-11-11 15:17:35 +01:00
Gijs NoorlanderandGitHub 2dec3a367d Merge branch 'mega' into mega 2018-11-11 14:53:39 +01:00
Gijs NoorlanderandGitHub f53a9533a4 Merge pull request #2041 from TD-er/bugfix/uniform_GPIO_labels
Bugfix/uniform gpio labels
2018-11-11 14:48:57 +01:00
TD-er 27a4f081e8 [Cleanup] Change label for P035_IRTX 2018-11-11 14:00:44 +01:00
TD-er 26d7c95b6f [Cleanup] Uniform labels for GPIO pins
For all other plugins not setting the GPIO labels, all are now added.
Also reverted the decision about RX/TX, since these are the only ones to be crossed, the rest is always describing the data on the sensor side.
"GPIO <-- TX" is rather descriptive. The GPIO is on the ESP side, TX is on the sensor side.

So the function to format the label is called `formatGpioName_RX` and it will write "GPIO <- TX"
At least it is clear where it is going to be used, it is the RX channel on the ESP side. (for example SoftwareSerial describes the pins with function on ESP side)
2018-11-11 12:42:36 +01:00
TD-er 72637da44c [Cleanup] Uniform labels for GPIO pins (existing labels)
All custom GPIO labels (set using `PLUGIN_GET_DEVICEGPIONAMES` ) now use the same format.
It is now uniform to describe GPIO functions on ESP side.
It was quite a mixup of sensor pin descriptions and ESP side descriptions (e.g. mixup of RX and TX)
Now all descriptions show the ESP side description.
2018-11-11 10:00:15 +01:00
ESPEasy release bot ca0a16fb9c automatically updated release notes for mega-20181111 2018-11-11 04:00:06 +01:00
Gijs NoorlanderandGitHub 6f895c2e2e Merge pull request #2033 from uzi18/patch12
Webserver content-type set fix for /control handler
2018-11-11 00:18:25 +01:00
Gijs NoorlanderandGitHub 8912ef845c Merge pull request #2038 from TD-er/bugfix/embedded_javascript
[JavaScript] Append zero termination to embedded progmem data
2018-11-10 23:51:26 +01:00
TD-er 1231c6a9c2 [JavaScript] Append zero termination to embedded progmem data 2018-11-10 23:43:52 +01:00
ESPEasy release bot 6313d4344d automatically updated release notes for mega-20181110 2018-11-10 04:00:08 +01:00
Bartlomiej Zimon 6dcfc9e2a1 Webserver optimize /control early handled commands 2018-11-09 23:17:54 +00:00
Bartlomiej Zimon 2e9e1e480f Webserver /control proper Content type
it sets printToWebJSON during PLUGIN_WRITE/SendStatus
fix for #2018
2018-11-09 23:13:28 +00:00
Gijs NoorlanderandGitHub d7dcd9cff0 Merge pull request #2017 from TD-er/feature/upgrade_ESP32_1.5.0
[ESP32] Upgrade core lib to espressif32@1.5.0
2018-11-09 11:39:19 +01:00
Gijs NoorlanderandGitHub bdf0e6e05c Merge pull request #2021 from TD-er/bugfix/wifi_disconnect_handling
[WiFi] Improve disconnect detection and run delay(1) when not connected
2018-11-09 11:37:30 +01:00
Gijs NoorlanderandGitHub 75e411f458 Merge pull request #2025 from uzi18/patch14
[Eastron] remove old duplicate code
2018-11-09 11:02:45 +01:00
Gijs NoorlanderandGitHub bc9a697792 Merge pull request #2022 from uzi18/patch12
HTTP responses have duplicate Content-Types
2018-11-09 10:00:03 +01:00
ESPEasy release bot dfe90363b7 automatically updated release notes for mega-20181109 2018-11-09 04:00:10 +01:00
Bartlomiej Zimon d8dd25593e properly send content-type header
fix for #2022
2018-11-09 00:17:06 +00:00
jimmys01 4cbd8a7ec7 further improvments 2018-11-08 19:46:19 +02:00
jimmys01 cf7faba90a Add appropriate check to irReceiver before disabling it 2018-11-08 14:18:25 +02:00
Bartlomiej Zimon 38d08d6902 remove old duplication 2018-11-08 10:42:36 +00:00
jimmys01 11bc5a716d syntax fix 2018-11-08 11:46:39 +02:00
jimmys01 b430adeefa Put a PLUGIN_EXIT in place 2018-11-08 11:35:48 +02:00
Gijs NoorlanderandGitHub a7b32273ae Merge pull request #2023 from uzi18/patch14
add p078_dev_id to form save
2018-11-08 10:24:58 +01:00
jimmys01 c5d0296bad extra dot fix 2018-11-08 11:23:37 +02:00
jimmys01 798b31fc2e Make max IR command to be 200 chars long
IR2 produces long encoded strings and we must make changes to acomodate that.
2018-11-08 11:11:20 +02:00
jimmys01 23fa1854a8 Ir Remote lib enchantments
Added new protocols supported by the library
Fixed missing _ in protocol names
Small improvments here and there
2018-11-08 10:40:02 +02:00
jimmys01andGitHub ba14acfb37 Merge pull request #2 from letscontrolit/mega
test pull
2018-11-08 10:30:43 +02:00
ESPEasy release bot 5ccbdfff11 automatically updated release notes for mega-20181108 2018-11-08 04:00:09 +01:00
Bartlomiej Zimon 4ff3de5482 add p078_dev_id to form save 2018-11-08 00:44:54 +00:00
Bartlomiej Zimon d52435264d remove double strings for contenttype 2018-11-07 23:34:39 +00:00
Bartlomiej Zimon cd76c88860 HTTP responses have duplicate Content-Types
fix for #2018
2018-11-07 23:18:00 +00:00
TD-er 429fa31ee5 [WiFi] Improve disconnect detection and run delay(1) when not connected
Make sure disconnects will not be missed.
Give background tasks more time when not connected to WiFi.
This may help lowering power consumption and improve chance of getting connected.
2018-11-07 23:03:41 +01:00
Gijs NoorlanderandGitHub 6b33cee8ea Merge pull request #2015 from clumsy-stefan/amend_system_nosleep
Amend nosleep command to accept awake time
2018-11-07 21:23:01 +01:00
Gijs NoorlanderandGitHub a182ca8097 Merge pull request #2016 from giig1967g/bug/p001
BUG fix in P001 - switchstate was referred but not set yet in PLUGIN_INIT
2018-11-07 20:22:24 +01:00
stefan f7feeff9b4 Add System#NoSleep=<time> event
Add a System#NoSleep event which returns the amount of seconds fow which the unit will be awake (at least). However this time can change within the delay or even disabled (by rules, commands, etc.)
2018-11-07 16:53:08 +01:00
Plebs a5cfa1713d BUG fix
in P001 switchstate was referred before setting its value.
2018-11-07 15:34:06 +01:00
TD-er 04edfae8de [ESP32] Upgrade core lib to espressif32@1.5.0 2018-11-07 15:33:00 +01:00
stefan 1e9debf67c Merge branch 'mega' into amend_system_nosleep 2018-11-07 14:39:48 +01:00
stefan 250d8aca59 Amend nosleep command to accept awake time
Amend system command "nosleep" to accept a parameter that sets the awake time (eg. nosleep for <time>).
like this it's possible to send a "nosleep" command to the unit immediately after it awakes, do whatever needed and then reset the awake time with "nosleep,<time>" instead of having to go via web-page.
2018-11-07 14:33:54 +01:00
Gijs NoorlanderandGitHub 19ec7a90cf Merge pull request #2014 from TD-er/bugfix/PUYA_build_v3patch
Bugfix/puya build v3patch
2018-11-07 12:48:35 +01:00
TD-er 74e591ac81 [PUYA] Fix typo in patch 2018-11-07 12:43:43 +01:00
TD-er 29fb32225a [PUYA] share static flash_chip_id among functions 2018-11-07 12:41:32 +01:00
TD-er f90f97e3d0 [PUYA] Fix patch v3 for PUYA support 2018-11-07 12:36:23 +01:00
Gijs NoorlanderandGitHub fd634a12a1 Merge pull request #2005 from TD-er/bugfix/uzi18_puya_patch
[PUYA] Apply generic patch on all builds checking for PUYA flash
2018-11-07 12:13:09 +01:00
TD-er 19b59359e0 [PUYA] Add PUYA patch v3 to check if patch is applied
See: https://github.com/letscontrolit/ESPEasy/pull/2005#issuecomment-436442587
Made by @uzi18
2018-11-07 11:25:12 +01:00
Gijs NoorlanderandGitHub 0fe9566d14 Merge pull request #2010 from uzi18/patch11
Sysinfo update to 4 values
2018-11-07 11:01:54 +01:00
Gijs NoorlanderandGitHub 9e49f6f7b1 Merge pull request #2004 from giig1967g/bug/1977-others
bug fixes
2018-11-07 11:01:34 +01:00
Gijs NoorlanderandGitHub 660377ea02 Merge pull request #2009 from uzi18/patch9
Eastron: Add optional DE PIN configuration
2018-11-07 10:13:30 +01:00
ESPEasy release bot 4e171993ff automatically updated release notes for mega-20181107 2018-11-07 04:00:09 +01:00
Bartlomiej Zimon dfdaa831d5 Sysinfo update to 4 values 2018-11-07 00:52:54 +00:00
Bartlomiej Zimon 946c1a8390 Add optional DE PIN configuration
Add gpio names to form
fix for #1684
2018-11-06 23:51:43 +00:00
TD-er f7c7d176f1 [Travis] Update platformIO packages before build
Since this directory is cached, updates must be applied before building.
2018-11-06 16:58:10 +01:00
TD-er 0a72b711f9 [PUYA] Apply generic patch on all builds checking for PUYA flash
Applied this patch made by @uzi18
https://github.com/esp8266/Arduino/issues/4061#issuecomment-368273656
It is now included in all builds
2018-11-06 15:56:36 +01:00
Gijs NoorlanderandGitHub 2f8962ec52 Merge pull request #1989 from TD-er/cleanup/reduce_flashStrings
[Cleanup] Reduce binary size to allow 1M OTA with minimal plugin set
2018-11-06 12:30:46 +01:00
Plebs b68d91fc58 final cleanup 2018-11-06 11:27:28 +01:00
Gijs NoorlanderandGitHub a8c565ee5f Merge branch 'mega' into cleanup/reduce_flashStrings 2018-11-06 11:27:21 +01:00
Plebs 6f06b57d14 cleaned if from addLog as per uzi18 comment 2018-11-06 11:20:24 +01:00
ESPEasy release bot cf949ab167 automatically updated release notes for mega-20181106 2018-11-06 04:00:10 +01:00
Plebs 21cc1faf25 bug fixes
- Fix for bug #1977 for serial and web sources
- Fix for Publish command not evaluating Formulas
- Fixed addlog commands only when needed
- Fixed logEntry command not showing command line
Fixed nit value of pinstate in P001, P009 and P019
2018-11-05 20:03:33 +01:00
TD-er 99030621b7 [timingstats] Show stats in msec instead of usec. 2018-11-05 17:18:25 +01:00
TD-er 33199ceb12 [timingstats] Improve table layout of timing stats
Highlighting when a timing value exceeds 100 msec.
2018-11-05 16:35:18 +01:00
GrovkillenandGitHub 6175adddd1 [Flasher] fixed ip bug fixed 2018-11-05 12:04:53 +01:00
ESPEasy release bot 35461643ff automatically updated release notes for mega-20181105 2018-11-05 04:00:10 +01:00
TD-er 9397f560dc [timingstats] Disable timing stats in log 2018-11-05 02:00:24 +01:00
TD-er 6de76f8817 [timingstats] Implement HTML table of timing stats
And move to `/timingstats`
All links in the menu use relative paths, so do not use URLs with more than 1 level deep.
2018-11-05 01:53:32 +01:00
Gijs NoorlanderandGitHub ae9deeb702 Merge pull request #1979 from clumsy-stefan/check_client_send
Add sent/return value check to client.print()
2018-11-05 01:21:36 +01:00
Gijs NoorlanderandGitHub 1bdbc97d33 Merge pull request #1992 from Grovkillen/fix_memanalyzer.py
[Memanalyzer] Fix memanalyzer.py
2018-11-05 01:21:08 +01:00
Gijs NoorlanderandGitHub bec97768f4 Merge pull request #1996 from kpalczewski/PioneerSupport
update lib IRremoteESP8266 and add send Pioneer support
2018-11-05 01:20:55 +01:00
TD-er abdc9a0454 [timing stats] Add http://<ip>/stat/timing/json to view timing stats 2018-11-05 01:17:59 +01:00
Gijs NoorlanderandGitHub c9bb2750a3 Merge pull request #1994 from uzi18/patch9
fix for #1986
2018-11-04 21:09:41 +01:00
Bartlomiej Zimon eda3326615 Eastron - save modbus id and enable SDM630 model
partial fix for #1684
2018-11-04 19:05:41 +00:00
TD-er d2644b2da7 [Cleanup] Do not use F-macro for short strings
Got rid of a few kB in the binary image by removing F-macro from numerous 1 or 2 character flash strings.
These very short strings take more space in flash and memory when using the F-macro.

Also appending to a string using a `'a'` character definition takes less resources compared to a one-character string `"a"`.
2018-11-04 01:27:42 +01:00
TD-er 8650bc6aa3 [Cleanup] Increase load speed and lower memory usage rendering web page
The (large) template string was reduced over and over again while parsing for strings to replace.

Now it is using one big string in memory which is not reduced. (and thus taking twice the amount of memory)
2018-11-03 23:39:24 +01:00
TD-er dee5f6df1a [Cleanup] Strip HTML templates into sections to remove duplicate strings 2018-11-03 22:40:57 +01:00
TD-er 0085986701 [OTA] Add ESP8285 1M OTA minimal build 2018-11-03 01:37:42 +01:00
TD-er 7a72836d0f [Cleanup] Make single definition for pin description
- ESP32 could not select GPIO-0 in plugins.
- Only usable pins will be selectable
- Arrow icon will show if GPIO is input or output only
- Added warning sign for pins affecting boot.
- Added RX0/TX0 indicator for GPIO-1 and -3 when serial is enabled.
- Added GPIO-1 and -3 to boot pin state setup, but only selectable when Serial disabled.
- Reduce number of flash strings.
2018-11-03 01:20:50 +01:00
TD-er cec830fe83 [1MB OTA] Add small build to allow for 1MB OTA
Using 128k SPIFFS and 2-step OTA image, it is possible to perform an OTA update on 1 MB nodes.
This 2-step image does not have the ArduinoOTA service running, but does allow for manual upload using web interface.
ArduinoOTA needs 8 kB more, which will not work at the moment.
2018-11-02 09:57:00 +01:00
kpalczewski 894a59e10b bump lib IRremoteESP8266 to 2.5.2 and add send Pioneer support for 035 IR plugin. 2018-11-01 17:24:14 +01:00
stefan e28f46697a Add comment why we check for %256
Added comment to explain why the comparison is done to the length%256
2018-11-01 15:47:54 +01:00
GrovkillenandGitHub 14ced058b5 [Memanalyzer] cmd args are back (un-commented) 2018-11-01 10:09:47 +01:00
Bartlomiej Zimon fabc514f8e fix for #1986 2018-11-01 07:49:45 +00:00
stefan 4ae5e2ce7b Merge remote-tracking branch 'origin/mega' into check_client_send 2018-11-01 08:31:28 +01:00
ESPEasy release bot 0585d48ffa automatically updated release notes for mega-20181101 2018-11-01 04:00:08 +01:00
GrovkillenandGitHub be9a5d622a Merge pull request #1991 from Grovkillen/Flashtool002003
[Flasher] updated flasher (some minor error)
2018-10-31 22:38:20 +01:00
GrovkillenandGitHub 821fcb9e54 [README] removed IRC link... we're not there. 2018-10-31 21:15:14 +01:00
Jimmy Westberg 1a9584134a [Memanalyzer] try to fix the memanalyzer not analyzing all plugins 2018-10-31 20:34:42 +01:00
Jimmy Westberg d2e9337d76 Revert "[Flasher] updated flasher (some minor error)"
This reverts commit 6c5c12a6f2.
2018-10-31 20:29:47 +01:00
Jimmy Westberg 6c5c12a6f2 [Flasher] updated flasher (some minor error) 2018-10-31 20:00:48 +01:00
TD-er 9eb2ebe210 [Cleanup] Minify JavaScript and CSS to reduce sketch size
Sketch size is reduced by 5 - 6 kB
Files are extracted from original source and moved to `static` directory.
2018-10-31 16:25:42 +01:00
Gijs NoorlanderandGitHub 1d5fbd926e Merge pull request #1986 from giig1967g/new/playground
Fixed some bugs and added the possibility to read the user variables with parameter
2018-10-31 12:16:38 +01:00
Gijs NoorlanderandGitHub 4d3ac95e5a Merge pull request #1985 from uzi18/patch-3
BlynkGet add timeout 1,5s.
2018-10-31 12:16:13 +01:00
TD-er 1f1e47530a [Cleanup] Reduce length HTML form data IDs to reduce sketch size
To allow OTA again on 1MB flash units.
2018-10-31 12:08:17 +01:00
TD-er 3b1d26b541 [Cleanup] Reduce build image size by 2k by wrapping flash strings
Only in WebServer.ino.
Looked for the most frequently used strings.
2018-10-31 11:44:51 +01:00
Plebs 8a86ee9b89 Update src/Misc.ino 2018-10-31 09:54:23 +01:00
GrovkillenandGitHub ed592a3a0a [Deploy] "source" folder was named "Source" 2018-10-31 08:53:02 +01:00
GrovkillenandGitHub f2b330424c [README] fixed some \r\n 2018-10-31 08:29:14 +01:00
GrovkillenandGitHub 542a758fde [README] added more info about ESP.Easy.Flasher 2018-10-31 08:28:10 +01:00
stefan 11e4addb41 Merge remote-tracking branch 'origin/mega' into check_client_send 2018-10-31 08:13:39 +01:00
ESPEasy release bot 8921ebbcaa automatically updated release notes for mega-20181031 2018-10-31 04:00:10 +01:00
Plebs d05d669284 Update src/Misc.ino 2018-10-30 23:54:27 +01:00
Bartłomiej ZimońandGitHub 71a6b344e7 BlynkGet add timeout 1,5s. 2018-10-30 23:15:33 +01:00
Gijs NoorlanderandGitHub c67becac0c Merge pull request #1981 from TD-er/feature/ota_warning
[OTA] Add OTA info and disable when not enough space
2018-10-30 22:56:11 +01:00
Gijs NoorlanderandGitHub 0ec06161c5 Merge pull request #1984 from uzi18/patch-2
BlynkGet fix loop #1951
2018-10-30 22:55:40 +01:00
Gijs NoorlanderandGitHub a2b2cd857a Merge pull request #1983 from Grovkillen/UpdateFlashTool
[Flasher] Updated to 0.02.002
2018-10-30 22:49:40 +01:00
Bartłomiej ZimońandGitHub 0e581f0288 BlynkGet fix loop #1951
this commit fix #1951
2018-10-30 22:47:32 +01:00
Jimmy Westberg fffcd0f2a4 [Path] folder rename 2 2018-10-30 22:45:10 +01:00
Jimmy Westberg 1d923a527f [Path] folder rename 1 2018-10-30 22:44:40 +01:00
Jimmy Westberg 356ebbc875 [Flasher] Updated to 0.02.002
Spelling error
2018-10-30 22:35:42 +01:00
Jimmy Westberg 25fadfc1ed [Deploy] small letters are the standard 2018-10-30 22:29:56 +01:00
Jimmy Westberg 54d892e162 [Flasher] Updated to 0.02.001 2018-10-30 22:27:53 +01:00
Jimmy Westberg 007ef78f2b [Deploy] Added sub folder for BIN files
I moved the compiled files to a sub folder (BIN) which makes it auto load if using the ESP.Easy.Flasher.exe
2018-10-30 21:05:09 +01:00
Jimmy Westberg d16daeca56 [Flasher] Added ESP.Easy.Flasher.exe
And moved the bin files to sub folder "BIN"
2018-10-30 20:52:46 +01:00
TD-er 90fdb8f809 [OTA] Add OTA info and disable when not enough space 2018-10-30 15:58:46 +01:00
stefan 383206b149 Add sent/return value check to client.print()
Add a check and debug to client.print() in send_via_http() on sent bytes and fail if not all (or nothing) could be sent to the wifi client
2018-10-30 13:23:32 +01:00
ESPEasy release bot ac20349854 automatically updated release notes for mega-20181030 2018-10-30 04:00:07 +01:00
Gijs NoorlanderandGitHub 1a972d61a6 Merge pull request #1619 from jamestutton/mega
Added Special Case to allow Servo to be disabled
2018-10-30 01:01:17 +01:00
Gijs NoorlanderandGitHub d6cf2e141b Merge pull request #1944 from svmac/mega
P022_PCA9685 Enhancements
2018-10-30 01:00:35 +01:00
Gijs NoorlanderandGitHub 7a2e9ba203 Merge pull request #1978 from TD-er/feature/core_2_4_2
[Core 2.4.2] Set core 2.4.2 as default platform
2018-10-30 00:58:46 +01:00
TD-er e3591aceb2 [Core 2.4.2] Set core 2.4.2 as default platform
Also added separate build using core 2.4.1 for those with PWM issues.
2018-10-30 00:23:36 +01:00
ESPEasy release bot ad3514e765 automatically updated release notes for mega-20181029 2018-10-29 04:00:08 +01:00
Gijs NoorlanderandGitHub f543995d86 Merge pull request #1968 from TD-er/bugfix/increase_ntp_accuracy
[NTP] Improve NTP accuracy
2018-10-29 01:02:09 +01:00
Gijs NoorlanderandGitHub 97ccb8eca1 Merge pull request #1975 from uzi18/patch9
Dallas: use reset timming from OneWire lib
2018-10-29 01:01:51 +01:00
Bartlomiej Zimon f291c9d25a Dallas: use reset timming from OneWire lib 2018-10-28 14:59:50 +00:00
Gijs NoorlanderandGitHub bd9ead3851 Merge pull request #1974 from uzi18/patch9
Dallas: add ScratchPad to debug log
2018-10-28 14:48:29 +01:00
Bartlomiej Zimon 43ea0039fd Dallas: add ScratchPad to debug log - OK suffix means data integrity ok (no communication problems) 2018-10-28 12:50:34 +00:00
ESPEasy release bot 74eb638bcb automatically updated release notes for mega-20181028 2018-10-28 04:00:09 +01:00
TD-er c87b035908 [NTP] Change log level for NTP success to INFO 2018-10-28 01:10:11 +02:00
TD-er 0f450eaa3d [NTP] Improve NTP accuracy
Use fractional part of TX section in NTP packet.
Also compensate for total delay to retrieve answer.

More possibilities for improvement of NTP, see https://github.com/lettier/ntpclient/issues/4#issuecomment-360703503
2018-10-28 00:22:39 +02:00
Gijs NoorlanderandGitHub 02df033fc6 Merge pull request #1967 from TD-er/bugfix/1684_Eastron
[Eastron] Make configurable and allow for multiple values read (#1684)
2018-10-28 00:07:57 +02:00
Gijs NoorlanderandGitHub 74d05e58f0 Merge pull request #1768 from workgroupengineering/feature/cron
[Feature] [Plugin] Cron
2018-10-28 00:07:31 +02:00
ESPEasy release bot 3d88537677 automatically updated release notes for mega-20181027 2018-10-27 04:00:12 +02:00
Gijs NoorlanderandGitHub 95b0a7bed9 Merge pull request #1784 from jazzgil/add-raw-ir-reading
Add IR RAW2 Reading / Transmitting.
2018-10-27 02:45:26 +02:00
Gijs NoorlanderandGitHub bc3434532e Merge pull request #1942 from giig1967g/new/doubleclick-pcf
doubleclick and longpress for PCF and MCP
2018-10-27 02:41:12 +02:00
TD-er 1f7639cb42 [Eastron] Make configurable and allow for multiple values read (#1684)
See #1684
It should now be possible to actually select parameters and configure it from the frontend.

N.B. Not yet tested on real hardware.
2018-10-27 00:49:52 +02:00
Gijs NoorlanderandGitHub 923642bb27 Merge pull request #1966 from uzi18/patch9
CSE7766 - fix stats plus add buffer fill level, #1934
2018-10-26 23:25:21 +02:00
Bartlomiej Zimon a09cb906eb CSE7766 - fix stats plus add buffer fill level 2018-10-26 20:43:31 +00:00
Saverio Cisternino 72b0a32839 [CRON] Fixed Daily flash write rate exceeded! 2018-10-26 09:51:41 +02:00
TD-erandSaverio Cisternino e279e5504b [Cron] Rename plugin name to match naming convention 2018-10-26 09:51:41 +02:00
Saverio Cisternino 6d5ddf06ce [CRON] Intercept event PLUGIN_TIME_CHANGE 2018-10-26 09:51:41 +02:00
Saverio Cisternino 7f544b7a10 [CRON] Add event PLUGIN_TIME_CHANGE 2018-10-26 09:51:41 +02:00
Saverio Cisternino fc407e86e1 [CRON] Plugin 2018-10-26 09:51:41 +02:00
Saverio Cisternino a35c3051df [CRON] Replace timeStruct with standard tm 2018-10-26 09:51:41 +02:00
ESPEasy release bot f8f2ddd33b automatically updated release notes for mega-20181026 2018-10-26 04:00:22 +02:00
Gijs NoorlanderandGitHub 6592b57615 Merge pull request #1934 from uzi18/patch9
fix for #1920
2018-10-25 23:52:04 +02:00
Bartlomiej Zimon 6e8e8214b2 CSE7766 - add some stats to debug log 2018-10-25 20:47:36 +00:00
Gijs NoorlanderandGitHub 24b6611c54 Merge pull request #1956 from workgroupengineering/BugFix/Issue_1995
Fixed plugin timer processing do not start, when call setPluginTaskTimer in PLUGIN_TIMER_IN
2018-10-25 21:37:07 +02:00
Gijs NoorlanderandGitHub 8135defa6f Merge pull request #1957 from TD-er/bugfix/c009_reduce_memory
[C009] Reduce memory usage for C009 controller.
2018-10-25 21:27:18 +02:00
Bartlomiej Zimon d5e9cfb081 Merge branch 'mega' of github.com:letscontrolit/ESPEasy into patch9 2018-10-25 18:17:10 +00:00
TD-er ffc8e1fb97 [C009] Reduce memory usage for C009 controller. 2018-10-25 12:09:49 +02:00
Saverio Cisternino 0255f41897 Fixed plugin timer processing do not start, when call setPluginTaskTimer in PLUGIN_TIMER_IN 2018-10-25 10:24:09 +02:00
ESPEasy release bot e88973861f automatically updated release notes for mega-20181025 2018-10-25 04:00:13 +02:00
Gijs NoorlanderandGitHub d6ec7aa736 Merge pull request #1941 from workgroupengineering/feature/Issue_1794
Added auto redirect to home after run reboot command from web page.
2018-10-25 02:12:08 +02:00
Gijs NoorlanderandGitHub 8aa5866dd9 Merge pull request #1954 from TD-er/bugfix/replace_yield_delay_0
[WDT] Replace yield() with delay(0)  & add Sonoff POW R2 build
2018-10-25 02:11:15 +02:00
TD-er 0c384c332e [Travis] Use variables even when no predefined plugins are added. 2018-10-25 01:54:00 +02:00
TD-er 7a4f3b15b3 [Info] Remove MD5 check fail on self-built images
And add in bold a statement it is self built.
2018-10-25 01:43:26 +02:00
TD-er c38e532e67 [Sonoff] Add pre-defined switch and relay + rules on factory reset
Define `GPIO_KEY1` containing GPIO number to get a pre-configured button input on factory reset.

Define `GPIO_REL1` containing GPIO number to get a pre-configured relay on factory reset.

When couple of `GPIO_KEY1` and `GPIO_REL1` is defined, a rule matching both will be added.
This is defined for 1...4
2018-10-25 01:28:25 +02:00
TD-er f983dd924d [Build] Add Sonoff POW R2 (4MB)
Sonoff POW R2 has 4 MB flash. So this needs a separate build, compared to the regular POW.
2018-10-24 20:44:48 +02:00
TD-er f0ff52b76b [WDT] Change yield() to delay(0)
`delay(0)` is a special case of delay, which also calls the system scheduler, `yield()` does not call.
It may interrupt a bit more than `yield()` 

See #1950
2018-10-24 13:25:36 +02:00
Plebs 3c0e5d1965 fixed as requested
- Fixed bootstate logic and inversed logic
- added selected events for doubleclick and longpress
- fixed log messages
- cleaned code
2018-10-23 23:45:23 +02:00
Bartlomiej Zimon 14489a2e98 optimization - remove double checksum check 2018-10-23 19:53:36 +00:00
Bartlomiej Zimon a920b95cfb move to PLUGIN_SERIAL_IN from PLUGIN_TEN_PER_SECOND - serial commandline uses our data 2018-10-23 15:52:27 +00:00
Saverio Cisternino a111175a8f Added auto redirect to home after run reboot command from web page. 2018-10-23 09:14:31 +02:00
svmac 4fd2166b5e P022_PCA9685 Enhancements
Added freq setting
Added mode2 command and setting
Added range command and setting
2018-10-23 05:06:23 +02:00
ESPEasy release bot db76aeb959 automatically updated release notes for mega-20181023 2018-10-23 04:00:14 +02:00
Gijs NoorlanderandGitHub b313957311 Merge pull request #1943 from TD-er/bugfix/pubsubclient_fixes
Bugfix/pubsubclient fixes
2018-10-23 02:09:38 +02:00
TD-er 9d0f741e84 [Docs] Add some WiFi related information to docs
Last week I added this text in a discussion on an issue.
It is also useful in the documentation so keep a copy there.
2018-10-23 01:48:26 +02:00
TD-er 7c0f1551b8 [WiFi timeout] Set default to 1000 msec again
Lower values might give strange issues
2018-10-23 01:45:33 +02:00
TD-er 8a59811392 [PubSubClient] Add delay when waiting for data and flush on disconnect
Applied suggestions:
- https://github.com/knolleary/pubsubclient/pull/472
- https://github.com/knolleary/pubsubclient/pull/495
2018-10-23 01:44:22 +02:00
Plebs e2e715d7de final fixes 2018-10-22 23:31:49 +02:00
Bartlomiej Zimon ccb4cf6a7a move to PLUGIN_TEN_PER_SECOND
update comments
2018-10-22 21:19:00 +00:00
Plebs 1b4a217bc9 fixed a display bug 2018-10-22 23:07:00 +02:00
Plebs 19ecf36358 doubleclick and longpress for PCF and MCP
Added doubleclick and longpress events for PCF (P019) and MCP (P009)
2018-10-22 22:30:20 +02:00
Bartlomiej Zimon bdea34a583 CSE7766 add online checksumming, autosyncing without data loos 2018-10-22 19:54:58 +00:00
Gijs NoorlanderandGitHub b7b5028c0c Merge branch 'mega' into add-raw-ir-reading 2018-10-22 20:05:59 +02:00
Gijs NoorlanderandGitHub c519d887db Merge pull request #1932 from TD-er/bugfix/1486_rotary_encoder
[#1486] Allow multiple instances of rotary encoder
2018-10-22 19:58:07 +02:00
Gijs NoorlanderandGitHub 29c8b850ba Merge pull request #1930 from Kurairaito/patch-1
Allow multiple instances of _P067_HX711_Load_Cell
2018-10-22 13:01:09 +02:00
Gijs NoorlanderandGitHub d01cb9b9a2 Merge pull request #1933 from TD-er/bugfix/Javascript_update_device_values
[JavaScript] Fix update values on Devices tab
2018-10-22 10:59:29 +02:00
ESPEasy release bot 9d894d7c83 automatically updated release notes for mega-20181022 2018-10-22 04:00:15 +02:00
Bartlomiej Zimon a418cb2bd0 Ser2Net catch serial data only if plugin used 2018-10-21 18:51:43 +00:00
Bartlomiej Zimon 907a672fa0 CSE7766 uses 8E1 serial connection 2018-10-21 18:50:57 +00:00
TD-er 2f10274da2 [JavaScript] Cleanup some code duplication 2018-10-21 17:01:55 +02:00
TD-er 399b344779 [JavaScript] Fix update values on Devices tab
Not all plugins have all values.
Now the JavaScript code checks if a DOM element exists before updating its value.
2018-10-21 16:47:06 +02:00
TD-er 2e06ed14c0 [#1486] Allow multiple instances of rotary encoder
Used same procedure as for P013 ultrasonic
See #1486
2018-10-21 15:51:36 +02:00
KurairaitoandGitHub b0032bebdb Update _P067_HX711_Load_Cell.ino
Reduce Ram footprint by using map vector instead of array
2018-10-21 13:41:40 +02:00
KurairaitoandGitHub a525ec34b0 Update _P067_HX711_Load_Cell.ino
Make it compatible when instantiated multiple time
2018-10-21 12:46:26 +02:00
Gijs NoorlanderandGitHub 024ec7b727 Merge pull request #1928 from TD-er/bugfix/reduce_webserver_strings
Reduce webserver strings
2018-10-21 11:12:52 +02:00
ESPEasy release bot 1ff0141e38 automatically updated release notes for mega-20181021 2018-10-21 04:00:16 +02:00
Gijs NoorlanderandGitHub 125db8046b Merge pull request #1927 from TD-er/feature/1870_build_sysino
[#1870] Feature request build date as system info
2018-10-21 01:20:51 +02:00
TD-er 720317c829 [Webserver] Uniform row labels to reduce flash string size 2018-10-21 01:18:43 +02:00
TD-er bbe9005a32 [Webserver] Generate copyText id names
Reduce amount of flash strings to reduce build file size
2018-10-21 00:05:31 +02:00
Gijs NoorlanderandGitHub afa16e80b6 Merge pull request #1923 from TD-er/bugfix/wifi_stability
Various network stability fixes and reduce memory usage when saving settings
2018-10-20 23:09:50 +02:00
Gijs NoorlanderandGitHub 37f5c92aa7 Merge pull request #1926 from TD-er/bugfix/1891_multiple_values
[#1891] Send all values for Generic UDP controller
2018-10-20 23:08:05 +02:00
TD-er 684b89ae4c [#1870] Feature request build date as system info
See #1870
Added:
- %sysbuild_date%
- %sysbuild_time%
2018-10-20 23:05:59 +02:00
TD-er 8c4612c300 [#1891] Send all values for Generic UDP controller
See https://github.com/letscontrolit/ESPEasy/issues/1891#issuecomment-431612051

A copy of the element from the queue was used, not a reference to it.
Therefore increasing the internal counter to send the next value was only executed on the copy, not the element in the list.
2018-10-20 22:34:11 +02:00
Gijs NoorlanderandGitHub 0afab53659 Merge pull request #1925 from TD-er/revert/1924_pull_request
Revert "fix for #1920"
2018-10-20 20:05:22 +02:00
Bartlomiej ZimonandTD-er e6e98345fe Revert "fix for #1920"
This reverts commit 3f84c35014.
2018-10-20 20:03:56 +02:00
Gijs NoorlanderandGitHub 2394e4a75f Merge pull request #1924 from uzi18/patch9
fix for #1920
2018-10-20 18:51:05 +02:00
ESPEasy release bot e1c4691325 automatically updated release notes for mega-20181020 2018-10-20 04:00:16 +02:00
Bartlomiej Zimon 3f84c35014 fix for #1920
fix for out of sync, check both header bytes
proper check for abnormal state
2018-10-19 22:40:11 +00:00
TD-er bc0bafa96b [#1910] Notification settings extra strings on stack
See #1910
Added a lot more of these changes and changed the input fields of the Notification Settings to be the same as all input fields in other places.
2018-10-20 00:20:58 +02:00
TD-er 4e7e66822d [Rules] Early exit on rules processing when rules not enabled 2018-10-20 00:20:58 +02:00
TD-er 6f226e6d65 Proper look for connection.
See discussion here: https://github.com/esp8266/Arduino/issues/5257
2018-10-20 00:20:58 +02:00
TD-er a50a035238 [stack usage] Allocate temp char array on heap for parsing arguments
These char arrays were rather large, so allocate on heap instead of char[240] on the stack.
Also re-order elements in not stored structs to reduce memory usage
2018-10-20 00:20:58 +02:00
Gijs NoorlanderandGitHub d560c635f5 Merge pull request #1922 from kpalczewski/mega
add support for 64bit IR codes.
2018-10-20 00:05:31 +02:00
kpalczewski f8db0c0a05 add support for 64bit IR codes. 2018-10-19 22:34:04 +02:00
Gijs NoorlanderandGitHub 79616022df Merge pull request #1919 from giig1967g/new/statusvariables
added 4 variables to verify the system status
2018-10-19 22:15:26 +02:00
Gijs NoorlanderandGitHub 559d294607 Merge branch 'mega' into new/statusvariables 2018-10-19 21:36:45 +02:00
Gijs NoorlanderandGitHub d2588c5e01 Merge pull request #1848 from giig1967g/new/plugin_pcf
Added [plugin#pcfgpio#pinstate#xx] and [plugin#mcpgpio#pinstate#xx]
2018-10-19 21:34:18 +02:00
Gijs NoorlanderandGitHub ba45a51576 Merge pull request #1884 from giig1967g/new/uservars
added Global Variables for rules
2018-10-19 21:33:10 +02:00
Gijs NoorlanderandGitHub 8321caaeed Merge branch 'mega' into new/statusvariables 2018-10-19 21:31:18 +02:00
Gijs NoorlanderandGitHub b35ed7d809 Merge pull request #1880 from giig1967g/doubleclick
DEBOUNCE, DOUBLECLICK and LONGPRESS events for PLUGIN001
2018-10-19 21:23:22 +02:00
Plebs a4583d150e added 4 variables to verify the system status
4 new system variables:
%iswifi% (=1 if wifi is connected)
%isntp% (=1 if NTP has been initialized)
%ismqtt% (=1 if mqtt is connected)
%ismqttimp% (=1 if mqtt import is connected)

Example:
if %isntp%=1 and %systime%>%sunset% do
....
endif
2018-10-18 17:44:05 +02:00
ESPEasy release bot cadc0a885d automatically updated release notes for mega-20181017 2018-10-17 04:00:18 +02:00
Gijs NoorlanderandGitHub 061eb20ae5 Merge pull request #1914 from TD-er/bugfix/reduce_stack
[#1906] Move Notification and Controller settings to heap
2018-10-17 00:40:30 +02:00
TD-er 9a9799eee7 [Stack] Add Free Stack to System Info plugin 2018-10-17 00:04:22 +02:00
Gijs NoorlanderandGitHub f4615bb76b Added checklist to the Issue_template
Lately a lot of new issues were non-descriptive and the same basic questions were to be asked over and over again.
These are now included in this template.
2018-10-16 23:02:33 +02:00
TD-er ecc498c359 [#1906] Allocate ControllerSettings on the heap
See #1906
2018-10-16 12:24:06 +02:00
TD-er e0e10fa6c8 [#1906] Allocate NotificationSettings on the heap
See #1906
2018-10-16 11:47:46 +02:00
ESPEasy release bot 228f09f394 automatically updated release notes for mega-20181016 2018-10-16 04:00:06 +02:00
Gijs NoorlanderandGitHub 19ac19778b Merge pull request #1909 from giig1967g/bug/toggle
Fix for "togglegpio" without gpio initialization
2018-10-16 01:11:46 +02:00
Gijs NoorlanderandGitHub 5e2d517ba2 Merge pull request #1913 from TD-er/bugfix/revert_safe_strncpy
[Revert] Safe_strncpy cannot be used as generic strncpy replacement
2018-10-16 01:09:59 +02:00
TD-er 7a4b17983e [Revert] Safe_strncpy cannot be used as generic strncpy replacement
It does do more. So only use it to convert Strings to single char arrays.
2018-10-16 00:11:17 +02:00
Plebs 6eba74ccc1 Fix for togglegpio without gpio initialization 2018-10-15 17:34:35 +02:00
ESPEasy release bot 27a05b674c automatically updated release notes for mega-20181015 2018-10-15 04:00:10 +02:00
Gijs NoorlanderandGitHub 4a66bbf081 Merge pull request #1905 from TD-er/bugfix/safe_strncpy
[safe strncpy] Add warning when entered string is too large
2018-10-15 00:52:34 +02:00
TD-er 109bddb5c3 [safe strncpy] Add warning when entered string is too large
Started with this issue:
"Framed Oled Display mixing up multiple values in different lines" #1904

Now almost all calls to `strncpy` are replaced with this safe variant which does some checking and zero-ing the buffer.
2018-10-15 00:24:57 +02:00
Gijs NoorlanderandGitHub 8158a919d8 Merge pull request #1879 from giig1967g/bug/1864
fix for bug #1864
2018-10-14 10:35:19 +02:00
ESPEasy release bot 706b91168b automatically updated release notes for mega-20181014 2018-10-14 04:00:13 +02:00
Gijs NoorlanderandGitHub d047999c5e Merge pull request #1901 from TD-er/bugfix/warn_incomplete_IPsettings
[UX] Warn user for incomplete network IP settings
2018-10-14 00:59:37 +02:00
Gijs NoorlanderandGitHub 42f361aacd Merge pull request #1902 from TD-er/bugfix/1895_I2C
[#1895] Incorrect number bytes read I2C_read32_reg
2018-10-14 00:43:15 +02:00
TD-er 3dd076cf25 [#1895] Incorrect number bytes read I2C_read32_reg
See #1895
2018-10-14 00:42:03 +02:00
TD-er c0d155dd99 [UX] Warn user for incomplete network IP settings
Was a left-over remark in #1291
2018-10-14 00:22:46 +02:00
Gijs NoorlanderandGitHub c433174d71 Merge pull request #1900 from TD-er/bugfix/time_initialized_event
Time#Initialized event in rules before %syshour% is set
2018-10-13 23:37:04 +02:00
Gijs NoorlanderandGitHub b805b59baf Merge pull request #1899 from TD-er/bugfix/controller_check_reply
Fix send only first value by controller (#1891 #1892 #1835)
2018-10-13 23:07:32 +02:00
Gijs NoorlanderandGitHub 9fae0477d8 Merge pull request #1894 from letscontrolit/feature/1799_SSID_mainpage
[#1799] Add SSID to main page
2018-10-13 23:06:55 +02:00
TD-er f7ac04dc96 Time#Initialized event in rules before %syshour% is set
See [forum](http://www.letscontrolit.com/forum/viewtopic.php?f=6&t=5819&p=31376&hilit=Initialized#p31376) and [other report of same issue](https://www.letscontrolit.com/forum/viewtopic.php?t=5925)
2018-10-13 23:05:35 +02:00
TD-er d50e661efb [Controller] Fix send only first value
See #1891 #1892 #1835
Added an extra option to explicitly check the reply  on sent messages by a controller.
2018-10-13 22:21:36 +02:00
Plebs 57b5338af6 Update src/StringConverter.ino 2018-10-12 15:00:58 +02:00
Plebs bd035c8f81 optimizations 2018-10-12 12:52:22 +02:00
Plebs ac63d93e1a Update src/_P001_Switch.ino 2018-10-12 12:10:10 +02:00
Plebs 4cff0d0e02 Update src/_P001_Switch.ino 2018-10-12 10:16:54 +02:00
TD-er ca83983fd2 [#1891] Generic UPD controller - send only first value from sensor
See #1891
2018-10-12 01:04:46 +02:00
Gijs NoorlanderandGitHub d808f7e79b [#1799] Add SSID to main page
See #1799
2018-10-12 00:57:08 +02:00
Plebs e469350ad9 modified command and variable name 2018-10-11 19:23:42 +02:00
Plebs 60536b1a93 some optimizations 2018-10-11 12:23:08 +02:00
Plebs b9e45bd515 fixed length check 2018-10-11 12:16:55 +02:00
Plebs a0992b8383 fixes 2018-10-11 11:50:37 +02:00
Plebs 9315581858 some fixes 2018-10-11 11:37:15 +02:00
ESPEasy release bot 9a763303ca automatically updated release notes for mega-20181011 2018-10-11 04:00:24 +02:00
Gijs NoorlanderandGitHub 7df9379f47 Merge pull request #1886 from TD-er/bugfix/reduce_memory_usage
Bugfix/reduce memory usage & improve load ExtraTaskSettings check
2018-10-11 01:48:31 +02:00
Plebs c32fe50521 Update src/_P023_OLED.ino 2018-10-10 23:28:34 +02:00
Plebs e4569b26f7 added global variables for rules
Added a new command:
customvar,x,y
that stores in a system variable %customvarx% the value 'y'.

Values are float
2018-10-10 23:19:09 +02:00
TD-er 48998886fe [WebLog] Disable weblog when it is not being read
This will prevent log items being generated when web log level is the highest level and it will clear the web log buffer to free memory.
2018-10-10 20:23:10 +02:00
Plebs 36f97d7909 some fixes 2018-10-10 19:24:45 +02:00
TD-er 0e3b9c9e47 [Travis Doc] Remove building documentation by Travis
It seems to break the nightly builds, so remove for now.
2018-10-10 15:54:34 +02:00
ESPEasy release bot acecff4108 automatically updated release notes for mega-20181010 2018-10-10 04:00:09 +02:00
TD-er 3322b954a7 Make sure to load ExtraTaskSettings when needed
There is only 1 `ExtraTaskSettings` object, so make sure it is always in sync.
2018-10-10 01:29:38 +02:00
TD-er 4c4b844a4d [Controller] Set default timeout to 300 msec (was 100 msec)
300 msec should be enough for most online services like `cloudmqtt.com`
2018-10-10 00:19:26 +02:00
Gijs NoorlanderandGitHub cf4d28eb4f Merge pull request #1877 from giig1967g/new/pcfinvertstate
Fix for #1767
2018-10-10 00:05:11 +02:00
TD-er 555b5386ae [C009] Reduce memory usage of FHEM HTTP delay queue
The entire JSON string was stored in the queue element, but lot of it can be computed later.
2018-10-09 23:52:46 +02:00
Plebs 1903fdc7f2 fix for bug #1864
Removed '.' check
2018-10-09 18:16:15 +02:00
Plebs 918353461e Update src/_P001_Switch.ino 2018-10-09 16:31:55 +02:00
Plebs e648a20fd0 Update src/_P019_PCF8574.ino 2018-10-09 16:24:13 +02:00
Plebs 1d7ea5e129 Update src/_P001_Switch.ino 2018-10-09 14:58:21 +02:00
Plebs 6ce5240dd7 few changes 2018-10-09 09:34:50 +02:00
ESPEasy release bot 692fb248ce automatically updated release notes for mega-20181009 2018-10-09 04:00:18 +02:00
Gijs NoorlanderandGitHub 5a87397ee0 Merge pull request #1872 from TD-er/bugfix/JSON_newline
Bugfix/json newline and memory allocation optimizations.
2018-10-09 01:14:50 +02:00
TD-er 99ba09b024 [StringConverter] Some optimisations to reduce memory allocation 2018-10-09 01:11:45 +02:00
Plebs 3dea091d21 small fixes 2018-10-09 00:20:27 +02:00
Plebs ca13317cbd Update src/_P001_Switch.ino 2018-10-09 00:12:50 +02:00
TD-er f68516d5bb [LWIP1.4] Move back to LWIP1.4
The combination LWIP1.4 and core 2.4.1 were used until begin of May and those were considered stable.
2018-10-08 23:56:55 +02:00
TD-er 8102a0096d [JSON] Replace \n and \r in text fields
Those are not allowed in strings in JSON.
This leads to (web) log viewer crashing.
2018-10-08 23:44:44 +02:00
Plebs 73cec59bd5 Update src/_P001_Switch.ino 2018-10-08 22:30:02 +02:00
Gijs NoorlanderandGitHub 96ecf9bf29 Merge pull request #1871 from TD-er/bugfix/travis_check_for_docs
[Docs] Disable travis_terminate for now
2018-10-08 21:05:55 +02:00
TD-er ef1e371514 [Docs] Disable travis_terminate for now
Apparently `travis_terminate` does not exist anymore as a command to stop the script without failing.
2018-10-08 19:29:56 +02:00
Gijs NoorlanderandGitHub 45d67292a3 Merge pull request #1869 from TD-er/feature/travis_build_docs
Feature/travis build docs
2018-10-08 16:38:16 +02:00
TD-er b5662baad4 [Docs] Run Travic documentation check before compiling project 2018-10-08 16:04:12 +02:00
TD-er 12c3e5f81f [Docs] Add Travis check for documentation and stop build for docs only
Let Travis build the documentation and prevent full build when only documentation changed.
2018-10-08 15:34:02 +02:00
TD-er dececf24ee [Docs] Add favicon to documentation 2018-10-08 15:31:48 +02:00
ESPEasy release bot 3fb6dec382 automatically updated release notes for mega-20181008 2018-10-08 04:00:09 +02:00
Gijs NoorlanderandGitHub cef962c5f1 Added link to ReadTheDocs 2018-10-08 00:05:58 +02:00
Gijs NoorlanderandGitHub cca2335070 Merge pull request #1868 from TD-er/feature/update_sphinx_docs
[Docs] Added some directory structure and template
2018-10-08 00:01:07 +02:00
TD-er ffd0d26ed3 [Docs] Added some directory structure and template 2018-10-08 00:00:27 +02:00
Plebs 9b457ed77b some code optimizations 2018-10-07 23:12:23 +02:00
GrovkillenandGitHub f787a9a9a6 [Sphinx] added extension "sphinx.ext.imgconverter" 2018-10-07 19:11:49 +02:00
Gijs NoorlanderandGitHub a0ae104794 Merge pull request #1865 from TD-er/feature/sphinx_docs
Feature/sphinx docs
2018-10-07 18:26:06 +02:00
TD-er 2b78810457 [Docs] First ESPEasy documentation (Controllers) 2018-10-07 18:23:25 +02:00
TD-er 43081c3ac8 [Sphinx] Initial setup for Sphinx documentation 2018-10-07 17:09:52 +02:00
ESPEasy release bot 33281c08c2 automatically updated release notes for mega-20181007 2018-10-07 04:00:09 +02:00
Gijs NoorlanderandGitHub 461aee26ad Merge pull request #1861 from TD-er/feature/debug_esp32_wrover_kit
Move stack to user memory space and close file handles + Add WROVER dev kit debug support
2018-10-06 23:19:18 +02:00
Gijs NoorlanderandGitHub 2b0b14b2e8 Merge pull request #1853 from blenk92/XSS
Fix XSS-Vulnerabilites on wifi configuration pages
2018-10-06 22:56:47 +02:00
Gijs NoorlanderandGitHub b7404666b1 Merge pull request #1851 from blenk92/mega
Force slash to be converted in htmlEscape
2018-10-06 22:56:37 +02:00
Gijs NoorlanderandGitHub da25aa87dd Merge pull request #1733 from giig1967g/new/invertvalue
Add four new TOGGLE commands
2018-10-06 22:55:57 +02:00
TD-er 10a1e634e2 [SPIFFS] Make sure to close open files on SPIFFS 2018-10-06 22:36:41 +02:00
TD-er 83f86449b9 [Stack] Move Arduino 'cont' stack into user RAM
As suggested [here](https://github.com/letscontrolit/ESPEasy/pull/1858#issuecomment-427578956) the previous used flag may also enable WPS.
So I used [this suggestion](https://github.com/esp8266/Arduino/issues/5148#issuecomment-424334261) to only re-allocate the stack at link time.
2018-10-06 20:01:39 +02:00
TD-er eee337d3e3 [ESP32] Allow Wrover dev kit to be used for PIO debug
Initial setup to be able to debug ESP32 Wrover dev kit from within Visual Studio Code + PIO plus.
2018-10-06 18:31:17 +02:00
ESPEasy release bot c549ecd329 automatically updated release notes for mega-20181006 2018-10-06 04:00:13 +02:00
Gijs NoorlanderandGitHub d9e682668d Merge pull request #1858 from TD-er/bugfix/increase_stack_5k
[Stack] Increase stack to 5k and reduce stack allocations in rules
2018-10-06 00:57:31 +02:00
TD-er e38072ac24 [Build flags] Remove NO_EXTRA_4K_HEAP
Core is now set to 2.4.1 again, so this flag is not needed anymore.
Also not sure if it did fix something in 2.4.2 core.
2018-10-06 00:53:53 +02:00
TD-er 6aebeba5dc [WiFi] Add delay to connection attempts in ControllerSettings
As suggested by @s0170071 [here](https://github.com/letscontrolit/ESPEasy/issues/1774#issuecomment-425038026)
2018-10-06 00:50:43 +02:00
TD-er da01c8f469 [Stack] Increase stack to 5k and reduce stack allocations in rules
Removed some unneeded stack allocations of 240 bytes in the rules processing.

Also gave the `process_system_event_queue()` a bit more priority to make sure it will be looked at at least once every 500 msec.
2018-10-05 00:52:22 +02:00
Plebs d3c86b9824 code optimization 2018-10-04 12:07:32 +02:00
Plebs 9621a91d90 added [plugin#mcpgpio#pinstate#xx] 2018-10-04 11:31:49 +02:00
ESPEasy release bot b3b68856f0 automatically updated release notes for mega-20181004 2018-10-04 04:00:08 +02:00
Max bec5cb5334 Fix XSS-Vulnerabilites on wifi configuration pages
Add escaping of wifi network names that can be discovered using the search
functionality of for instantce the /setup page. As these names are also used
inside an html tag, a stronger html encoding variant has been added.
2018-10-04 03:19:09 +02:00
Gijs NoorlanderandGitHub bda6011390 Merge pull request #1852 from TD-er/bugfix/wificlient_timeout
[#1830] WiFi client timeout & back to core 2.4.1
2018-10-04 00:56:09 +02:00
Gijs NoorlanderandGitHub f3fdb93a52 Merge pull request #1831 from JojoS62/mega
[P013_HCSR04] added error checking and logging
2018-10-04 00:54:02 +02:00
Gijs NoorlanderandGitHub 200b060b15 Merge pull request #1846 from thomastech/mega
Update _P075_Nextion.ino
2018-10-04 00:51:44 +02:00
Gijs NoorlanderandGitHub ff41cb2f94 Merge pull request #1849 from uzi18/patch9
- partial fix for #1723
2018-10-04 00:51:03 +02:00
TD-er c134eb6d13 [Core 2.4.1] Move back to core 2.4.1 from 2.4.2
PlatformIO `espressif8266@1.7.3` instead of `espressif8266@1.8.0`
2.4.2 has a lot of improvements like 4k of extra free memory.
But also the number of hardware watchdog reboots has increased a lot and the PWM related code no longer seems to work on 2.4.2
So for now, back to 2.4.1 library.
2018-10-04 00:24:28 +02:00
TD-er f9e2a211e1 [WiFiClient] Set timeout and make it configurable for controllers
The default timeout for wificlient is 1000 msec. This may cause all kind of strange effects when the node is being blocked for so long.
2018-10-04 00:21:00 +02:00
Max bd3d3f66f4 Force slash to be converted in htmlEscape
According to the owasp XSS prevention cheat sheet it is also necessary to encode / as it may helps to end html entities
(Source https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet#RULE_.231_-_HTML_Escape_Before_Inserting_Untrusted_Data_into_HTML_Element_Content)
2018-10-03 23:58:24 +02:00
Bartlomiej Zimon 3bad683211 - partial fix for #1723 2018-10-03 21:13:56 +00:00
TD-er 68f6e913a2 [sendHttp] #1830 Set timeout and early exit on timeout reached
See #1830
2018-10-03 23:10:47 +02:00
Plebs 0b9c550fd7 Added [plugin#pcfgpio#pinstate#xx]
Added [plugin#pcfgpio#pinstate#xx] variable for rules
2018-10-03 22:49:11 +02:00
Plebs 96420faa2f added "mcpgpiotoggle" command 2018-10-03 22:07:42 +02:00
ThomasandGitHub 8eea77e4ed Update _P075_Nextion.ino (#1)
Added DEBUG_LOG define to reduce info log messages and prevent serial log flooding.
Added SendStatus() to post log message on browser to acknowledge HTTP write.
Added reserve() to minimize string memory allocations.
2018-10-03 09:02:02 -07:00
JojoS62 3d1f723787 Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into mega 2018-10-03 15:27:40 +02:00
JojoS62 5d459003e4 fixed 'unused variable' warning 2018-10-03 15:19:19 +02:00
JojoS62 ad208c357c code clean up
added default for filter size = 5.
clode clieanup: using constants, read setting into local vars for better readability,
2018-10-03 14:33:17 +02:00
ESPEasy release bot b1c777e6fd automatically updated release notes for mega-20181003 2018-10-03 04:00:18 +02:00
JojoS62 f5ab15c255 max distance depends on measurement unit
setting is in user units, ping function needs cm. Conversion added.
added unit to log output.
2018-10-02 17:41:23 +02:00
JojoS62 001ec6dcd2 added more settings: unit, filtertype and size
Measuring unit can be changed bewtween metric/imperial
Filtertype can none or median. If median a filtersize can be set.
Meauring value time to distance conversion now as float division, resulting in a higher resolution output.
2018-10-02 17:00:22 +02:00
JojoS62 15e5edccd8 added float calculation for time to distance conversion
returns higher resolution, especially for measuring in inches the integer resolution was low.
2018-10-02 16:57:33 +02:00
Gijs NoorlanderandGitHub 651353cc99 Merge pull request #1842 from crankyoldgit/patch-2
Acknowledge credit & origin of code used in _P016IR.ino
2018-10-02 13:41:35 +02:00
Gijs NoorlanderandGitHub 85f97551c5 Merge pull request #1841 from crankyoldgit/patch-1
Acknowledge credit & origin of code used in IRTX
2018-10-02 13:41:23 +02:00
David ConranandGitHub 6a158f68f5 Acknowledge credit & origin of code used in _P016IR.ino
FYI @TD-er

Ref: https://github.com/letscontrolit/ESPEasy/pull/1645#issuecomment-422253497
2018-10-02 21:36:18 +10:00
David ConranandGitHub 1933714de5 Acknowledge credit & origin of code used in IRTX
FYI @TD-er

Ref: https://github.com/letscontrolit/ESPEasy/pull/1645#issuecomment-422253497
2018-10-02 21:29:57 +10:00
ESPEasy release bot 545117ddf7 automatically updated release notes for mega-20181002 2018-10-02 04:00:29 +02:00
Gijs NoorlanderandGitHub 8eb479c411 Merge pull request #1837 from TD-er/bugfix/schedule_commands_yield
[Stack] Report stack usage on ESP32 and increase stack for ESP8266normal
2018-10-01 23:27:07 +02:00
TD-er b39f51ca3c [Stack] Report stack usage on ESP32 and increase stack for ESP8266normal
Stack usage on ESP32 is querying current stack, not statistics per RTOS task.
2018-10-01 22:15:32 +02:00
Gijs NoorlanderandGitHub 4511e08d3c Merge pull request #1805 from giig1967g/new/parse
split parseTemplate function
2018-10-01 17:12:21 +02:00
Gijs NoorlanderandGitHub 086e836956 Merge pull request #1836 from TD-er/feature/esp32_pio_1_4_0
[ESP32] Update to platform espressif32@1.4.0
2018-10-01 17:10:45 +02:00
Gijs NoorlanderandGitHub 3e20f617ea Merge pull request #1827 from TD-er/bugfix/DTH_Si7021_reading_stability
[#1798] Bugfix Sonoff Si7021 stability
2018-10-01 17:10:23 +02:00
TD-er 8d9aacb6a4 [ESP32] Update to PIO espressif32@1.4.0
[ESP32 IDF 3.1](https://github.com/espressif/esp-idf/releases/tag/v3.1)
[ESP32 PIO 1.4.0](https://github.com/platformio/platform-espressif32/releases/tag/v1.4.0)
2018-10-01 16:34:21 +02:00
TD-er 0670fa98a6 [ESP32] Add default partition table for reference 2018-10-01 16:32:20 +02:00
ESPEasy release bot 2b3d1517c9 automatically updated release notes for mega-20181001 2018-10-01 13:13:13 +02:00
Gijs NoorlanderandGitHub 0be79759d1 Merge pull request #1834 from TD-er/bugfix/detect_large_stack_allocs
[Stack] Move Arduino stack back to top of System stack instead of overlap
2018-10-01 01:25:38 +02:00
TD-er d47bede215 [Stack] Revert move Settings from stack to heap
Apparently the settings are allocated on the system stack and not on the Arduino stack.
This means it takes a lot of ram when allocated on the heap. So move it back to the system stack.
2018-10-01 00:51:04 +02:00
TD-er 2988a244b2 [Stack] Check if a block sent to save on SPIFFS is stack allocated 2018-10-01 00:42:01 +02:00
TD-er 8d87dc0175 [Heap] Use NO_EXTRA_4K_HEAP to get old stack address space
Originally the Arduino stack was placed on top of the system stack.
But since the system stack is mostly empty, it was decided to shift the Arduino stack to overlap the system stack to save an extra 4k of memory.

However, since a lot of Watchdog timer reboots are reported lately, this optimisation will now be reverted to see if it will improve stability.
This will use about 4k more RAM.
2018-10-01 00:40:55 +02:00
Gijs NoorlanderandGitHub 21c86e666a Merge pull request #1829 from TD-er/feature/1824_stack_stats
[#1824] Show stack size on main page
2018-09-30 19:37:16 +02:00
JojoS e6fdd3380a added error checking and logging
there were several errors that all resulted in a distance value reading of 0. Added an errorState that is printed to the log and helps troubleshooting.
Max. Distance checking can be turned off by setting max distance to 0 cm. If max. distance is used, exceeding the range will return a distance of 0 cm and print this to the log.
2018-09-30 15:23:36 +02:00
TD-er e04f71ab47 [#1824] Show stack size on main page
See #1824
2018-09-30 09:32:01 +02:00
ESPEasy release bot 90ae0720cf automatically updated release notes for mega-20180930 2018-09-30 04:00:24 +02:00
Gilad Raz 4ec2af24a3 Increased buffer size. Added constants. 2018-09-30 01:10:55 +03:00
TD-er c8ecd8d374 [#1798] Bugfix Sonoff Si7021 stability
See #1798
2018-09-29 22:50:24 +02:00
Gijs NoorlanderandGitHub 7a451dd672 Merge pull request #1825 from TD-er/bugfix/proper_default_settings
Bugfix/proper default settings
2018-09-29 15:39:21 +02:00
Gijs NoorlanderandGitHub b06f6aa360 Merge pull request #1823 from JojoS62/mega
minor change: unit was missing for threshold in 'state' mode
2018-09-29 15:06:36 +02:00
TD-er 6b67415c71 [Defaults] Other default initializations 2018-09-29 15:05:10 +02:00
JojoS b095465d3a minor change: unit was missing for threshold in 'state' mode 2018-09-29 14:09:03 +02:00
Gijs NoorlanderandGitHub 81a5d911ba Merge pull request #1809 from JojoS62/mega
fixed distance reading
2018-09-29 13:38:44 +02:00
TD-er 48060d8d99 [Default Settings] Properly clear settings when reset to default 2018-09-29 12:40:29 +02:00
JojoS d303fa023f changed implementation to use shared_ptr instead of helper structure
this makes it easier to use this as a template for other sensors. No additional helper class/structure is needed.
2018-09-29 11:58:57 +02:00
JojoS 29b0cc1b32 removed sensordefs helper structure
to simplify the code
2018-09-27 22:00:01 +02:00
JojoS 584abd1e75 on INIT, delete sensordef before adding new 2018-09-27 14:19:54 +02:00
JojoS b4d8be0e59 fixed distance reading
the P_013_sensordef object was created on the stack and the destructor was called after leaving the PLUGIN_INIT. That deleted the included NewPingESP8266 object and using this object failed.
2018-09-27 11:56:31 +02:00
ESPEasy release bot 30f5c5cb7d automatically updated release notes for mega-20180927 2018-09-27 04:00:17 +02:00
Plebs 6e7286c6fb split parseTemplate function
simplifying code
2018-09-26 23:40:01 +02:00
Gijs NoorlanderandGitHub ae1db543ce Merge pull request #1804 from TD-er/bugfix/ESP32_partition_build
[ESP32] Split new partition layout to separate build
2018-09-26 22:52:30 +02:00
TD-er 947e1e0343 [Build] Add esp32test_1M8_partition build and warning on ESP32 partition 2018-09-26 22:49:30 +02:00
TD-er 0578d720f4 [ESP32] Split new partition layout to separate build
See "ESP32 not start after last upgrade" #1802
2018-09-26 21:55:02 +02:00
Gilad Raz 3fee6794f2 Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into add-raw-ir-reading 2018-09-26 19:03:47 +03:00
Gilad Raz 019e33331b Merge branch 'mega' into add-raw-ir-reading
# Conflicts:
#	src/_P016_IR.ino
#	src/_P035_IRTX.ino
2018-09-26 19:01:50 +03:00
Gijs NoorlanderandGitHub 211d79bbd5 Merge pull request #1792 from TD-er/feature/ESP32_partition_table
[ESP32] Change partition size (will clear all settings) and add plugins
2018-09-26 09:05:44 +02:00
Gilad 8a751a0922 Merge branch 'mega' of https://github.com/letscontrolit/ESPEasy into mega 2018-09-25 18:43:37 +03:00
Gilad 450eca8dc5 Fixed warnings... 2018-09-25 03:13:14 +03:00
Gilad ce0bfbf717 Fixed warnings... 2018-09-25 02:30:20 +03:00
Gilad bb316bbd30 Improved IR RAW2 format to support RLE. 2018-09-25 01:42:45 +03:00
TD-er 91c5d60af9 [Info] Add board name to the sysinfo page. 2018-09-25 00:19:17 +02:00
TD-er 0d9bc8027d [ESP32] RTOS move handle_schedule() to core1 and increase stack
Enable RTOS flag in advanced settings (and reboot) to create separate threads on the 2nd ESP32 core, which will handle the scheduler.
This lowers stack usage and CPU load.
Also the ESP will no longer crash when saving large settings like for the Framed OLED plugin.
2018-09-25 00:18:46 +02:00
TD-er bd2bdab95c [Stack] Move Settings from stack to heap 2018-09-24 22:08:02 +02:00
TD-er c4f98fbc8e [Travis] Uninitialized variable in P073_7DGT 2018-09-24 20:13:24 +02:00
ESPEasy release bot b332a513b5 automatically updated release notes for mega-20180924 2018-09-24 04:00:20 +02:00
TD-er e36bb714f1 [ESP32] Change partition size (will clear all settings) and add plugins
The last update to > 0.12 increased the binary size a lot. This is mainly due to the added BLE support.
This makes it almost impossible to use the default partition table layout.

This changes the app partitions to 1.8 MB and reduces the SPIFFS to 320 k.
Changing the partition table will clear all settings, so make a backup of the settings.

Also added all plugins that would compile (not tested) for ESP32.

Known issue:
ESP32 might crash due to stack overflow when saving settings of plugins. (e.g. OLED framed plugin)
2018-09-24 00:23:45 +02:00
Gijs NoorlanderandGitHub 6e1cde343f Merge pull request #1791 from TD-er/bugfix/ESP32_I2C
[ESP32] Fix I2C handling to allow I2C devices to work
2018-09-23 22:14:43 +02:00
TD-er cce9ddd2dc [ESP32] Fix I2C handling to allow I2C devices to work
See this issue: [I2C repeated start broken](https://github.com/platformio/platform-espressif32/issues/126)
2018-09-23 21:17:55 +02:00
Gijs NoorlanderandGitHub 51be17a436 Merge pull request #1780 from clumsy-stefan/sensor_type_change
Change type of sensor for MCP and PCF devices
2018-09-23 20:18:38 +02:00
Gijs NoorlanderandGitHub 66d27a6697 Merge pull request #1776 from beigenmann/mega
Fix platformio
2018-09-23 20:17:33 +02:00
Gijs NoorlanderandGitHub a033e458fb Merge pull request #1782 from TD-er/bugfix/MQTT_reconnect_name
[MQTT] Work around for lost MQTT connection
2018-09-23 20:17:07 +02:00
Gijs NoorlanderandGitHub 494436bbff Merge pull request #1789 from sakinit/ESP32-to-core_esp32_1_3_0
ESP32: change to platform version core_esp32_1_3_0
2018-09-23 20:16:52 +02:00
sakinit 23bacd0762 change to platform version core_esp32_1_3_0 2018-09-23 17:49:47 +02:00
Gilad 9bdfab3fa2 Add IR RAW2 Reading / Transmitting - added a safety check. 2018-09-23 15:49:26 +03:00
Gilad 9d446745cc Add IR RAW2 Reading / Transmitting - fixed ambiguity. 2018-09-23 14:38:36 +03:00
Gilad d2ab946d17 Add IR RAW2 Reading / Transmitting. 2018-09-23 12:44:56 +03:00
Gilad fcc71a56b6 Add IR RAW2 Reading / Transmitting. 2018-09-23 12:40:52 +03:00
TD-er 657d15d962 [MQTT] Work around for lost MQTT connection
Maybe a fix for #1525
Meant to be a fix for #1530

It looks like the MQTT broker is refusing to accept a new connection from a specific client ID, as long as the broker thinks a client with that ID is still connected.
This work around adds the number of wifi reconnects to the clientID, to make the ID unique when a reconnect has to be made.
2018-09-23 00:54:55 +02:00
stefan 533cb88a64 Change type of sensor for MCP and PCF devices
MCP and PCF devices should be of type SWNSOR_TYPE_SWITCH instead of SENSOR_TYPE_SINGLE so that the controllers can identify them correctly as switches (for GPIO related functions)
2018-09-22 20:41:53 +02:00
Benno Eigenmann f33ca6df78 Fix platformio 2018-09-22 15:57:09 +02:00
Plebs 639685ea0d fixed float to int conversion 2018-09-11 10:16:44 +02:00
Plebs 867209de6d Add three new TOGGLE commands
Added three new commands to toggle the pins from 0 to 1 or viceversa and to toggle the task value:

Command: taskvaluetoggle
P001: gpiotoggle
P019:pcfgpiotoggle
2018-09-11 00:38:55 +02:00
James TuttonandGitHub 60925778c6 Fixed missing ;
Fixed missing ;
2018-07-30 14:19:56 +01:00
James TuttonandGitHub 15233bf100 Added Special Case to allow Servo to be disabled
Servo Motors by default forcefully hold the desired position.  This consumes power.  In some cases for example to turn a value or open a latch once the position is set  there may be no need to hold the new position.  With this update users can pass a special case value above >9000 which is out of normal range 0-180 or 365. when this value is passed the servo is detached and is free to move.
2018-07-30 14:10:22 +01:00
611 changed files with 46513 additions and 17563 deletions
+23
View File
@@ -1,3 +1,25 @@
### Checklist
- [ ] The title of this issue is "to the point" and descriptive.
- [ ] This issue describes what is happening.
- [ ] This issue describes what components are affected (e.g. name of plugin/controller)
- [ ] This issue describes how to reproduce it.
- [ ] This issue describes when it was introduced (when known) and what version is now showing the problem.
### I have...
- [ ] searched the [issue tracker](https://github.com/letscontrolit/ESPEasy/issues) or the [forum](https://www.letscontrolit.com/forum/viewforum.php?f=1) for a similar issue. (include links when applicable)
- [ ] entered a system description using "Copy info to clipboard" on the sysinfo page. (when possible)
- [ ] entered the full filename of the used version (e.g. `ESP_Easy_mega-20181001_test_ESP8266_4096_VCC.bin` )
- [ ] given a list of active plugins or controllers when applicable.
- [ ] filled out all applicable fields below.
### Steps already tried...
- [ ] Tried a clean install (empty `.bin` files are included in the ZIP)
- [ ] Tested previous/other build (mention which one already tested)
- [ ] Tested on other node to make sure hardware isn't defective.
- [ ] Verified if the problem is limited to a single plugin/controller
### If you self compile, please state this and PLEASE try to ONLY REPORT ISSUES WITH OFFICIAL BUILDS! ###
<!--- If you self compile, please state this and PLEASE try to ONLY REPORT ISSUES WITH OFFICIAL BUILDS! --->
<!--- NOTE: This is not a support forum! For questions and support go here: --->
@@ -5,6 +27,7 @@
<!--- Remove topics that are not applicable to your feature request of issue --->
<!--- Remember to have a "to the point" TITLE --->
### Summarize of the problem/feature request
<!--- Describe the problem or feature request --->
YOUR TEXT GOES HERE
+2
View File
@@ -22,3 +22,5 @@ test/output_export.cpp
.vscode/.browse.c_cpp.db*
.vscode/c_cpp_properties.json
.vscode/launch.json
docs/build/
+7 -8
View File
@@ -22,19 +22,18 @@ addons:
install:
- pip install -U platformio
- pip install -U platformio sphinx recommonmark sphinx_bootstrap_theme
script:
# - cppcheck --enable=warning src/*.ino -q --force -I src --include=src/ESPEasy.ino --error-exitcode=1
# - ./memanalyzer.py ~/.platformio/packages/toolchain-xtensa/bin/xtensa-lx106-elf-objdump
- PLATFORMIO_BUILD_FLAGS="-D CONTINUOUS_INTEGRATION" platformio run
- PLATFORMIO_BUILD_FLAGS="-D CONTINUOUS_INTEGRATION" platformio run
- platformio update
# patch platformio core libs for PUYA bug (https://github.com/letscontrolit/ESPEasy/issues/650)
- cd patches; ./check_puya_patch; cd ..
- PLATFORMIO_BUILD_FLAGS="-D CONTINUOUS_INTEGRATION" platformio run -s --environment dev_ESP8266PUYA_1024
- PLATFORMIO_BUILD_FLAGS="-D CONTINUOUS_INTEGRATION" platformio run -s --environment dev_ESP8266PUYA_1024
# - bash ./preflight.sh # make sure input files are OK before wasting time with prereqs
# - cppcheck --enable=warning src/*.ino -q --force -I src --include=src/ESPEasy.ino --error-exitcode=1
# - ./memanalyzer.py ~/.platformio/packages/toolchain-xtensa/bin/xtensa-lx106-elf-objdump
- PLATFORMIO_BUILD_FLAGS="-D CONTINUOUS_INTEGRATION" platformio run --target clean
- PLATFORMIO_BUILD_FLAGS="-D CONTINUOUS_INTEGRATION" platformio run
before_deploy:
- ./before_deploy
+4 -4
View File
@@ -1,6 +1,6 @@
|Latest Nightly | Build Status | Patreon | Ko-Fi | PayPal |
|-------|-------|-------|-------|-------|
| [![GitHub version](https://img.shields.io/github/release/letscontrolit/ESPEasy/all.svg)](https://github.com/letscontrolit/ESPEasy/releases/latest) | [![Build Status](https://travis-ci.org/letscontrolit/ESPEasy.svg?branch=mega)](https://travis-ci.org/letscontrolit/ESPEasy) | [![donate](https://img.shields.io/badge/donate-Patreon-blue.svg)](https://www.patreon.com/GrovkillenTDer) | [![donate](https://img.shields.io/badge/donate-KoFi-blue.svg)](https://ko-fi.com/grovkillentder) | [![donate](https://img.shields.io/badge/donate-PayPal-blue.svg)](https://www.paypal.me/espeasy) |
|Latest Nightly | Build Status | Docs | Patreon | Ko-Fi | PayPal |
|-------|-------|-------|-------|-------|-------|
| [![GitHub version](https://img.shields.io/github/release/letscontrolit/ESPEasy/all.svg)](https://github.com/letscontrolit/ESPEasy/releases/latest) | [![Build Status](https://travis-ci.org/letscontrolit/ESPEasy.svg?branch=mega)](https://travis-ci.org/letscontrolit/ESPEasy) | [![Documentation Status](https://readthedocs.org/projects/espeasy/badge/?version=latest)](https://espeasy.readthedocs.io/en/latest/?badge=latest) | [![donate](https://img.shields.io/badge/donate-Patreon-blue.svg)](https://www.patreon.com/GrovkillenTDer) | [![donate](https://img.shields.io/badge/donate-KoFi-blue.svg)](https://ko-fi.com/grovkillentder) | [![donate](https://img.shields.io/badge/donate-PayPal-blue.svg)](https://www.paypal.me/espeasy) |
For ways to *support* us, see [this announcement on the forum](https://www.letscontrolit.com/forum/viewtopic.php?f=14&t=5787), or have a look at the [Patreon](https://www.patreon.com/GrovkillenTDer), [Ko-Fi](https://ko-fi.com/grovkillentder) or [PayPal](https://www.paypal.me/espeasy) links above.
@@ -41,4 +41,4 @@ ESPEasy_mega-20180102_dev_ESP8285_1024.bin | ESP8285 with 1Mb flash | Stabl
Details and discussion are on the Experimental forum: https://www.letscontrolit.com/forum/viewforum.php?f=18
We're also on IRC: #ESPEasy @freenode
Automated builds of the (new) documentation can be found at [ESPEasy.readthedocs.io](https://espeasy.readthedocs.io/en/latest/)
+86 -28
View File
@@ -1,47 +1,105 @@
#!/bin/bash
VERSION=$(git describe)
TMP_DIST=`mktemp -d`
CURPATH=`pwd`
while getopts d: option
do
case "${option}"
in
d) VERSION=${OPTARG};;
esac
done
if [ ! -d ${TMP_DIST} ]; then
# Could not create temp dir, so exit
exit 1
fi
#Naming convention:
# ESP_Easy_[github version]_[plugin set]_[chip type]_[flash memory].bin
mkdir -p ${TMP_DIST}
cp -r dist/* ${TMP_DIST}/
if [ -d "docs/build" ]; then
# Docs have been created
mkdir -p ${TMP_DIST}/docs
cp -r docs/build/* ${TMP_DIST}/docs/
fi
for ENV in \
normal_ESP8266_1024 \
normal_ESP8266_4096 \
normal_ESP8285_1024 \
normal_IR_ESP8266_4096 \
test_ESP8266_1024\
dev_ESP8266_4096\
esp-wrover-kit_test_1M8_partition\
esp32dev\
esp32test_1M8_partition\
hard_SONOFF_POW_4M\
hard_core_250_beta_SONOFF_POW_4M\
hard_core_250_beta_Shelly_1_2M256\
minimal_ESP8266_1024_OTA\
minimal_ESP8285_1024_OTA\
normal_ESP8266_1024\
normal_ESP8266_1024_VCC\
normal_ESP8266_4096\
normal_ESP8285_1024\
normal_IR_ESP8266_4096\
normal_WROOM02_2048\
normal_core_241_ESP8266_1024\
normal_core_241_ESP8266_4096\
normal_core_250_beta_ESP8266_1024\
normal_core_250_beta_ESP8266_4096\
normal_core_250_beta_IR_ESP8266_4096\
normal_core_250_beta_WROOM02_2M256\
test_ESP8266_4096\
test_ESP8266_4096_VCC\
test_ESP8285_1024\
dev_ESP8266_1024\
dev_ESP8266_4096\
dev_ESP8285_1024\
dev_ESP8266PUYA_1024\
dev_ESP8266PUYA_1024_VCC\
hard_SONOFF_POW\
hard_Shelly_1\
esp32dev;\
test_core_250_beta_ESP8266_4096\
test_core_250_beta_ESP8266_4096_VCC;\
do
echo
echo "### Deploying environment $ENV for version $VERSION"
BIN=.pioenvs/${ENV}/ESP_Easy_${VERSION}_${ENV}.bin
cp .pioenvs/${ENV}/firmware.bin $BIN
python2 crc2.py $BIN
mv $BIN "dist/ESP_Easy_${VERSION}_${ENV}.bin"
MAX_FILESIZE=1044464
if [[ ${ENV} == *"1024"* ]]; then
# max 602 kiB
MAX_FILESIZE=892912
fi
if [[ ${ENV} == *"1024_OTA"* ]]; then
# max 602 kiB
MAX_FILESIZE=616448
fi
if [[ ${ENV} == *"esp32"* ]]; then
MAX_FILESIZE=1310720
fi
if [[ ${ENV} == *"1M8_partition"* ]]; then
MAX_FILESIZE=1900544
fi
FILESIZE=$(stat -c%s .pioenvs/${ENV}/firmware.bin )
if (( FILESIZE < MAX_FILESIZE )); then
echo
echo "### Deploying environment $ENV for version $VERSION"
BIN=.pioenvs/${ENV}/ESP_Easy_${VERSION}_${ENV}.bin
cp .pioenvs/${ENV}/firmware.bin $BIN
python2 crc2.py $BIN
mv $BIN "${TMP_DIST}/bin/ESP_Easy_${VERSION}_${ENV}.bin"
else
echo "Build too large for $ENV $FILESIZE > $MAX_FILESIZE "
fi
done
#create a source structure that is the same as the original ESPEasy project (and works with the howto on the wiki)
rm -rf dist/Source 2>/dev/null
mkdir dist/Source
cp -r lib dist/Source/
cp -r src dist/Source/
cp platformio.ini dist/Source/
#rm -rf dist/Source 2>/dev/null
cd dist
mkdir -p ${TMP_DIST}/source
cp -r lib ${TMP_DIST}/source/
cp -r src ${TMP_DIST}/source/
cp platformio.ini ${TMP_DIST}/source/
cd ${TMP_DIST}
echo
echo "### Creating zip archive"
zip ../ESPEasy_$VERSION.zip -r .
zip ${CURPATH}/ESPEasy_$VERSION.zip -r .
rm -Rf ${TMP_DIST}/* 2>/dev/null
rmdir ${TMP_DIST}
BIN
View File
Binary file not shown.
+23 -10
View File
@@ -21,22 +21,26 @@ Build type can be: (differ in included plugins)
There is also a number of special builds:
- normal_IR => "Normal" + IR receiver/transmitter plugins and library
- hard_xxxxx => Special builds for some off-the-shelff hardware.
- hard_xxxxx => Special builds for some off-the-shelf hardware.
- normal_core_241 => "Normal" using core 2.4.1, since 2.4.2 has issues with PWM
- minimal_ESP82xx_1024_OTA => Minimum number of plugins and a limited set of controllers included to be able to perform a 2-step OTA on 1 MB flash nodes.
Chip can be:
- ESP8266 => Most likely option
- ESP8285 => Used in some Sonoff modules
- ESP32 => Experimental support at this moment
- ESP8266PUYA => For ESP modules with a flash chip labeled "PUYA" (often 1 MB)
The "PUYA" version deserves a bit more attention.
If you cannot save settings, better try to see if the flash chip has "PUYA" written on it.
If so, try the "PUYA" build.
MemorySize can be:
- 1024 => 1 MB flash modules (e.g. almost all Sonoff modules)
- 2048 => 2 MB flash modules (e.g. Shelly1)
- 4096 => 4 MB flash modules (e.g. NodeMCU)
- 2048 => 2 MB flash modules (e.g. Shelly1/WROOM02)
- 4096 => 4 MB flash modules (e.g. NodeMCU/ESP32)
ESP32 now has 2 builds:
- esp32dev Using the default partition layout (1.4 MB for the sketch)
- esp32test_1M8_partition Larger sketch partition (1.8MB) smaller SPIFFS (316 kB)
Please note that changing between those versions will destroy the settings!
The SPIFFS partition will be lost and that contains all settings.
To help recover from a bad flash, there are also blank images included.
@@ -47,8 +51,17 @@ To help recover from a bad flash, there are also blank images included.
When the wrong image is flashed, or the module behaves unstable, or is in a reboot loop,
flash these images first and then the right image for the module.
Another great flash tool can be found here: (Windows only)
https://github.com/Grovkillen/ESP_Easy_Flasher
ESP.Easy.Flasher.exe...
... is the new flashing tool for ESP Easy. You need to run it in elevated mode (as admin)
for it to fetch the COM ports correctly. If you want you may save YOUR settings using the
"Save as default settings" button in the lower left corner. If the window is too big or
too small you can experiment with the "Pixels Per Inch" variable in the
..\Settings\Default.ini file. Setting it to =96 is working for most users but the
application will try to find the most optimal value by default. Sometimes it fails to
do that. More information about the tool is found here:
https://github.com/Grovkillen/ESP_Easy_Flasher
You can also have custom serial commands entered in a txt file. One command per line.
Further reading:
For more information, see: https://github.com/letscontrolit/ESPEasy
Or our forum: https://www.letscontrolit.com/forum/
+1080
View File
File diff suppressed because it is too large Load Diff
Binary file not shown.
View File
View File
View File
+19
View File
@@ -0,0 +1,19 @@
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SOURCEDIR = source
BUILDDIR = build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+35
View File
@@ -0,0 +1,35 @@
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build
if "%1" == "" goto help
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
:end
popd
+3
View File
@@ -0,0 +1,3 @@
recommonmark==0.4.0
Sphinx==1.8.2
sphinx-bootstrap-theme==0.6.5
+22
View File
@@ -0,0 +1,22 @@
These scripts are used to render screenshots of the GUI.
We use phantomJS (available on Win/Mac/Linux http://phantomjs.org/quick-start.html)
and you control the script by passing arguments to the JavaScript files:
########## rasterize.js ##########
argument1: url (ampersand & need to be closed with "&")
argument2: output file name (you can use .png or .pdf as output format)
argument3: horisontalXvertical size (OPTIONAL)
argument4: zoom ("entire page" or "window" or <value> OPTIONAL)
....Example CLI....
phantomjs rasterize.js http://95.143.204.227/devices?index=1"&"page=1 P001_Setup_Switch_1.png
or
phantomjs rasterize.js http://95.143.204.227/devices?index=1"&"page=1 P001_Setup_Switch_1.png 1200px 2
WE USE THE SECOND EXAMPLE by default (you might need to change zoomFactor if the page is too big).
If the rendering is not working you can use this CLI (arg --debug=true):
phantomjs --debug=true rasterize.js http://95.143.204.227/devices?index=1"&"page=1 P001_Setup_Switch_1.png 1200px 2
+52
View File
@@ -0,0 +1,52 @@
//removed use strict GROVKILLEN
var page = require('webpage').create(),
system = require('system'),
address, output, size;
if (system.args.length < 3 || system.args.length > 5) {
console.log('Usage: rasterize.js URL filename [paperwidth*paperheight|paperformat] [zoom]');
console.log(' image (png/jpg output) examples: "1920px" entire page, window width 1920px');
console.log(' "800px*600px" window, clipped to 800x600');
phantom.exit(1);
} else {
address = system.args[1];
output = system.args[2];
page.viewportSize = { width: 600, height: 600 };
if (system.args.length > 3 && system.args[2].substr(-4) === ".pdf") {
size = system.args[3].split('*');
page.paperSize = size.length === 2 ? { width: size[0], height: size[1], margin: '0px' }
: { format: system.args[3], orientation: 'portrait', margin: '1cm' };
} else if (system.args.length > 3 && system.args[3].substr(-2) === "px") {
size = system.args[3].split('*');
if (size.length === 2) {
pageWidth = parseInt(size[0], 10);
pageHeight = parseInt(size[1], 10);
page.viewportSize = { width: pageWidth, height: pageHeight };
page.clipRect = { top: 0, left: 0, width: pageWidth, height: pageHeight };
} else {
console.log("size:", system.args[3]);
pageWidth = parseInt(system.args[3], 10);
pageHeight = parseInt(pageWidth * 3/4, 10); // it's as good an assumption as any
console.log ("pageHeight:",pageHeight);
page.viewportSize = { width: pageWidth, height: pageHeight };
}
}
if (system.args.length > 4) {
page.zoomFactor = system.args[4];
}
page.open(address, function (status) {
if (status !== 'success') {
console.log('Unable to load the address!');
phantom.exit(1);
} else {
window.setTimeout(function () {
//This is injected because of bug in phantomjs (rendering black background: http://phantomjs.org/tips-and-tricks.html) GROVKILLEN
page.evaluate(function() {
document.body.bgColor = 'white';
});
page.render(output);
phantom.exit();
}, 200);
}
});
}
+39
View File
@@ -0,0 +1,39 @@
.. include:: _controller_substitutions.repl
.. _C001_page:
|C001_typename|
==================================================
|C001_shortinfo|
Controller details
------------------
Type: |C001_type|
Name: |C001_name|
Status: |C001_status|
GitHub: |C001_github|_
Maintainer: |C001_maintainer|
Change log
----------
.. versionchanged:: 2.0
...
|added|
Major overhaul for 2.0 release.
.. versionadded:: 1.0
...
|added|
Initial release version.
Description
-----------
+39
View File
@@ -0,0 +1,39 @@
.. include:: _controller_substitutions.repl
.. _C002_page:
|C002_typename|
==================================================
|C002_shortinfo|
Controller details
------------------
Type: |C002_type|
Name: |C002_name|
Status: |C002_status|
GitHub: |C002_github|_
Maintainer: |C002_maintainer|
Change log
----------
.. versionchanged:: 2.0
...
|added|
Major overhaul for 2.0 release.
.. versionadded:: 1.0
...
|added|
Initial release version.
Description
-----------
+39
View File
@@ -0,0 +1,39 @@
.. include:: _controller_substitutions.repl
.. _C003_page:
|C003_typename|
==================================================
|C003_shortinfo|
Controller details
------------------
Type: |C003_type|
Name: |C003_name|
Status: |C003_status|
GitHub: |C003_github|_
Maintainer: |C003_maintainer|
Change log
----------
.. versionchanged:: 2.0
...
|added|
Major overhaul for 2.0 release.
.. versionadded:: 1.0
...
|added|
Initial release version.
Description
-----------
+39
View File
@@ -0,0 +1,39 @@
.. include:: _controller_substitutions.repl
.. _C004_page:
|C004_typename|
==================================================
|C004_shortinfo|
Controller details
------------------
Type: |C004_type|
Name: |C004_name|
Status: |C004_status|
GitHub: |C004_github|_
Maintainer: |C004_maintainer|
Change log
----------
.. versionchanged:: 2.0
...
|added|
Major overhaul for 2.0 release.
.. versionadded:: 1.0
...
|added|
Initial release version.
Description
-----------
+39
View File
@@ -0,0 +1,39 @@
.. include:: _controller_substitutions.repl
.. _C005_page:
|C005_typename|
==================================================
|C005_shortinfo|
Controller details
------------------
Type: |C005_type|
Name: |C005_name|
Status: |C005_status|
GitHub: |C005_github|_
Maintainer: |C005_maintainer|
Change log
----------
.. versionchanged:: 2.0
...
|added|
Major overhaul for 2.0 release.
.. versionadded:: 1.0
...
|added|
Initial release version.
Description
-----------
+39
View File
@@ -0,0 +1,39 @@
.. include:: _controller_substitutions.repl
.. _C006_page:
|C006_typename|
==================================================
|C006_shortinfo|
Controller details
------------------
Type: |C006_type|
Name: |C006_name|
Status: |C006_status|
GitHub: |C006_github|_
Maintainer: |C006_maintainer|
Change log
----------
.. versionchanged:: 2.0
...
|added|
Major overhaul for 2.0 release.
.. versionadded:: 1.0
...
|added|
Initial release version.
Description
-----------
+39
View File
@@ -0,0 +1,39 @@
.. include:: _controller_substitutions.repl
.. _C007_page:
|C007_typename|
==================================================
|C007_shortinfo|
Controller details
------------------
Type: |C007_type|
Name: |C007_name|
Status: |C007_status|
GitHub: |C007_github|_
Maintainer: |C007_maintainer|
Change log
----------
.. versionchanged:: 2.0
...
|added|
Major overhaul for 2.0 release.
.. versionadded:: 1.0
...
|added|
Initial release version.
Description
-----------
+39
View File
@@ -0,0 +1,39 @@
.. include:: _controller_substitutions.repl
.. _C008_page:
|C008_typename|
==================================================
|C008_shortinfo|
Controller details
------------------
Type: |C008_type|
Name: |C008_name|
Status: |C008_status|
GitHub: |C008_github|_
Maintainer: |C008_maintainer|
Change log
----------
.. versionchanged:: 2.0
...
|added|
Major overhaul for 2.0 release.
.. versionadded:: 1.0
...
|added|
Initial release version.
Description
-----------
+39
View File
@@ -0,0 +1,39 @@
.. include:: _controller_substitutions.repl
.. _C009_page:
|C009_typename|
==================================================
|C009_shortinfo|
Controller details
------------------
Type: |C009_type|
Name: |C009_name|
Status: |C009_status|
GitHub: |C009_github|_
Maintainer: |C009_maintainer|
Change log
----------
.. versionchanged:: 2.0
...
|added|
Major overhaul for 2.0 release.
.. versionadded:: 1.0
...
|added|
Initial release version.
Description
-----------
+39
View File
@@ -0,0 +1,39 @@
.. include:: _controller_substitutions.repl
.. _C010_page:
|C010_typename|
==================================================
|C010_shortinfo|
Controller details
------------------
Type: |C010_type|
Name: |C010_name|
Status: |C010_status|
GitHub: |C010_github|_
Maintainer: |C010_maintainer|
Change log
----------
.. versionchanged:: 2.0
...
|added|
Major overhaul for 2.0 release.
.. versionadded:: 1.0
...
|added|
Initial release version.
Description
-----------
+39
View File
@@ -0,0 +1,39 @@
.. include:: _controller_substitutions.repl
.. _C011_page:
|C011_typename|
==================================================
|C011_shortinfo|
Controller details
------------------
Type: |C011_type|
Name: |C011_name|
Status: |C011_status|
GitHub: |C011_github|_
Maintainer: |C011_maintainer|
Change log
----------
.. versionchanged:: 2.0
...
|added|
Major overhaul for 2.0 release.
.. versionadded:: 1.0
...
|added|
Initial release version.
Description
-----------
+39
View File
@@ -0,0 +1,39 @@
.. include:: _controller_substitutions.repl
.. _C012_page:
|C012_typename|
==================================================
|C012_shortinfo|
Controller details
------------------
Type: |C012_type|
Name: |C012_name|
Status: |C012_status|
GitHub: |C012_github|_
Maintainer: |C012_maintainer|
Change log
----------
.. versionchanged:: 2.0
...
|added|
Major overhaul for 2.0 release.
.. versionadded:: 1.0
...
|added|
Initial release version.
Description
-----------
+263
View File
@@ -0,0 +1,263 @@
.. include:: _controller_substitutions.repl
.. _C013_page:
|C013_typename|
==================================================
|C013_shortinfo|
Controller details
------------------
Type: |C013_type|
Name: |C013_name|
Status: |C013_status|
GitHub: |C013_github|_
Maintainer: |C013_maintainer|
Change log
----------
.. versionchanged:: 2.0
...
|improved|
Implementation of secure communication and check for valid data.
.. versionadded:: 1.0
...
|added|
Initial release version.
Description
-----------
ESPEasy is able to communicate between nodes itself.
It is an IANA registered service: `espeasy-p2p <https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=8266#ESPeasy>`_
* Service Name: espeasy-p2p
* Port Number: 8266
* Transport Protocol: UDP
* Description: ESPeasy peer-2-peer communication
* Registration date: 2018-11-28
This protocol is targeted specific for use by ESPeasy to let ESPeasy nodes
communicate with each other to create a big swarm of nodes working together
without the need for a hosted service like MQTT, which needs a central broker.
It is currently used for:
* Discovery of nodes
* Sharing sensor data among nodes
Later updates may add:
* Distribution of settings
* Sending commands
Sending & Known Nodes
---------------------
ESPEasy keeps track of all nodes advertising themselves via Sysinfo messages.
This knowledge is kept in a ``NodeStruct`` for at least 10 minutes.
If a node is not sending a Sysinfo message in this period, it will be removed from the list.
Data Format Versions
--------------------
During the IANA port assignment assessment, a number of issues were pointed out by their experts.
* Versioning
* Security
* Data validation
* Traffic limiting and congestion handling
There are now 2 versions available:
* Version "0" - No security, no data validation.
* Version "1" - Introduced in ESPeasy build <???>
Data Format Version 0
---------------------
Sending and receiving is causing issues when the swarm of nodes increases.
* All nodes with this service enabled will advertise their presence every 30 seconds via broadcast
* Nodes can not subscribe to receiving sensor data updates
* Non broadcast messages are sent to each individual known node, regardless if the receiving node will use the data
* Sensor Data messages are sent to each individual known node
* Sensor Info updates are sent to each individual known node when a plugin coupled to this plugin is saved.
Of each known node the following data is kept:
.. code-block:: C++
struct NodeStruct
{
String nodeName;
byte ip[4];
uint16_t build;
byte age;
byte nodeType;
};
The key to index this ``NodeStruct`` is the nodes unit number.
ASCII Data
~~~~~~~~~~
Command Message
***************
First byte is not 0xFF.
The entire message processed as a command like this:
.. code-block:: C++
packetBuffer[len] = 0;
String request = &packetBuffer[0];
struct EventStruct TempEvent;
parseCommandString(&TempEvent, request);
TempEvent.Source = VALUE_SOURCE_SYSTEM;
if (!PluginCall(PLUGIN_WRITE, &TempEvent, request)) {
ExecuteCommand(VALUE_SOURCE_SYSTEM, &packetBuffer[0]);
}
As can be seen, no checks for size, and it is just expected to be a valid ESPeasy command.
Also no check to see if the command is supported by the receiving end and no feedback to the sender.
Binary Data
~~~~~~~~~~~
Binary data is marked with the first byte 0xFF.
On the receiving end, it is packed in an event in the ``Data`` field and processed like this:
.. code-block:: C++
struct EventStruct TempEvent;
TempEvent.Data = reinterpret_cast<byte*>(&packetBuffer[0]);
TempEvent.Par1 = remoteIP[3];
TempEvent.Par2 = len;
PluginCall(PLUGIN_UDP_IN, &TempEvent, dummyString);
CPluginCall(CPLUGIN_UDP_IN, &TempEvent);
N.B. only the controller C013 implements code for handling UDP data.
Message types supported, determined by the 2nd byte:
* 1: Sysinfo message
* 2: Sensor info pull request (not implemented)
* 3: Sensor info
* 4: Sensor data pull request (not implemented)
* 5: Sensor data
Sysinfo Message
***************
There are 2 types of Sysinfo messages, a standard and an extended message.
The extended message starts with the same information as the standard one.
Standard Sysinfo message (13 bytes):
* 2 bytes marker (255 , 1)
* 6 byte MAC address
* 4 byte IP address
* 1 byte unit number
Extended Sysinfo message (13 + 28 = 41 bytes):
* 2 bytes ESPeasy data version number (LSB, MSB)
* 25 bytes node name
* 1 byte node type
The node type is defined as:
* 1 = "ESP Easy"
* 17 = "ESP Easy Mega"
* 33 = "ESP Easy 32"
* 65 = "Arduino Easy"
* 81 = "Nano Easy"
Sensor Info message
*******************
Sensor Info messages are just a description of a shared sensor.
It contains some information to setup a new sensor on the receiving end.
These messages are just a serialized byte stream of ``struct C013_SensorInfoStruct`` .
.. code-block:: C++
struct C013_SensorInfoStruct
{
byte header = 255;
byte ID = 3;
byte sourcelUnit;
byte destUnit;
byte sourceTaskIndex;
byte destTaskIndex;
byte deviceNumber;
char taskName[26];
char ValueNames[VARS_PER_TASK][26];
};
Sensor Data message
*******************
These messages are just a serialized byte stream of ``struct C013_SensorDataStruct`` .
.. code-block:: C++
struct C013_SensorDataStruct
{
byte header = 255;
byte ID = 5;
byte sourcelUnit;
byte destUnit;
byte sourceTaskIndex;
byte destTaskIndex;
float Values[VARS_PER_TASK];
};
Data Format Version 1
---------------------
This version remains compatible with version 0 for backwards compatibility.
It is using the "next" unused marker.
All messages will have a standard packet data format:
* 2 bytes Marker (255 , 6)
* 2 bytes Version => also determines data offset (header length)
* 2 bytes Message type
* 2 bytes Size of data block in "N" blocks of 16 bytes
* 2 bytes Key/group selector
* 2 bytes Sequence number
* (16 x N) bytes Data block AES encrypted data (including 2 bytes checksum)
* 2 bytes Packet checksum
This allows to:
* Distinguish data format versions
* Filter on message type before allocating large buffers
* Use multiple (pre-shared) encryption keys to have several levels of security or just several groups.
* Validate correct transmission of packet (last 2 checksum bytes) before decrypting data.
* Allow for larger messages to be sent in sequences. (e.g. firmware upgrades?)
* Validate sender and content of data block, since it contains a checksum too, which is part of the encrypted data block.
Since AES has a block size of 16 bytes (128 bit), the size of the data block is defined as a block of 16 bytes.
This allows up-to 1 MB of messages. (2^16 * 2^4 = 2^20)
An UDP datagram sent over IPv4 cannot exceed 65,507 bytes (65,535 8 byte UDP header 20 byte IP header).
In IPv6 jumbograms it is possible to have UDP packets of size greater than 65,535 bytes.
+90
View File
@@ -0,0 +1,90 @@
.. include:: _controller_substitutions.repl
Controller
**********
A controller is a component to enable a plugin to send data elsewhere.
- Up-to 3 controllers can be active in ESPEasy.
- Per plugin up-to 3 active controllers can be selected.
- For some controllers an additional parameter can be given.
For example, Domoticz needs an 'IDX' value to identify the configured entry in
Domoticz for which new data is sent.
Controller Plugins
==================
.. csv-table::
:header: "Plugin name", "Plugin status", "Plugin number"
:widths: 10, 8, 5
":ref:`C001_page`","|C001_status|","C001"
":ref:`C002_page`","|C002_status|","C002"
":ref:`C003_page`","|C003_status|","C003"
":ref:`C004_page`","|C004_status|","C004"
":ref:`C005_page`","|C005_status|","C005"
":ref:`C006_page`","|C006_status|","C006"
":ref:`C007_page`","|C007_status|","C007"
":ref:`C008_page`","|C008_status|","C008"
":ref:`C009_page`","|C009_status|","C009"
":ref:`C010_page`","|C010_status|","C010"
":ref:`C011_page`","|C011_status|","C011"
":ref:`C012_page`","|C012_status|","C012"
":ref:`C013_page`","|C013_status|","C013"
Controller Parameters
=====================
Generic fields
--------------
- **Protocol** - The type of controller (e.g. ThingSpeak/OpenHAB MQTT/etc.)
- **Locate Controller** - Selection between hostname/IP
- **Controller Hostname/IP** - The address to reach the selected service
- **Controller Port** - TCP/UDP Port number (0...65536)
- **Enabled** - Whether or not the controller is active.
Send queue parameters
---------------------
Controllers have a queue to keep unsent messages.
This queue is used to handle message bursts and also store messages which are recorded
before WiFi connection is made or during lost connection.
- **Minimum Send Interval** - Minimum time between two messages in msec.
- **Max Queue Depth** - Maximum length of the buffer queue to keep unsent messages.
- **Max Retries** - Maximum number of retries to send a message.
- **Full Queue Action** - How to handle when queue is full, ignore new or delete oldest message.
- **Client Timeout** - Timeout in msec for an network connection used by the controller.
- **Check Reply** - When set to false, a sent message is considered always successful.
Sample ThingSpeak configuration
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Some controllers, like ThingSpeak, need a specific configuration.
ThingSpeak only allows a message every 15 seconds for the free accounts.
- **Minimum Send Interval** - 15000 msec
- **Max Queue Depth** - 1 (only report the last value)
- **Max Retries** - 2
- **Full Queue Action** - Delete Oldest
- **Client Timeout** - 500 msec (server is online, so timeout must be a bit longer)
Controller user credentials
---------------------------
- **Controller User** - User name (optional)
- **Controller Password** - Password (optional)
MQTT related settings
---------------------
- **Controller Subscribe** - Subscribe to the given topic.
- **Controller Publish** - Publish to the given topic.
- **Controller lwl topic** - Topic to which LWT (Last Will Testament) messages should be sent.
- **LWT Connect Message** - Connection established message.
- **LWT Disconnect Message** - Connection lost message (sent to broker during connect and published by broker when connection is lost)
@@ -0,0 +1,145 @@
.. |C001_name| replace:: :cyan:`Domoticz HTTP`
.. |C001_type| replace:: :cyan:`Controller`
.. |C001_typename| replace:: :cyan:`Controller - Domoticz HTTP`
.. |C001_status| replace:: :green:`NORMAL`
.. |C001_github| replace:: C001.ino
.. _C001_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_C001.ino
.. |C001_usedby| replace:: `.`
.. |C001_shortinfo| replace:: `.`
.. |C001_maintainer| replace:: `.`
.. |C001_compileinfo| replace:: `.`
.. |C002_name| replace:: :cyan:`Domoticz MQTT`
.. |C002_type| replace:: :cyan:`Controller`
.. |C002_typename| replace:: :cyan:`Controller - Domoticz MQTT`
.. |C002_status| replace:: :green:`NORMAL`
.. |C002_github| replace:: C002.ino
.. _C002_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_C002.ino
.. |C002_usedby| replace:: `.`
.. |C002_shortinfo| replace:: `.`
.. |C002_maintainer| replace:: `.`
.. |C002_compileinfo| replace:: `.`
.. |C003_name| replace:: :cyan:`Nodo Telnet`
.. |C003_type| replace:: :cyan:`Controller`
.. |C003_typename| replace:: :cyan:`Controller - Nodo Telnet`
.. |C003_status| replace:: :green:`NORMAL`
.. |C003_github| replace:: C003.ino
.. _C003_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_C003.ino
.. |C003_usedby| replace:: `.`
.. |C003_shortinfo| replace:: `.`
.. |C003_maintainer| replace:: `.`
.. |C003_compileinfo| replace:: `.`
.. |C004_name| replace:: :cyan:`ThingSpeak`
.. |C004_type| replace:: :cyan:`Controller`
.. |C004_typename| replace:: :cyan:`Controller - ThingSpeak`
.. |C004_status| replace:: :green:`NORMAL`
.. |C004_github| replace:: C004.ino
.. _C004_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_C004.ino
.. |C004_usedby| replace:: `.`
.. |C004_shortinfo| replace:: `.`
.. |C004_maintainer| replace:: `.`
.. |C004_compileinfo| replace:: `.`
.. |C005_name| replace:: :cyan:`OpenHAB MQTT`
.. |C005_type| replace:: :cyan:`Controller`
.. |C005_typename| replace:: :cyan:`Controller - OpenHAB MQTT`
.. |C005_status| replace:: :green:`NORMAL`
.. |C005_github| replace:: C005.ino
.. _C005_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_C005.ino
.. |C005_usedby| replace:: `.`
.. |C005_shortinfo| replace:: `.`
.. |C005_maintainer| replace:: `.`
.. |C005_compileinfo| replace:: `.`
.. |C006_name| replace:: :cyan:`PiDome MQTT`
.. |C006_type| replace:: :cyan:`Controller`
.. |C006_typename| replace:: :cyan:`Controller - PiDome MQTT`
.. |C006_status| replace:: :green:`NORMAL`
.. |C006_github| replace:: C006.ino
.. _C006_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_C006.ino
.. |C006_usedby| replace:: `.`
.. |C006_shortinfo| replace:: `.`
.. |C006_maintainer| replace:: `.`
.. |C006_compileinfo| replace:: `.`
.. |C007_name| replace:: :cyan:`Emoncms`
.. |C007_type| replace:: :cyan:`Controller`
.. |C007_typename| replace:: :cyan:`Controller - Emoncms`
.. |C007_status| replace:: :green:`NORMAL`
.. |C007_github| replace:: C007.ino
.. _C007_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_C007.ino
.. |C007_usedby| replace:: `.`
.. |C007_shortinfo| replace:: `.`
.. |C007_maintainer| replace:: `.`
.. |C007_compileinfo| replace:: `.`
.. |C008_name| replace:: :cyan:`Generic HTTP`
.. |C008_type| replace:: :cyan:`Controller`
.. |C008_typename| replace:: :cyan:`Controller - Generic HTTP`
.. |C008_status| replace:: :green:`NORMAL`
.. |C008_github| replace:: C008.ino
.. _C008_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_C008.ino
.. |C008_usedby| replace:: `.`
.. |C008_shortinfo| replace:: `.`
.. |C008_maintainer| replace:: `.`
.. |C008_compileinfo| replace:: `.`
.. |C009_name| replace:: :cyan:`FHEM HTTP`
.. |C009_type| replace:: :cyan:`Controller`
.. |C009_typename| replace:: :cyan:`Controller - FHEM HTTP`
.. |C009_status| replace:: :green:`NORMAL`
.. |C009_github| replace:: C009.ino
.. _C009_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_C009.ino
.. |C009_usedby| replace:: `.`
.. |C009_shortinfo| replace:: `.`
.. |C009_maintainer| replace:: `.`
.. |C009_compileinfo| replace:: `.`
.. |C010_name| replace:: :cyan:`Generic UDP`
.. |C010_type| replace:: :cyan:`Controller`
.. |C010_typename| replace:: :cyan:`Controller - Generic UDP`
.. |C010_status| replace:: :green:`NORMAL`
.. |C010_github| replace:: C010.ino
.. _C010_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_C010.ino
.. |C010_usedby| replace:: `.`
.. |C010_shortinfo| replace:: `.`
.. |C010_maintainer| replace:: `.`
.. |C010_compileinfo| replace:: `.`
.. |C011_name| replace:: :cyan:`Generic HTTP`
.. |C011_type| replace:: :cyan:`Controller`
.. |C011_typename| replace:: :cyan:`Controller - Generic HTTP`
.. |C011_status| replace:: :yellow:`TESTING`
.. |C011_github| replace:: C011.ino
.. _C011_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_C011.ino
.. |C011_usedby| replace:: `.`
.. |C011_shortinfo| replace:: `.`
.. |C011_maintainer| replace:: `.`
.. |C011_compileinfo| replace:: `.`
.. |C012_name| replace:: :cyan:`Blynk`
.. |C012_type| replace:: :cyan:`Controller`
.. |C012_typename| replace:: :cyan:`Controller - Blynk`
.. |C012_status| replace:: :yellow:`TESTING`
.. |C012_github| replace:: C012.ino
.. _C012_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_C012.ino
.. |C012_usedby| replace:: `.`
.. |C012_shortinfo| replace:: `.`
.. |C012_maintainer| replace:: `.`
.. |C012_compileinfo| replace:: `.`
.. |C013_name| replace:: :cyan:`ESPEasy P2P Networking`
.. |C013_type| replace:: :cyan:`Controller`
.. |C013_typename| replace:: :cyan:`Controller - ESPEasy P2P Networking`
.. |C013_status| replace:: :green:`NORMAL`
.. |C013_github| replace:: C013.ino
.. _C013_github: https://github.com/letscontrolit/ESPEasy/blob/mega/src/_C013.ino
.. |C013_usedby| replace:: `.`
.. |C013_shortinfo| replace:: `.`
.. |C013_maintainer| replace:: `.`
.. |C013_compileinfo| replace:: `.`
+138
View File
@@ -0,0 +1,138 @@
About Us
********
The ESP Easy project is being handled by the core team of TD-er and Grovkillen.
TD-er being the head of backend and Grovkillen being head of the frontend.
We both dig down into each others areas of responsible on a daily basis though.
Other than us we have around 100 volunteers that helping us maintain
and improve the source code.
History
=======
ESP Easy has gone through a lot of changes over the last years and here's some
of the major milestones.
Early days (Nodo Uno)
---------------------
It's somewhat unknown how it all started but Paul Tonkes (part of the Nodo team)
built a IR (infrared) to Kaku controller because he was not happy with the
commercial version. That unit came to the world named as Nodo (Uno).
04/2010 (Nodo Due)
------------------
Taken from the old Nodo website at the time that the Nodo update was introduced
(named Nodo Due). During this time, a nice production class Arduino Shield was
also built.
10/2011 (Joining the Nodo community)
------------------------------------
The founder of the ESP Easy project, Mvb, read about the Nodo project and
ordered his first Nodo Arduino board from the Nodo shop. He was using it to
control Kaku lights around his house.
03/2012 (Nodo Mega)
--------------------
Beta Nodo Mega was released, based on Arduino Mega 2560 board with Ethernet
Shield. Using a hosted web application.
05/2013 (Nodo NES Shield)
-------------------------
The hardware guys from the Nodo team released a shield for Arduino Mega 2560
that contains everything needed to run Nodo Mega with the web application.
01/2014 (Exploring new wireless capabilities)
---------------------------------------------
Nodo got its first 2.4GHz communication plugin, using the well known NRF24L01.
This had solved limitations of the 433MHz OOK modules and at the same time it
reduced the load on that frequency so Kaku became more reliable.
Mvb decided to run a setup with two Nodo Mega units in the house. First unit
runs the NES board for 433MHz communication, second board was dedicated for
NRF24L01 communications. Both Mega's could communicate through I2C or Ethernet.
02/2015 (Entering the Wi-Fi solution)
-------------------------------------
Nodo got its first ESP Wi-Fi plugin, using it as a serial to Wi-Fi bridge.
At that time we were using the stock firmware that came with the module.
04/2015 (ESP Connexio)
----------------------
The ESP Connexio project was initiated as the first effort to port the original
Nodo code to the ESP platform using early version of the ESP8266 Arduino Core.
The team had to workaround a lot of issues but got it working reasonably.
05/2015 (ESP Easy initiative)
-----------------------------
ESP Easy was initiated, mainly because the Nodo Connexio concept was a bit
over complicated. It had the same event list as the original Nodo project.
Quite powerful but also complicated to end users. So the idea was to have
something plug and play to hook up sensors to Domoticz. That decision of
targeting Domoticz is still present in current source code since many plugins
from the early days have the values setup in such a way that Domoticz can
import them with little effort.
09/2015 (ESP Easy R020)
-----------------------
As of R017 the Nodo Plugin mechanism was also implemented within ESP Easy.
Some other inconvenient bugs were fixed, help buttons added and it was decided
that R020 could be the first production edition.
ESP Easy was launched on Sourceforge as the very first production edition.
No programming required.
02/2016 (ESP Easy R078)
-----------------------
To make things even more easy, edition R078 was provided as binary images
with a simple installer. No need for a complicated Arduino IDE setup.
And it also introduced OTA, so subsequent updates could be done without
connecting the module to a serial port.
08/2016 (ESP Easy R120)
-----------------------
Lots of fixes and additional features:
* Rules engine
* Custom dummy device
* GlobalSync
* More commands
* More controllers
* More devices
Estimated user count was at this time around 7 000.
11/2016 (ESP Easy Mega)
-----------------------
ESP Easy Mega was initiated (only for ESP Modules with at least 1MB flash
memory). We had to many limitations in ESP Easy, due to the code size that
exceeded the 512kB modules flash size. Decided to drop support for these
classic modules and went forward with this version.
02/2017 (Change of roles)
-------------------------
Psy0rz took over lead development of ESP Easy Mega (2.0.0), he moved the
source code onto the GitHub page and started to modularize the code. He also
made ESP Easy support multiple controllers and fallback Wi-Fi. During this time
nightly releases was introduced and user counts had grown to around 20 000.
08/2018 (New core team)
-----------------------
With both Mvb and Psy0rz having little time to spend on the project two of the
most eager contributors Grovkillen (mainly wiki documentation and help tools
at that time) and TD-er (had already implemented the event based Wi-Fi and
scheduler for better timing) stepped in. The aim for the core team is to
make the ESP Easy OS as great as can be by dedicating full time commitment to
the project.
User count was at this point approximately around 32 000 and 24 hour download
count around 280.
.. 11/2018 (First stable 2+ version)
----------------------------------
The first stable release of the new 2.0.0 version was finally released. Much
of the features added had been in the nightly releases for more than a year
but in the process of modularizing the source code a lot of bugs were fixed,
much better timing added, but also some new bugs came into the light. The
team wanted to have the official stable release to be just that, stable.
Estimated user count was at this point around 40 000 and 24 hour download count
around 540.
+2
View File
@@ -0,0 +1,2 @@
ESP Easy Function Blocks
************************
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

+35
View File
@@ -0,0 +1,35 @@
Documentation
*************
For documentation we use Sphinx and this will be read by ReadTheDocs.
We use the `Sphinx Bootstrap Theme <https://github.com/ryan-roemer/sphinx-bootstrap-theme>`_
This documentation is included in the GitHub repository.
It allows us to create documentation per version of ESPEasy.
See also the `ESPEasy wiki <https://www.letscontrolit.com/wiki/index.php/ESPEasy>`_
for more documentation which has not been moved here.
Needed Python packages::
pip install sphinx recommonmark sphinx_bootstrap_theme
PlatformIO with Atom
====================
With the ESPEasy project open in Atom, open the PIO terminal in Atom.
Install dependencies::
cd docs
pip install ... (see needed Python packages above)
Build on Windows::
cd docs
.\make.bat html
Build on Linux/Mac::
cd docs
./make html
+47
View File
@@ -0,0 +1,47 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P000_page:
|P000_typename|
==================================================
|P000_shortinfo|
Plugin details
--------------
Type: |P000_type|
Name: |P000_name|
Status: |P000_status|
GitHub: |P000_github|_
Maintainer: |P000_maintainer|
Supported hardware
------------------
|P000_usedby_GPIO|, |P000_usedby_RTTTL|
Commands available
------------------
.. include:: P001_commands_GPIO.repl
.. include:: P001_commands_RTTTL.repl
Change log
----------
.. versionchanged:: 2.0
...
|added|
Major overhaul for 2.0 release.
.. versionadded:: 1.0
...
|added|
Initial release version.
+106
View File
@@ -0,0 +1,106 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P000_Buzzer_page:
Buzzer (RTTTL)
==============
|P000_typename|
|P000_status|
.. image:: P000_Buzzer_RTTTL_1.jpg
Introduction
------------
RTTTL (Ring Tone [Text] Transfer Language) was developed by Nokia to play more "easy on the ear" melodies as ringtones for mobile phones. The tunes over all characteristics are created by using three different commands:
**d** - duration
**o** - octave
**b** - tempo (beat)
After that the actual tune is then created using standard notes (a, b, c, d, e, f, and g), before the note the duration is set, after the note the octave is set:
.. code-block:: html
<duration><note><octave>
To compose a jingle you separate the notes with a comma.
Specifications:
* Output sound
Wiring
------
.. code-block:: html
ESP Buzzer
GPIO <--> I/O
Power
3.3V <--> VCC
GND <--> GND
Setup
-----
No device is needed, generally you use rules to activate different notifications, or you send commands to activate them. Below you find more information on how to do this.
Rules examples
--------------
From ESP Easy v2.0.0 its possible to play melodies via `RTTTL <https://en.wikipedia.org/wiki/Ring_Tone_Transfer_Language#Technical_specification>`_ (don't forget to remove the spaces and replace # with -, this might be fixed in future releases):
.. code-block:: html
http://<ESP IP address>/control?cmd=rtttl,14:d=4,o=5,b=112:8a,8a,a,8a,8a,a,8a,8c6,8f.,16g,2a,8a-,8a-,8a-.,16a-,8a-,8a,8a.,16a,8a,8g,8g,8a,g,c6
This plays a melody on pin 14.
You can also use these from rules. We use it to let our alarm system give feedback to the user via a piezo speaker.
To make a boot-sound on startup, create a rule like this:
.. code-block:: html
On System#Boot do
rtttl,14:d=10,o=6,b=180,c,e,g
endon
`A place to find more tunes <http://www.picaxe.com/RTTTL-Ringtones-for-Tune-Command/>`_, all saved as txt files.
Besides RTTTL it's also possible to play a single tone on a pin, via a buzzer, speaker or piezo element:
.. code-block:: html
http://<ESP IP address>/control?cmd=tone,14,1300,200
Plays a 1300 Hz tone for 200 ms on GPIO-14.
Indicators (recommended settings)
---------------------------------
No device is needed.
Commands
--------
.. include:: P001_commands_RTTTL.repl
Where to buy
------------
.. csv-table::
:header: "Store", "Link"
:widths: 5, 40
"AliExpress","`Link 1 ($) <http://s.click.aliexpress.com/e/cMvVWYS4>`_"
|affiliate|
.. More pictures
.. -------------
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

+125
View File
@@ -0,0 +1,125 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P000_Level_converter_page:
Level converter
===============
.. image:: P000_Level_converter_1.jpg
Introduction
------------
Level-converters, aka level-shifters, aka voltage dividers, are used to adapt between a 3.3V device like the ESP8266 and devices using 5V or more internally.
The ESP8266 runs with 3.3V - many devices need 5V or more, for example a LCD display or a Wiegand card reader. It is said that the ESP8266 can
take 5V at its inputs. Basically this is correct and confirmand by Espressif, the manufacturer. Anyways this as always has some limitations.
**First**, overcurrent. If you use a GPIO as input and the output of the connected device has 5V it should work. But if the internal resistance
of the device is low the current might exceed the limits of the ESP8266. With some specific settings of the ESP8266 the GPIO can not take 5V,
who checks every plugin or never made a setting mistake? So for making sure no GPIO is blown accidentally or by a bug some measurements should be taken.
**Second**, some devices need higher voltage if GPIO used as output. For example the PCF8574 or the MCP23017, port multiplexer. This chips use
3.3V or 5V as you choose. For some purpose higher voltage is useful. If using 5V there is a point you have to take care for:
The High and Low levels depend on the voltage!
With the PCF8574 the minimum "High" level Vih = 0.7 × Vdd, with 5V as Vdd it is 3.5V. With the MCP23017 the Vih = 0.8 × Vdd, with 5V as Vdd it is 4V.
(Vdd is the supplied voltage) So with 3.3V max from the ESP we are too low. It might work, it might fail. Worse, it might work with one chip
and fail with another one due to tolerances. In this case a level-converter is needed.
Specifications:
* Level shifter, aka logic converter. Used to turn logics of higher voltage (5V) down to ESP friendly voltage (3.3V).
.. note::
**Troubleshooting**:
If your level converter does not work, please check cabling first. As said cabling mistakes and slack joints with the usual cheap breadboard cables are the most likely reason.
If you use breakout board type level converters have a second one at hand. We've seen some "dead on arrival", other died by electrostatic discharge.
And again, breadboards are somewhat unreliable. Use a digital multi-meter to check contacts and wires.
Wiring
------
.. warning::
Be careful with wiring. A wrong connection from 5V to the 3.3V rail can cause damages of the ESP and/or the power supply.
A direct connection by mistake from 5V to a GPIO may fry your ESP! Handle level-shifters with some care.
The used FET transistors are somewhat sensible against electrostatic discharge. Use a anti-static mat.
.. code-block:: html
ESP Level converter Connected hardware
GPIO (X) <--> 3A, LV1, A1 etc. <--> 5A, HV1, B2 etc.
GPIO (Y) <--> 3B, LV2, A2 etc. <--> 5B, HV2, B2 etc.
Power
3.3V <--> 3V3, LV, VA, 3V etc.
5.0V <--> VIN, HV, VB, +5V etc.
GND <--> GND
Different ways of level converting
----------------------------------
Other than using a level converter it is possible to do it "manually" through resistors.
Just Input - simple unidirectional
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
As an example we will use a HC-SR04 ultrasonic distance metering module. The HC-SR04 needs 5V, it will not work with 3.3V.
It works like bat ears, sending ultrasonic pulses and waiting for the echo. It has an input "Trigger" for sending ultrasonic pulses and an output "Echo" for the received signals.
The "trigger" input is no problem as it can take 3.3V for "High". Just connect it to the desired GPIO. But the "Echo" pin sends back 5V signals!
As this signaling is working just in one direction ("unidirectional") from the HC-SR04 to the ESP8266, a simple voltage divider does the job. Look at the schematic:
.. image:: P000_Level_converter_2.jpg
Note the two resistors R1 and R2, configured as a voltage divider. The divider gives 2.2/(1.2+2.2) = 0.65 so with 5V you get 5V × 0.65 = 3.25V at the GPIO pin.
Just Input - precise unidirectional
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The simple circuit with two resistors has one disadvantage. It is calculated for 5V. For other voltages you have to calculate another pair of resistor values. And worse,
spikes, short spikes of high voltage from unstable power supply or other reasons) pass through the divider. A better and more precise way is using a Zener diode.
A Zener diode simplified is a semiconductor that gets conductive at a specific voltage.
.. image:: P000_Level_converter_3.jpg
Here a Zener diode is used as voltage limiter. The resistor must not be omitted, it is necessary to limit the current. If a 5V signal comes the diode gets conductive - it would
short circuit the device output without the resistor. This circuit is dimensioned for input voltages from 5V to 9V (resistor should have 0.25W!). It can be used nicely for Wiegand
card readers for example. You may use even higher voltages, for example if you want to check a 24V pump. You need an adapted resistor value for that.
Input and Output - Bidirectional Level Converter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For devices that use one wire for input and output ("bidirectional") or devices that need higher voltage on an input an active level converter is necessary.
This applies mainly to I²C devices as SCL (the clock signal) comes with 3.3V from the ESP and the SDA (data signal) goes in both directions. There are
specialized chips for this purpose. Most of them have 8 channels - bit of an overkill for an ESP. There is a much simpler way you can buy as a cheap
breakout board or solder together yourself.
.. image:: P000_Level_converter_4.jpg
A little FET and two resistors do the job. This is the circuit most level shifters you can buy at the market use.
How does it work? Lets have a simplified look in a nutshell. A FET gets conductive if the voltage at the gate (pin 1) is higher then the voltage at
the source (pin 2). So if the ESP gives 3.3V (High), gate and source have same voltage - the FET isolates both sides (pin 2 & 3) from each other.
If the ESP goes to 0.3V (Low), the gate still has 3.3V - now the FET gets conductive pulling the 5V-side down. If the 5V-side goes to zero (low)
because your device sends data, the diode inside the FET gets conductive and pulls the 3.3V side down to nearly zero (Low).
Use of a dedicated level converter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Quite an easy job. The pins on a level shifter are usually divided in a LV (Low Voltage) and a HV (High Voltage) side. Sometimes it is just called 3V and 5V.
Connect the 3V pin to 3.3V from ESP and the 5V pin to 5V from your device, for example a LCD display. Don't forget ground, some breakouts have some additional
capacitors which need it. Then connect the GPIOs from the ESP to the LV side, the equivalent pins from your 5V device to the HV side. That's all.
.. image:: P000_Level_converter_5.jpg
Where to buy
------------
.. csv-table::
:header: "Store", "Link"
:widths: 5, 40
"AliExpress","`Link 1 ($) <http://s.click.aliexpress.com/e/c5dMH05S>`_"
|affiliate|
.. More pictures
.. -------------
Binary file not shown.

After

Width:  |  Height:  |  Size: 802 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

@@ -0,0 +1,104 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P000_Piezo_element_page:
Piezo element
=============
|P000_typename|
|P000_status|
.. image:: P000_Piezo_element_RTTTL_1.jpg
Introduction
------------
RTTTL (Ring Tone [Text] Transfer Language) was developed by Nokia to play more "easy on the ear" melodies as ringtones for mobile phones. The tunes over all characteristics are created by using three different commands:
**d** - duration
**o** - octave
**b** - tempo (beat)
After that the actual tune is then created using standard notes (a, b, c, d, e, f, and g), before the note the duration is set, after the note the octave is set:
.. code-block:: html
<duration><note><octave>
To compose a jingle you separate the notes with a comma.
Specifications:
* Output sound
Wiring
------
.. code-block:: html
ESP Piezo
GPIO <--> Positive (red)
GND <--> Negative (black)
Setup
-----
No device is needed, generally you use rules to activate different notifications, or you send commands to activate them. Below you find more information on how to do this.
Rules examples
--------------
From ESP Easy v2.0.0 its possible to play melodies via `RTTTL <https://en.wikipedia.org/wiki/Ring_Tone_Transfer_Language#Technical_specification>`_ (don't forget to remove the spaces and replace # with -, this might be fixed in future releases):
.. code-block:: html
http://<ESP IP address>/control?cmd=rtttl,14:d=4,o=5,b=112:8a,8a,a,8a,8a,a,8a,8c6,8f.,16g,2a,8a-,8a-,8a-.,16a-,8a-,8a,8a.,16a,8a,8g,8g,8a,g,c6
This plays a melody on pin 14.
You can also use these from rules. We use it to let our alarm system give feedback to the user via a piezo speaker.
To make a boot-sound on startup, create a rule like this:
.. code-block:: html
On System#Boot do
rtttl,14:d=10,o=6,b=180,c,e,g
endon
`A place to find more tunes <http://www.picaxe.com/RTTTL-Ringtones-for-Tune-Command/>`_, all saved as txt files.
Besides RTTTL it's also possible to play a single tone on a pin, via a buzzer, speaker or piezo element:
.. code-block:: html
http://<ESP IP address>/control?cmd=tone,14,1300,200
Plays a 1300 Hz tone for 200 ms on GPIO-14.
Indicators (recommended settings)
---------------------------------
No device is needed.
Commands
--------
.. include:: P001_commands_RTTTL.repl
Where to buy
------------
.. csv-table::
:header: "Store", "Link"
:widths: 5, 40
"AliExpress","`Link 1 ($) <http://s.click.aliexpress.com/e/CG00mPI>`_"
|affiliate|
.. More pictures
.. -------------
Binary file not shown.

After

Width:  |  Height:  |  Size: 433 KiB

+340
View File
@@ -0,0 +1,340 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P000_Relay_page:
Relay
=====
|P000_typename|
|P000_status|
.. image:: P000_Relay_1.jpg
Introduction
------------
The ESP8266 can't switch high currents or voltages and no AC at all. But it can switch a relay that can switch high load, isolating high
voltage from the ESP circuit. There are several relay types in the wild.
The ESP can control a relay using one of it's GPIO pins. All relay boards that work with Arduino should also work with the ESP module.
Note this is only a possible application of the ESPs ability to send a logic 1/0 (TTL at 3.3V) on a GPIO. These relay are usually available
as 1,2,4,8,16 Relay modules and work electromagnetically. They can switch both AC/DC(or imitate a button press of a remote for example)
as they are "power operated mechanical switches". Each relay has the screw terminal. The middle one is usually "always connected" terminal.
The NC contact will be connected to the middle terminal when the relay is not powered. The NO is connected when the relay is powered
and activated. Note that there are "active high" and "active low" versions of these relays.
There are mainly two relay types in the wild: The good old mechanical relay with the nice "click-clack" sound and the electronic relays, so called
"Solid State Relays" (SSR) which are completely silent.
Specifications:
* Opto coupler (mechanical)
* Solid state (SSR)
Relays are the most used actuators in home automation. Most people use breakout boards with a relay on it. Sadly there is no "standard" relay board.
It seems every small manufacturing garage in china has it's own layout and schematic. Some use 5V, some use 12V, some do with opto couplers, some without...
the perfect chaos. Several problems result from this chaos. Relays keeping switched on no mater what your ESP says. Relays not switching at all.
And last but not least - sometimes they work. Let's get some order into that chaos.
.. note::
You have just got your brand new relay board and it does not work. What to do?
At first you should check the switching level. Is it switching on with "high" or with "low"?
* Connect the board to power only (5V or 12V usually).
* Plug a jumper cable to one of the inputs.
* With the other end of the cable touch GND and +Vcc (5V or 12V).
On one of these touches the relay should switch. If it switches when connecting to GND the board uses "low" as active (relay on) signal.
In this case diodes or a transistor / FET as described above might help.
Connect the board to the ESP carefully. Check voltages, the power supply should be able to deliver enough current for the relays!
Check the connection cables. Jumper cables are well known for slack joints.
Mechanical relay
----------------
The mechanical relay is a simple construction.
It consist of a coil, one or more contacts and a spring. The spring keeps the contact in the "open" position. If the coil gets current, the magnetic
field pulls the contact into the second position, the contact closes. As soon as the current is switched off the spring pulls the contact back.
Mechanical relays may just have one contact switching to closed if the coil works (Normally open or NO). The contact might be a changeover contact which
has a "common" connector and a NO (open without coil current, "normally open") and a NC (closed without coil current, "normally closed") connection.
There might even be several contacts in one relay.
There are several special types of mechanical relay
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Latching relay:
.. image:: P000_Relay_2.jpg
One current pulse switches on and keeps on when current goes off, a second pulse switches off.
Polarized relay:
.. image:: P000_Relay_3.jpg
These relays have a defined + and - pin for the coil that must be followed.
.. warning:: These micro relays can not switch mains voltage! Use them for low voltage door openers or similar.
Pros and cons of mechanical relays
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:green:`+` Several contacts in one relay available.
:green:`+` NO/NC available.
:green:`+` Limited resistance to overload and overvoltage.
:red:`-` Noisy, might disturb in a living room or bedroom.
:red:`-` Mechanical, moving parts that might wear out over time.
:red:`-` Contact bumping when switching.
:red:`-` High current for the coil, needs a transistor or FET for driving and generates peaks on power supply.
:red:`-` The coil induces high voltage when switching off.
Solid state relay
-----------------
The solid state relay, SSR for short, is a complex electronic circuit. It uses an opto coupler for input, this isolating the driving circuit from the load voltage.
Isolation voltage is usually 2000V, 4000V or more. The switching element usually is a triac for AC switching types. For DC there are types with a MOSFET as switching element.
There are several special types of SSR relay
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. image:: P000_Relay_4.jpg
As with the mechanical relays there are specialized types of SSR's.
**AC Type** : Can only (!!) switch AC. AC with zero crossing circuit. This type switches on and off if the AC voltage is at the zero point. **Expensive** and necessary only for special applications.
**DC Type** : Can only (!!) switch DC! And a lot more that are reserved for special cases.
Pros and cons of SSR relays
^^^^^^^^^^^^^^^^^^^^^^^^^^^
:green:`+` Completely noiseless
:green:`+` Low driving current and voltage available. Some types can be driven directly from the ESP.
:green:`+` No mechanical parts, no wearing out.
:green:`+` No contact bumping.
:green:`+` No voltage peaks on the low voltage side.
:green:`+` Available for very high current for an affordable price.
:red:`-` Very sensitive to overvoltage and overcurrent.
:red:`-` No NC available usually.
:red:`-` Usually with only one or sometimes three "normally open" circuits.
:red:`-` Needs cooling! Smaller relays up to 5A must be mounted with at least 1cm distance to other parts.
:red:`-` Bigger relays usually need a heat sink. Watch out: Heat sink may carry mains voltage with some types!
:red:`-` Leak current! These relays leak some current even if switched off.
Leak currents
~~~~~~~~~~~~~
Leak Current from SSR's might lead into problems under certain circumstances.
The both types shown above ("Hoymk D3805KH" and "Mager GJ-6-L", 5A AC) were tested here.
The Mager GJ-5-L showed a low leaking current and is useable for most purposes.
The D3805HK showed a really high leaking current, enough for a 10W LED to glow and a small solenoid valve to keep open!
This is not recommended for normal use.
Meanwhile a third sample arrived: The SSR-D32A380/5 sold by Pollin.
Similar to the D3805HK it shows a leaking current, as the test LED is slightly glowing in the dark when off.
It seems to be a lower leaking then with the D3805HK, this is subject to some further investigation.
The advantage of the Pollin SSR: It contains a small LED on the top indicating if the relay is on.
This SSR is a bit bigger then the other two types tested, it just fits the case. So holes for the LEDs
can be drilled on the top side of the case.
.. danger::
Always remember that a switched-off SSR is not completely switched off!
Even a small leaking current is enough to give a shock. Nice surprise if you're on the ladder changing bulbs....
Choosing your relay
~~~~~~~~~~~~~~~~~~~
Which relay should be used?
Well, this depends on what you want to switch. If you control a heavy motor or pump, I'd always prefer a mechanical relay.
The resistance against short overcurrent is a good point here.
For experimenting we prefer mechanical relays too - we just love the "click" sound, i.e. we don't have to connect a load to see if it works.
If noise counts or if you place the relay in a dusty or humid environment a SSR is the better choice. It's completely encapsulated so dust
and humidity can't damage it. As it has no mechanical parts it is completely noise-free. So it's the perfect choice to switch lighting in a living room or sleeping room.
Of course you have to chose a relay that fits your parameters.
Which voltage you want to switch? AC or DC? Which current?
If you want to use a SSR for high current you have to calculate the space for a heat sink and you have to use a vented case. All these parameters
have to be figured into your project. It is also possible to use a small SSR to drive a really heavy external relay for a heavy machine for example.
Wiring
------
.. code-block:: html
ESP Relay (board)
GPIO (X) <--> IN1
GPIO (Y) <--> IN2
Power
5.0V <--> VCC
GND <--> GND
Setup
-----
No device is needed, generally you use rules to activate relays, or you send commands to activate them. Below you
find more information on how to do this.
.. note::
If you want to monitor and have the GPIO state published you do this by adding as a |P001_typename| ,
it will not be a switch per say but you will get the state published automatically.
Rules examples
--------------
.. code-block:: html
On Switch#State Do
if [Switch#State]=1
GPIO,12,1
else
GPIO,12,0
endif
EndOn
This rule will turn the relay ON when the button is pressed, and OFF when released.
Indicators (recommended settings)
---------------------------------
No device is needed.
Commands
--------
.. include:: P001_commands_GPIO.repl
How to connect your relay
-------------------------
You can connect the relay in multiple ways, we explain them all below.
Basic ESP circuit: mechanical relays
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The basic circuit is simple.
As the relay usually consumes more current as the ESP can handle it needs a transistor or FET to drive the relay.
To suppress the voltage peak when switching off the coil a free-wheeling diode is needed. This can be a standard silicium diode, a 1N4148 for example.
.. image:: P000_Relay_5.jpg
Well, there is another way to switch the relay. In the above example we used a NPN transistor or a N-channel FET. A PNP transistor or P-Channel FET can be used too.
Some board manufacturers do this and now we run into problems promptly. The relays usually need some higher voltage then the ESP, 5V or 12 V in most cases.
The PNP transistor in the example is connected to +5V. It will switch the relay to "on" if the voltage at the input is at least 0.7V below the Vcc of 5V.
The ESP delivers a maximum of 3.3V if the GPIO is "high", around 0.5V if it is "low". Both voltages are far below the 5V-0.7V = 4.3V threshhold of the relay board.
The relay is permanently on, no matter what your ESP says. We can get this to work in a simple way with a 5V relay board. A standard diode has a loss of around 0.7V.
We can use this to get a higher output level from the ESP. We simply use two diodes in the connection between relay board and ESP. This raises the voltage from the
ESP up to 3.3v + 1.4V = 4.7V. This is above the threshhold of 4.3V. If the board uses a FET it might be necessary to use three diodes. That usually will work.
On top: This circuit switches the relay off if the GPIO is "high", this leading to irritations sometimes.
The picture shows the basic circuit with a PNP transistor, and the " 2 Diodes " solution:
.. image:: P000_Relay_6.jpg
More complex: using an opto coupler
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Many widespread relay boards use opto couplers. Honestly we don't know the reason besides it looks good in advertising.
In theory the opto coupler isolates the relay coil from the ESP circuit. Well, that's nice theory. In real world we use the same power supply for relays and ESP.
This bridges the opto coupler as the circuits are connected via power supply making the opto coupler completely useless. Anyways the relay isolates the load from
the ESP anyways. It might be useful only if relay switching interferes with the ESP. In this case you might try a separate power supply for relay coils.
This isolates the ESP completely from the coil circuits. Note that a jumper has to be set for that on some boards.
Again there are two possible ways to use this circuit. The opto coupler input has one pin to the ESP and one to ground - this works without any problem but it is not widespread.
.. image:: P000_Relay_7.jpg
Most boards we've seen connect the opto coupler to 5V or 12V and the other input pin to the ESP.
.. image:: P000_Relay_8.jpg
This runs into same issues as with the PNP transistor above. The high voltage of 3.3V from ESP is far below 5V, this keeping the relay permanently active.
The solution is same as with the transistor board above. Use some diodes between ESP and relay board usually does the job with relay boards using 5V.
Depending on the circuit you will have to experiment how many diodes are necessary.
Boards with 12V
~~~~~~~~~~~~~~~
If your relay board uses 12V and needs "Low" to switch the relay on it gets somewhat more complex. Basically it is possible to use a lot of diodes but
it's not very handy. You may try a Zener diode of around 8.5.. 8.7 V. Honestly we don't recommend it. In this case it is better to use an additional
transistor or FET to get it to work. This has one advantage: It inverts the switching signal so a "low" output says the relay is off.
.. image:: P000_Relay_9.jpg
Special designed boards
~~~~~~~~~~~~~~~~~~~~~~~
There are some boards in the wild which can be configured if "low" or "high" should switch the relay on.
With this boards you will have to experiment a bit with your ESP and the board, there should be a combination that works.
.. image:: P000_Relay_10.jpg
Note the jumpers down left - that's the configuration for switching on high or low level.
Basic ESP circuit: SSR
~~~~~~~~~~~~~~~~~~~~~~
This is more simple. If you got a SSR that has an input of "3...12V" or "3...30V" it usually can be driven directly from the ESP.
The only thing you should keep in mind: Do not omit the varistor (RVx in the schematics). It protects the SSR from voltage peaks that
may kill it within some milliseconds. Instead of the varistor a TVS diode can be used, for example a P6K400CA.
Be careful, you have to use a bidirectional type!
.. image:: P000_Relay_11.jpg
It is possible to direct drive a SSR from the ESP but we won't recommend this. We prefer the same circuit as with the mechanical relay.
It makes the relay circuit more universal and reduces load on the ESP.
.. image:: P000_Relay_12.jpg
Instead of the 2N2222/BC547 you may use a small FET, a BSS138 or 2N7000 / 7002. Omit the 22K resistor if useing a FET.
R2 is needed if your relay can't take the Vcc directly. If you use a "3...30V" input SSR it's not necessary.
Any opto coupler is completely needless if you use a SSR. The SSR has an opto coupler built in to isolate the load from the ESP.
At this time there are not that much relay boards with SSR in the market, this will change over time as they get more popular.
From what is on the market be careful what you buy. Most boards we've seen nowadays on AliExpress and Ebay have a DC relay installed - they can switch DC only! They can't switch mains voltage.
Some words about DIY relay boards
---------------------------------
All in all it's no problem to build your own relay board fitting your needs exactly. But watch out if you want to switch
mains voltage. There is a reason why in some countries the policies specify a minimum distance between the parts with high
voltage and the low voltage circuits. Do not use experimental PCB's with copper pads or stripes!
Good breakout boards are milled out, there is a gap in the PCB for isolating mains from low voltage.
Prefer these boards over others without milling.
.. danger::
Be very careful - mains voltage can burn your home or kill you. In case of doubt ask an expert!
Where to buy
------------
.. csv-table::
:header: "Store", "Link"
:widths: 5, 40
"AliExpress","`Link 1 ($) <http://s.click.aliexpress.com/e/cM59HXVq>`_ `Link 2 ($) <http://s.click.aliexpress.com/e/cerop6s0>`_"
|affiliate|
.. More pictures
.. -------------
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 KiB

+88
View File
@@ -0,0 +1,88 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P000_Servo_motor_page:
Servo motor
===========
|P000_typename|
|P000_status|
.. image:: P000_Servo_motor_1.jpg
Introduction
------------
Usual servos can turn about 180° (90° in both directions from zero point).
There are some rare servos with 270° turn. If you use a 180° type you may turn it 90° to the left or to the right.
.. danger::
Trying to turn a servo more then what it can handle will run the servo against a stopper inside the gear.
As ESP Easy tries to go further the servo starts humming and gets hot, it will die over time.
The third type "continuous turn servo" is not supported at this time.
Specifications:
* Controlling servo motors using PWM
Wiring
------
.. code-block:: html
ESP Servo
GPIO (X) <--> S (signal)
Power
5.0V <--> VCC
GND <--> GND
Setup
-----
No device is needed, generally you use rules to activate servos, or you send commands to activate them. Below you
find more information on how to do this.
Rules examples
--------------
.. code-block:: html
On Switch#State Do
if [Switch#State]=1
Servo,12,1,-45
Servo,14,2,45
else
Servo,12,1,0
Servo,14,2,0
endif
EndOn
This rule will tilt the servos 45° when the button is pressed, and it'll go back to 0 once released.
Indicators (recommended settings)
---------------------------------
No device is needed.
Commands
--------
.. include:: P001_commands_GPIO.repl
Where to buy
------------
.. csv-table::
:header: "Store", "Link"
:widths: 5, 40
"AliExpress","`Link 1 ($) <http://s.click.aliexpress.com/e/c5RaXUgu>`_"
|affiliate|
.. More pictures
.. -------------
Binary file not shown.

After

Width:  |  Height:  |  Size: 864 KiB

+104
View File
@@ -0,0 +1,104 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P000_Speaker_page:
Speaker
=======
|P000_typename|
|P000_status|
.. image:: P000_Speaker_RTTTL_1.jpg
Introduction
------------
RTTTL (Ring Tone [Text] Transfer Language) was developed by Nokia to play more "easy on the ear" melodies as ringtones for mobile phones. The tunes over all characteristics are created by using three different commands:
**d** - duration
**o** - octave
**b** - tempo (beat)
After that the actual tune is then created using standard notes (a, b, c, d, e, f, and g), before the note the duration is set, after the note the octave is set:
.. code-block:: html
<duration><note><octave>
To compose a jingle you separate the notes with a comma.
Specifications:
* Output sound
Wiring
------
.. code-block:: html
ESP Speaker
GPIO <--> Positive (red)
GND <--> Negative (black)
Setup
-----
No device is needed, generally you use rules to activate different notifications, or you send commands to activate them. Below you find more information on how to do this.
Rules examples
--------------
From ESP Easy v2.0.0 its possible to play melodies via `RTTTL <https://en.wikipedia.org/wiki/Ring_Tone_Transfer_Language#Technical_specification>`_ (don't forget to remove the spaces and replace # with -, this might be fixed in future releases):
.. code-block:: html
http://<ESP IP address>/control?cmd=rtttl,14:d=4,o=5,b=112:8a,8a,a,8a,8a,a,8a,8c6,8f.,16g,2a,8a-,8a-,8a-.,16a-,8a-,8a,8a.,16a,8a,8g,8g,8a,g,c6
This plays a melody on pin 14.
You can also use these from rules. We use it to let our alarm system give feedback to the user via a piezo speaker.
To make a boot-sound on startup, create a rule like this:
.. code-block:: html
On System#Boot do
rtttl,14:d=10,o=6,b=180,c,e,g
endon
`A place to find more tunes <http://www.picaxe.com/RTTTL-Ringtones-for-Tune-Command/>`_, all saved as txt files.
Besides RTTTL it's also possible to play a single tone on a pin, via a buzzer, speaker or piezo element:
.. code-block:: html
http://<ESP IP address>/control?cmd=tone,14,1300,200
Plays a 1300 Hz tone for 200 ms on GPIO-14.
Indicators (recommended settings)
---------------------------------
No device is needed.
Commands
--------
.. include:: P001_commands_RTTTL.repl
Where to buy
------------
.. csv-table::
:header: "Store", "Link"
:widths: 5, 40
"AliExpress","`Link 1 ($) <http://s.click.aliexpress.com/e/cPcaaQXI>`_"
|affiliate|
.. More pictures
.. -------------
Binary file not shown.

After

Width:  |  Height:  |  Size: 434 KiB

+250
View File
@@ -0,0 +1,250 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. csv-table::
:header: "Command", "Class", "Purpose / Syntax"
:widths: 8, 5, 30
"Debug","
:red:`Internal`","
Change Serial port debug level
``Debug,<1-4>``"
"
IP","
:red:`Internal`","
Change IP address
``IP,<IP address>``"
"
Name","
:red:`Internal`","
Set the name of the unit
``Name,<new name>``"
"
Password","
:red:`Internal`","
Set the password of the unit
``Password,<new password>``"
"
Reboot","
:red:`Internal`","
Reboot the ESP
``Reboot``"
"
Reset","
:red:`Internal`","
Reset config to factory default. Caution, all settings will be lost!
``Reset``"
"
Reset Flash Write Counter","
:red:`Internal`","
Reset flash write to zero.
``ResetFlashWriteCounter``"
"
Rules","
:red:`Internal`","
Rules enabled (1) or rules disabled (0)
``Rules,<1/0>``"
"
Save","
:red:`Internal`","
Save config to persistent flash memory
``Save``"
"
Settings","
:red:`Internal`","
Show settings on serial terminal
``Settings``"
"
TaskClear","
:red:`Internal`","
Delete the given task/device
``TaskClear,<task/device nr>``"
"
TaskClearAll","
:red:`Internal`","
Delete ALL task/device
``TaskClearAll``"
"
TaskRun","
:red:`Internal`","
Run/excecute the given task/device, use to manually force an update/read of the task.
``TaskRun,<task/device nr>``"
"
Unit","
:red:`Internal`","
Set the unit number
``Unit,<unit number>``"
"
WifiAPKey","
:red:`Internal`","
Change AP WPA key
``WifiAPKey,<WPA key>``"
"
WifiAPMode","
:red:`Internal`","
Force the unit into AP mode.
``WifiAPMode``"
"
WifiConnect","
:red:`Internal`","
Connect to configured wireless network
``WifiConnect``"
"
WifiDisconnect","
:red:`Internal`","
Disconnect from wireless network
``WifiDisconnect``"
"
WifiKey","
:red:`Internal`","
Change WPA key for primary WiFi
``WifiKey,<Wifi WPA key>``"
"
WifiKey2","
:red:`Internal`","
Change WPA key for secondary WiFi
``WifiKey2,<Wifi WPA key>``"
"
WifiScan","
:red:`Internal`","
Scan Wireless networks
``WifiScan``"
"
WifiSSID","
:red:`Internal`","
Change SSID to connect as primary WiFi
``WifiSSID,<SSID>``"
"
WifiSSID2","
:red:`Internal`","
Change SSID to connect as secondry WiFi
``WifiSSID2,<SSID>``"
"
Delay","
:green:`Rules`","
Delay rule processing
``Delay,<delay in milliSeconds>``"
"
Publish","
:green:`Rules`","
Send command using MQTT broker service
``Publish,<topic>,<value>``"
"
SendTo","
:green:`Rules`","
Send command to other ESP (using UDP)
``SendTo,<unit nr>,<command>``"
"
SendToHTTP","
:green:`Rules`","
Send command to other network device using HTTP
``SendToHTTP,<IP address>,<Portnumber>,<command>``
``SendToHTTP,<domain>,<Portnumber>,</url>``"
"
SendToUDP","
:green:`Rules`","
Send command to other network device using UDP (non-ESP Easy units)
``SendToUDP,<IP address>,<Portnumber>,<command>``"
"
TaskValueSet","
:green:`Rules`","
Set values on a **Dummy Task** (device)
``TaskValueSet,<task/device nr>,<value nr>,<value/formula>``"
"
TimerSet","
:green:`Rules`","
Start a timed event
``TimerSet,<timernr>,<timeInSeconds>``
``TimerSet,<timernr>,0`` disables the timer"
"
Event","
:blue:`Special`","
Create an event, it's possible to send a float value along as well.
See event syntax below..."
Event command
~~~~~~~~~~~~~
The event command is a special command used to trigger an event. This event can then be acted upon from the rules.
You can send 0..4 event values along with the event.
.. csv-table::
:header: "Event / Info", "Rule example"
:widths: 10, 10
"
``Event,SingleEvent``
The event (triggered by any of the launch ways) will make the unit publish a message.
","
.. code-block:: html
on SingleEvent do
Publish,%sysname%/Info,A single event has been triggered!
endon
"
"
``Event,SingleValue=123``
The event value ``123`` is intercepted and published.
","
.. code-block:: html
on SingleValue do
Publish,%sysname%/Info,An event has been sent (%eventvalue%)!
endon
TEST
"
"
``Event,Multi=1,2,3,99``
The event value ``99`` (4) is intercepted and the rule ``Publish, ... %eventvalue1% + %eventvalue2% = [Dummy#V1]`` is
triggered, output payload to MQTT would then be ``Lets compute 1 + 2 = 3``
","
.. code-block:: html
on Multi do
if %eventvalue4%=99
TaskValueSet,12,1,[%eventvalue1%+%eventvalue2%]
Publish,%sysname%/Info,Lets compute %eventvalue1% + %eventvalue2% = [Dummy#V1]
else
TaskValueSet,12,1,[%eventvalue3%-%eventvalue2%]
Publish,%sysname%/Info,Lets compute %eventvalue3% - %eventvalue2% = [Dummy#V1]
endif
endon
"
+47
View File
@@ -0,0 +1,47 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P001_page:
|P001_typename|
==================================================
|P001_shortinfo|
Plugin details
--------------
Type: |P001_type|
Name: |P001_name|
Status: |P001_status|
GitHub: |P001_github|_
Maintainer: |P001_maintainer|
Supported hardware
------------------
|P001_usedby|
Commands available
------------------
.. include:: P001_commands_GPIO.repl
.. include:: P001_commands_RTTTL.repl
Change log
----------
.. versionchanged:: 2.0
...
|added|
Major overhaul for 2.0 release.
.. versionadded:: 1.0
...
|added|
Initial release version.
+143
View File
@@ -0,0 +1,143 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P001_Door_switch_page:
Door switch
===========
|P001_typename|
|P001_status|
.. image:: P001_Door_switch_1.jpg
Introduction
------------
Any door switch module can be used as an digital input. Most none contact door switches use a technology called
reed switch. By using a magnet (the part with no wires) the reed inside the other part (with wires) will connect
the two parts of the reed and making a signal go low or high depending on how you have connected the switch.
You may use it by simply connect it to either a GPIO that is normally high (pull-up) or normally low (pull-down).
Specifications:
* Give a high or low signal to a GPIO
* Power needed: 3.3V (typically)
* Output voltage: same as input (typically)
Wiring
------
.. code-block:: html
ESP Door switch
GPIO (X) <--> Signal
Power
3.3V <--> Signal
or
GND <--> Signal
Setup
-----
.. image:: P001_Setup_Door_switch_1.png
Task settings
~~~~~~~~~~~~~
* **Device**: Name of plugin
* **Name**: Name of the task (example name **Door**)
* **Enable**: Should the task be enabled or not
Sensor
^^^^^^
* **Internal pull-up**: Check if you want to use the internal pull-up of the ESP (not all GPIO pins have this internal pull-up.)
* **Inverse logic**: Sometimes you may want the physical high value to be published as a low value. For example if the button is
triggering a high (1) value when you push it you maybe use it to turn of a LED so the :code:`Switch#State` would then logically be
preferred to be set as 0 and thus used as a variable for controlling that LED. See rules example below.
* **GPIO**: Which GPIO should be used, recommended to not use a latching switch that may set the ESP into flash mode if left
to high/low.
* **Switch type**: Set the switch type to either "Switch" or "Dimmer". Door (reed) switch is a "Switch".
* Switch: The default way of handling a switch is by a on/off button. It's either on (:code:`1`) or off (:code:`0`).
* Dimmer: Not used by door (reed) switches, if you still want to use it you can have a look at the
:ref:`P001_Switch_page` page.
* **Switch button type**: Set the type of switch, "Normal switch", "Push button active low", or "Push button active high".
* Normal switch: This is the general setting to use for a PIR switch.
* Push button active low: Not used by door (reed) switches (in general), if you still want to use it you can have a look at the
:ref:`P001_Switch_page` page.
* **Send boot state**: If checked the unit will publish the switch state when booting. If not checked you may find yourself
with a latching switch caught in limbo. This means that the unit is registering a low/high value but the physical state of
the switch might be the opposite. If you use a mechanical switch that may be physically set to a state you should check this
option.
Advanced event management
^^^^^^^^^^^^^^^^^^^^^^^^^
* **De-bounce (ms)**: How long should the pulse (the time you press the button) be, if set to high you need to have it published
for a longer time before the unit will register it as an state change. You could experiment with this setting to find a good
behavior of the button if you feel that it's not responding according to your preferences.
* **Double click event**: Not used by door (reed) switches (in general), if you still want to use it you can have a look at the
:ref:`P001_Switch_page` page.
* **Double click max interval (ms)**: Same as above..
* **Long press event**: Same as above..
* **Long press min interval (ms)**: Same as above..
* **Use safe button (slower)**: Same as above..
Data acquisition
^^^^^^^^^^^^^^^^
* **Send to controller** 1..3: Check which controller (if any) you want to publish to. All or no controller can be used.
* **Interval**: How often should the task publish its value (optional for switch plugins).
Indicators/values (recommended settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. csv-table::
:header: "Indicator", "Value Name", "Interval", "Decimals", "Extra information"
:widths: 8, 5, 5, 5, 40
"State", "State", "0", "N/A", "Usually you just want the state being published when door is actually being opened/closed. If you want a continuous publishing of the state you may use the interval setting to do so."
Rules examples
--------------
.. code-block:: html
on Door#State=1 do
timerSet,1,1
endon
on rules#timer=1 do
if [Door#State]=0
//Action if door is closed
else
//Action if door is opened
endif
endon
Where to buy
------------
.. csv-table::
:header: "Type", "Link"
:widths: 5, 40
"Door switch","`AliExpress 1 ($) <http://s.click.aliexpress.com/e/ccCdXCVi>`_ `Banggood 1 ($) <https://www.banggood.com/search/reed-door.html?p=V3270422659778201806&custlinkid=76099>`_ `eBay 1 ($) <http://rover.ebay.com/rover/1/711-53200-19255-0/1?ff3=4&pub=5575404073&toolid=10001&campid=5338336929&customid=&mpre=https%3A%2F%2Fwww.ebay.com%2Fsch%2Fi.html%3F_odkw%3Ddoor%2Bswitch%26_osacat%3D0%26_from%3DR40%26_trksid%3Dm570.l1313%26_nkw%3Dreed%2Bdoor%26_sacat%3D0>`_"
"Reed switch","`AliExpress 2 ($) <http://s.click.aliexpress.com/e/0gMmOoY>`_ `Banggood 2 ($) <https://www.banggood.com/search/reed-switch.html?p=V3270422659778201806&custlinkid=76096>`_ `eBay 2 ($) <http://rover.ebay.com/rover/1/711-53200-19255-0/1?ff3=4&pub=5575404073&toolid=10001&campid=5338336929&customid=&mpre=https%3A%2F%2Fwww.ebay.com%2Fsch%2Fi.html%3F_odkw%3Dreed%2Bdoor%26_osacat%3D0%26_from%3DR40%26_trksid%3Dm570.l1313%26_nkw%3Dreed%2Bswitch%26_sacat%3D0>`_"
|affiliate|
.. More pictures
.. -------------
Binary file not shown.

After

Width:  |  Height:  |  Size: 522 KiB

+150
View File
@@ -0,0 +1,150 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P001_PIR_sensor_page:
PIR sensor
==========
|P001_typename|
|P001_status|
.. image:: P001_PIR_sensor_1.jpg
Introduction
------------
A big difference from the regular tactile buttons and a PIR is that a PIR will output a high or low Signal
without someone actually pushing a physical button. The PIR uses a pyro detector which will detect change
in radiated heat. A person or an animal is always radiating some level of heat and when someone enters
the vision of the PIR the amount of heat will change and the PIR will trigger a signal.
Specifications:
* Motion (change in heat)
* Power needed: 5V (typically)
* Output voltage: 3.3V (typically)
.. note::
Some PIR sensor boards have a jumper which will allow you to have the unit send a single pulse when
the motion is detected or send a single repeatedly as long as motion is detected. Good boards also
have a sensitivity adjustment and time delay setting which lets you tweak the way the unit is behaving,
that could be really helpful if the default settings are triggering too much or not enough.
Wiring
------
.. code-block:: html
ESP PIR
GPIO (X) <--> I/O or OUT
Power
5V <--> VCC
GND <--> GND
Setup
-----
.. image:: P001_Setup_PIR_sensor_1.png
Task settings
~~~~~~~~~~~~~
* **Device**: Name of plugin
* **Name**: Name of the task (example name **Motion**)
* **Enable**: Should the task be enabled or not
Sensor
^^^^^^
* **Internal pull-up**: Check if you want to use the internal pull-up of the ESP (not all GPIO pins have this internal pull-up.)
* **Inverse logic**: Sometimes you may want the physical high value to be published as a low value. For example if the button is
triggering a high (1) value when you push it you maybe use it to turn of a LED so the :code:`Switch#State` would then logically be
preferred to be set as 0 and thus used as a variable for controlling that LED. See rules example below.
* **GPIO**: Which GPIO should be used, recommended to not use a latching switch that may set the ESP into flash mode if left
to high/low.
* **Switch type**: Set the switch type to either "Switch" or "Dimmer". PIR is a "Switch".
* Switch: The default way of handling a switch is by a on/off button. It's either on (:code:`1`) or off (:code:`0`).
* Dimmer: Not used by PIR switches, if you still want to use it you can have a look at the
:ref:`P001_Switch_page` page.
* **Switch button type**: Set the type of switch, "Normal switch", "Push button active low", or "Push button active high".
* Normal switch: This is the general setting to use for a door (reed) switch.
* Push button active low: Not used by PIR switches (in general), if you still want to use it you can have a look at the
:ref:`P001_Switch_page` page.
* **Send boot state**: If checked the unit will publish the switch state when booting. If not checked you may find yourself
with a latching switch caught in limbo. This means that the unit is registering a low/high value but the physical state of
the switch might be the opposite. If you use a mechanical switch that may be physically set to a state you should check this
option.
Advanced event management
^^^^^^^^^^^^^^^^^^^^^^^^^
* **De-bounce (ms)**: How long should the pulse (the time you press the button) be, if set to high you need to have it published
for a longer time before the unit will register it as an state change. You could experiment with this setting to find a good
behavior of the button if you feel that it's not responding according to your preferences.
* **Double click event**: Not used by PIR switches (in general), if you still want to use it you can have a look at the
:ref:`P001_Switch_page` page.
* **Double click max interval (ms)**: Same as above..
* **Long press event**: Same as above..
* **Long press min interval (ms)**: Same as above..
* **Use safe button (slower)**: Same as above..
Data acquisition
^^^^^^^^^^^^^^^^
* **Send to controller** 1..3: Check which controller (if any) you want to publish to. All or no controller can be used.
* **Interval**: How often should the task publish its value (optional for switch plugins).
Indicators/values (recommended settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. csv-table::
:header: "Indicator", "Value Name", "Interval", "Decimals", "Extra information"
:widths: 8, 5, 5, 5, 40
"State", "Detection", "0", "N/A", "Usually you just want the state being published when door is actually being opened/closed. If you want a continuous publishing of the state you may use the interval setting to do so."
Rules examples
--------------
.. code-block:: html
on Motion#Detection=1 do
timerSet,1,1
endon
on rules#timer=1 do
if [Motion#Detection]=0
//Action if NO motion is detected
else
//Action if motion is detected
endif
endon
Where to buy
------------
.. csv-table::
:header: "Store", "Link"
:widths: 5, 40
"AliExpress","`Link 1 ($) <http://s.click.aliexpress.com/e/j0xC1UU>`_"
"Banggood","`Link 2 ($) <https://www.banggood.com/RobotDyn-5V-PIR-Motion-Sensor-Adjustable-Time-Delay-Sensitive-Module-For-Arduino-p-1244536.html?p=V3270422659778201806>`_"
"eBay","`Link 3 ($) <https://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_id=114&ipn=icep&toolid=20004&campid=5338336929&mpre=https%3A%2F%2Fwww.ebay.com%2Fitm%2FNew-HC-SR501-Infrared-PIR-Motion-Sensor-Module-for-Arduino-Raspberry-pi%2F132113984394%3Fepid%3D14013121702%26hash%3Ditem1ec29b6b8a%3Ag%3AkusAAOSwT5xZTInL>`_"
|affiliate|
More pictures
-------------
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

+161
View File
@@ -0,0 +1,161 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P001_Switch_page:
Switch
======
|P001_typename|
|P001_status|
.. image:: P001_Switch_1.jpg
Introduction
------------
Any switch module can be used as an digital input. In everyday language the switch is often referred to as a "button".
You may use it by simply connect it to either a GPIO that is normally high (pull-up) or normally low (pull-down). Other
types of switches are door switches (reed switch), sound activated switches and pulse activated switches.
Specifications:
* Give a high or low signal to a GPIO
* Power needed: 3.3V (typically)
* Output voltage: same as input (typically)
Wiring
------
.. code-block:: html
ESP Switch/button
GPIO (X) <--> Signal
Power
3.3V <--> Signal
or
GND <--> Signal
Setup
-----
.. image:: P001_Setup_Switch_1.png
Task settings
~~~~~~~~~~~~~
* **Device**: Name of plugin
* **Name**: Name of the task (recommended name **SwitchN**, where N is a number)
* **Enable**: Should the task be enabled or not
Sensor
^^^^^^
* **Internal pull-up**: Check if you want to use the internal pull-up of the ESP (not all GPIO pins have this internal pull-up.)
* **Inverse logic**: Sometimes you may want the physical high value to be published as a low value. For example if the button is
triggering a high (1) value when you push it you maybe use it to turn of a LED so the :code:`Switch#State` would then logically be
preferred to be set as 0 and thus used as a variable for controlling that LED. See rules example below.
* **GPIO**: Which GPIO should be used, recommended to not use a latching switch that may set the ESP into flash mode if left
to high/low.
* **Switch type**: Set the switch type to either "Switch" or "Dimmer". Dimmer is used if you have a knob that can be turned and
thus give multiple switch trigger signals.
* Switch: The default way of handling a switch is by a on/off button. It's either on (:code:`1`) or off (:code:`0`).
* Dimmer: If you use the dimmer option you will be able to control the device using a dimmer (knob that can be turned).
The value allowed for dimmers are :code:`0..255` and a new setting is added to the web form (Dim value).
* **Switch button type**: Set the type of switch, "Normal switch", "Push button active low", or "Push button active high".
* Normal switch: If you use a normal switch you should use this (you can always start with this setting).
* Push button active low: If you use a momentary switch you may want the state to be activated when you have it published
and not wait for it to be released. Depending on your setup you can then experiment with the active low / active high
to make it behave as you want.
* Push button active high: See bullet point above.
* **Send boot state**: If checked the unit will publish the switch state when booting. If not checked you may find yourself
with a latching switch caught in limbo. This means that the unit is registering a low/high value but the physical state of
the switch might be the opposite. If you use a mechanical switch that may be physically set to a state you should check this
option.
Advanced event management
^^^^^^^^^^^^^^^^^^^^^^^^^
* **De-bounce (ms)**: How long should the pulse (the time you press the button) be, if set to high you need to have it published
for a longer time before the unit will register it as an state change. You could experiment with this setting to find a good
behavior of the button if you feel that it's not responding according to your preferences.
* **Double click event**: If enabled the unit will detect double clicks which are within the set interval (see below). The double
click event is identified as :code:`Switch#State=3`. There's three options for the double click:
* Active only on low: the double clicks will be counted by how many low signals that is triggered within the set time.
* Active only on high: the double clicks will be counted by how many high signals that is triggered within the set time.
* Active on high & low: the double clicks will be counted by how many high and low signals that is triggered within the set time.
This means that a double click could be registered as a press and release of a button. So not actually double click.
* **Double click max interval (ms)**: This is the interval that you need to perform the double click within.
* **Long press event**: If enabled the unit will detect a long press of a button. There's three different behaviors of the long press:
* Active only on low: this means that the unit will only be triggering the long press event if the signal is low. Two different event
values are used, :code:`10` if the state goes from 0 to 1 (:code:`Switch#State=10`), and :code:`11` if the state goes
from 1 to 0 (:code:`Switch#State=11`).
* Active only on high: same as above but only triggered on high signal.
* Active on high & low: the long press will be triggered both on high and low signals.
* **Long press min interval (ms)**: This is the interval that you need to press the button before the long press event is triggered.
* **Use safe button (slower)**:
Data acquisition
^^^^^^^^^^^^^^^^
* **Send to controller** 1..3: Check which controller (if any) you want to publish to. All or no controller can be used.
* **Interval**: How often should the task publish its value (optional for switch plugins).
Indicators/values (recommended settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. csv-table::
:header: "Indicator", "Value Name", "Interval", "Decimals", "Extra information"
:widths: 8, 5, 5, 5, 40
"State", "State", "0", "N/A", "Usually you just want the state being published when an actual push has been happening. If you want a continuous publishing of the state you may use the interval setting to do so."
Rules examples
--------------
.. code-block:: html
on Switch#State do
if [Switch#State]=3
//double click triggered!
GPIO,12,0
else
GPIO,2,[Switch#State]
GPIO,12,1
endif
endon
Where to buy
------------
.. csv-table::
:header: "Store", "Link"
:widths: 5, 40
"Toggle switch","`AliExpress 1 ($) <http://s.click.aliexpress.com/e/fY7OgXO>`_ `Banggood 1 ($) <https://www.banggood.com/5pcs-12V-Round-Rocker-Toggle-ONOFF-Switch-3-Pins-p-1046835.html?p=V3270422659778201806>`_ `Banggood 2 ($) <https://www.banggood.com/Red-3-Pin-ON-ON-SPDT-Mini-Toggle-Switch-AC-6A125V-3A250V-p-967014.html?p=V3270422659778201806>`_ `eBay 1 ($) <https://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_id=114&ipn=icep&toolid=20004&campid=5338336929&mpre=https%3A%2F%2Fwww.ebay.com%2Fsch%2Fi.html%3F_from%3DR40%26_trksid%3Dm570.l1313%26_nkw%3Dtoggle%2Bswitch%26_sacat%3D0%26LH_TitleDesc%3D0%26_osacat%3D0%26_odkw%3DMomentary%2Bswitch>`_"
"Float switch","`AliExpress 2 ($) <http://s.click.aliexpress.com/e/clw6aFEY>`_ `Banggood 3 ($) <https://www.banggood.com/10W-Black-Side-Mount-Water-Level-Sensor-Controller-Liquid-Float-Switch-p-961256.html?p=V3270422659778201806>`_ `Banggood 4 ($) <https://www.banggood.com/Side-mounted-Liquid-Water-Level-Sensor-Right-Angle-Float-Switch-p-945298.html?p=V3270422659778201806>`_ `eBay 2 ($) <https://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_id=114&ipn=icep&toolid=20004&campid=5338336929&mpre=https%3A%2F%2Fwww.ebay.com%2Fsch%2Fi.html%3F_from%3DR40%26_trksid%3Dm570.l1313%26_nkw%3DFloat%2Bswitch%26_sacat%3D0%26LH_TitleDesc%3D0%26_osacat%3D0%26_odkw%3DMembrane%2Bswitch>`_"
"Membrane switch","`AliExpress 3 ($) <http://s.click.aliexpress.com/e/ZkI1ov6>`_ `Banggood 5 ($) <https://www.banggood.com/4-x-3-Matrix-12-Key-Array-Membrane-Switch-Keypad-Keyboard-For-Arduino-p-87370.html?p=V3270422659778201806>`_ `Banggood 6 ($) <https://www.banggood.com/5Pcs-DC-4-Key-Matrix-Membrane-Switch-Control-Keypad-Keyboard-With-LED-p-965091.html?p=V3270422659778201806>`_ `eBay 3 ($) <https://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_id=114&ipn=icep&toolid=20004&campid=5338336929&mpre=https%3A%2F%2Fwww.ebay.com%2Fsch%2Fi.html%3F_from%3DR40%26_trksid%3Dm570.l1313%26_nkw%3DMembrane%2Bswitch%26_sacat%3D0%26LH_TitleDesc%3D0%26_osacat%3D0%26_odkw%3DCapacitive%2Btouch%2Bswitch>`_"
"Capacitive (touch) switch","`AliExpress 4 ($) <http://s.click.aliexpress.com/e/cMIem1Nq>`_ `Banggood 7 ($) <https://www.banggood.com/TTP223B-Digital-Touch-Sensor-Capacitive-Touch-Switch-Module-For-Arduino-p-1158322.html?p=V3270422659778201806>`_ `Banggood 8 ($) <https://www.banggood.com/Jog-Type-Touch-Sensor-Module-Capacitive-Touch-Switch-Module-p-916212.html?p=V3270422659778201806>`_ `Banggood 9 ($) <https://www.banggood.com/2_7V-6V-HTTM-Series-Capacitive-Touch-Switch-Button-Module-p-1245166.html?p=V3270422659778201806>`_ `eBay 4 ($) <https://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_id=114&ipn=icep&toolid=20004&campid=5338336929&mpre=https%3A%2F%2Fwww.ebay.com%2Fsch%2Fi.html%3F_from%3DR40%26_trksid%3Dm570.l1313%26_nkw%3DCapacitive%2Btouch%2Bswitch%26_sacat%3D0>`_"
"Limit switch","`AliExpress 5 ($) <http://s.click.aliexpress.com/e/bWOekFqo>`_ `Banggood 10 ($) <https://www.banggood.com/10Pcs-Micro-Limit-Switch-Roller-Lever-5A-125V-Open-Close-Switch-p-945733.html?p=V3270422659778201806>`_ `Banggood 11 ($) <https://www.banggood.com/10-Types-250VAC-Limit-Switch-IP65-Adjustable-Actuator-Roller-Arm-Rod-Spring-Coil-Endstop-Switch-p-1297617.html?p=V3270422659778201806>`_ `eBay 5 ($) <https://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_id=114&ipn=icep&toolid=20004&campid=5338336929&mpre=https%3A%2F%2Fwww.ebay.com%2Fsch%2Fi.html%3F_from%3DR40%26_trksid%3Dm570.l1313%26_nkw%3DLimit%2Bswitch%26_sacat%3D0%26LH_TitleDesc%3D0%26_osacat%3D0%26_odkw%3DMagnetic%2Breed%2Bswitch>`_"
"Momentary switch","`AliExpress 6 ($) <http://s.click.aliexpress.com/e/bPEYQDfw>`_ `Banggood 12 ($) <https://www.banggood.com/420pcs-14-Types-Momentary-Tact-Tactile-Push-Button-Switch-SMD-Assortment-Kit-Set-p-1154674.html?p=V3270422659778201806>`_ `Banggood 13 ($) <https://www.banggood.com/100-Pcs-Micro-Switch-Tact-Cap-Slim-Cap-Tactile-Push-Button-Switch-Momentary-Tact-p-1277707.html?p=V3270422659778201806>`_ `Banggood 14 ($) <https://www.banggood.com/36V-2A-12mm-Momentary-Push-Button-Switch-LED-Switch-Waterproof-Switch-p-994547.html?p=V3270422659778201806>`_ `eBay 6 ($) <https://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_id=114&ipn=icep&toolid=20004&campid=5338336929&mpre=https%3A%2F%2Fwww.ebay.com%2Fsch%2Fi.html%3F_from%3DR40%26_trksid%3Dm570.l1313%26_nkw%3DMomentary%2Bswitch%26_sacat%3D0%26LH_TitleDesc%3D0%26_osacat%3D0%26_odkw%3DLimit%2Bswitch>`_"
|affiliate|
.. More pictures
.. -------------
Binary file not shown.

After

Width:  |  Height:  |  Size: 942 KiB

+118
View File
@@ -0,0 +1,118 @@
.. These P001 commands should be moved to core (P000)...
:ref:`P000_page` |P000_status|
Supported hardware: |P000_usedby_GPIO|
.. csv-table::
:header: "Command (GPIO/Value)", "Extra information"
:widths: 20, 30
"
``GPIO,<GPIO>,<state>``
GPIO: 0 ... 16
State:
**2** (HIGH-Z, input)
**1** (HIGH, output)
**0** (LOW, output)
","
**Basic on/off.**.
We can control a pin with simple http URL commands. To change the pin to high or low steady output. Setting GPIO to **2** means
that it will be able to detect low level relays (with high impedance, Z).
"
"
``GPIOtoggle,<GPIO>``
GPIO: 0 ... 16
","
**Toggle on/off.**.
Toggle the current (output) state of the given GPIO pin.
This will only be executed on pins set to be in output mode.
"
"
``LongPulse,<GPIO>,<state>,<duration>``
GPIO: 0 ... 16
State: 1/0
Duration: 1 ... 999 S
","
**To send a *long* pulse to a certain pin.**.
A long pulse is basically the same as the plain pulse. Duration is defined in seconds, which makes it more suitable for longer duration.
This command is not blocking, but will send 2 events to start and stop the pulse. This may have some variation depending on the system load of the module.
Variation is typically up-to 10 msec, but may be up-to a second, depending on active plugins and controllers performing blocking operations.
"
"
``LongPulse_mS,<GPIO>,<state>,<duration>``
GPIO: 0 ... 16
State: 1/0
Duration: 10 ... 15000 msec
","
**To send a *long* pulse to a certain pin.**
A ``LongPulse_mS`` is the same as the regular ``LongPulse``. The only difference is the time base in milliseconds rather than in seconds.
"
"
``Pulse,<GPIO>,<state>,<duration>``
GPIO: 0 ... 16
State: 1/0
Duration: 0 ... 1000 msec
","
**To send a *short* pulse to a certain pin.**
Example to send an active high (1) pulse on GPIO 14 for 500 mSeconds. Pulse duration is in milliseconds. State is 1 or 0.
N.B. this is a blocking call, meaning no other actions will be performed during the pulse.
"
"
``PWM,<GPIO>,<duty>``
``PWM,<GPIO>,<duty>,<duration>``
``PWM,<GPIO>,<duty>,<duration>,<frequency>``
GPIO: 0 ... **15**
Duty: 0 ... 1023
Duration: 100 ... 15000 msec (optional)
Frequency: 100 ... 40000 Hz (optional)
","
**To set a certain PWM level.**
If you have set a certain GPIO to a PWM level and want to use it as a regular HIGH/LOW pin you need to reset by setting the PWM level to 0.
Duration (in msec) parameter will create a fading.
Value of 0 will not set a duration.
Frequency (in Hz) will be set to 1000 Hz when not given.
Frequencies above 30 kHz are not stable and will likely crash the ESP.
"
"
``Servo,<servo>,<GPIO>,<position>``
GPIO: 0 ... **15**
Servo: 1/2
Position: -180 ... 180 (see warning below)
","
**To control a servo motor.**
We currently support a maximum of two servo motors so you can build a pan & tilt device if you like.
.. warning::
Most servos are not able to turn full 360°! Normally the servos are able to go from **-90°** to **90°**, some rare servos do allow for -135° to 135°.
A position value of 9000 will stop the PWM signal.
This can be useful to save energy on servos which do not need power to remain at the same position.
"
@@ -0,0 +1,46 @@
.. These P001 commands should be moved to core (P000)...
:ref:`P000_page` |P000_status|
Supported hardware: |P000_usedby_RTTTL| (Ringtones etc.)
.. csv-table::
:header: "Command (GPIO/Value)", "Extra information"
:widths: 20, 30
"
``tone,<gpio>,<tone>,<duration>``
GPIO: 12 ... 16
Tone: 20 ... 13000 Hz
Duration: 100 ... 15000 msec
","
You should try to use GPIO 12...16 since these generally aren't used.
The recommended tone range is 20 Hz ... 13 kHz.
Up-to 40 kHz should be possible to generate, but will be inaudible for humans.
Frequencies above 30 kHz are not stable and will likely crash the ESP.
Duration is set in ms.
N.B. tones with a duration less than 50 msec will be blocking.
Longer duration will use the scheduler, which may cause some fluctuations in the duration.
"
"
``rtttl,<gpio>,<value>``
GPIO: 12 ... 16
Value: d=<duration>,o=<octave>,b=<tempo>,<notes...>
","
You should try to use GPIO 12...16 since these generally aren't used by ESP internal functions.
N.B. Playing a tune is blocking for as long as the tune is playing.
Value can be defined like <name_of_melody:duration,octave,beat,notes....>
For example:
``rtttl,14,test:d=8,o=5,b=180,c6,b,c6,p,g,g-``
`More RTTTL Ringtone Downloads <http://www.picaxe.com/RTTTL-Ringtones-for-Tune-Command/>`_
"
+47
View File
@@ -0,0 +1,47 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P002_page:
|P002_typename|
==================================================
|P002_shortinfo|
Plugin details
--------------
Type: |P002_type|
Name: |P002_name|
Status: |P002_status|
GitHub: |P002_github|_
Maintainer: |P002_maintainer|
Supported hardware
------------------
|P002_usedby|
.. Commands available
.. ^^^^^^^^^^^^^^^^^^
.. .. include:: P002_commands.repl
Change log
----------
.. versionchanged:: 2.0
...
|added|
Major overhaul for 2.0 release.
.. versionadded:: 1.0
...
|added|
Initial release version.
@@ -0,0 +1,71 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P002_ESP82XX_internal_page:
ESP82XX internal
================
|P002_typename|
|P002_status|
Introduction
------------
Specifications:
* Analog signal (0-1V)
Wiring
------
.. code-block:: html
ESP S8
GPIO (X) <--> TX
GPIO (X) <--> RX
Power
5.0V <--> VCC
GND <--> GND
Setup
-----
Rules examples
--------------
.. code-block:: html
//Code below...
Indicators (recommended settings)
---------------------------------
.. csv-table::
:header: "Indicator", "Value Name", "Interval", "Decimals", "Extra information"
:widths: 8, 5, 5, 5, 40
"XXXXXX", "N/A", "", "", ""
Where to buy
------------
.. csv-table::
:header: "Store", "Link"
:widths: 5, 40
"AliExpress","`Link 1 ($) <http://s.click.aliexpress.com/e/cg1fhDDI>`_"
|affiliate|
More pictures
-------------
+70
View File
@@ -0,0 +1,70 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P002_PCF8591_page:
PCF8591
=======
|P002_typename|
|P002_status|
Introduction
------------
Specifications:
* Analog signal (0-5V)
Wiring
------
.. code-block:: html
ESP S8
GPIO (X) <--> TX
GPIO (X) <--> RX
Power
5.0V <--> VCC
GND <--> GND
Setup
-----
Rules examples
--------------
.. code-block:: html
//Code below...
Indicators (recommended settings)
---------------------------------
.. csv-table::
:header: "Indicator", "Value Name", "Interval", "Decimals", "Extra information"
:widths: 8, 5, 5, 5, 40
"XXXXXX", "N/A", "", "", ""
Where to buy
------------
.. csv-table::
:header: "Store", "Link"
:widths: 5, 40
"AliExpress","`Link 1 ($) <http://s.click.aliexpress.com/e/cg1fhDDI>`_"
|affiliate|
More pictures
-------------
@@ -0,0 +1,71 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P002_Photosensitive_resistor_page:
Photosensitive resistor
=======================
|P002_typename|
|P002_status|
Introduction
------------
Specifications:
* Light intensity
* Analog 1-100% or Binary above/below trigger value
Wiring
------
.. code-block:: html
ESP S8
GPIO (X) <--> TX
GPIO (X) <--> RX
Power
5.0V <--> VCC
GND <--> GND
Setup
-----
Rules examples
--------------
.. code-block:: html
//Code below...
Indicators (recommended settings)
---------------------------------
.. csv-table::
:header: "Indicator", "Value Name", "Interval", "Decimals", "Extra information"
:widths: 8, 5, 5, 5, 40
"XXXXXX", "N/A", "", "", ""
Where to buy
------------
.. csv-table::
:header: "Store", "Link"
:widths: 5, 40
"AliExpress","`Link 1 ($) <http://s.click.aliexpress.com/e/cg1fhDDI>`_"
|affiliate|
More pictures
-------------
+49
View File
@@ -0,0 +1,49 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P003_page:
|P003_typename|
==================================================
|P003_shortinfo|
Plugin details
--------------
Type: |P003_type|
Name: |P003_name|
Status: |P003_status|
GitHub: |P003_github|_
Maintainer: |P003_maintainer|
Supported hardware
------------------
|P003_usedby|
.. Commands available
.. ^^^^^^^^^^^^^^^^^^
.. .. include:: P003_commands.repl
Change log
----------
.. versionchanged:: 2.0
...
|added|
Major overhaul for 2.0 release.
.. versionadded:: 1.0
...
|added|
Initial release version.
+154
View File
@@ -0,0 +1,154 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P003_LJ12A3_page:
LJ12A3
======
|P003_typename|
|P003_status|
.. image:: P003_LJ12A3_1.jpg
Introduction
------------
The ESP8266 module can be used as a general purpose digital pulse counter device for various digital sensors.
Think about optical sensors with a digital output. To be used for things like gas, water, electricity, door open/close counters, etc.
In this example we will connect an inductive proximity switch (LJ12A3-4-Z/BX).
A LJ12A3-4-Z/BX module can be used in order to detect metal.
For example in your water consumption meter (as seen in picture).
Specifications:
* Inductive proximity sensor
* Detection distance: 4mm
* Working voltage range: 10V-30V
* Dimension: M12x10x55mm
Wiring
------
.. code-block:: html
ESP LJ12A3
GPIO (14) <--> Signal (black)
Power
12V <--> VCC (brown)
GND <--> GND (blue)
.. note:: You need to use a voltage divider to get the signal level down from 12V to 5V.
The LJ12A3-4-Z/BX-**5V** way
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Just buy the 5V version of the proximity sensor and you are good to go.
The resistor way
^^^^^^^^^^^^^^^^
.. image:: P003_LJ12A3_2.png
The 7805 way
^^^^^^^^^^^^
7805 IC specifications:
* Input voltage range 7-35V
* Current rating Ic = 1A
* Output voltage range: Vmax=5.2V, Vmin=4.8V
* Where to buy: `AliExpress ($) <http://s.click.aliexpress.com/e/bmR1wUxq>`_
.. image:: P003_LJ12A3_3.png
.. note:: 7805 is not very efficient and has drop-out voltage problems. A lot of energy is wasted in the form of heat.
Higher the input voltage, less efficient your 7805 will be.
Setup
-----
.. image:: P003_Setup_LJ12A3_1.png
.. danger:: Only task number 1..4 is currently supported for the pulse plugin!
Task settings
~~~~~~~~~~~~~
* **Device**: Name of plugin
* **Name**: Name of the task (example name **WaterMeter**)
* **Enable**: Should the task be enabled or not
Sensor
^^^^^^
* **GPIO <-- Pulse**: Pulse input is generally set to **GPIO 14 (D5)**.
* **Debounce time**: Debounce time is generally set to **100**.
* **Counter type**: In this example the type is set to **Delta/Total/Time**.
* **Mode type**: Pulse input is generally set to **Falling**
``LOW`` = count when signal go from not low to low (0.8+V to 0.8-V)
``CHANGE`` = count on signal being changed, low to high (0.8-V to 2.4+V) or high to low (2.4+V to 0.8-V)
``RISING`` = count if signal is rising, from low to not low (0.8-V to 0.8+V)
``FALLING`` = count if signal is falling, from high to not high (2.4+V to 2.4-V)
.. warning:: GPIO 16 (D0) is not compatible with pulse counters.
Data acquisition
^^^^^^^^^^^^^^^^
* **Send to controller** 1..3: Check which controller (if any) you want to publish to. All or no controller can be used.
* **Interval**: How often should the task publish its value (5..15 seconds is normal).
Indicators (recommended settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. csv-table::
:header: "Indicator", "Value Name", "Interval", "Decimals", "Extra information"
:widths: 8, 5, 5, 5, 40
"Count", "mL", "5", "2", "Using the formula ``%value%*20*0.1`` to convert the pulse count into liters per minute.
You might have to tweak the value to fit your application, our flow meter gives 0.1L per pulse and since
our interval was set to 5 seconds we have to multiply the value with ``20`` (the reading is done once every
20th of a minute) and also multiply it with ``0.1`` because that is the value in liters (per pulse).
"
"Total", "Total", "N/A", "1", "Total value is the counted pulses since last reboot.
.. note:: Only updated if counter type is set to ``Delta/Total/Time``, ``Total``, or ``Delta/Total``
"
"Time", "Time", "N/A", "0", "Time since last pulse was intercepted, in mSec.
.. note:: Only updated if counter type is set to ``Delta/Total/Time``
"
Rules examples
--------------
.. code-block:: html
On WaterMeter#mL Do
If [WaterMeter#mL]=0
Publish,%sysname%/WaterConsumption/status,No water running
Else
Publish,%sysname%/WaterConsumption/status,Water is being tapped
EndIf
EndOn
Where to buy
------------
.. csv-table::
:header: "Store", "Link"
:widths: 5, 40
"AliExpress","`Link 1 ($) <http://s.click.aliexpress.com/e/1YcZUUo>`_ `Link 2 ($) <http://s.click.aliexpress.com/e/cWBJkHes>`_"
"Banggood","`Link 3 ($) <https://www.banggood.com/LJ12A3-4-ZBY-PNP-DC6-36V-Inductive-Proximity-Sensor-Detection-Switch-p-982679.html?p=V3270422659778201806>`_"
"eBay","`Link 4 ($) <https://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_id=114&ipn=icep&toolid=20004&campid=5338336929&mpre=https%3A%2F%2Fwww.ebay.com%2Fsch%2Fi.html%3F_from%3DR40%26_trksid%3Dm570.l1313%26_nkw%3DLJ12A3%26_sacat%3D0%26LH_TitleDesc%3D0%26_osacat%3D0%26_odkw%3DAnalog%2BPressure%2Bsensor>`_"
|affiliate|
.. More pictures
.. -------------
Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

+142
View File
@@ -0,0 +1,142 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P003_TCR5000_page:
TCR5000
=======
|P003_typename|
|P003_status|
.. image:: P003_TCR5000_1.jpg
Introduction
------------
The ESP8266 module can be used as an general purpose digital pulse counter device for various digital sensors.
Think about optical sensors with a digital output. To be used for things like gas, water, electricity, door open/close counters, etc.
In this example we will connect an optical sensor. Connect the digital output to a GPIO pin on the ESP module.
Specifications:
* IR emitter + phototransistor (for ex. water/electricity meters)
* Distance
Wiring
------
.. code-block:: html
ESP TCR5000
GPIO (14) <--> S
Power
5.0V <--> V+
GND <--> G
Setup
-----
.. image:: P003_Setup_TCR5000_1.png
.. danger:: Only task number 1..4 is currently supported for the pulse plugin!
Task settings
~~~~~~~~~~~~~
* **Device**: Name of plugin
* **Name**: Name of the task (example name **PowerMeter**)
* **Enable**: Should the task be enabled or not
Sensor
^^^^^^
* **GPIO <-- Pulse**: Pulse input is generally set to **GPIO 14 (D5)**.
* **Debounce time**: Debounce time is generally set to **100**.
* **Counter type**: In this example the type is set to **Delta/Total/Time**.
* **Mode type**: Pulse input is generally set to **Falling**
``LOW`` = count when signal go from not low to low (0.8+V to 0.8-V)
``CHANGE`` = count on signal being changed, low to high (0.8-V to 2.4+V) or high to low (2.4+V to 0.8-V)
``RISING`` = count if signal is rising, from low to not low (0.8-V to 0.8+V)
``FALLING`` = count if signal is falling, from high to not high (2.4+V to 2.4-V)
.. warning:: GPIO 16 (D0) is not compatible with pulse counters.
Data acquisition
^^^^^^^^^^^^^^^^
* **Send to controller** 1..3: Check which controller (if any) you want to publish to. All or no controller can be used.
* **Interval**: How often should the task publish its value (5..15 seconds is normal).
Indicators (recommended settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. csv-table::
:header: "Indicator", "Value Name", "Interval", "Decimals", "Extra information"
:widths: 8, 5, 5, 5, 40
"Count", "W", "10", "0", "Using the formula ``%value%*3600/10`` to convert the pulse count into Watts.
You might have to tweak the value to fit your application, our energy meter gives 1Wh per pulse and since
our interval was set to 10 seconds we have to first multiply the value with ``3600`` (3600 seconds per hour) and
also divide that value with ``10`` because we measure the Watt over a time period of 10 seconds (of that hour).
"
"Total", "kWh", "10", "0", "Using the formula ``%value%/1000`` we get the numbers of kWh (1000 Wh = 1 kWh) used since last reboot.
.. note:: Only updated if counter type is set to ``Delta/Total/Time``, ``Total``, or ``Delta/Total``
"
"Time", "Time", "N/A", "0", "Time since last pulse was intercepted, in mSec.
.. note:: Only updated if counter type is set to ``Delta/Total/Time``
"
Rules examples
--------------
.. code-block:: html
On PowerMeter#W Do
If [PowerMeter#W]>1500
NeoPixelAll,255,0,0 //using too much energy!
Else
NeoPixelAll,0,255,0 //good job, low energy consumption
EndIf
EndOn
Where to buy
------------
.. csv-table::
:header: "Store", "Link"
:widths: 5, 40
"AliExpress","`Link 1 ($) <http://s.click.aliexpress.com/e/bo2Sbx4c>`_"
"Banggood","`Link 2 ($) <https://www.banggood.com/TCRT5000-Infrared-Reflective-Switch-IR-Barrier-Line-Track-Sensor-Module-p-1038443.html?p=V3270422659778201806>`_"
"eBay","`Link 3 ($) <https://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_id=114&ipn=icep&toolid=20004&campid=5338336929&mpre=https%3A%2F%2Fwww.ebay.com%2Fsch%2Fi.html%3F_from%3DR40%26_trksid%3Dm570.l1313%26_nkw%3DTCRT5000%26_sacat%3D0%26LH_TitleDesc%3D0%26_osacat%3D0%26_odkw%3DLJ12A3>`_"
|affiliate|
More pictures
-------------
.. image:: P003_TCR5000_2.gif
A really nice feature of SOME digital pulse counters is the small red led diode which flash for each detected pulse.
Using the adjustment wheel you can fine tune the detection level which makes the device really robust and withstand
unwanted signals from the outside. Turn the wheel until the red led light shines constantly and then turn it back
slowly until it start to detect pulses, this is the level you want to have.
.. image:: P003_TCR5000_3.jpg
.. image:: P003_TCR5000_4.jpg
It is sometimes good to mask the LED used to measure distance/pulses since the reflection could
trigger a pulse.
.. image:: P003_TCR5000_5.jpg
Binary file not shown.

After

Width:  |  Height:  |  Size: 643 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1004 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 898 KiB

+140
View File
@@ -0,0 +1,140 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P003_YFS401_page:
YFS401
======
|P003_typename|
|P003_status|
.. image:: P003_YFS401_1.jpg
Introduction
------------
Just as the ESP may be used with specific pulse counters it may also be used with any generic pulse based unit as long as the pulses are not giving to high voltages.
A generic 5V flow sensor that gives a pulse each complete revolution. You may have to measure what each revolution/pulse means in volume.
The one used in this example is called YF-S401, a 5V unit, which is great to use for watering systems or in this case (pictured) to measure a drainage system.
Specifications:
* General, output as pulse
* Min. working voltage: 4.5V
* Max. working current: 15mA (5V)
* Working voltage range: 5V-12V
* Flow range detectable: approx. 0.3-6L/min
Wiring
------
.. code-block:: html
ESP YFS401
GPIO (14) <--> Signal (yellow)
Power
5.0V <--> VCC (red)
GND <--> GND (black)
Setup
-----
.. image:: P003_Setup_YFS401_1.png
.. danger:: Only task number 1..4 is currently supported for the pulse plugin!
Task settings
~~~~~~~~~~~~~
* **Device**: Name of plugin
* **Name**: Name of the task (example name **WaterMeter**)
* **Enable**: Should the task be enabled or not
Sensor
^^^^^^
* **Device**: Name of plugin
* **Name**: Name of the task (example name **WaterMeter**)
* **Enable**: Should the task be enabled or not
Sensor
^^^^^^
* **GPIO <-- Pulse**: Pulse input is generally set to **GPIO 14 (D5)**.
* **Debounce time**: Debounce time is generally set to **100**.
* **Counter type**: In this example the type is set to **Delta/Total/Time**.
* **Mode type**: Pulse input is generally set to **Falling**
``LOW`` = count when signal go from not low to low (0.8+V to 0.8-V)
``CHANGE`` = count on signal being changed, low to high (0.8-V to 2.4+V) or high to low (2.4+V to 0.8-V)
``RISING`` = count if signal is rising, from low to not low (0.8-V to 0.8+V)
``FALLING`` = count if signal is falling, from high to not high (2.4+V to 2.4-V)
.. warning:: GPIO 16 (D0) is not compatible with pulse counters.
Data acquisition
^^^^^^^^^^^^^^^^
* **Send to controller** 1..3: Check which controller (if any) you want to publish to. All or no controller can be used.
* **Interval**: How often should the task publish its value (5..15 seconds is normal).
Indicators (recommended settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. csv-table::
:header: "Indicator", "Value Name", "Interval", "Decimals", "Extra information"
:widths: 8, 5, 5, 5, 40
"Count", "mL", "5", "2", "Using the formula ``%value%*0.65`` to convert the pulse count into milliliters per minute.
You might have to tweak the value to fit your application, our flow meter gives 0.65mL per pulse.
"
"Total", "Total", "N/A", "1", "Total value is the counted pulses since last reboot, for total in liters you could
use this formula ``%value%*0.65*0.001``. 1mL = 0.001L.
.. note:: Only updated if counter type is set to ``Delta/Total/Time``, ``Total``, or ``Delta/Total``
"
"Time", "Time", "N/A", "0", "Time since last pulse was intercepted, in mSec.
.. note:: Only updated if counter type is set to ``Delta/Total/Time``
"
Rules examples
--------------
.. code-block:: html
On WaterMeter#mL Do
If [WaterMeter#mL]=0
Publish,%sysname%/WaterStream/status,Water stream empty
Else
Publish,%sysname%/WaterStream/status,Water is life!
EndIf
EndOn
Where to buy
------------
.. csv-table::
:header: "Store", "Link"
:widths: 5, 40
"AliExpress","`Link 1 ($) <http://s.click.aliexpress.com/e/cnLNRRM4>`_"
"Banggood","`Link 2 ($) <https://www.banggood.com/G12inch-DN15-Transparent-Water-Flow-Meter-Flowmeter-Hall-Flow-Sensor-Indicator-Counter-p-1101851.html?p=V3270422659778201806>`_ `Link 3 ($) <https://www.banggood.com/G12-Copper-Hall-Effect-Liquid-Water-Flow-Sensor-Flowmeter-Meter-p-1172960.html?p=V3270422659778201806>`_ `Link 4 ($) <https://www.banggood.com/Water-Flow-Sensor-Flowmeter-Switch-Meter-Counter-Hall-Sensor-0_3-6Lmin-p-1100517.html?p=V3270422659778201806>`_"
"eBay","`Link 5 ($) <https://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_id=114&ipn=icep&toolid=20004&campid=5338336929&mpre=https%3A%2F%2Fwww.ebay.com%2Fsch%2Fi.html%3F_from%3DR40%26_trksid%3Dm570.l1313%26_nkw%3Dfluid%2Bsensor%2Bmeter%26_sacat%3D0%26LH_TitleDesc%3D0%26_osacat%3D0%26_odkw%3DFlow%2Bsensor%2Bmeter>`_"
|affiliate|
More pictures
-------------
.. image:: P003_YFS401_2.jpg
.. image:: P003_YFS401_3.jpg
.. image:: P003_YFS401_4.jpg
.. image:: P003_YFS401_5.jpg
Binary file not shown.

After

Width:  |  Height:  |  Size: 468 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Some files were not shown because too many files have changed in this diff Show More