diff --git a/docs/source/Controller/C014.rst b/docs/source/Controller/C014.rst index 9662e9c37..3fbb1ea15 100644 --- a/docs/source/Controller/C014.rst +++ b/docs/source/Controller/C014.rst @@ -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) diff --git a/docs/source/Plugin/P000_Buzzer_RTTTL.rst b/docs/source/Plugin/P000_Buzzer_RTTTL.rst index a3ac8a226..11c0d77da 100644 --- a/docs/source/Plugin/P000_Buzzer_RTTTL.rst +++ b/docs/source/Plugin/P000_Buzzer_RTTTL.rst @@ -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 @@ -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 `_ (don't forget to remove the spaces and replace # with -, this might be fixed in future releases): -.. code-block:: html +.. code-block:: none http:///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:///control?cmd=tone,14,1300,200 diff --git a/docs/source/Plugin/P000_Level_converter.rst b/docs/source/Plugin/P000_Level_converter.rst index 9695e8086..77e64641d 100644 --- a/docs/source/Plugin/P000_Level_converter.rst +++ b/docs/source/Plugin/P000_Level_converter.rst @@ -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. diff --git a/docs/source/Plugin/P000_Piezo_element_RTTTL.rst b/docs/source/Plugin/P000_Piezo_element_RTTTL.rst index 1c3daaa17..cd28215a0 100644 --- a/docs/source/Plugin/P000_Piezo_element_RTTTL.rst +++ b/docs/source/Plugin/P000_Piezo_element_RTTTL.rst @@ -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 @@ -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 `_ (don't forget to remove the spaces and replace # with -, this might be fixed in future releases): -.. code-block:: html +.. code-block:: none http:///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:///control?cmd=tone,14,1300,200 diff --git a/docs/source/Plugin/P000_Relay.rst b/docs/source/Plugin/P000_Relay.rst index 25829d3a0..5208426db 100644 --- a/docs/source/Plugin/P000_Relay.rst +++ b/docs/source/Plugin/P000_Relay.rst @@ -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 diff --git a/docs/source/Plugin/P000_Servo_motor.rst b/docs/source/Plugin/P000_Servo_motor.rst index 5a7cfb410..8f813e3d1 100644 --- a/docs/source/Plugin/P000_Servo_motor.rst +++ b/docs/source/Plugin/P000_Servo_motor.rst @@ -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 diff --git a/docs/source/Plugin/P000_Speaker_RTTTL.rst b/docs/source/Plugin/P000_Speaker_RTTTL.rst index d4fbad20d..67c860fda 100644 --- a/docs/source/Plugin/P000_Speaker_RTTTL.rst +++ b/docs/source/Plugin/P000_Speaker_RTTTL.rst @@ -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 @@ -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 `_ (don't forget to remove the spaces and replace # with -, this might be fixed in future releases): -.. code-block:: html +.. code-block:: none http:///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:///control?cmd=tone,14,1300,200 diff --git a/docs/source/Plugin/P000_commands.repl b/docs/source/Plugin/P000_commands.repl index 48ddff51d..3ed59d198 100644 --- a/docs/source/Plugin/P000_commands.repl +++ b/docs/source/Plugin/P000_commands.repl @@ -170,7 +170,7 @@ Example output: - .. code-block:: html + .. code-block:: none 4500043 : Info : Command: i2cscanner I2C : Found 0x3c @@ -221,7 +221,7 @@ Example output: - .. code-block:: html + .. code-block:: none 4306250 : Info : Command: meminfo SecurityStruct | 593 @@ -531,7 +531,7 @@ Try to use AsyncEvents where possible, to keep rules processing times low. **Rules example** - .. code-block:: html + .. code-block:: none on SingleEvent do Publish,%sysname%/Info,A single event has been triggered! @@ -544,7 +544,7 @@ Try to use AsyncEvents where possible, to keep rules processing times low. **Rules example** - .. code-block:: html + .. code-block:: none on SingleValue do Publish,%sysname%/Info,An event has been sent (%eventvalue%)! @@ -558,7 +558,7 @@ Try to use AsyncEvents where possible, to keep rules processing times low. **Rules example** - .. code-block:: html + .. code-block:: none on Multi do if %eventvalue4%=99 diff --git a/docs/source/Plugin/P000_events.repl b/docs/source/Plugin/P000_events.repl index 8b8c5d45b..6a661d132 100644 --- a/docs/source/Plugin/P000_events.repl +++ b/docs/source/Plugin/P000_events.repl @@ -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 diff --git a/docs/source/Plugin/P001_Door_switch.rst b/docs/source/Plugin/P001_Door_switch.rst index d4684df18..731803b69 100644 --- a/docs/source/Plugin/P001_Door_switch.rst +++ b/docs/source/Plugin/P001_Door_switch.rst @@ -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 diff --git a/docs/source/Plugin/P001_PIR_sensor.rst b/docs/source/Plugin/P001_PIR_sensor.rst index 3d2356f74..f1039485b 100644 --- a/docs/source/Plugin/P001_PIR_sensor.rst +++ b/docs/source/Plugin/P001_PIR_sensor.rst @@ -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 diff --git a/docs/source/Plugin/P001_Switch.rst b/docs/source/Plugin/P001_Switch.rst index f21726b6a..25d251447 100644 --- a/docs/source/Plugin/P001_Switch.rst +++ b/docs/source/Plugin/P001_Switch.rst @@ -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 diff --git a/docs/source/Plugin/P002_ESP82XX_internal.rst b/docs/source/Plugin/P002_ESP82XX_internal.rst index 170b8b783..f4aec11e0 100644 --- a/docs/source/Plugin/P002_ESP82XX_internal.rst +++ b/docs/source/Plugin/P002_ESP82XX_internal.rst @@ -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... diff --git a/docs/source/Plugin/P002_PCF8591.rst b/docs/source/Plugin/P002_PCF8591.rst index 0c4087234..ba455d43e 100644 --- a/docs/source/Plugin/P002_PCF8591.rst +++ b/docs/source/Plugin/P002_PCF8591.rst @@ -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... diff --git a/docs/source/Plugin/P002_Photosensitive_resistor.rst b/docs/source/Plugin/P002_Photosensitive_resistor.rst index f177bd5a0..672c4a68f 100644 --- a/docs/source/Plugin/P002_Photosensitive_resistor.rst +++ b/docs/source/Plugin/P002_Photosensitive_resistor.rst @@ -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... diff --git a/docs/source/Plugin/P003_LJ12A3.rst b/docs/source/Plugin/P003_LJ12A3.rst index 4046fcc63..cb6b5ebd5 100644 --- a/docs/source/Plugin/P003_LJ12A3.rst +++ b/docs/source/Plugin/P003_LJ12A3.rst @@ -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 diff --git a/docs/source/Plugin/P003_TCR5000.rst b/docs/source/Plugin/P003_TCR5000.rst index e9f9c6487..f24d63512 100644 --- a/docs/source/Plugin/P003_TCR5000.rst +++ b/docs/source/Plugin/P003_TCR5000.rst @@ -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 diff --git a/docs/source/Plugin/P003_YFS401.rst b/docs/source/Plugin/P003_YFS401.rst index eef9fde94..7b744242b 100644 --- a/docs/source/Plugin/P003_YFS401.rst +++ b/docs/source/Plugin/P003_YFS401.rst @@ -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 diff --git a/docs/source/Plugin/P004_DS18b20.rst b/docs/source/Plugin/P004_DS18b20.rst index 1ff49ee3c..7c24362b1 100644 --- a/docs/source/Plugin/P004_DS18b20.rst +++ b/docs/source/Plugin/P004_DS18b20.rst @@ -1,4 +1,4 @@ -.. include:: ../Plugin/_plugin_substitutions_p00x.repl +.. include:: ../Plugin/_plugin_substitutions_p00x.repl .. _P004_DS18b20_page: DS18b20 @@ -32,7 +32,7 @@ Wiring .. image:: P004_DS18b20_5.jpg -.. code-block:: html +.. code-block:: none ESP DS18b20 GPIO (14) <--> 1-wire/D (yellow) @@ -106,7 +106,7 @@ Indicators (recommended settings) Rules examples -------------- -.. code-block:: html +.. code-block:: none On Temp1#Celsius Do If [Temp1#Celsius]>37 diff --git a/docs/source/Plugin/P005_DHT11_DHT22.rst b/docs/source/Plugin/P005_DHT11_DHT22.rst index f4e7dbb40..395ad28f2 100644 --- a/docs/source/Plugin/P005_DHT11_DHT22.rst +++ b/docs/source/Plugin/P005_DHT11_DHT22.rst @@ -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 diff --git a/docs/source/Plugin/P006_BMP085.rst b/docs/source/Plugin/P006_BMP085.rst index 758212b7a..7a153feba 100644 --- a/docs/source/Plugin/P006_BMP085.rst +++ b/docs/source/Plugin/P006_BMP085.rst @@ -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 diff --git a/docs/source/Plugin/P006_BMP180.rst b/docs/source/Plugin/P006_BMP180.rst index 74d047f66..158696ae3 100644 --- a/docs/source/Plugin/P006_BMP180.rst +++ b/docs/source/Plugin/P006_BMP180.rst @@ -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 diff --git a/docs/source/Plugin/P008_Wiegand-26.rst b/docs/source/Plugin/P008_Wiegand-26.rst index 4c1f19550..609732373 100644 --- a/docs/source/Plugin/P008_Wiegand-26.rst +++ b/docs/source/Plugin/P008_Wiegand-26.rst @@ -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... diff --git a/docs/source/Plugin/P009_MCP23017.rst b/docs/source/Plugin/P009_MCP23017.rst index 1644e84fc..89aab2628 100644 --- a/docs/source/Plugin/P009_MCP23017.rst +++ b/docs/source/Plugin/P009_MCP23017.rst @@ -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... diff --git a/docs/source/Plugin/P010_BH1750.rst b/docs/source/Plugin/P010_BH1750.rst index 78920a91f..b1a0adbe3 100644 --- a/docs/source/Plugin/P010_BH1750.rst +++ b/docs/source/Plugin/P010_BH1750.rst @@ -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... diff --git a/docs/source/Plugin/P012_LCD.rst b/docs/source/Plugin/P012_LCD.rst index f244eb79d..05884dcec 100644 --- a/docs/source/Plugin/P012_LCD.rst +++ b/docs/source/Plugin/P012_LCD.rst @@ -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... diff --git a/docs/source/Plugin/P013_HC-SR04.rst b/docs/source/Plugin/P013_HC-SR04.rst index a1c467568..d00a57f99 100644 --- a/docs/source/Plugin/P013_HC-SR04.rst +++ b/docs/source/Plugin/P013_HC-SR04.rst @@ -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 diff --git a/docs/source/Plugin/P013_RCW-0001.rst b/docs/source/Plugin/P013_RCW-0001.rst index 53eabcbcd..715539758 100644 --- a/docs/source/Plugin/P013_RCW-0001.rst +++ b/docs/source/Plugin/P013_RCW-0001.rst @@ -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 diff --git a/docs/source/Plugin/P013_US-100.rst b/docs/source/Plugin/P013_US-100.rst index d99cff0f9..b2594f805 100644 --- a/docs/source/Plugin/P013_US-100.rst +++ b/docs/source/Plugin/P013_US-100.rst @@ -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 diff --git a/docs/source/Plugin/P014_SI7021_HTU21D.rst b/docs/source/Plugin/P014_SI7021_HTU21D.rst index bced501ef..1e14966e2 100644 --- a/docs/source/Plugin/P014_SI7021_HTU21D.rst +++ b/docs/source/Plugin/P014_SI7021_HTU21D.rst @@ -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... diff --git a/docs/source/Plugin/P015_TSL2561.rst b/docs/source/Plugin/P015_TSL2561.rst index 2c370ef50..9f91f2593 100644 --- a/docs/source/Plugin/P015_TSL2561.rst +++ b/docs/source/Plugin/P015_TSL2561.rst @@ -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 diff --git a/docs/source/Plugin/P017_PN532.rst b/docs/source/Plugin/P017_PN532.rst index f27745ac2..dc27c1ca6 100644 --- a/docs/source/Plugin/P017_PN532.rst +++ b/docs/source/Plugin/P017_PN532.rst @@ -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... diff --git a/docs/source/Plugin/P018_GP2Y10.rst b/docs/source/Plugin/P018_GP2Y10.rst index 341d6b87f..1039d7b80 100644 --- a/docs/source/Plugin/P018_GP2Y10.rst +++ b/docs/source/Plugin/P018_GP2Y10.rst @@ -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... diff --git a/docs/source/Plugin/P019_PCF8574.rst b/docs/source/Plugin/P019_PCF8574.rst index fe66509eb..a7f1b91bb 100644 --- a/docs/source/Plugin/P019_PCF8574.rst +++ b/docs/source/Plugin/P019_PCF8574.rst @@ -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... diff --git a/docs/source/Plugin/P022_PCA9685.rst b/docs/source/Plugin/P022_PCA9685.rst index 4d07cb39e..a1bb62f83 100644 --- a/docs/source/Plugin/P022_PCA9685.rst +++ b/docs/source/Plugin/P022_PCA9685.rst @@ -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... diff --git a/docs/source/Plugin/P023_OLED.rst b/docs/source/Plugin/P023_OLED.rst index f002df965..48ffc1db0 100644 --- a/docs/source/Plugin/P023_OLED.rst +++ b/docs/source/Plugin/P023_OLED.rst @@ -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... diff --git a/docs/source/Plugin/P024_MLX90614.rst b/docs/source/Plugin/P024_MLX90614.rst index 3cc5ab4cc..bc85d57c7 100644 --- a/docs/source/Plugin/P024_MLX90614.rst +++ b/docs/source/Plugin/P024_MLX90614.rst @@ -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 diff --git a/docs/source/Plugin/P025_ADS1115.rst b/docs/source/Plugin/P025_ADS1115.rst index 11303f6c9..ec730736c 100644 --- a/docs/source/Plugin/P025_ADS1115.rst +++ b/docs/source/Plugin/P025_ADS1115.rst @@ -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... diff --git a/docs/source/Plugin/P027_INA219.rst b/docs/source/Plugin/P027_INA219.rst index fcbf8eed7..4b1991746 100644 --- a/docs/source/Plugin/P027_INA219.rst +++ b/docs/source/Plugin/P027_INA219.rst @@ -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... diff --git a/docs/source/Plugin/P028_BME280.rst b/docs/source/Plugin/P028_BME280.rst index ebc539608..58a4e20b0 100644 --- a/docs/source/Plugin/P028_BME280.rst +++ b/docs/source/Plugin/P028_BME280.rst @@ -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 diff --git a/docs/source/Plugin/P030_BMP280.rst b/docs/source/Plugin/P030_BMP280.rst index 8f6e58801..467592d48 100644 --- a/docs/source/Plugin/P030_BMP280.rst +++ b/docs/source/Plugin/P030_BMP280.rst @@ -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 diff --git a/docs/source/Plugin/P031_SHT1X.rst b/docs/source/Plugin/P031_SHT1X.rst index 40923d120..77ee233d8 100644 --- a/docs/source/Plugin/P031_SHT1X.rst +++ b/docs/source/Plugin/P031_SHT1X.rst @@ -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... diff --git a/docs/source/Plugin/P032_MS5611.rst b/docs/source/Plugin/P032_MS5611.rst index 057bbec09..7616bbd0e 100644 --- a/docs/source/Plugin/P032_MS5611.rst +++ b/docs/source/Plugin/P032_MS5611.rst @@ -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... diff --git a/docs/source/Plugin/P034_DHT12.rst b/docs/source/Plugin/P034_DHT12.rst index 75b1ff0be..1cf2e3044 100644 --- a/docs/source/Plugin/P034_DHT12.rst +++ b/docs/source/Plugin/P034_DHT12.rst @@ -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... diff --git a/docs/source/Plugin/P035_IR_transmitter.rst b/docs/source/Plugin/P035_IR_transmitter.rst index b57c4e404..6fb7c1464 100644 --- a/docs/source/Plugin/P035_IR_transmitter.rst +++ b/docs/source/Plugin/P035_IR_transmitter.rst @@ -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... diff --git a/docs/source/Plugin/P045_MPU6050.rst b/docs/source/Plugin/P045_MPU6050.rst index aa079aea2..c9a79ca26 100644 --- a/docs/source/Plugin/P045_MPU6050.rst +++ b/docs/source/Plugin/P045_MPU6050.rst @@ -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... diff --git a/docs/source/Plugin/P046_Ventus_W266.rst b/docs/source/Plugin/P046_Ventus_W266.rst index 50b49d131..9ca4f8a2d 100644 --- a/docs/source/Plugin/P046_Ventus_W266.rst +++ b/docs/source/Plugin/P046_Ventus_W266.rst @@ -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 diff --git a/docs/source/Plugin/P047_Soil_moisture_sensor.rst b/docs/source/Plugin/P047_Soil_moisture_sensor.rst index 7fe9f20d1..239822f9e 100644 --- a/docs/source/Plugin/P047_Soil_moisture_sensor.rst +++ b/docs/source/Plugin/P047_Soil_moisture_sensor.rst @@ -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... diff --git a/docs/source/Plugin/P048_Adafruit_Motor_Shield_v2.rst b/docs/source/Plugin/P048_Adafruit_Motor_Shield_v2.rst index 8ae786b48..f077b9a10 100644 --- a/docs/source/Plugin/P048_Adafruit_Motor_Shield_v2.rst +++ b/docs/source/Plugin/P048_Adafruit_Motor_Shield_v2.rst @@ -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... diff --git a/docs/source/Plugin/P049_MH-Z19.rst b/docs/source/Plugin/P049_MH-Z19.rst index 4c6790324..f60c17592 100644 --- a/docs/source/Plugin/P049_MH-Z19.rst +++ b/docs/source/Plugin/P049_MH-Z19.rst @@ -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... diff --git a/docs/source/Plugin/P050_TCS34725.rst b/docs/source/Plugin/P050_TCS34725.rst index 2d23e11a1..a4aebe38a 100644 --- a/docs/source/Plugin/P050_TCS34725.rst +++ b/docs/source/Plugin/P050_TCS34725.rst @@ -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... diff --git a/docs/source/Plugin/P051_AM2320.rst b/docs/source/Plugin/P051_AM2320.rst index 1111987ac..9da70752f 100644 --- a/docs/source/Plugin/P051_AM2320.rst +++ b/docs/source/Plugin/P051_AM2320.rst @@ -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... diff --git a/docs/source/Plugin/P052_S11.rst b/docs/source/Plugin/P052_S11.rst index f4a294817..b1041b4d3 100644 --- a/docs/source/Plugin/P052_S11.rst +++ b/docs/source/Plugin/P052_S11.rst @@ -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 diff --git a/docs/source/Plugin/P052_S8.rst b/docs/source/Plugin/P052_S8.rst index 5f79afd56..f9239ddba 100644 --- a/docs/source/Plugin/P052_S8.rst +++ b/docs/source/Plugin/P052_S8.rst @@ -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 diff --git a/docs/source/Plugin/P052_tSense_K70.rst b/docs/source/Plugin/P052_tSense_K70.rst index fed48c56d..b70fb6110 100644 --- a/docs/source/Plugin/P052_tSense_K70.rst +++ b/docs/source/Plugin/P052_tSense_K70.rst @@ -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 diff --git a/docs/source/Plugin/P053_PMSx003.rst b/docs/source/Plugin/P053_PMSx003.rst index 6b1b355ae..11adc4593 100644 --- a/docs/source/Plugin/P053_PMSx003.rst +++ b/docs/source/Plugin/P053_PMSx003.rst @@ -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... diff --git a/docs/source/Plugin/P059_Rotary_Encoder.rst b/docs/source/Plugin/P059_Rotary_Encoder.rst index 689009c45..5b6dea882 100644 --- a/docs/source/Plugin/P059_Rotary_Encoder.rst +++ b/docs/source/Plugin/P059_Rotary_Encoder.rst @@ -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... diff --git a/docs/source/Plugin/P063_TTP229-B.rst b/docs/source/Plugin/P063_TTP229-B.rst index 379dc07b7..c13b4efc3 100644 --- a/docs/source/Plugin/P063_TTP229-B.rst +++ b/docs/source/Plugin/P063_TTP229-B.rst @@ -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... diff --git a/docs/source/Plugin/P065_DFPlayer_Mini.rst b/docs/source/Plugin/P065_DFPlayer_Mini.rst index 369b87667..a147534e4 100644 --- a/docs/source/Plugin/P065_DFPlayer_Mini.rst +++ b/docs/source/Plugin/P065_DFPlayer_Mini.rst @@ -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... diff --git a/docs/source/Plugin/P065_YX5300.rst b/docs/source/Plugin/P065_YX5300.rst index 441cb3c3b..c85cd6fd4 100644 --- a/docs/source/Plugin/P065_YX5300.rst +++ b/docs/source/Plugin/P065_YX5300.rst @@ -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... diff --git a/docs/source/Plugin/P073_7_Segment.rst b/docs/source/Plugin/P073_7_Segment.rst index 2852e1788..148cf3d0a 100644 --- a/docs/source/Plugin/P073_7_Segment.rst +++ b/docs/source/Plugin/P073_7_Segment.rst @@ -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... diff --git a/docs/source/Plugin/P075_Nextion.rst b/docs/source/Plugin/P075_Nextion.rst index 9346a0b97..2d819fdde 100644 --- a/docs/source/Plugin/P075_Nextion.rst +++ b/docs/source/Plugin/P075_Nextion.rst @@ -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... diff --git a/docs/source/Plugin/P081.rst b/docs/source/Plugin/P081.rst index d1088d7df..232f6a703 100644 --- a/docs/source/Plugin/P081.rst +++ b/docs/source/Plugin/P081.rst @@ -46,7 +46,7 @@ The extra argument handles seconds. See also `Wikipedia - 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" diff --git a/docs/source/Plugin/P081_events.repl b/docs/source/Plugin/P081_events.repl index d427bad2e..785b04053 100644 --- a/docs/source/Plugin/P081_events.repl +++ b/docs/source/Plugin/P081_events.repl @@ -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 diff --git a/docs/source/Plugin/P082_Neo-6M.rst b/docs/source/Plugin/P082_Neo-6M.rst index 9b8498b18..4e2f1f1dd 100644 --- a/docs/source/Plugin/P082_Neo-6M.rst +++ b/docs/source/Plugin/P082_Neo-6M.rst @@ -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 diff --git a/docs/source/Plugin/P082_Neo-7M.rst b/docs/source/Plugin/P082_Neo-7M.rst index b638cb149..3b13e522a 100644 --- a/docs/source/Plugin/P082_Neo-7M.rst +++ b/docs/source/Plugin/P082_Neo-7M.rst @@ -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 diff --git a/docs/source/Plugin/P082_Neo-M8n.rst b/docs/source/Plugin/P082_Neo-M8n.rst index 736ace675..eb0487e88 100644 --- a/docs/source/Plugin/P082_Neo-M8n.rst +++ b/docs/source/Plugin/P082_Neo-M8n.rst @@ -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 diff --git a/docs/source/Plugin/P082_events.repl b/docs/source/Plugin/P082_events.repl index cf3a256be..ce0acea12 100644 --- a/docs/source/Plugin/P082_events.repl +++ b/docs/source/Plugin/P082_events.repl @@ -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' diff --git a/docs/source/Plugin/P086_Homie.rst b/docs/source/Plugin/P086_Homie.rst index cbc33f847..9e9f2d7a0 100644 --- a/docs/source/Plugin/P086_Homie.rst +++ b/docs/source/Plugin/P086_Homie.rst @@ -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. diff --git a/docs/source/Plugin/P097_events.repl b/docs/source/Plugin/P097_events.repl index 992cb218f..eb5522b57 100644 --- a/docs/source/Plugin/P097_events.repl +++ b/docs/source/Plugin/P097_events.repl @@ -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 diff --git a/docs/source/Plugin/_plugin_hardware.template b/docs/source/Plugin/_plugin_hardware.template index e6dbb0395..963fd061d 100644 --- a/docs/source/Plugin/_plugin_hardware.template +++ b/docs/source/Plugin/_plugin_hardware.template @@ -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 diff --git a/docs/source/Rules/Rules.rst b/docs/source/Rules/Rules.rst index 3c59ab3a2..4588c7957 100644 --- a/docs/source/Rules/Rules.rst +++ b/docs/source/Rules/Rules.rst @@ -51,79 +51,79 @@ Syntax The syntax of a rule can be single line: -.. code-block:: html +.. code-block:: none - on do endon + on do endon or multi-line (need to be closed with an "endon"): -.. code-block:: html +.. code-block:: none - on do - - - - endon + on do + + + + endon IF/ELSE - IF/ELSEIF/ELSE ------------------------ Also simple if ... else ... statements are possible: -.. code-block:: html +.. code-block:: none - on do - if - - - else - - endif - endon + on do + if + + + else + + endif + endon If the "else" part is not needed it can be removed: -.. code-block:: html +.. code-block:: none - on do - if - - - endif - endon + on do + if + + + endif + endon Also more complex if ... elseif ... else statements are possible (multiple elseif's can be used) -.. code-block:: html +.. code-block:: none - on do - if - - - elseif - - - else - - endif - endon + on do + if + + + elseif + + + else + + endif + endon Again, if the "else" part is not needed it can be removed: -.. code-block:: html +.. code-block:: none - on do - if - - - elseif - - - elseif - - - endif - endon + on do + if + + + elseif + + + elseif + + + 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 do - if - event, - endif - endon - - on do - if - - endif - endon + on do + if + event, + endif + endon + + on do + if + + 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 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 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 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] @@ -257,7 +257,7 @@ DeviceName#ValueName is closed by (square) brackets "[" and "]". Action ------ -.. code-block:: html +.. code-block:: none @@ -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 do //If this happens then do that... if @@ -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:}`` 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:}`` 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]< //These work... [DeviceName#ValueName] < //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:///control?cmd=event,remoteTimerControl=5 @@ -740,7 +740,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% @@ -748,7 +748,7 @@ Multiple event values: You could then use the command "ToggleGPIO" with dynamic GPIO numbers and state. -.. code-block:: html +.. code-block:: none http:///control?cmd=event,ToggleGPIO=12,1 @@ -757,7 +757,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,, @@ -774,7 +774,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] @@ -798,7 +798,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] @@ -809,7 +809,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] @@ -823,7 +823,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 @@ -836,7 +836,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 @@ -849,7 +849,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 @@ -867,7 +867,7 @@ Timer There are 8 timers (1-8) you can use: -.. code-block:: html +.. code-block:: none On System#Boot do //When the ESP boots, do servo,1,12,0 @@ -891,7 +891,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 @@ -915,7 +915,7 @@ timers for things like alarms or warnings: To start or stop the warning signal use http: -.. code-block:: html +.. code-block:: none http:///control?cmd=event,start_warning http:///control?cmd=event,stop_warning @@ -925,14 +925,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:///control?cmd=event,startwatering http:///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) @@ -966,7 +966,7 @@ SendTo: SendTo , 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.) @@ -976,7 +976,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:///control?cmd=event,demoEvent @@ -984,7 +984,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 @@ -993,7 +993,7 @@ It is also possible to directly order GPIO changes, like: Publish -.. code-block:: html +.. code-block:: none Publish,, @@ -1004,7 +1004,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 @@ -1012,7 +1012,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 @@ -1021,7 +1021,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 @@ -1041,7 +1041,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 @@ -1055,7 +1055,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 @@ -1071,7 +1071,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 @@ -1084,7 +1084,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 @@ -1102,7 +1102,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% @@ -1125,7 +1125,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 @@ -1138,7 +1138,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¶m=udevice&idx=123456&nvalue=0&svalue=[INA219#Amps] //Own made up IDX 123456 @@ -1159,7 +1159,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 @@ -1178,7 +1178,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