Merge branch 'mega' into feature/explicit_task_command

This commit is contained in:
Ton Huisman
2020-08-20 15:48:23 +02:00
committed by GitHub
188 changed files with 9688 additions and 7828 deletions
+1
View File
@@ -58,6 +58,7 @@ env:
- ENV=normal_ESP8266_1M
- ENV=normal_ESP8266_1M_VCC
- ENV=normal_ESP8266_4M1M
- ENV=normal_ESP8266_4M1M_VCC
- ENV=normal_ESP8285_1M
- ENV=normal_IRext_no_rx_ESP8266_4M2M
- ENV=normal_WROOM02_2M256
+6 -6
View File
@@ -163,10 +163,10 @@ Of each known node the following data is kept:
The key to index this ``NodeStruct`` is the nodes unit number.
ASCII Data
~~~~~~~~~~
^^^^^^^^^^^^^^^^
Command Message
***************
^^^^^^^^^^^^^^^^
First byte is not 0xFF.
@@ -181,7 +181,7 @@ As can be seen, no checks for size, and it is just expected to be a valid ESPeas
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.
@@ -207,7 +207,7 @@ Message types supported, determined by the 2nd byte:
* 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.
@@ -234,7 +234,7 @@ The node type is defined as:
* 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.
@@ -258,7 +258,7 @@ These messages are just a serialized byte stream of ``struct C013_SensorInfoStru
Sensor Data message
*******************
^^^^^^^^^^^^^^^^^^^^
These messages are just a serialized byte stream of ``struct C013_SensorDataStruct`` .
+1 -1
View File
@@ -79,7 +79,7 @@ Setup
- ``homie/%sysname%/$nodes`` enumerating all devices will be sent as final message of the auto-discover header.
- The final event log should look like this:
.. code-block:: html
.. code-block:: none
5584 : EVENT: MQTT#Connected
5754 : C014 : autodiscover information of 4 Devices and 6 Nodes sent with no errors! (26 messages)
Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

+176
View File
@@ -0,0 +1,176 @@
Hardware page
*************
Overview
========
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:
* TCA9548a (8 channels, multiple channel-connections, 8 I2C addresses, with reset)
* TCA9546a (4 channels, multiple channel-connections, 8 I2C addresses, with reset, also TCA9545a can be used, but no support for the Interrupt function though)
* TCA9543a (2 channels, multiple channel-connections, 4 I2C addresses, with reset)
* PCA9540 (2 channels, fixed I2C address, no reset, experimental support)
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:*
.. image:: Device_I2COptionsMultiplexerSelectSingleChannel.png
NB: Only acceptable channels (0-7/0-3/0-1) will be available in the dropdown list, depending on the Multiplexer type configured.
*Select Single channel or Multiple channels:*
.. image:: Device_I2COptionsMultiplexerSelect.png
*Configure multiple channels for a device, 8 channel multiplexer configured*
.. image:: Device_I2COptionsMultiplexerMultipleSelect.png
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.
-------------------
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)
*ESP8266 GPIO boot states:*
.. image:: Hardware_GPIObootstatesESP8266.png
*ESP32 GPIO boot states:*
.. image:: Hardware_GPIObootstatesESP32.png
Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

