For some strange reason....
Build log:
```
$ PLATFORMIO_BUILD_FLAGS="-D CONTINUOUS_INTEGRATION" platformio run -e $ENV
Processing minimal_core_242_ESP8266_1M_OTA (platform: https://github.com/TD-er/platform-espressif8266.git#patch/v1.8.0_Puya; board: esp01_1m; framework: arduino)
--------------------------------------------------------------------------------
Platform Manager: Installing git+https://github.com/TD-er/platform-espressif8266.git#patch/v1.8.0_Puya
git version 2.27.0
Cloning into '/home/travis/.platformio/.cache/tmp/pkg-installing-aktun99x'...
Platform Manager: espressif8266 @ 1.8.0+sha.9ffc857 has been installed!
The platform 'https://github.com/TD-er/platform-espressif8266.git#patch/v1.8.0_Puya' has been successfully installed!
The rest of the packages will be installed later depending on your build environment.
Tool Manager: Installing toolchain-xtensa @ ~1.40802.0
Downloading...
Unpacking...
Tool Manager: toolchain-xtensa @ 1.40802.0 has been installed!
Tool Manager: Installing framework-arduinoespressif8266 @ 2.20402.4-puya
Tool Manager: Warning! More than one package has been found by framework-arduinoespressif8266 @ 2.20402.4-puya requirements:
- platformio/framework-arduinoespressif8266 @ 3.20704.0
- jason2866/framework-arduinoespressif8266 @ 2.7.4.1
Tool Manager: Please specify detailed REQUIREMENTS using package owner and version (showed above) to avoid name conflicts
Error: Could not find the package with 'framework-arduinoespressif8266 @ 2.20402.4-puya' requirements for your system 'linux_x86_64'
The command "PLATFORMIO_BUILD_FLAGS="-D CONTINUOUS_INTEGRATION" platformio run -e $ENV" exited with 1.
```
Maybe @jason2866 does have an idea?
When adding the new webform I2C params function, it struck me how inconsistent the formatting of our code is.
So how looks like a good moment to uncrustify all I2C plugins as their code is touched anyway.
Use PIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_191122 for all builds, unless mentioned otherwise.
This does seem to work just fine and reduces the number of bin files.
Loading and saving of display lines must be done using a temporary object and not via the task data object in memory as that may have been changed via write commands.
For example the Framed OLED plugin has a default number of lines per page of 0, but the limits of the field only allows 1 .. 4.
This makes it impossible to save the default settings without changing something.
There may be other settings which may have similar issues.
During load, the (large) task data struct was allocated on the heap, regardless whether it was already present in memory when the task was initialized.
During save, the (large) task data struct was allocated on the stack.
Both load and save now check whether there is already an instance present and use that instance.
If not, it creates a temporary instance for loading and saving of the settings.
Also the scrolling variable was not initialized, so it could happen the display would not start to show the pages as it was marked as "still being scrolling"
Fixes: #3155
For the ESP8266, we keep things like the last boot cause in RTC memory.
Currently that's not supported on ESP32 (in our code) so the last boot cause is never read and stored.
The max. UDP packet size could allow for a large memory allocation when a large packet was received.
No matter if this was a valid packet to process anyway.
The WiFi.connected() call sometimes returns `WL_DISCONNECTED` even though it is connected and serving web pages etc.
Added a timeout of 15 seconds to get out of this or else the WiFi state is reset to try again fresh.
It appeared the log handling function was sometimes processing flash strings or progmem strings and thus crashing with an exception.
Crashes like these:
```
ets Jan 8 2013,rst cause:4, boot mode:(3,6)
0x40275929 in String::operator=(char const*) at ??:?
0x4022cab9 in process_serialWriteBuffer() at ??:?
0x4023532b in addToSerialBuffer(char const*) at ??:?
0x402756a0 in String::copy(char const*, unsigned int) at ??:?
0x40238bd3 in addToLog(unsigned char, char const*) at ??:?
0x40275cac in String::concat(String const&) at ??:?
0x402b3849 in wifi_station_get_rssi at ??:?
0x402754bd in String::invalidate() at ??:?
0x40238c88 in addToLog(unsigned char, String const&) at ??:?
0x4025be2a in WiFiConnected() at ??:?
0x4025a500 in NetworkConnected() at ??:?
0x402cd8b0 in chip_v6_unset_chanfreq at ??:?
0x40238a9e in syslog(unsigned char, char const*) at ??:?
0x4021ebd3 in getMaxFreeBlock() at ??:?
0x4022cab9 in process_serialWriteBuffer() at ??:?
0x402754bd in String::invalidate() at ??:?
0x40238c25 in addToLog(unsigned12484 : Info : EVENT: Clock#Time=Mon,11:27
```
Also converted:
- StringConverter.ino
- Scheduler.ino
- ESPEasyStorage.ino
- Hardware.ino
- ESPEasy_checks.ino
- Convert.ino
Plus some clean up of now made obsolete forward declarations in ESPEasy_fwddelcs.h
Fixes: #3123
ControllerSettings and (large) struct for the controller config were active at the same time while it is not needed.
Also the host to send data to was connected twice, which may also lead to strange results.
There is still room for improvement as we still try to create the entire string in a fixed size buffer.
Maybe we can also send out the data in chunks?
Or determine the needed array size at runtime.
BUG: MaxFramesToDisplay was not updated if all display lines were empty -> display_indicator() crashed due to memory overflow
CHG: MaxFramesToDisplay will be updated after receiving command with new line content
CHG: Added some checks if P036_data are valid and if P036_data->isInitialized()
Add checks to see if allocating the relative large ControllerSettingsStruct failed.
This can be caused by either running out of memory or when memory gets fragmented.
Quote often the ControllerSettings are only used to get one or two values.
No need to keep this ~800 bytes large object allocated for more than absolutely needed.
`NOTIFIER_SET_NONE` should only be used for not adding default selection of plugins.
The positive define (USES_NOTIFIER) should be used in the code to determine whether the notifier page should be displayed. (and included in the code)
When the plugin task data is initialized, the execution order is:
- construct new data (and previously: start webserver)
- destroy existing data
As the webserver is stopped at destruction of the existing data,
start the webserver after the existing data is destroyed ( and no
longer at construction).
The serial data reading algorithm is 'reverted' to commit 1de1350 to
handle the parsing results within reading loop again.
E.g. the 'start detected' error is logged again.
CHG: re-schedule Settings.TaskDeviceTimer after JumpToPage to avoid any scheduled page change while jumping to pages
CHG: correct calculation of the page indicator counts
Just add "_LittleFS" to the PIO env label and it will compile with LittleFS instead of SPIFFS.
First impression:
- Load speed of web page is just WOW! (average 170 msec)
- Saving settings is terribly slow (1...2 seconds)
CHG merged with Tonis PR #3026
CHG: Jump to any page (Display button or command) is always without page scrolling
CHG: Jump to next page (Display button) is not allowed while page scrolling is running
BUG: temporary pointer to P036_data_struct was not deleted in PLUGIN_WEBFORM_LOAD
CHG: PLUGIN_WEBFORM_SAVE does not use a temporary pointer to P036_data_struct
CHG: Comments
CHG: Memory optimization (issue #2799)
CHG: Added setting for 'Disable scrolling while WiFi is not connected', scrolling is not smooth as long as the ESP tries to connect Wifi (Load 100%!)
BUG: Wifi-Bars not fully right for 128 pixel wide displays
BUG: clearing window for scrolling lines was too high and to narrow
BUG: content of lines with pixel width > 255 had to be shortened
CHG: scrolling lines improved
CHG: variables renamed for better understanding
Updated all packages we use to their latest version.
At least the latest Sphinx does seem to squish the documentation a bit, so we may need to update the template of our documentation.
Generate filename, included in the build
Use post Python scripts to move files to the right directory
Use post Python scripts to generate .bin.gz files.
ETH.macAddress()
which returns a String.
I changed it to the byte version of the function and now
uint8_t * NetworkMacAddressAsBytes(uint8_t* mac)
returns either this in Ethernet mode or
WiFi.macAddress(mac)
in Wifi mode.
- Hostname Handling refactored for better overview:
- String NetworkGetHostNameFromSettings() returns Settings.getHostname()
- String NetworkCreateRFCCompliantHostname() creates a RFCcompliant Hostname from Settings.cpp
- String NetworkGetHostname() returns the Hostname prevoiusly set in ETH or Wifi dependong on Mode
- MacAddress Handling refactored
- String NetworkMacAddress() returns the Mac addres of ETH or Wifi depending on Mode
- String WifiSoftAPmacAddress() returns WiFi.softAPmacAddress(mac) as String
- remove useless comments
- ETH.config moved after ETH.begin
- Added note: Be aware with ESPEasyP2P Network, since IP Address will change. There could be conflicts.
- Ethernet JSON
- Ethernet Variables
[APDS-9960 library] Added extensions and applied fixes from original Github project (including not merged yet improvements)
[P064] Added/updated documentation for Gesture - APDS-9960 plugin
[Documentation] Updated footer copyright notice to show 2018..2020
- ESP P2P is working
- Only ETH.beginPacket() with Standard Parameter is working at the moment, configuration will follow.
- Network.in not cpp/h files but this will be changed in future
- Some TODO: PKR: comments will be removed in the future, too
Fixes: #3019
Only setting the internal counter values is not enough.
The output values must also be set and a call to any optional formula must also be made.
A call to `PLUGIN_READ` will also store the values in RTC.
Especially on some custom devices wich need custom builds, the variable
is missing. This provides a new environment variable to customize the
default pin for the reset button.
It has become next to impossible to keep track of active issues due to the sheer amount of open issues.
So let's enable the stale bot to let the users requesting issues decide whether an issue is still active or not.
This one does seem to be the more stable one.
Still a bit uncertain what the difference is between
- `PIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703`
-`PIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_191122`
If it is really fixed now, we should for sure move away from .ino files as this is really bad the Arduino processor trips over these formatting issues.
The function `executeInternalCommand` now takes roughly 3 kByte less in the binary.
Expansion of the macro resulted in quite some additional binary size.
Now the logic is moved to a separate function.
When checking the "Use Extended Credentials", the user name + pass field for the controller can be extended up-to 128 bytes.
This limit is only applicable to the text field, so it can later be extended to longer when needed.
All user + pass fields for all controllers must be within the 1 kByte (including 1 extra byte per field)
this commit adds support for Gitpod.io, a free automated
dev environment that makes contributing and generally working on GitHub
projects much easier. It allows anyone to start a ready-to-code dev
environment for any branch, issue and pull request with a single click.
For I2C UART an I2C clock of 400 kHz is needed to be able to handle continuous streams of data.
But the default was still 100 kHz, unless you selected a plugin that may have set the I2C frequency to 400 kHz like the Framed OLED plugin.
CHG: Moved the array for the received bit changes to stativ uint_8t, the ISR call uses only a volatile pointer to it
CHG: some more defines and name changes for better explanation
Removed the while (P092_receiving) loop.
Starting of the receiving and processing of the received bit stream iare now done in the PLUGIN_ONCE_A_SECOND call
PLUGIN_READ call just uses the already processed data
The DL-Bus is used in heating control units e.g. sold by Technische Alternative (www.ta.co.at).
The idea for this plug-in is based on Martin Kropf's project UVR31_RF24 (https://github.com/martinkropf/UVR31_RF24)
The plug-in is tested and workis fine for the ESR21 device.
The plug-in should be also able to decode the information from the UVR31, UVR1611 and UVR 61-3 devices but not tested yet.
The selected input needs a voltage divider as follows because the DL-Bus runs on 12 volts.
[Ethernet] Switch to WiFi when Ethernet adapter is not found
Michał Obrembski (1):
Fixed compile-time defines not working in ESP32 platform
TD-er (2):
Fix build issue for P094 CUL reader
Fix C002 Domoticz dimmer switch set value (#3230)
Ton Huisman (5):
[I2C] Some fixes and improvements
[I2C] Add TCA9543a multiplexer, updated docs
[I2C Docs] Emphasize configuration with multiplexer
[I2C Docs] Add note about multiplexer address
[P044] Accept '_' in meter ID
tonhuisman (11):
[Docs] Updated commands reference
[Docs] Fixed some typos and Sphinx syntax errors
[OLED] Don't change shared bus speed
[I2C] Implement I2C Multiplexer
[I2C] Improve I2C Multiplexer support
[I2C] Fix builderror on SettingsStructSize (again)
[P008] Fix saving/loading new setting
[P008] Fix saving/loading new setting
[I2C] Bugfixes and improvements for multiplexer implementation
[I2C] Optimizations and improvements
[I2C/Doc] Add Hardware page documentation, RTD help button
uwekaditz (2):
[P092_DLBus] Move plugin data from lib to PluginStructs
Update _P092_DLbus.ino
-------------------------------------------------
Changes in release mega-20200812 (since mega-20200801)
-------------------------------------------------
Release date: wo 12 aug 2020 23:29:35 CEST
Gijs Noorlander (19):
[Python] Update of python packages in requirements.txt
[C011] Fix incorrect load/save settings.
[Uncrustify] Clean up C011 code using Uncrustify.
[Blynk] Make C015 Blynk controller compile again
Include C015 in the custom build for testing
[GPS] Apply sanity check on received data.
[Rules Timer] Use scheduler for rules timer
[Timers] Make loop timers with fixed interval and nr of loops
[Docs] Add documentation for msec timers and loop timers
[Timers] Cleanup of timer code.
[Scheduler] Move global scheduler functions into C++ class
[Timers] Change interval timer defines into enum class
[Scheduler] Change plugin pointer type into enum class
[Dallas iButton] Enable interrupts when no sensor found
[Dallas] Fix NoInterrupt calls for ESP32
Uncrustify both Dallas plugins
[Dallas] Make sure function forward declaration is on one line
[Dallas] Add warning about the need for a pull up
[Docs] Update mentioned dates of introduced feature
TD-er (1):
[Dallas] Enable interrupts when no sensor found
Wiki591 (1):
Update URLs.rst
jimmys01 (1):
[IR] Update Library
tonhuisman (4):
[Docs] Update [P036] documentation that went missing
[P010] Changes to enable use on ESP32 (#3175)
[P010] Remove some left-overs from testing
[P010] Correction in I2C handing, and fix for old issue
-------------------------------------------------
Changes in release mega-20200801 (since mega-20200721)
-------------------------------------------------
Release date: za 1 aug 2020 16:27:55 CEST
Chris-1965 (14):
Fonts usage added
minor formatting
minor
updated suggested requests
chneged requested items from last pull request
comment on pins added
added cusrom-sample-h file to repository
updated doc files
also in ino file -> docs adapted
new update
changed fonts can disabled by define, font names instead of numbers
resolved a bug : commands other than tft were all sucussfull. Also the output log moved in else otherwise message appears for all commands
platformio changed
Changed naming as proposed
Gijs Noorlander (25):
[Framed OLED] Add checks for display initialized
[P036_FramedOLED] Reduce stack and heap memory usage
[Web form] Force value in number field within given range
[P036_FramedOLED] Uncrustify source code
[Framed OLED] Move plugin data to separate .h/.cpp
[Framed OLED] Clean up code + use temp. object for load/save lines
[e-ink] Include LOLIN_EPD in the lib_deps to make it compile
[Alternate WiFi] Use different SDK build for nodes with WiFi issues (#2931)
[GCC 10] Fix compile issues with GCC 10.1
[Cleanup] Move RTC struct code to .h/.cpp
[Build] Remove test VCC MDNS SD build from Travis build
Fix build errors
[ESP32] Fix build issue (spiffs.h vs SPIFFS.h)
[ESP32 build] Fix build issues with lots of lib_ignore set (#3083)
[Docs] Document /json and /csv URLs
[Arduino] Update to core 2.7.3
[SDK] Disable alt_wifi and use SDK22x_191122 for all builds
[Travis] Split builds in several jobs
[Build] Do not generate .bin.gz for 1M builds as no support 2-step OTA
[Build] Revert back to SDK22x_190703 + alt_wifi build
[Build] Disable custom_alt_wifi_ESP8266_1M as it is too large
[Build] Fix using GCC 10.1 toolchain
[core_3.0.0 alpha] Fix build issue analog PWMRANGE
Fix build issue on ESP32 finding SPIFFS.h
[Travis] Enable some core 3.0.0 alpha (*_beta_*) builds
Jean-Michel DECORET (6):
Add eInk plugin
Add SPI device type
Optimize code: - remove unwanted output - move http answer only in debug mode - fix functions args to const - optimize parsing color data
Remove useless comments Use BUILD_NO_DEBUG define Add display timings Fix input text to handle degress and monetary symbols (specific for adafruit gfx lib with eink screen)
Fix documentation typo
Fix documentation typo
Michael Schröder (1):
Decrease the longpress min interval to 500ms
tonhuisman (4):
[Build] Add P029 to PLUGIN_SET_ONLY_SWITCH
[Build] Enable P029 for hard_shelly builds
[Build] Move USES_DOMOTICZ logic together and in a more useful order
[Build] Remove superfluous #defines
uwekaditz (7):
merged Release mega-20200328
[P036] Memory optimization (issue #2799)
[P036] temporary pointer to P036_data_struct was not deleted
[P036] merged with Tonis PR #3026
[P036] re-schedule Settings.TaskDeviceTimer after JumpToPage
[P036] clearing window for scrolling lines was 1pix too large in y direction
[P036] Fixed: display_indicator() crashed
-------------------------------------------------
Changes in release mega-20200721 (since mega-20200720)
-------------------------------------------------
Release date: di 21 jul 2020 11:23:15 CEST
Gijs Noorlander (22):
[WiFi] Reduce wifi reset calls and call full wifi init at reset
[WiFi] Add timeout to get out of incorrect WiFi.connected() state
[WiFi] Convert bit-wise operations to use bitSet/bitClear/bitRead
[WiFi] No longer rely on WiFi.isConnected()
[WiFi] Detect and work around missing events
Fix issue where task name / task var name was incorrect
Reduce minimal OTA build slightly
[WiFi] Small fixes for WiFi related code
[ESP32] Fix build error on ESP32
[WiFi] Clear event callback on ESP32 + correct order of log/disconnect
[PIO] revert custom_beta env to stage core lib
[PIO ESP32] Update to latest Platformio espressif32@1.12.4
[ESPEasy p2p] Reload UDP port settings when changed
[UDP] Reduce max UDP packet size
[NTP] After timeout or receiving invalid packet, port could be held
[Syslog] Add custom port to the syslog IP (#1258)
[Docs] Update docs related to p2p UDP port no longer need reboot
[UDP p2p] Fix crash on ESP32 where UDP is started before connected
[ESP32] Recognize last boot state as Deepsleep (#3155)
[TimeZone] Move timezone configuration line to location settings (#3141)
[Docs] Document Tools => Advanced Settings
[WiFi] Copy DNS servers from DHCP when using fixed last octet (#3111)
-------------------------------------------------
Changes in release mega-20200720 (since mega-20200703)
-------------------------------------------------
Release date: ma 20 jul 2020 23:35:58 CEST
Gijs Noorlander (13):
[Modbus RTU] Move Modbus code to .h/.cpp file to reduce size
Convert scheduler from .ino to .cpp/.h
[Build] Fix missing include building ESP32
[Build] Fix build error for C018, due to removed forward declaration
Make delay queue macro a bit more logical
[Frontend] Only show "Submitted" message when pressing submit (#3144)
[ESP32 ETH] Fix build issue due to recent changes
[Arduino IDE] Fix build issue with Arduino IDE
Fix typo in filename for P044 data struct
[Arduino IDE] Make P076 compile again on Arduino IDE
[Arduino IDE] Fix build issue for P035_IRTX.ino
[Arduino IDE] Fix compile issues when selecting specific controllers
[Syslog] Fix crash with syslog enabled on wifi (re)connect (#3147 #3072)
TD-er (1):
Fix ADS1115 mixing input signals (#3159)
jimmys01 (1):
arduJSON library update
llevet (2):
Update _P095_ILI9341.ino
P095 Plugin: Fix bug #3047
tonhuisman (5):
[P008] Add option to convert value to 'hex' (#3068), and updated documentation
[TaskDisable] Bugfix for plugins without PLUGIN_EXIT implementation
[TaskDisable] Improve readability of code after bugfix
[TaskDisable] Remove unneeded else & return
[P076] fix: Custom pin settings in same order as Sensor pins, improved label, improved cast
-------------------------------------------------
Changes in release mega-20200703 (since mega-20200608)
-------------------------------------------------
Release date: vr 3 jul 2020 13:15:58 CEST
Florin (1):
Disable Arduino OTA by default for ESP32
Gijs Noorlander (31):
[ESP32] Only define FEATURE_ARDUINO_OTA in build config, not in .h files
[Build] Disable test_beta_ESP8266_4M1M for now as it is too big
[PIO] Use espressif8266@2.5.2 with fixed esp8266_stack_decoder
[Controller] Memory optimization for sending SENSOR_TYPE_STRING
[Controller] Check if controller host/IP is set before MQTT connect
[MQTT] Add function to check MQTT queue full state
[Cleanup] Free ControllerSettings as soon as possible to free memory
[Cleanup] Try to use move constructor when adding to controller queue
[Controller] Cache needed controller info to reduce memory usage
[MQTT] More efficient MQTT copy incoming messages
[Controller] Check if MakeControllerSettings failed due to low RAM
[MQTT import] Check if MakeControllerSettings failed due to out of RAM
Fix merge issue WiFiConnected changed to NetworkConnected
[P001 Switch] Reduce stack usage on PLUGIN_WEBFORM_LOAD
[Blynk] Reduce stack usage on Blynk_get
[Web Frontend] Reduce stack usage on DST configuration
[Python] Update package versions in requirements.txt
addFormSelectorI2C Fix high stack usage (#3130)
Minimize stack allocation in plugins
[Build] Add LittleFS to lib_ignore
[build] Exclude function from build for minimal OTA
[Controller] Check success of controller settings allocation processing queue
[HTTP controller] Memory optimization, prevent copy queue element
[Build] Allow building using SD support for special debug builds
[Frontend] Use stringProvider on some more strings
[Domoticz HTTP] Make sending slightly more efficient
[Web interface] Fix bug in I2C address selector
[Rules] Fix rules handling of set 2...4 when using admin login (#3113)
[Syslog] Fix high stack usage for Syslog (#3128)
[Documentation] Add documentation on the log settings.
Grzegorz Dziubak (1):
Update _P047_i2c-soil-moisture-sensor.ino
Michał Obrembski (10):
Initial Ethernet support
Added displaying Ethernet parameter in sysinfo and root page
Added configuration of Eth Phy via Hardware settings web page
Added Olimex ESP32-PoE board to DeviceModel and default settings
Increased BUILD number to 20107
Fix build on devices without Ethernet.
Remove ifdefs for Ethernet in settings
Renamed functions in ESPEasyEth, added eth* prefix
Moved WifiGetHostname into more generic createRFCCompliantHostname
Added basic implementation of Ethernet Static IP
Pavel Moravec (1):
Fixed IP address range checking
Peter Kretz (24):
atlas Sensor for pH an Redox (ORP) added
- Atlas EZO new webserver added - Serial --> logging - No [TESTING]
Extended the great work from Michał Obrembski mobrembski, so that: - mqtt works - WifiConnected works as EthernetConnected
- Moved ETHEvent from ESPEasy.ino to ESPEasyEthEvent.ino - Corrected Hostname Setting - ESPEasy P2P works now with some minor changes for IP-Address Handling in Network.ino
Change requested by TD-er review: clarification of build file https://github.com/letscontrolit/ESPEasy/pull/2962/files/8ba2bb88eadb98c4691cbb1f40c4d5466cb7b5b8
ESP32 with Ethernet or Wifi, not both at the same time configurable via Hardware Page. - ESP P2P is working - Only ETH.beginPacket() with Standard Parameter is working at the moment, configuration will follow. - Network.in not cpp/h files but this will be changed in future - Some TODO: PKR: comments will be removed in the future, too
Removed some comments Build now working with HAS_ETHERNET not defined
- Ethernet Commands - remove useless comments - ETH.config moved after ETH.begin - Added note: Be aware with ESPEasyP2P Network, since IP Address will change. There could be conflicts. - Ethernet JSON - Ethernet Variables
- ETHEvents moved to WifiEvents, because they are the same type
- New events: ETHERNET#Connected and ETHERNET#Disconnected
Fixed https://travis-ci.org/github/letscontrolit/ESPEasy/builds/680698472 ci build error
Fixed ci compile bug https://travis-ci.org/github/letscontrolit/ESPEasy/builds/680724129
Fixed bug reported by mobremski
- UDP / ESPEasyP2P now works for ETHERNET - Hostname Handling refactored for better overview: - String NetworkGetHostNameFromSettings() returns Settings.getHostname() - String NetworkCreateRFCCompliantHostname() creates a RFCcompliant Hostname from Settings.cpp - String NetworkGetHostname() returns the Hostname prevoiusly set in ETH or Wifi dependong on Mode - MacAddress Handling refactored - String NetworkMacAddress() returns the Mac addres of ETH or Wifi depending on Mode - String WifiSoftAPmacAddress() returns WiFi.softAPmacAddress(mac) as String
This String function is not needed, because there is a ETH.macAddress() which returns a String. I changed it to the byte version of the function and now uint8_t * NetworkMacAddressAsBytes(uint8_t* mac) returns either this in Ethernet mode or WiFi.macAddress(mac) in Wifi mode.
Check changed as requested by TD-er
addFormNote(F("Be aware with ESPEasyP2P Network, since IP Address will change. There could be conflicts.")); not used anymore because P2P UDP works good
removede personal upload flags
_P124_Atlas_EZO_pH.ino and _P222_Atlas_EZO_ORP.ino deleted since ther are not in ESPEasy but in Playground. There is another Issu, to put them in ESPEasy mega
- Error in Network Name fpr WiFi fixed - logging improvements
bccrew (1):
Change FormSubHeader to clarify difference between IP settings of LAN or WiFi
tonhuisman (5):
[P064] Gesture - APDS-9960 plugin: Added switching plugin mode and settings to fine-tune without recompiling source [APDS-9960 library] Added extensions and applied fixes from original Github project (including not merged yet improvements) [P064] Added/updated documentation for Gesture - APDS-9960 plugin [Documentation] Updated footer copyright notice to show 2018..2020
[P064] Made code-readability and other improvements as TD-er suggested, fixed a swapped argument bug
[Tasks] Call PLUGIN_INIT/PLUGIN_EXIT using TaskEnable/TaskDisable from rules
[Transformation] Add P/p (Password display)
[Transformation] Optimizations for Password transformation
-------------------------------------------------
Changes in release mega-20200608 (since mega-20200515)
-------------------------------------------------
Release date: ma 8 jun 2020 22:51:44 CEST
Bartlomiej Zimon (11):
rfid events update for P008/P017/P040, plus send event after log line.
PN532: remove hardcoded scl/sda pins reading and use hardware configuration instead
PN532: update comment
Webserver - add port number setting into Advanced options, resolves #3031 and #573
P2P: send and receive webserver port number, add port to link on rootpage #2252
NodeStruct: init webgui_portnumber value
p2p infopacket - use low/highByte
Webserver - increase BUILD number and set default value for port number
Webserver port setting - add reboot note
MDNS - send service with actual webserver port
P2P: respect also build number in condition
Florin (7):
Adding buzzer capabilities back to ESP32.
Allow to set the Latitude and longitude when resetting the firmware from custom.h or using the build_flags
clean up code and variables when NOTIFIER_SET_NONE is defined.
ESP32: Allow to select one of the two available SPI ports
clean up code and variables when NOTIFIER_SET_NONE is defined.
Fix for allowing negative timeOffset from UTC in constructor
rename the tone to toneESP32 to be more specific
Gijs Noorlander (27):
[MQTT] Process publish LWT connect message asynchronous
[MQTT] Stop trying to send LWT connected when client disconnects
[LittleFS] Make switching between SPIFFS and LittleFS easy to do
[ESPEasySerial] Update to v2.0.3 adding I2C UART to ESP32 + fix bug ESP32
[Build] Fix merge error
[PIO] Move to esp8266/Arduino core 2.7.1
[PIO] Hide deprecated warning for SPIFFS
[Vagrant] Fix vagrant build installing all required Python packages
[Notifications] Make sure all custom defines are set at compile time
[Travis] Fix deploy multiple ZIP files + split ESP82xx and ESP32 files
[Build] Fix Python 3.8 build when no .git dir or pygit2 not installed
[GPS] Add GPS#travelled=... event (#3099)
[Build] Add ina219 and mpu6050 to custom build (#3100)
[Build] Disable diagnostics code for test_ESP8266_4M1M_VCC to fit size
[Build] Disabling timing stats results in build errors for ESP32
[Commands] Split commands.ino to .h/.cpp to overcome build/link issues
[Build] Limit build size (no diagnostics) for test_beta_ESP8266_4M1M
[Notifications] Show notification tab when notifiers set via Custom.h
[Notifiers] switch from NOTIFIER_SET_NONE to USES_NOTIFIER in code
[ESP32] Fix Disabling ARDUINO_OTA fails the build (#3083)
[ESP32 build] Fix capitalization error in #include <esp_partition.h>
[ESP32] Update to platform-espressif32@1.12.2
[PIO] Add exception_decoder as serial monitor filter
Many systems provide a simple HTTP API where data can be changed using a HTTP request with a properly constructed querystring.
This Controller allows you to send HTTP GET, POST and PUT Requests to the given webserver.
For every device you have to choose to which Controllers it is sending its data. When configuring the Controller you can access this data and use them to generate your querystring.
You can use this placeholders in http header and in the http body:
*``%systime%`` will be replaced with the local system time
*``%vcc%`` will be replaced with the power supply voltage (if enable in this build)
*``%ip%`` will be replaced with the local ip adress
*``%sysload%`` will be replaced with the system load
*``%uptime%`` will be replaced with the system uptime
*``%CR%`` will be replaced with "\r"
*``%LF%`` will be replaced with "\n" (newline)
*``%sysname%`` will be replaced with the system name
*``%tskname%`` will be replaced with the name of the device which is sending data to this controller
*``%id%`` will be replaced with IDX value.
*``%vname1%`` will be replaced with Valuename 1
*``%vname2%`` will be replaced with Valuename 2
*``%vname3%`` will be replaced with Valuename 3
*``%vname4%`` will be replaced with Valuename 4
*``%val1%`` will be replaced with the value 1 of the device which is sending data to this controller
*``%val2%`` will be replaced with the value 2 of the device which is sending data to this controller
You can also write things like this:
``%1%_some_text_and_placeholder_%/1%`` everything between ``%1%`` and ``%/1%`` will only print when there is a value ``1``
@@ -67,6 +67,11 @@ before WiFi connection is made or during lost connection.
Especially useful for controllers which cannot send samples in a burst. This makes the receiving time stamp useless to detect what samples were taken around the same time.
The sample set counter value can help matching received samples to a single set.
..note::
Be careful when setting the timeout too high.
For almost all controllers, sending data is a blocking call, so it may halt execution of other code on the node.
With timouts longer than 2 seconds, the ESP may reboot as the software watchdog may step in.
ESPEasy has some centralized hardware configuration settings, shown in this page, and divided in sections.
---------------
Wifi Status LED
---------------
To display the Wifi acitivity, a pin can be configured to light up a LED when data is transfered via Wifi. Optionally, the LED signal can be 'inverted'.
As many ESP boards have an onboard LED connected to GPIO-2 and inverted, it is shown as a note how to configure that.
..image:: Hardware_Wifistatusled.png
---------
Reset pin
---------
To provide a possible escape from a malfunctioning ESP module, a factory-reset button/feature can be configured by setting up a GPIO-pin for this.
..warning::
**When connecting this pin to ground for ca. 10 seconds the unit will be completely reset, and all settings/configuration irretrievably deleted!**
This feature can be useful in a development/laboratory environment, for when the configuration gets corrupted in some way.
..image:: Hardware_Resetpin.png
-------------
I2C Interface
-------------
When using devices that use the I2C bus (Inter-integrated circuit, also known as IIC, and mostly compatible with SM Bus) (`Wikipedia: I2C <https://en.wikipedia.org/wiki/I%C2%B2C>`_) some pins have to be configured, and initialized during boot, for the SDA and SCL connections. This can be any unused pair of pins on the ESP board.
The pins can be configured here, and will have default values initially (ESP8266: SDA: GPIO-4 (D2), SCL: GPIO-5 (D3), ESP32: SDA: GPIO-22, SCL: GPIO-23). When I2C is not used, these can be set to `- None -`, so the pins are available for other purposes.
The default bus clock speed can also be set here. If only devices supporting 100 kHz are connected (Old/Slow devices), then the value can be set to 100 kHz, by default 400 kHz is configured, that is supported by newer devices, though there are many devices supporting higher frequencies. ESP8266 is able to achieve ca. 400 kHz, while ESP32 allows much higher speeds.
Since build 20110, ESPEasy has a separate setting for Slow I2C devices, and per I2C device this slow clock speed can be selected in the Device edit page. This value is by default set to 100 kHz, but can be set lower or higher if desired.
..image:: Hardware_I2CInterface.png
*Device specific Force Slow I2C speed selection:*
..image:: Device_I2COptionsShort.png
---------------
I2C Multiplexer
---------------
Since build 20110, there is the option of using an I2C multiplexer. This option is not available in all builds, because of the size of the code. It is usually available in the normal, testing and custom builds, but ommitted from minimal, IR and hardware-specific builds.
Possible use-cases for an I2C multiplexer are:
* Connect multiple devices that have fixed or limited I2C addresses (For example, some OLED devices have a single fixed address but you need to connect 2 or more, or connect more than 3 TLS2561 devices, that support only 3 different addresses).
* Connect different devices that have the same I2C address (For example connecting a TSL2561 light/lux sensor and an APDS9960 proximity sensor).
* Connect slow and fast devices, where the speed of the fast device prohibits proper working of the slow device.
..|br|raw:: html
<br>
..note::
If devices with conflicting I2C addresses are to be used, then *none* of them can be connected to the ESP main I2C bus, but they should each be connected to a separate channel of the multiplexer. |br|
Devices that do not conflict with other devices *can* be connected to the ESP main I2C bus, this might improve the performance/responsiveness of these devices.
..note::
When using an I2C Multiplexer, make sure there is no address conflict with any of the devices you intend to connect, f.e. when connecting BME280 sensors, don't set the address of the multiplexer to 0x76 or 0x77.
There are a couple of I2C multiplexer chips available, currently there is support for:
* TCA9546a (4 channels, multiple channel-connections, 8 I2C addresses, with reset, also TCA9545a can be used, but no support for the Interrupt function though)
The TCA9548a, TCA9546a and TCA9543a support connecting multiple channels to the main I2C channel. This can be configured on the Device edit page for I2C devices, once the I2C Multiplexer configuration is enabled by selecting a multiplexer type and an I2C address for the multiplexer.
Also, the TCA9548a, TCA9546a and TCA9543a chips have a connection for a reset signal available. This allows the chip to be reset if it gets stuck by some 'less compatible' or 'badly behaving' devices. Once connected and configured, the multiplexer can be reset from the software, if desired or required. This feature is not yet used in any I2C device plugin.
A TCA9543a board has the advantage of being quite a bit smaller than either TCA9546a or TCA9548a, while being digitally compatible. (But with less channels and only 4 I2C addresses).
All these chips/boards can be found at Adafruit, Aliexpress, Banggood, EBay, etc.
..image:: Hardware_I2CMultiplexerNone.png
*Available multiplexer types:*
..image:: Hardware_I2CMultiplexer_Type.png
*Select the I2C Address for the multiplexer:*
..image:: Hardware_I2CMultiplexer_Address.png
Device configuration
^^^^^^^^^^^^^^^^^^^^
If an I2C multiplexer is configured, every Device edit page for I2C devices will show extra options to select the channel the device is connected on.
There is the default option of Single channel, or, when a TCA9548a, TCA9546a or TCA9543a is configured, Multiple channels.
*Example: A multiplexer is configured, but the device is connected directly on the ESP board I2C channel:*
..image:: Device_I2COptionsMultiplexerNone.png
*Configure a (single) multiplexer channel the device is connected on:*
Above configuration results in channels 0, 4, 5, 6 and 7 being connected to the ESP board I2C bus when this sensor is active via I2C.
NB: Only acceptable channel checkboxes (0-7/0-3/0-1) will be shown, depending on the Multiplexer type configured.
-------------
SPI Interface
-------------
When using devices that are connected via the SPI interface (`Wikipedia: SPI <https://en.wikipedia.org/wiki/Serial_Peripheral_Interface>`_), the interface must be initialized during boot. This can be enabled here. For ESP32 there is the option to select either the Hardware SPI (HSPI) interface or the Virtual SPI (VSPI) interface (software controlled).
The common SPI pins are shown here.
Other SPI pins to be used are device specific, and need to be configured from the corresponding Device edit page.
*For ESP8266:*
..image:: Hardware_SPIInterfaceESP8266.png
*For ESP32, disabled:*
..image:: Hardware_SPIInterfaceESP32.png
*For ESP32, select the desired interface:*
..image:: Hardware_SPIInterfaceESP32_Select.png
NB: When using the VSPI interface and also the I2C interface is used, another pin has to be selected for I2C GPIO -> SCL, as its configuration is fixed for the VSPI setting.
--------
Ethernet
--------
On builds including ``_eth`` in their build name, it is also possible to use ethernet instead of WiFi.
Currently this is only present for ESP32 builds and no plans currently exist to support it for ESP82xx.
N.B. This is still in testing phase, so not all kinds of network communications work right now.
Preferred network medium
^^^^^^^^^^^^^^^^^^^^^^^^
Allows to switch between:
* WiFi (default)
* Ethernet
To activate a new configuration, a reboot is needed.
Ethernet PHY type
^^^^^^^^^^^^^^^^^
Select the used PHY controller type:
* LAN8710 (LAN8720 is also supported, but none of the newer features are supported)
* TLK110
Ethernet PHY Address
^^^^^^^^^^^^^^^^^^^^
The PHY address depends on the hardware and the PHY configuration.
* Espressif's Ethernet board with TLK110 PHY use PHY address 31.
* Common Waveshare LAN8720 PHY breakout use PHY address 1.
* Olimex ESP32 EVB REV B IoT LAN8710 PHY Board with CAN use PHY address 0.
* Other LAN8720 breakouts often use PHY address 0.
If the PHY address is incorrect then the EMAC will initialise but all attempts to read/write configuration registers on the PHY will fail.
GPIO pins
^^^^^^^^^
RMII PHY SMI Wiring
"""""""""""""""""""
Most PHY boards have documented their *RMII PHY SMI Wiring* pins:
***MDC** Output to PHY, usually pin 23
***MDIO** Bidirectional, usually pin 18
Clock sync
""""""""""
The PHY and the ESP need to keep a clock in sync.
This can either be done via an external crystal, which is connected to a GPIO pin.
Another option is to let the ESP provide the clock to the PHY.
* External crystal oscillator
* 50MHz APLL Output on GPIO0
* 50MHz APLL Output on GPIO16
* 50MHz APLL Inverted Output on GPIO17
Power pin
"""""""""
On almost all PHY boards, or ESP boards equiped with an ethernet PHY, it is possible to turn the PHY on or off.
Either to save energy, or to make sure the external clock is not affecting the ESP boot mode when it restarts.
For example the Olimex ESP32-EVB does have the *external crystal oscillator* connected to GPIO-0, which could boot the ESP32 randomly into UART flash mode.
Most boards use a specific GPIO pin to control the power to the PHY.
The Olimex ESP32-EVB does have a specific delay circuit to only allow power to the PHY after boot and therefore does not need to control the PHY power.
For other boards, the default is often GPIO-17, but this may change per board.
RMII PHY Wiring
"""""""""""""""
Apart from these GPIO pins, there is a number of other pins reserved on the ESP32 for RMII PHY Wiring.
Since these GPIO pin assignments cannot be changed, it is also not needed to configure them.
However, they also cannot be used when *RMII PHY* is used.
..include:: ../Reference/Ethernet_PHY_ESP32.rst
-------------------
GPIO boot states
-------------------
For some GPIO pins, the boot state (initial configuration after startup) can be configured.
Some differences exist between ESP8266 and ESP32:
* ESP8266 can't initialize GPIO's 6, 7 and 8 (technical limitation of ESP8266 chip) and 16 (always has pull-down setting)
* ESP32 can't initialize GPIO's from 16 and up (settings storage limitation, could be initialized from Rules in `System#Boot` event)
* normal_IR => "Normal" + IR receiver/transmitter plugins and library
* hard_xxxxx => Special builds for some off-the-shelf hardware.
* minimal_ESP82xx_1M_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.
* normal_core_xxx => "Normal" using core xxx (e.g. 2.6.3)
* normal_beta => "Normal" using the staged (beta) branch of the esp8266/Arduino repository.
ESP Chip Type
-------------
*``ESP8266`` Most likely option.
*``ESP8285`` Used in some Sonoff modules. This chip has embedded flash, so no extra flash chip.
*``ESP32`` Experimental support at this moment.
Memory Size and Partitioning
----------------------------
*``1M`` 1 MB flash modules (e.g. almost all Sonoff modules)
*``2M`` 2 MB flash modules (e.g. Shelly1/WROOM02)
*``4M`` 4 MB flash modules (e.g. NodeMCU/ESP32)
*``16M`` 16 MB flash modules (e.g. Wemos D1 mini pro)
Please note that the performance of 14MB SPIFFS (16M flash modules) is really slow.
All file access takes a lot longer and since the settings are also read from flash, the entire node will perform slower.
See `Arduino issue - SPIFFS file access slow on 16/14M flash config <https://github.com/esp8266/Arduino/issues/5932>`_
If these speed issues will be fixed, it is very likely the SPIFFS must then be re-partitioned, thus loosing all data in the SPIFFS.
Special memory partitioning:
*``2M256`` 2 MB flash modules (e.g. Shelly1/WROOM02) with 256k SPIFFS (only core 2.5.0 or newer)
*``4M316k`` For ESP32 with 4MB flash, sketch size is set to 1.8 MByte (default: 1.4 MByte)
@@ -22,7 +22,7 @@ RTTTL (Ring Tone [Text] Transfer Language) was developed by Nokia to play more "
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
..code-block::none
<duration><note><octave>
@@ -35,7 +35,7 @@ Specifications:
Wiring
------
..code-block::html
..code-block::none
ESP Buzzer
GPIO <--> I/O
@@ -55,7 +55,7 @@ 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
..code-block::none
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
@@ -65,7 +65,7 @@ You can also use these from rules. We use it to let our alarm system give feedba
To make a boot-sound on startup, create a rule like this:
..code-block::html
..code-block::none
On System#Boot do
rtttl,14:d=10,o=6,b=180,c,e,g
@@ -75,7 +75,7 @@ To make a boot-sound on startup, create a rule like this:
Besides RTTTL it's also possible to play a single tone on a pin, via a buzzer, speaker or piezo element:
..code-block::html
..code-block::none
http://<ESP IP address>/control?cmd=tone,14,1300,200
@@ -22,7 +22,7 @@ RTTTL (Ring Tone [Text] Transfer Language) was developed by Nokia to play more "
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
..code-block::none
<duration><note><octave>
@@ -35,7 +35,7 @@ Specifications:
Wiring
------
..code-block::html
..code-block::none
ESP Piezo
GPIO <--> Positive (red)
@@ -52,7 +52,7 @@ 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
..code-block::none
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
@@ -62,7 +62,7 @@ You can also use these from rules. We use it to let our alarm system give feedba
To make a boot-sound on startup, create a rule like this:
..code-block::html
..code-block::none
On System#Boot do
rtttl,14:d=10,o=6,b=180,c,e,g
@@ -72,7 +72,7 @@ To make a boot-sound on startup, create a rule like this:
Besides RTTTL it's also possible to play a single tone on a pin, via a buzzer, speaker or piezo element:
..code-block::html
..code-block::none
http://<ESP IP address>/control?cmd=tone,14,1300,200
@@ -22,7 +22,7 @@ RTTTL (Ring Tone [Text] Transfer Language) was developed by Nokia to play more "
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
..code-block::none
<duration><note><octave>
@@ -35,7 +35,7 @@ Specifications:
Wiring
------
..code-block::html
..code-block::none
ESP Speaker
GPIO <--> Positive (red)
@@ -52,7 +52,7 @@ 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
..code-block::none
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
@@ -62,7 +62,7 @@ You can also use these from rules. We use it to let our alarm system give feedba
To make a boot-sound on startup, create a rule like this:
..code-block::html
..code-block::none
On System#Boot do
rtttl,14:d=10,o=6,b=180,c,e,g
@@ -72,7 +72,7 @@ To make a boot-sound on startup, create a rule like this:
Besides RTTTL it's also possible to play a single tone on a pin, via a buzzer, speaker or piezo element:
..code-block::html
..code-block::none
http://<ESP IP address>/control?cmd=tone,14,1300,200
As described already, each task can produced one or more events, one for each measured value. You should not name your devices and value names so that the combination equals to any of the below listed system events!
","
.. code-block:: html
.. code-block:: none
on DHT11Outside#Temperature>20 do
GPIO,2,1
@@ -19,7 +19,7 @@
Triggered after power on.
","
.. code-block:: html
.. code-block:: none
on System#Wake do
GPIO,15,1
@@ -31,7 +31,7 @@
Triggered at boot time.
","
.. code-block:: html
.. code-block:: none
on System#Boot do
GPIO,2,1
@@ -44,7 +44,7 @@
Triggered just before the ESP goes to deep sleep.
","
.. code-block:: html
.. code-block:: none
on System#Sleep do
GPIO,2,0
@@ -56,7 +56,7 @@
Triggered when the ESP has connected to broker.
","
.. code-block:: html
.. code-block:: none
on MQTT#Connected do
Publish,%sysname%/status,First message!
@@ -68,7 +68,7 @@
Triggered when the ESP has disconnected from the broker.
","
.. code-block:: html
.. code-block:: none
on MQTT#Disconnected do
Reboot
@@ -80,7 +80,7 @@
Triggered when the ESP has connected to broker (the MQTT Import plugin uses a separate connection than the generic one).
","
.. code-block:: html
.. code-block:: none
on MQTTimport#Connected do
Publish,%sysname%/status,MQTT Import is now operational
@@ -92,7 +92,7 @@
Triggered when the ESP has disconnected from the broker (the MQTT Import plugin uses a separate connection than the generic one).
Triggered when the ESP has changed to access point, will also trigger first time the unit connects to the Wi-Fi.
","
.. code-block:: html
.. code-block:: none
on WiFi#ChangedAccesspoint do
Publish,%sysname%/status,AP changed
@@ -129,7 +129,7 @@
This has been added in build mega-20190910
","
.. code-block:: html
.. code-block:: none
on WiFi#ChangedWiFichannel do
Publish,%sysname%/status,channel changed
@@ -143,7 +143,7 @@
N.B. Sending a publish command may not be very useful on this event, since this will mainly happen when there is no WiFi connection.
","
.. code-block:: html
.. code-block:: none
on WiFi#APmodeEnabled do
... // Some command
@@ -156,7 +156,7 @@
This can happen some time (default 60 seconds) after a WiFi connection has been made. Or disabled using some command.
","
.. code-block:: html
.. code-block:: none
on WiFi#APmodeDisabled do
Publish,%sysname%/status,AP disabled
@@ -168,7 +168,7 @@
Triggered when (someone) has tried to login to a ESP unit with admin password enabled, but have failed to enter correct password.
","
.. code-block:: html
.. code-block:: none
on Login#Failed do
Publish,%sysname%/warning,Intruder alert!
@@ -180,7 +180,7 @@
Triggered the first time (after boot) NTP is updating the unit.
","
.. code-block:: html
.. code-block:: none
on Time#Initialized do
Publish,%sysname%/Time,%systime%
@@ -192,7 +192,7 @@
Triggered when the time is set by an update from NTP.
","
.. code-block:: html
.. code-block:: none
on Time#Set do
Publish,%sysname%/Time,%systime%
@@ -205,7 +205,7 @@
As described already, triggered when a rules timer ends (setting a timer to 0 will disable the timer).
","
.. code-block:: html
.. code-block:: none
on Rules#Timer=1 do
GPIO,2,1
@@ -217,7 +217,7 @@
Triggered every minute with day and time like: Mon,12:30 or Tue,14:45. You can define triggers on specific days or all days using 'All' for days indicator. You can also use wildcards in the time setting like All,**:00 to run every hour.
","
.. code-block:: html
.. code-block:: none
on Clock#Time=All,12:00 do //will run once a day at noon
GPIO,2,1
@@ -237,7 +237,7 @@
If the command 'Monitor' is used to monitor a given pin you will receive an event for that GPIO as soon as it's state changes. As seen in the example you can always use the square brackets together with the task/value name of ``Plugin#GPIO#Pinstate#N`` to get the state, but to trigger events you need to add the monitor command (preferably at boot).
This one can be set either to measure the Vdd pin (supplied voltage to the ESP) or to ``TOUT``, so it can measure the voltage on the ``A0`` pin.
The ESP32 has 18 pins that can be used as ADC. It also has a Hall Effect sensor included.
See the `ESP32 API reference <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/adc.html>`_ for more detailed information on the features and limitations of these pins.
Hall Effect Sensor (ESP32)
--------------------------
The ESP32 has a Hall Effect Sensor included, to measure a magnetic field.
N.B. This value can also be negative, if the polarity of the magnetic field is swapped.
Note that even the hall sensor is internal to ESP32, reading from it uses channels 0 and 3 of ADC1 (GPIO 36 and 39).
Do not connect anything else to these pins and do not change their configuration. Otherwise it may affect the measurement of low value signal from the sensor.
WiFi activity and ADC
---------------------
The ADC on the ESP8266 is also used during WiFi RF calibration.
This can result in incorrect readings of the ADC while a WiFi connection attempt is in progress.
ESP32 has 2 ADCs present.
``ADC1`` and ``ADC2``
Since the ``ADC2`` is shared with the WIFI module, which has higher priority, reading operation of ``adc2_get_raw()`` may fail between ``esp_wifi_start()`` and ``esp_wifi_stop()``.
Oversampling
------------
When ``Oversampling`` is enabled, the plugin will take a reading 10 times a second.
This reading is averaged over the entire interval time as set in the task configuration.
The highest and lowest values are subtracted from the recorded values, to filter out single flukes.
Measured values which are clipped either on the lower range or higher range are only added once per interval as they may occur for more than a single sample per interval.
This is done to prevent a relative large offset in the averaging due to clipping or maybe unforceen interaction of the WiFi chip on the ADC measurements.
Calibration
-----------
The plugin supports a 2-point calibration.
The user can set these to convert the raw values into the desired unit of measure.
When set, the configuration screen also displays the minimum, maximum and step size values based on the calibration settings.
Supported hardware
------------------
@@ -42,8 +96,7 @@ Change log
..versionchanged:: 2.0
...
|added|
Major overhaul for 2.0 release.
|improved| 2020-04-25 Added support for ESP32 ADC pins + Hall Effect Sensor.
The Wiegand plugin reads the Wiegand protocol, either the 26 or 34 bit variant, transmitted over a 2-wire serial connection. The RFID reader or keypad has to be connected to two GPIO pins on the ESP module. The plugin uses an interrupt routine to decode the bitstream. A RFID reader will send a message containing the unique RFID Tag ID. A keypad will send the input after pressing the #, or another configured, confirmation key.
Data is transmitted in hexadecimal format.
For numeric keypads an option is provided to transform the hex value into a decimal representation, so that when entering value 1234# (# is the confirmation key here), not the result 4660 (0x1234) is made available, but actually 1234. This for easier processing/validating of the entered value. Any input of A-F is replaced by 0 when this option is enabled! It should not be enabled when using a RFID reader, as the Tag ID won't be correct.
The value is placed in the Tag variable (this name can be changed).
@@ -33,8 +33,16 @@ The number of pages depends on the number of set lines of text and the font size
Switching between pages can be "instant" or "scrolling".
Please note that scrolling may need more resources of the ESP, which can have an effect on other active tasks of the node.
Setting up a Display Button, allows to configure a Display Timeout and wake the display on demand. Inversed Logic should be checked when using a button that connects the input to ground when pressed.
When enabling "Step through pages with Display button", the button can also be used to step through the pages, when having multiple pages, to display the content on demand. If this option is unchecked, then, when available, the next page will be displayed after Interval seconds have passed. Pressing the button restarts the Display Timeout timer. When holding the button pressed, the next page will be shown after a 1 second delay.
The Display Timeout setting sets the numbers of seconds after which the display is turned off. When set to 0 no timeout is active.
The plugin allows for a header and footer line, which may show some user selectable information.
Checkbox 'Wake display on receiving text' (default: on) allows to not wake up the display when a text is sent from a remote source, and Display Timeout is set.
All user defined texts may contain references to system variables or task values which will be interpreted when displayed on screen.
Some displays do not accept all brightness levels and some also make a quite high pitch coil whine noise when running on some brightness levels.
So different levels of brightness can also be of help on those displays.
The display controller itself does support more brightness levels, but these are chosen to give noticable change in brightness levels and also to help in chosing the best values for the 2 brighness control registers.
As there are 2 brighness control registers, there is some overlap in their range, but some combinations may lead to issues like coil whining noise or sometimes not even working displays as not all of these displays are wired to support both controls to be used.
The display controller itself does support more brightness levels, but these are chosen to give noticable change in brightness levels and also to help in choosing the best values for the 2 brightness control registers.
As there are 2 brightness control registers, there is some overlap in their range, but some combinations may lead to issues like coil whining noise or sometimes not even working displays as not all of these displays are wired to support both controls to be used.
"
"
``oledframedcmd,<line>,<text>``
","
The <line> parameter coresponds with the same lines as the plugin configuration has.
The <line> parameter corresponds with the same lines as the plugin configuration has.
The <text> parameter must be a single command parameter.
Meaning, it must be wrapped in quites when using a space or comma as text.
Meaning, it must be wrapped in quotes when using a space or comma as text.
If double quote characters are needed, wrap the parameter in single quotes or back quotes.
@@ -36,4 +36,17 @@
After a reboot the stored plugin settings will be used.
All template notations can be used, like system variables, or reference to a task value.
After receiving text this way, the frame where the text is placed is shown, if the setting for 'Wake display on receiving text' is checked.
"
"
``oledframedcmd,frame[,<framenr>]``
","
This command is to display a specific frame (aka page), or the next frame. When reaching the last frame, a 'next' (0) will display the first frame.
The <framenr> parameter corresponds to the desired frame (1..<number of frames>) to display. The number of frames is determined by dividing the lines in use (at least one line in that frame with some data), by the number of Lines per Frame. So practically, the range is 1..3 when all lines are used and 4 Lines per Frame is set, or 1..12 if Line per frames is set to 1. The number of frames is updated if a frame would initially be empty, and an external source places text on a line of that frame (see above).
When omitting <framenr>, or providing 0, the next frame is displayed.
When the display is off, because a 'Display Timeout' is set and the timer has expired or it is turned off by the off command (see above), then it is turned on, and, when set, the timer is started again.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.