+5 -5
View File
@@ -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
+2 -2
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P000_Level_converter_page:
Level converter
@@ -43,7 +43,7 @@ Wiring
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
.. code-block:: none
ESP Level converter Connected hardware
GPIO (X) <--> 3A, LV1, A1 etc. <--> 5A, HV1, B2 etc.
@@ -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
+2 -2
View File
@@ -179,7 +179,7 @@ have to be figured into your project. It is also possible to use a small SSR to
Wiring
------
.. code-block:: html
.. code-block:: none
ESP Relay (board)
GPIO (X) <--> IN1
@@ -204,7 +204,7 @@ find more information on how to do this.
Rules examples
--------------
.. code-block:: html
.. code-block:: none
On Switch#State Do
if [Switch#State]=1
+2 -2
View File
@@ -29,7 +29,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP Servo
GPIO (X) <--> S (signal)
@@ -48,7 +48,7 @@ find more information on how to do this.
Rules examples
--------------
.. code-block:: html
.. code-block:: none
On Switch#State Do
if [Switch#State]=1
+5 -5
View File
@@ -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
File diff suppressed because it is too large Load Diff
+19 -19
View File
@@ -7,7 +7,7 @@
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).
","
.. code-block:: html
.. code-block:: none
on MQTTimport#Disconnected do
Reboot
@@ -104,7 +104,7 @@
Triggered when the ESP has connected to Wi-Fi.
","
.. code-block:: html
.. code-block:: none
on WiFi#Connected do
SendToHTTP,url.com,80,/report.php?hash=123abc456&t=[temp2#out]
@@ -116,7 +116,7 @@
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).
","
.. code-block:: html
.. code-block:: none
on System#Boot do
Monitor GPIO,15
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P001_Door_switch_page:
Door switch
@@ -25,7 +25,7 @@ Specifications:
Wiring
------
.. code-block:: html
.. code-block:: none
ESP Door switch
GPIO (X) <--> Signal
@@ -111,7 +111,7 @@ Indicators/values (recommended settings)
Rules examples
--------------
.. code-block:: html
.. code-block:: none
on Door#State=1 do
timerSet,1,1
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P001_PIR_sensor_page:
PIR sensor
@@ -31,7 +31,7 @@ Specifications:
Wiring
------
.. code-block:: html
.. code-block:: none
ESP PIR
GPIO (X) <--> I/O or OUT
@@ -117,7 +117,7 @@ Indicators/values (recommended settings)
Rules examples
--------------
.. code-block:: html
.. code-block:: none
on Motion#Detection=1 do
timerSet,1,1
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P001_Switch_page:
Switch
@@ -24,7 +24,7 @@ Specifications:
Wiring
------
.. code-block:: html
.. code-block:: none
ESP Switch/button
GPIO (X) <--> Signal
@@ -128,7 +128,7 @@ Indicators/values (recommended settings)
Rules examples
--------------
.. code-block:: html
.. code-block:: none
on Switch#State do
if [Switch#State]=3
+2 -2
View File
@@ -21,7 +21,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -41,7 +41,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P002_PCF8591_page:
PCF8591
@@ -20,7 +20,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -40,7 +40,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P002_Photosensitive_resistor_page:
Photosensitive resistor
@@ -21,7 +21,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -41,7 +41,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+2 -2
View File
@@ -28,7 +28,7 @@ Specifications:
Wiring
------
.. code-block:: html
.. code-block:: none
ESP LJ12A3
GPIO (14) <--> Signal (black)
@@ -125,7 +125,7 @@ Indicators (recommended settings)
Rules examples
--------------
.. code-block:: html
.. code-block:: none
On WaterMeter#mL Do
If [WaterMeter#mL]=0
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P003_TCR5000_page:
TCR5000
@@ -25,7 +25,7 @@ Specifications:
Wiring
------
.. code-block:: html
.. code-block:: none
ESP TCR5000
GPIO (14) <--> S
@@ -97,7 +97,7 @@ Indicators (recommended settings)
Rules examples
--------------
.. code-block:: html
.. code-block:: none
On PowerMeter#W Do
If [PowerMeter#W]>1500
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P003_YFS401_page:
YFS401
@@ -27,7 +27,7 @@ Specifications:
Wiring
------
.. code-block:: html
.. code-block:: none
ESP YFS401
GPIO (14) <--> Signal (yellow)
@@ -104,7 +104,7 @@ Indicators (recommended settings)
Rules examples
--------------
.. code-block:: html
.. code-block:: none
On WaterMeter#mL Do
If [WaterMeter#mL]=0
+2 -2
View File
@@ -32,7 +32,7 @@ Wiring
.. image:: P004_DS18b20_5.jpg
.. code-block:: html
.. code-block:: none
ESP DS18b20
GPIO (14) <--> 1-wire/D (yellow)
@@ -108,7 +108,7 @@ Indicators (recommended settings)
Rules examples
--------------
.. code-block:: html
.. code-block:: none
On Temp1#Celsius Do
If [Temp1#Celsius]>37
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P005_DHT11_DHT22_page:
DHT11/DHT22
@@ -35,7 +35,7 @@ DHT11 (blue)
DHT22 (white)
.. code-block:: html
.. code-block:: none
ESP DHT11/DHT22
GPIO (X) <--> Data (2nd pin)
@@ -89,7 +89,7 @@ Indicators (recommended settings)
Rules examples
--------------
.. code-block:: html
.. code-block:: none
On DHT#Celsius Do
If [DHT#Celsius]>-15
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P006_BMP085_page:
BMP085
@@ -20,7 +20,7 @@ Specifications:
Wiring
------
.. code-block:: html
.. code-block:: none
ESP BMP085
GPIO (4) <--> DA (SDA)
@@ -73,7 +73,7 @@ Indicators (recommended settings)
Rules examples
--------------
.. code-block:: html
.. code-block:: none
on BMP#hPa do
if BMP#hPa>999
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P006_BMP180_page:
BMP180
@@ -20,7 +20,7 @@ Specifications:
Wiring
------
.. code-block:: html
.. code-block:: none
ESP BMP180
GPIO (4) <--> DA (SDA)
@@ -73,7 +73,7 @@ Indicators (recommended settings)
Rules examples
--------------
.. code-block:: html
.. code-block:: none
on BMP#hPa do
if BMP#hPa>999
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P008_Wiegand-26_page:
Wiegand-26
@@ -20,7 +20,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -40,7 +40,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. include:: ../Plugin/_plugin_substitutions_p00x.repl
.. _P009_MCP23017_page:
MCP23017
@@ -20,7 +20,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -40,7 +40,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p01x.repl
.. include:: ../Plugin/_plugin_substitutions_p01x.repl
.. _P010_BH1750_page:
BH1750
@@ -20,7 +20,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -40,7 +40,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p01x.repl
.. include:: ../Plugin/_plugin_substitutions_p01x.repl
.. _P012_LCD_page:
LCD
@@ -20,7 +20,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -40,7 +40,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+15 -15
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p01x.repl
.. include:: ../Plugin/_plugin_substitutions_p01x.repl
.. _P013_HC-SR04_page:
HC-SR04
@@ -26,15 +26,15 @@ Wiring
The HC-SR04 must be run on 5V. Running it with 3.3V will show very weak results or nothing at all.
.. code-block:: html
.. code-block:: none
ESP HC-SR04
GPIO (X) <--> Trigger
GPIO (X) <--> Echo (voltage divider!)
Power
5.0V <--> VCC
GND <--> GND
ESP HC-SR04
GPIO (X) <--> Trigger
GPIO (X) <--> Echo (voltage divider!)
Power
5.0V <--> VCC
GND <--> GND
.. warning:: Do not connect 5V directly to the ESP! Read more about :ref:`P000_Level_converter_page`.
@@ -89,14 +89,14 @@ Indicators (recommended settings)
Rules examples
--------------
.. code-block:: html
.. code-block::
on HCSR04#distance do
if [HCSR04#distance]<50 and [HCSR04#distance]>45
GPIO,14,1 //light up LED to show that you're at the correct position
else
GPIO,14,0
endif
if [HCSR04#distance]<50 and [HCSR04#distance]>45
GPIO,14,1 //light up LED to show that you're at the correct position
else
GPIO,14,0
endif
endon
.. Commands available
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p01x.repl
.. include:: ../Plugin/_plugin_substitutions_p01x.repl
.. _P013_RCW-0001_page:
RCW-0001
@@ -26,7 +26,7 @@ Wiring
The RCW-0001 must be run on 5V. Running it with 3.3V will show very weak results or nothing at all.
.. code-block:: html
.. code-block:: none
ESP RCW-0001
GPIO (X) <--> Trigger
@@ -89,7 +89,7 @@ Indicators (recommended settings)
Rules examples
--------------
.. code-block:: html
.. code-block::
on RCW0001#distance do
if [RCW0001#distance]<50 and [RCW0001#distance]>45
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p01x.repl
.. include:: ../Plugin/_plugin_substitutions_p01x.repl
.. _P013_US-100_page:
US-100
@@ -26,7 +26,7 @@ Wiring
The US-100 must be run on 5V. Running it with 3.3V will show very weak results or nothing at all.
.. code-block:: html
.. code-block:: none
ESP US-100
GPIO (X) <--> Trigger
@@ -89,7 +89,7 @@ Indicators (recommended settings)
Rules examples
--------------
.. code-block:: html
.. code-block::
on US100#distance do
if [US100#distance]<50 and [US100#distance]>45
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p01x.repl
.. include:: ../Plugin/_plugin_substitutions_p01x.repl
.. _P014_SI7021_HTU21D_page:
SI7021/HTU21D
@@ -21,7 +21,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -41,7 +41,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p01x.repl
.. include:: ../Plugin/_plugin_substitutions_p01x.repl
.. _P015_TSL2561_page:
TSL2561
@@ -31,7 +31,7 @@ Wiring
.. image:: P015_TSL2561_2.jpg
.. code-block:: html
.. code-block:: none
ESP TSL2561
GPIO (5) <--> SCL
@@ -94,7 +94,7 @@ Indicators (recommended settings)
Rules examples
--------------
.. code-block:: html
.. code-block:: none
on Light#VI_Lux do
if Light#VI_Lux>100
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p01x.repl
.. include:: ../Plugin/_plugin_substitutions_p01x.repl
.. _P017_PN532_page:
PN532
@@ -20,7 +20,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -40,7 +40,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p01x.repl
.. include:: ../Plugin/_plugin_substitutions_p01x.repl
.. _P018_GP2Y10_page:
GP2Y10
@@ -20,7 +20,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -40,7 +40,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p01x.repl
.. include:: ../Plugin/_plugin_substitutions_p01x.repl
.. _P019_PCF8574_page:
PCF8574
@@ -20,7 +20,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -40,7 +40,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p02x.repl
.. include:: ../Plugin/_plugin_substitutions_p02x.repl
.. _P022_PCA9685_page:
PCA9685
@@ -20,7 +20,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -40,7 +40,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p02x.repl
.. include:: ../Plugin/_plugin_substitutions_p02x.repl
.. _P023_OLED_page:
OLED
@@ -20,7 +20,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -40,7 +40,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p02x.repl
.. include:: ../Plugin/_plugin_substitutions_p02x.repl
.. _P024_MLX90614_page:
MLX90614
@@ -21,7 +21,7 @@ Specifications:
Wiring
------
.. code-block:: html
.. code-block:: none
ESP MLX90614
GPIO (4) <--> SDA
@@ -71,7 +71,7 @@ Indicators (recommended settings)
Rules examples
--------------
.. code-block:: html
.. code-block:: none
on Temp#C do
if [Temp#C]>300
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p02x.repl
.. include:: ../Plugin/_plugin_substitutions_p02x.repl
.. _P025_ADS1115_page:
ADS1115
@@ -20,7 +20,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -40,7 +40,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p02x.repl
.. include:: ../Plugin/_plugin_substitutions_p02x.repl
.. _P027_INA219_page:
INA219
@@ -21,7 +21,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -41,7 +41,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p02x.repl
.. include:: ../Plugin/_plugin_substitutions_p02x.repl
.. _P028_BME280_page:
BME280
@@ -24,7 +24,7 @@ Specifications:
Wiring
------
.. code-block:: html
.. code-block:: none
ESP BME280
GPIO (4) <--> SDA
@@ -75,7 +75,7 @@ Indicators (recommended settings)
Rules examples
--------------
.. code-block:: html
.. code-block:: none
on BME#hPa do
if BME#hPa>999
+12 -1
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p02x.repl
.. include:: ../Plugin/_plugin_substitutions_p02x.repl
.. _P029_page:
|P029_typename|
@@ -36,6 +36,17 @@ Supported hardware
.. .. include:: P029_events.repl
Description
-----------
Using the Domoticz MQTT protocol, it is not possible to configure direct commands to control output.
Instead, a json message is send by Domoticz on the Domoticz/Out channel.
We need to configure the IDX value within ESP Easy and link this to a given output pin.
This plugin is a special 'helper' device to link IDX to GPIO.
Only the IDX and the corresponding GPIO pin needs to be set.
Change log
----------
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p03x.repl
.. include:: ../Plugin/_plugin_substitutions_p03x.repl
.. _P030_BMP280_page:
BMP280
@@ -23,7 +23,7 @@ Specifications:
Wiring
------
.. code-block:: html
.. code-block:: none
ESP BMP280
GPIO (4) <--> SDI (SDA)
@@ -77,7 +77,7 @@ Indicators (recommended settings)
Rules examples
--------------
.. code-block:: html
.. code-block:: none
on BMP#hPa do
if BMP#hPa>999
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p03x.repl
.. include:: ../Plugin/_plugin_substitutions_p03x.repl
.. _P031_SHT1X_page:
SHT1X
@@ -21,7 +21,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -52,7 +52,7 @@ With a delay of 10, on the same node, the clock signal is about 40 kHz.
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p03x.repl
.. include:: ../Plugin/_plugin_substitutions_p03x.repl
.. _P032_MS5611_page:
MS5611
@@ -21,7 +21,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -41,7 +41,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p03x.repl
.. include:: ../Plugin/_plugin_substitutions_p03x.repl
.. _P034_DHT12_page:
DHT12
@@ -21,7 +21,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -41,7 +41,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p03x.repl
.. include:: ../Plugin/_plugin_substitutions_p03x.repl
.. _P035_IR_transmitter_page:
IR transmitter
@@ -20,7 +20,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -40,7 +40,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p04x.repl
.. include:: ../Plugin/_plugin_substitutions_p04x.repl
.. _P045_MPU6050_page:
MPU6050
@@ -20,7 +20,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -40,7 +40,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+4 -4
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p04x.repl
.. include:: ../Plugin/_plugin_substitutions_p04x.repl
.. _P046_Ventus_W266_page:
Ventus W266
@@ -42,7 +42,7 @@ Specifications (indoor unit):
of the normal builds. If you want to compile ESP Easy with this plugin enabled you
can set the following line in your platformio.ini:
.. code-block:: html
.. code-block:: none
[platformio]
env_default = hard_Ventus_W266
@@ -70,7 +70,7 @@ Wiring
.. image:: P046_Ventus_W266_2.jpg
.. code-block:: html
.. code-block:: none
ESP Ventus
GPIO (4) <--> MOSI
@@ -169,7 +169,7 @@ Indicators (recommended settings)
Rules examples
--------------
.. code-block:: html
.. code-block:: none
on VentusW266#UV do
if [VentusW266#UV]>9
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p04x.repl
.. include:: ../Plugin/_plugin_substitutions_p04x.repl
.. _P047_Soil_moisture_sensor_page:
Soil moisture sensor
@@ -22,7 +22,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -42,7 +42,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p04x.repl
.. include:: ../Plugin/_plugin_substitutions_p04x.repl
.. _P048_Adafruit_Motor_Shield_v2_page:
Adafruit Motor Shield v2
@@ -20,7 +20,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -40,7 +40,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p04x.repl
.. include:: ../Plugin/_plugin_substitutions_p04x.repl
.. _P049_MH-Z19_page:
MH-Z19
@@ -22,7 +22,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -42,7 +42,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p05x.repl
.. include:: ../Plugin/_plugin_substitutions_p05x.repl
.. _P050_TCS34725_page:
TCS34725
@@ -20,7 +20,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -40,7 +40,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p05x.repl
.. include:: ../Plugin/_plugin_substitutions_p05x.repl
.. _P051_AM2320_page:
AM2320
@@ -21,7 +21,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -41,7 +41,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+2 -2
View File
@@ -28,7 +28,7 @@ Wiring
Circuit wiring (S11 seen from top, with the 5 holes left and the 4 holes right):
.. code-block:: html
.. code-block:: none
ESP S11 (UART)
GPIO (14) <--> TX (5th hole of the 5 holes)
@@ -106,7 +106,7 @@ Indicators (recommended settings)
Rules examples
--------------
.. code-block:: html
.. code-block:: none
on CO2#Level do
if [CO2#Level]>2000
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p05x.repl
.. include:: ../Plugin/_plugin_substitutions_p05x.repl
.. _P052_S8_page:
S8
@@ -28,7 +28,7 @@ Wiring
Circuit wiring (S8 seen from PCB side, with the 5 vias down and the 4 vias up):
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (7) <--> TX (3rd via [middle] of the 5 vias)
@@ -95,7 +95,7 @@ Indicators (recommended settings)
Rules examples
--------------
.. code-block:: html
.. code-block:: none
on CO2#Level do
if [CO2#Level]>2000
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p05x.repl
.. include:: ../Plugin/_plugin_substitutions_p05x.repl
.. _P052_tSense_K70_page:
tSense (K70)
@@ -36,7 +36,7 @@ Specifications:
Wiring
------
.. code-block:: html
.. code-block:: none
ESP tSense
GPIO (7) <--> TX (see pictures further down)
@@ -140,7 +140,7 @@ Indicators (recommended settings)
Rules examples
--------------
.. code-block:: html
.. code-block:: none
on CO2#Level do
if [CO2#Level]>2000
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p05x.repl
.. include:: ../Plugin/_plugin_substitutions_p05x.repl
.. _P053_PMSx003_page:
PMSx003
@@ -20,7 +20,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -40,7 +40,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p05x.repl
.. include:: ../Plugin/_plugin_substitutions_p05x.repl
.. _P059_Rotary_Encoder_page:
Rotary Encoder
@@ -20,7 +20,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -40,7 +40,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p06x.repl
.. include:: ../Plugin/_plugin_substitutions_p06x.repl
.. _P063_TTP229-B_page:
TTP229-B
@@ -20,7 +20,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -40,7 +40,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p06x.repl
.. include:: ../Plugin/_plugin_substitutions_p06x.repl
.. _P065_DFPlayer_Mini_page:
DFPlayer Mini
@@ -20,7 +20,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -40,7 +40,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p06x.repl
.. include:: ../Plugin/_plugin_substitutions_p06x.repl
.. _P065_YX5300_page:
YX5300
@@ -20,7 +20,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -40,7 +40,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p07x.repl
.. include:: ../Plugin/_plugin_substitutions_p07x.repl
.. _P073_7_Segment_page:
7 Segment
@@ -20,7 +20,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -40,7 +40,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+3 -3
View File
@@ -1,4 +1,4 @@
.. include:: ../Plugin/_plugin_substitutions_p07x.repl
.. include:: ../Plugin/_plugin_substitutions_p07x.repl
.. _P075_Nextion_page:
Nextion
@@ -20,7 +20,7 @@ Wiring
------
.. code-block:: html
.. code-block:: none
ESP S8
GPIO (X) <--> TX
@@ -40,7 +40,7 @@ Setup
Rules examples
--------------
.. code-block:: html
.. code-block:: none
//Code below...
+2 -2
View File
@@ -46,7 +46,7 @@ The extra argument handles seconds.
See also `Wikipedia - Cron <https://en.wikipedia.org/wiki/Cron>`_ for more detailed information.
.. code-block:: html
.. code-block:: none
┌───────────── seconds (0 - 59)
│ ┌───────────── minute (0 - 59)
@@ -76,7 +76,7 @@ Examples of supported expressions
Expression, input date, next date:
.. code-block:: html
.. code-block:: none
"*/15 * 1-4 * * *", "2012-07-01_09:53:50", "2012-07-02_01:00:00"
"0 */2 1-4 * * *", "2012-07-01_09:00:00", "2012-07-02_01:00:00"
+1 -1
View File
@@ -7,7 +7,7 @@
Will trigger when the cron expression of task named ``foo`` matches the current time.
","
.. code-block:: html
.. code-block:: none
on Cron#foo do
GPIO,2,1 //LED on
+2 -2
View File
@@ -27,7 +27,7 @@ The TX channel from the ESP to the GPS is not needed for this plugin.
The used baudrate is 9600 bps.
.. code-block:: html
.. code-block:: none
ESP Neo-6M (HW Serial0)
GPIO (3/RX/RX0/D9) <--> TXD
@@ -102,7 +102,7 @@ Indicators (recommended settings)
Rules examples
--------------
.. code-block:: html
.. code-block:: none
on GeoPos#Speed do
if [GeoPos#Speed]>50
+2 -2
View File
@@ -28,7 +28,7 @@ The TX channel from the ESP to the GPS is not needed for this plugin.
The used baudrate is 9600 bps.
.. code-block:: html
.. code-block:: none
ESP Neo-7M (HW Serial0)
GPIO (3/RX/RX0/D9) <--> TXD
@@ -103,7 +103,7 @@ Indicators (recommended settings)
Rules examples
--------------
.. code-block:: html
.. code-block:: none
on GeoPos#Speed do
if [GeoPos#Speed]>50
+2 -2
View File
@@ -30,7 +30,7 @@ The TX channel from the ESP to the GPS is not needed for this plugin.
The used baudrate is 9600 bps.
.. code-block:: html
.. code-block:: none
ESP Neo-M8n (HW Serial0)
GPIO (3/RX/RX0/D9) <--> TXD
@@ -105,7 +105,7 @@ Indicators (recommended settings)
Rules examples
--------------
.. code-block:: html
.. code-block:: none
on GeoPos#Speed do
if [GeoPos#Speed]>50
+3 -3
View File
@@ -7,7 +7,7 @@
Will trigger when the GPS unit got a good position from the satellites.
","
.. code-block:: html
.. code-block:: none
on GPS#GotFix do
GPIO,2,1 //LED on
@@ -19,7 +19,7 @@
Will trigger when the GPS unit is not having a good position from the satellites.
","
.. code-block:: html
.. code-block:: none
on GPS#LostFix do
GPIO,2,0 //LED off
@@ -32,7 +32,7 @@
This means the total travel distance can be more if the GPS does not move in a straight line.
","
.. code-block:: html
.. code-block:: none
on GPS#travelled do
LogEntry,'Travelled %eventvalue% meter'
+1 -1
View File
@@ -41,7 +41,7 @@ For some controllers or dataset types it is not necessary to acknowledge the new
Example Rules for every value / event type
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: html
.. code-block:: none
// The "homie controller" schedules the event defined in the plug-in.
// Does NOT store string values or arrays in the "homie receiver" plug-in.
+1 -1
View File
@@ -89,7 +89,7 @@ Commands
.. Events
.. ~~~~~~
.. include:: P093_events.repl
.. This file is missing. (remove up to 'include' when fixed) include:: P093_events.repl
Example
-------
+59 -59
View File
@@ -1,69 +1,69 @@
.. csv-table::
:header: "Command", "Extra information"
:widths: 20, 30
:header: "Command", "Extra information"
:widths: 20, 30
"
``TFTCMD,<tftcmd_subcommand>``
","
Control the screen (on, off, clear,..)
"
``TFTCMD,<tftcmd_subcommand>``
","
Control the screen (on, off, clear,..)
Examples:
Examples:
- ``tftcmd,on`` Switch display on.
- ``tftcmd,off`` Switch display off.
- ``tftcmd,clear`` Clear whole display.
- ``tftcmd,clear,green`` Clear whole display with green color.
- ``tftcmd,inv,1`` Invert the dispaly (value:0 normal display, 1 inverted display)
- ``tftcmd,rot,2`` Rotate display (value from 0 to 3 inclusive)
"
"
``TFT,<tft_subcommand>,....``
","
Draw line, rect, circle, triangle and text
Subcommands:
- ``tft,txt,<text>`` Write simple text (use last position, color and size)
- ``tft,txp,<X>,<Y>`` Set text position (move the cursor)
- ``tft,txc,<foreColor>,<backgroundColor>`` Set text color (background is transparent if not provided
- ``tft,txs,<SIZE>`` Set text size
- ``tft,txtfull,<row>,<col>,<size=1>,<foreColor=white>,<backColor=black>,<text>`` Write text with all options
- ``tft,l,<x1>,<y1>,<2>,<y2>,<color>`` Draw a simple line
- ``tft,lh,<y>,<width>,<color>`` Draw an horizontal line (width = Line width in pixels (positive = right of first point, negative = point of first corner).
- ``tft,lv,<x>,<height>,<color>`` Draw a vertical line (height= Line height in pixels (positive = below first point, negative = above first point).
- ``tft,r,<x>,<y>,<width>,<height>,<color>`` Draw a rectangle
- ``tft,rf,<x>,<y>,<width>,<height>,<bordercolor>,<innercolor>`` Draw a filled rectangle
- ``tft,c,<x>,<y>,<radius>,<color>`` Draw a circle
- ``tft,cf,<x>,<y>,<radius>,<bordercolor>,<innercolor>`` Draw a filled circle
- ``tft,t,<x1>,<y1>,<x2>,<y2>,<x3>,<y3>,<color>| Draw a triangle
- ``tft,tf,<x1>,<y1>,<x2>,<y2>,<x3>,<y3>,<bordercolor>,<innercolor>`` Draw a filled triangle
- ``tft,rr,<x>,<y>,<width>,<height>,<corner_radius>,<color>`` Draw a round rectangle
- ``tft,rrf,<x>,<y>,<width>,<height>,<corner_radius>,<bordercolor>,<innercolor>`` Draw a filled round rectangle
- ``tft,px,<x>,<y>,<color>`` Print a single pixel
- ``tft,font,<fontname> `` Switch to font - SEVENSEG24, SEVENSEG18, FREESANS, DEFAULT
- ``tftcmd,on`` Switch display on.
- ``tftcmd,off`` Switch display off.
- ``tftcmd,clear`` Clear whole display.
- ``tftcmd,clear,green`` Clear whole display with green color.
- ``tftcmd,inv,1`` Invert the dispaly (value:0 normal display, 1 inverted display)
- ``tftcmd,rot,2`` Rotate display (value from 0 to 3 inclusive)
"
"
``TFT,<tft_subcommand>,....``
","
Draw line, rect, circle, triangle and text
Subcommands:
- ``tft,txt,<text>`` Write simple text (use last position, color and size)
- ``tft,txp,<X>,<Y>`` Set text position (move the cursor)
- ``tft,txc,<foreColor>,<backgroundColor>`` Set text color (background is transparent if not provided
- ``tft,txs,<SIZE>`` Set text size
- ``tft,txtfull,<row>,<col>,<size=1>,<foreColor=white>,<backColor=black>,<text>`` Write text with all options
- ``tft,l,<x1>,<y1>,<2>,<y2>,<color>`` Draw a simple line
- ``tft,lh,<y>,<width>,<color>`` Draw an horizontal line (width = Line width in pixels (positive = right of first point, negative = point of first corner).
- ``tft,lv,<x>,<height>,<color>`` Draw a vertical line (height= Line height in pixels (positive = below first point, negative = above first point).
- ``tft,r,<x>,<y>,<width>,<height>,<color>`` Draw a rectangle
- ``tft,rf,<x>,<y>,<width>,<height>,<bordercolor>,<innercolor>`` Draw a filled rectangle
- ``tft,c,<x>,<y>,<radius>,<color>`` Draw a circle
- ``tft,cf,<x>,<y>,<radius>,<bordercolor>,<innercolor>`` Draw a filled circle
- ``tft,t,<x1>,<y1>,<x2>,<y2>,<x3>,<y3>,<color>`` Draw a triangle
- ``tft,tf,<x1>,<y1>,<x2>,<y2>,<x3>,<y3>,<bordercolor>,<innercolor>`` Draw a filled triangle
- ``tft,rr,<x>,<y>,<width>,<height>,<corner_radius>,<color>`` Draw a round rectangle
- ``tft,rrf,<x>,<y>,<width>,<height>,<corner_radius>,<bordercolor>,<innercolor>`` Draw a filled round rectangle
- ``tft,px,<x>,<y>,<color>`` Print a single pixel
- ``tft,font,<fontname>`` Switch to font - SEVENSEG24, SEVENSEG18, FREESANS, DEFAULT
"
Examples:
Examples:
Write Text :
``tft,txtfull,0,0,HelloWorld``
Write Text another place:
``tft,txtfull,100,40,HelloWorld``
Write Text :
``tft,txtfull,0,0,HelloWorld``
Write bigger Text :
``tft,txtfull,0,0,3,HelloWorld``
Write Text another place:
``tft,txtfull,100,40,HelloWorld``
Write RED Text :
``tft,txtfull,0,0,3,HelloWorld``
Write bigger Text :
``tft,txtfull,0,0,3,HelloWorld``
Write RED Text (size is 1):
``tft,txtfull,0,0,1,RED,HelloWorld``
Write RED Text :
``tft,txtfull,0,0,3,HelloWorld``
Write RED Text on YELLOW background (size is 1):
``tft,txtfull,0,0,1,RED,YELLOW,HelloWorld``
Select font :
``tft,font,SEVENSEG24``
``tft,txtfull,0,0,1,RED,17.0 ``
"
Write RED Text (size is 1):
``tft,txtfull,0,0,1,RED,HelloWorld``
Write RED Text on YELLOW background (size is 1):
``tft,txtfull,0,0,1,RED,YELLOW,HelloWorld``
Select font :
- ``tft,font,SEVENSEG24``
- ``tft,txtfull,0,0,1,RED,17.0``
+3 -3
View File
@@ -8,7 +8,7 @@
The regular events like in every other task. Only difference here is that you may have an event either when the touch pad is touched, released or both.
","
.. code-block:: html
.. code-block:: none
on touch#Touch do
GPIO,2,1 //LED on
@@ -21,7 +21,7 @@
When enabled, this event will be sent on release of the touch pad. The event variable is the time in msec the pad had been touched.
","
.. code-block:: html
.. code-block:: none
on touch#Duration do
LogEntry,'Touch Duration %eventvalue% ms'
@@ -29,7 +29,7 @@
Example in the log:
.. code-block:: html
.. code-block:: none
6553261 : Info : Touch : ADC2 ch5 (T5): 10
6553338 : Info : EVENT: touch#Touch=10.00
+2 -2
View File
@@ -20,7 +20,7 @@ Specifications:
Wiring
------
.. code-block:: html
.. code-block:: none
ESP UNIT
GPIO (X) <--> A
@@ -73,7 +73,7 @@ Indicators (recommended settings)
Rules examples
--------------
.. code-block:: html
.. code-block:: none
on TASK#VALUE do
if [TASK#VALUE]>999
+1 -1
View File
@@ -4,7 +4,7 @@ RTC Reference
The ESP microprocessors we use, have some special memory which will retain its information as long as the node remains powered.
Espressif calls this _RTC_ RAM and thus we're using the same term for it.
The name may be a bit strange, as RTC usually refers to _Real Time Clock_.
The name may be a bit strange, as RTC usually refers to *Real Time Clock*.
Currently we only support RTC functions on the ESP8266 and ESP8285.
ESP32 does also have RTC memory, but that's organised a bit different.
+148 -148
View File
@@ -51,79 +51,79 @@ Syntax
The syntax of a rule can be single line:
.. code-block:: html
.. code-block:: none
on <trigger> do <action> endon
on <trigger> do <action> endon
or multi-line (need to be closed with an "endon"):
.. code-block:: html
.. code-block:: none
on <trigger> do
<action>
<action>
<action>
endon
on <trigger> do
<action>
<action>
<action>
endon
IF/ELSE - IF/ELSEIF/ELSE
------------------------
Also simple if ... else ... statements are possible:
.. code-block:: html
.. code-block:: none
on <trigger> do
if <test>
<action>
<action>
else
<action>
endif
endon
on <trigger> do
if <test>
<action>
<action>
else
<action>
endif
endon
If the "else" part is not needed it can be removed:
.. code-block:: html
.. code-block:: none
on <trigger> do
if <test>
<action>
<action>
endif
endon
on <trigger> do
if <test>
<action>
<action>
endif
endon
Also more complex if ... elseif ... else statements are possible (multiple elseif's can be used)
.. code-block:: html
.. code-block:: none
on <trigger> do
if <test1>
<action>
<action>
elseif <test2>
<action>
<action>
else
<action>
endif
endon
on <trigger> do
if <test1>
<action>
<action>
elseif <test2>
<action>
<action>
else
<action>
endif
endon
Again, if the "else" part is not needed it can be removed:
.. code-block:: html
.. code-block:: none
on <trigger> do
if <test1>
<action>
<action>
elseif <test2>
<action>
<action>
elseif <test3>
<action>
<action>
endif
endon
on <trigger> do
if <test1>
<action>
<action>
elseif <test2>
<action>
<action>
elseif <test3>
<action>
<action>
endif
endon
AND/OR
------
@@ -135,55 +135,55 @@ consumption of stack space (IRAM). Depending on plug-ins in use this might
lead to unpredictable, unreliable behavior, advice is not to exceed 3 levels
of nesting.
.. code-block:: html
.. code-block:: none
on <trigger> do
if <test1>
event,<EventName1>
endif
endon
on <EventName1> do
if <test2>
<action>
endif
endon
on <trigger> do
if <test1>
event,<EventName1>
endif
endon
on <EventName1> do
if <test2>
<action>
endif
endon
As of mega-201803.. we have the possibility to use AND/OR:
.. code-block:: html
.. code-block:: none
on test do
if [test#a]=0 or [test#b]=0 or [test#c]=0
event,ok
else
event,not_ok
endif
endon
on test2 do
if [test#a]=1 and [test#b]=1 and [test#c]=1
event,ok
else
event,not_ok
endif
endon
on test3 do
if [test#a]=1 and [test#b]=1 or [test#c]=0
event,ok
else
event,not_ok
endif
endon
on test4 do
if [test#a]=0
event,ok
else
event,not_ok
endif
endon
on test do
if [test#a]=0 or [test#b]=0 or [test#c]=0
event,ok
else
event,not_ok
endif
endon
on test2 do
if [test#a]=1 and [test#b]=1 and [test#c]=1
event,ok
else
event,not_ok
endif
endon
on test3 do
if [test#a]=1 and [test#b]=1 or [test#c]=0
event,ok
else
event,not_ok
endif
endon
on test4 do
if [test#a]=0
event,ok
else
event,not_ok
endif
endon
Up to two AND/OR can be used per if statement, that means that you can test
three float values and if the statement is true/false corresponding action will take place.
@@ -191,13 +191,13 @@ three float values and if the statement is true/false corresponding action will
Trigger
-------
.. code-block:: html
.. code-block:: none
<trigger>
The trigger can be an device value being changed:
.. code-block:: html
.. code-block:: none
DeviceName#ValueName
@@ -206,13 +206,13 @@ Operator (inequality function)
Or a inequality function:
.. code-block:: html
.. code-block:: none
DeviceName#ValueName<inequality function><value>
Where the "inequality function" is a simple check:
.. code-block:: html
.. code-block:: none
equal (=) to
less (<) than
@@ -240,14 +240,14 @@ boot/reboot/time/sleep etc. of the unit:
Test
----
.. code-block:: html
.. code-block:: none
<test>
As described in the trigger section the test is a check done by checking
if the DeviceName#ValueName is meeting a criteria:
.. code-block:: html
.. code-block:: none
[DeviceName#ValueName]<inequality function><value>
@@ -257,7 +257,7 @@ DeviceName#ValueName is closed by (square) brackets "[" and "]".
Action
------
.. code-block:: html
.. code-block:: none
<action>
@@ -272,7 +272,7 @@ Comment
If you want you can add comments to any row in your rules code. Just
remember to add them after the code and always begin with "//":
.. code-block:: html
.. code-block:: none
on <trigger> do //If this happens then do that...
if <test>
@@ -356,13 +356,13 @@ In order to allow the comma or space in a parameter, you can wrap the parameter
There are multiple quotes available for this, to be able to use "the other quote" in your parameter.
For example in JSON, you need the double quote for string like values or keys.
.. code-block:: html
.. code-block:: none
Publish domoticz/in,{"idx":26,"nvalue":0,"svalue":"[AQ#TVOC]"}
This can be fixed by wrapping the last parameter with single quotes like this:
.. code-block:: html
.. code-block:: none
Publish domoticz/in,'{"idx":26,"nvalue":0,"svalue":"[AQ#TVOC]"}'
@@ -459,7 +459,7 @@ The position arguments are the same as in Arduino ``String::substring`` , meanin
For example:
.. code-block:: html
.. code-block:: none
on DS-1#Temperature do
logentry,{substring:0:1:%eventvalue%}
@@ -470,7 +470,7 @@ For example:
The ``%eventvalue%`` may contain the value "23.06"
The output in the log will then be:
.. code-block:: html
.. code-block:: none
1512372 : Info : EVENT: DS-1#Temperature=23.06
1512404 : Info : ACT : logentry,2
@@ -488,13 +488,13 @@ N.B. it is also possible to concatenate these and refer to ``{taskname#varname}`
For example (bit useless example, just for illustrative purposes):
.. code-block:: html
.. code-block:: none
on DS-1#Temperature do
logentry,{substring:0:2:{strtol:16:{substring:0:2:[DS-1#Temperature]}{substring:3:5:[DS-1#Temperature]}}}
endon
.. code-block:: html
.. code-block:: none
221313 : Info : EVENT: DS-1#Temperature=22.13
221346 : Info : parse_string_commands cmd: substring:0:2:22.13 -> 22
@@ -515,14 +515,14 @@ Usage: ``{strtol:16:<string>}`` to convert HEX (base 16) into an integer value.
Example of extracting sub strings from a value and interpreting as if they were HEX values:
.. code-block:: html
.. code-block:: none
on DS-1#Temperature do
logentry,{strtol:16:%eventvalue%}
logentry,{strtol:16:{substring:3:5:%eventvalue%}}
endon
.. code-block:: html
.. code-block:: none
1987550 : Info : EVENT: DS-1#Temperature=24.12
1987586 : Info : ACT : logentry,36
@@ -566,7 +566,7 @@ Last but not least the fraction is not correct, it needs to be divided by 256 (a
Complete rule used to parse this and set a variable in a dummy device:
.. code-block:: html
.. code-block:: none
// Room temperature
on !Serial#T1018* do
@@ -583,7 +583,7 @@ Usage: ``{ord:<string>}``
For example:
.. code-block:: html
.. code-block:: none
on DS-1#Temperature do
logentry,{ord:A} // ASCII value of 'A'
@@ -591,7 +591,7 @@ For example:
endon
.. code-block:: html
.. code-block:: none
2982455 : Info : EVENT: DS-1#Temperature=23.12
2982487 : Info : ACT : logentry,65
@@ -626,7 +626,7 @@ Regarding spaces in names it is recommended to NOT use them as it makes bug
testing rules a lot harder. Spaces between chunks of code is possible to make
the code more readable:
.. code-block:: html
.. code-block:: none
[DeviceName#ValueName]<<value> //These work...
[DeviceName#ValueName] < <value> //the same...
@@ -647,14 +647,14 @@ TaskValueSet
Dummy Device is a single way to store and read value on variable.
Just create Generic - Dummy Device and variables inside it.
.. code-block:: html
.. code-block:: none
TaskValueSet,TASKnr,VARnr,Value
This example for two switches that toggle one device (LED and Relay on GPIO 13 and 16).
.. code-block:: html
.. code-block:: none
on sw1#state do
if [dummy#var1]=0
@@ -688,7 +688,7 @@ For the Unix time there are now 2 variables included:
Here some example used to store the Unix time in the dummy plugin to keep track of actions.
The values stored in the Dummy variables will be kept and restored on a crash/reboot as long as the ESP remains powered.
.. code-block:: html
.. code-block:: none
if [DT#YMD]=0 and %unixday%>0
taskvalueset,7,1,%unixday%-1
@@ -715,7 +715,7 @@ the '=' sign, up to four values are possible).
Sample rules section:
.. code-block:: html
.. code-block:: none
on remoteTimerControl do
timerSet,1,%eventvalue%
@@ -723,7 +723,7 @@ Sample rules section:
Now send this command to the ESP:
.. code-block:: html
.. code-block:: none
http://<espeasyip>/control?cmd=event,remoteTimerControl=5
@@ -747,7 +747,7 @@ the value of the Dummy device as condition in if-statement within rules.
Multiple event values:
.. code-block:: html
.. code-block:: none
on ToggleGPIO do
GPIO,%eventvalue1%,%eventvalue2%
@@ -755,7 +755,7 @@ Multiple event values:
You could then use the command "ToggleGPIO" with dynamic GPIO numbers and state.
.. code-block:: html
.. code-block:: none
http://<espeasyip>/control?cmd=event,ToggleGPIO=12,1
@@ -764,7 +764,7 @@ Internal variables
A really great feature to use is the 16 internal variables. You set them like this:
.. code-block:: html
.. code-block:: none
Let,<n>,<value>
@@ -781,7 +781,7 @@ remove the jumpiness with hardware you might want to add a filter in the softwar
A **10 value average**:
.. code-block:: html
.. code-block:: none
On Temp#Value Do
Let,10,[VAR#9]
@@ -805,7 +805,7 @@ value instead of the sensor value.
Another filter could be to just use the previous value and **dilute** the new value with that one:
.. code-block:: html
.. code-block:: none
On Temp#Value Do
Let,2,[VAR#1]
@@ -816,7 +816,7 @@ Another filter could be to just use the previous value and **dilute** the new va
Yet another filter could be to add the new value to a **summarized average**:
.. code-block:: html
.. code-block:: none
On Temp#Value Do
Let,1,[Temp#Value]
@@ -830,7 +830,7 @@ one suits your actual scenario the best.
PIR and LDR
-----------
.. code-block:: html
.. code-block:: none
On PIR#State do
if [LDR#Light]<500
@@ -843,7 +843,7 @@ PIR and LDR
In other words: If the PIR switch is set (to either 1 or 0) and if
the light value < 500, then set GPIO port 16 of the ESP.
.. code-block:: html
.. code-block:: none
on PIR#State=1 do
if [LDR#Light]<500
@@ -856,7 +856,7 @@ Now the event is only triggered when the PIR switches on.
SR04 and LDR
------------
.. code-block:: html
.. code-block:: none
on SR04#range<100 do
if [ldr#lux]<500
@@ -875,7 +875,7 @@ Timer
Until 2020/08/12, there were 8 timers. (1-8)
Builds made after this date support 256 timers. (1-256)
.. code-block:: html
.. code-block:: none
On System#Boot do //When the ESP boots, do
servo,1,12,0
@@ -947,7 +947,7 @@ Starting/stopping repeating timers with events
To disable an existing timer, set it to 0. This is useful to make repeating
timers for things like alarms or warnings:
.. code-block:: html
.. code-block:: none
//start the warning signal when we receive a start_warning event:
On start_warning do
@@ -971,7 +971,7 @@ timers for things like alarms or warnings:
To start or stop the warning signal use http:
.. code-block:: html
.. code-block:: none
http://<espeasyip>/control?cmd=event,start_warning
http://<espeasyip>/control?cmd=event,stop_warning
@@ -981,14 +981,14 @@ HTTP call
When you enter this first command with the correct IP address in the URL of your browser:
.. code-block:: html
.. code-block:: none
http://<espeasyip>/control?cmd=event,startwatering
http://<espeasyip>/control?cmd=event,stopwatering
And have this rule in the addressed ESP:
.. code-block:: html
.. code-block:: none
On startwatering do
gpio,12,1 //start watering (open valve)
@@ -1022,7 +1022,7 @@ SendTo: SendTo <unit>,<command>
Imagine you have two ESP Easy modules, ESP#1 and ESP#2
In the Rules section of ESP#1 you have this:
.. code-block:: html
.. code-block:: none
on demoEvent do
sendTo,2,event,startwatering //(to use the previous example.)
@@ -1032,7 +1032,7 @@ And ESP#2 has the rules according to the previous example (givemesomewater)
If you then enter this with the correct IP address in the URL of your browser:
.. code-block:: html
.. code-block:: none
http://<ESP#1-ip >/control?cmd=event,demoEvent
@@ -1040,7 +1040,7 @@ Then ESP#1 shall send the event 'startwatering ' to ESP#2.
It is also possible to directly order GPIO changes, like:
.. code-block:: html
.. code-block:: none
on demoEvent do
sendTo,2,GPIO,2,1
@@ -1049,7 +1049,7 @@ It is also possible to directly order GPIO changes, like:
Publish
.. code-block:: html
.. code-block:: none
Publish,<topic>,<value>
@@ -1060,7 +1060,7 @@ Time
With Rules you can also start or stop actions on a given day and time, or even on every day.
.. code-block:: html
.. code-block:: none
On Clock#Time=All,18:25 do // every day at 18:25 hours do ...
gpio,14,0
@@ -1068,7 +1068,7 @@ With Rules you can also start or stop actions on a given day and time, or even o
Or for a specific day:
.. code-block:: html
.. code-block:: none
On Clock#Time=Sun,18:25 do // for Sunday, but All, Sun, Mon, Tue, Wed, Thu, Fri, Sat will do.
gpio,14,0
@@ -1077,7 +1077,7 @@ Or for a specific day:
It is also possible to use the system value %systime% in rules conditions
to make things happen during certain hours of the day:
.. code-block:: html
.. code-block:: none
On Pir#State=1 do
If %systime% < 07:00:00
@@ -1097,7 +1097,7 @@ SendToHTTP
To send a message to another device, like a command to switch on a light to Domoticz
.. code-block:: html
.. code-block:: none
On System#Boot do //When the ESP boots, do
timerSet,1,10 //Set Timer 1 for the next event in 10 seconds
@@ -1111,7 +1111,7 @@ Many users have reported problems with commands being truncated, particularly
when trying to send commands to Domoticz. It seems to be a parsing error.
There is the following workaround:
.. code-block:: html
.. code-block:: none
SendToHTTP 192.168.0.243,8080,/json.htm?type=param=switchlight&command&idx=174&switchcmd=On
@@ -1127,7 +1127,7 @@ different i2c addresses.
For dew point on the 'outside':
.. code-block:: html
.. code-block:: none
on TempHumidityPressure_OUTSIDE#%RH do
TaskValueSet,7,1,[TempHumidityPressure_OUTSIDE#°C]-(100-[TempHumidityPressure_OUTSIDE#%RH])/5 // "7" is the number of the task that the dummy device is on, "1" is its first value where we dump our result
@@ -1140,7 +1140,7 @@ For dew point on the 'outside':
For dew point on the 'inside':
.. code-block:: html
.. code-block:: none
on TempHumidityPressure_INSIDE#%RH do
TaskValueSet,7,2,[TempHumidityPressure_INSIDE#°C]-(100-[TempHumidityPressure_INSIDE#%RH])/5 // "7" is the number of the task that the dummy device is on, "2" is its second value where we dump our result
@@ -1158,7 +1158,7 @@ Report IP every 30 seconds using MQTT
This rule also work as a ping or heart beat of the unit. If it has not
published a IP number for 30+ seconds the unit is experiencing problems.
.. code-block:: html
.. code-block:: none
On System#Boot do //When the ESP boots, do
Publish,%sysname%/IP,%ip%
@@ -1181,7 +1181,7 @@ just as an example we want to publish these as custom messages with a unique IDX
*MQTT*
.. code-block:: html
.. code-block:: none
on INA219#Amps do
Publish domoticz/in,{"idx":123456,"nvalue":0,"svalue":"[INA219#Amps]"} //Own made up IDX 123456
@@ -1194,7 +1194,7 @@ just as an example we want to publish these as custom messages with a unique IDX
*HTTP*
.. code-block:: html
.. code-block:: none
on INA219#Amps do
SendToHTTP 192.168.1.2,8080,/json.htm?type=command&param=udevice&idx=123456&nvalue=0&svalue=[INA219#Amps] //Own made up IDX 123456
@@ -1215,7 +1215,7 @@ Using a "normal switch" device which is in this example normally set to low
(0) you can make one of two actions when pressed. If you either release the
button in less than a second or press it for more than a second:
.. code-block:: html
.. code-block:: none
on Button#State=1 do
timerSet,1,1
@@ -1234,7 +1234,7 @@ Calculating water consumption
Using the pulse counter you can calculate and act on waterflow and changes like this:
.. code-block:: html
.. code-block:: none
On System#Boot do // When the ESP boots, do
TaskValueSet,3,1,0 // TaskValueSet TASKnr,VARnr,Value, Reset the Liters counter to 0
+1
View File
@@ -13,6 +13,7 @@ Welcome to ESP Easy's documentation!
ESPEasy/AboutUs.rst
ESPEasy/FunctionBlocks.rst
Controller/_Controller.rst
Hardware/Hardware.rst
Plugin/_Plugin.rst
Rules/Rules.rst
Tools/Tools.rst
+8
View File
@@ -206,6 +206,14 @@ platform_packages = ${regular_platform.platform_packages}
build_flags = ${regular_platform.build_flags}
${esp8266_4M1M.build_flags}
[env:normal_ESP8266_4M1M_VCC]
extends = esp8266_4M1M
platform = ${regular_platform.platform}
platform_packages = ${regular_platform.platform_packages}
build_flags = ${regular_platform.build_flags}
${esp8266_4M1M.build_flags}
-D FEATURE_ADC_VCC=true
[env:normal_alt_wifi_ESP8266_4M1M]
extends = esp8266_4M1M
platform = ${regular_platform_alt_wifi.platform}
+9 -3
View File
@@ -419,22 +419,28 @@ void SendStatus(EventValueSource::Enum source, const String& status)
#ifdef USES_MQTT
bool MQTT_queueFull(controllerIndex_t controller_idx) {
if (MQTTDelayHandler == nullptr) {
return true;
}
MQTT_queue_element dummy_element;
dummy_element.controller_idx = controller_idx;
if (MQTTDelayHandler.queueFull(dummy_element)) {
if (MQTTDelayHandler->queueFull(dummy_element)) {
// The queue is full, try to make some room first.
processMQTTdelayQueue();
return MQTTDelayHandler.queueFull(dummy_element);
return MQTTDelayHandler->queueFull(dummy_element);
}
return false;
}
bool MQTTpublish(controllerIndex_t controller_idx, const char *topic, const char *payload, bool retained)
{
if (MQTTDelayHandler == nullptr) {
return false;
}
if (MQTT_queueFull(controller_idx)) {
return false;
}
const bool success = MQTTDelayHandler.addToQueue(MQTT_queue_element(controller_idx, topic, payload, retained));
const bool success = MQTTDelayHandler->addToQueue(MQTT_queue_element(controller_idx, topic, payload, retained));
scheduleNextMQTTdelayQueue();
return success;
}
+1 -1
View File
@@ -20,7 +20,7 @@
#endif // if defined(ESP32)
#define BUILD 20109 // git version e.g. "20103" can be read as "2.1.03" (stored in int16_t)
#define BUILD 20110 // git version e.g. "20103" can be read as "2.1.03" (stored in int16_t)
#if defined(ESP8266)
# define BUILD_NOTES " - Mega"
#endif // if defined(ESP8266)
+2
View File
@@ -37,6 +37,8 @@
#define PLUGIN_GET_PACKED_RAW_DATA 30 // Return all data in a compact binary format specific for that plugin.
// Needs USES_PACKED_RAW_DATA
#define PLUGIN_ONLY_TIMER_IN 31
#define PLUGIN_WEBFORM_SHOW_I2C_PARAMS 32
// ********************************************************************************

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