From ad7dc52b6bca8e076e1f4125e7e674ceb5b940fb Mon Sep 17 00:00:00 2001
From: Michael Ingraham <34340210+meingraham@users.noreply.github.com>
Date: Fri, 19 Jul 2019 09:59:49 -0400
Subject: [PATCH] "Components" rather than "GPIOs"
---
Templates.md | 42 +++++++++++++++++++++---------------------
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/Templates.md b/Templates.md
index c465e03b..ffe13e7a 100644
--- a/Templates.md
+++ b/Templates.md
@@ -24,7 +24,7 @@ Time to create your template.
### Creating your template
1. Change the template name (also defines the name for `Module 0`).
2. Select a module to [**BASE** your template on](Templates#base). If you're not sure, `Module 18` is the best choice. In this example the device is based on Blitzwolf SHP (45) module.
-3. Configure the [**GPIOs**](Templates#gpio) to match your device. If you do not know what pins your device uses, employ the [new device configuration procedure](Configuration-Procedure-for-New-Devices) to determine the correct pin assignments.
+3. Configure the components assigned to the [**GPIOs**](Templates#gpio) to match your device. If you do not know what pins your device uses, employ the [new device configuration procedure](Configuration-Procedure-for-New-Devices) to determine the correct pin assignments.
![GPIO configuration](https://i.postimg.cc/44r41GDJ/templat-step3.png)
@@ -55,7 +55,7 @@ Now that you've set up your previously unsupported device in Tasmota it is time
MQT: stat/sonoff/RESULT = {"NAME":"RGB Smart Plug","GPIO":[37,0,39,0,38,134,0,0,131,17,132,21,0],"FLAG":0,"BASE":45}
```
-Copy the string `{"NAME":"RGB Smart Plug","GPIO":[37,0,39,0,38,134,0,0,131,17,132,21,0],"FLAG":0,"BASE":45}` and share it on our [device repository](https://blakadder.github.io/templates/) page.
+Copy the string `{"NAME":"RGB Smart Plug","GPIO":[37,0,39,0,38,134,0,0,131,17,132,21,0],"FLAG":0,"BASE":45}` and share it on our [device template repository](https://blakadder.github.io/templates/) page.
### Merge Template and module settings
@@ -127,9 +127,9 @@ CODE [17,148,29,149,52,255,255,255,138,255,139,255,255]
The GPIO functionality numbers are the same as shown by command ``GPIOs``. In addition code 255 is added to select a GPIO as user configurable via the GUI Configure Module menu.
***example***
->In our example GPIO00 has the number `17` which corresponds to Button1 according to the following table. If you change that to `9` in your template it would then become a Switch1.
-
+>In our example the GPIO 00 data element is `17` which corresponds to the `Button1` component, according to the following table. If you change that template element to `9` it would then be assigned as a `Switch1` component instead.
+### [Components](Components)
|#|Function|#|Function|#|Function|#|Function|
|:---:|:---|:---:|:---|:---:|:---|:---:|:---|
|0|None|255|User define|
@@ -186,7 +186,7 @@ The GPIO functionality numbers are the same as shown by command ``GPIOs``. In ad
|147|ALux IrRcv|159|ALux IrSel|
|148|Serial Tx|149|Serial Rx|
-[Google Sheet](https://docs.google.com/spreadsheets/d/10aYCaR3P09omn_vryFGyyq7dS-XK54K2fGAcb4gruik/edit?usp=sharing) with the GPIOS sorted by number or alphabetically.
+[Google Sheet](https://docs.google.com/spreadsheets/d/10aYCaR3P09omn_vryFGyyq7dS-XK54K2fGAcb4gruik/edit?usp=sharing) with the components sorted by number or alphabetically.
## FLAG
The FLAG value is an 8-bit mask where each bit controls a feature. Add FLAG values to set multiple bits.
@@ -195,7 +195,7 @@ FLAG | Mask | Feature description
-----|----------|------------------------------
0 | xxxxxxxx | No features
1 | xxxxxxx1 | Use Analog0 (ADC0) as an input if USE_ADC_VCC, defined in ``my_user_config.h``, is disabled
Selecting ADC0 allows input of an analog signal through the ADC0 (A.K.A. A0) ESP8266 input (pin 6). ADC0 will be reported in telemetry messages as well as in the web UI. It can also be used as a [trigger](Rules#adc0) in [rules](Rules).
**Check your Wi-Fi module**. The [ESP8266 A0 pin](https://arduino-esp8266.readthedocs.io/en/latest/reference.html#analog-input) supports a maximum voltage of 1.0V. Many newer Wi-Fi modules have an on-board voltage divider to support a higher A0 input voltage range (typically in the range between 0 and 3.3 volts). You may need to use a an external voltage divider to ensure your input voltage is in the right range.
- 2 | xxxxxx1x | Allow ADC0 as Temperature sensor when define USE_ADC_VCC is disabled. *Introduced in 6.5.0.9*
+ 2 | xxxxxx1x | Allow ADC0 as Temperature sensor when define USE_ADC_VCC is disabled.
4 | xxxxx1xx | Not used
8 | xxxx1xxx | Not used
16 | xxx1xxxx | Not used
@@ -208,7 +208,7 @@ BASE is the starting module setup for the custom template. Some modules, not all
***example***
>In the [RGB Smart Plug](https://blakadder.github.io/templates/rgbpow.html)
-template we used the `BlitzWolf SHP (45)` module as BASE since the power monitoring circuitry is identical but GPIO00, GPIO02 were changed and an unused GPIO04 was added to enable the RGB LED function. Using that specific module we took advantage of that module's calibrated power monitoring special programming which the `Generic (18)` module does not use.
+template we used the `BlitzWolf SHP (45)` module as BASE since the power monitoring circuitry is identical but GPIO00 and GPIO02 were changed and an unused GPIO04 was added to enable the RGB LED function. Using that specific module we took advantage of that module's calibrated power monitoring special programming which the `Generic (18)` module does not use.
The following table lists hard-coded device specific functionality.
@@ -218,27 +218,27 @@ BASE | Module | Description
2 | Sonoff RF |
3 | Sonoff SV |
4 | Sonoff TH |
- 5 | Sonoff Dual | Process relay and button via hardware serial interface using GPIO01 and GPIO03. Change baudrate to 19200 bps. Process buttons as single press only
+ 5 | Sonoff Dual | Process relay and button via hardware serial interface using GPIO01 and GPIO03. Change the baud rate to 19200 bps. Process buttons as single press only
6 | Sonoff POW |
7 | Sonoff 4Ch |
8 | Sonoff S2X |
9 | Slampher |
- 10 | Sonoff Touch | Invert LedState 1 functionality
+ 10 | Sonoff Touch | Invert `LedState 1` functionality
11 | Sonoff LED | Set light type to 2 PWM channels disregarding SetOption15. Fix device specific LED instabilities by disabling GPIO04, GPIO5 and GPIO14
12 | 1 Channel |
13 | 4 Channel | [See Sonoff Dual](#SonoffDual)
- 14 | Motor C/AC | Force all relays ON at Power On and disable command PowerOnState
+ 14 | Motor C/AC | Force all relays ON at Power un and disable command `PowerOnState`
15 | ElectroDragon |
16 | EXS Relay(s) | Enable pulse latching using even/odd numbered relay pairs
17 | WION |
18 | Generic | Show Wemos specific pin information in GUI
19 | Sonoff Dev |
20 | H801 | Change hardware UART Tx from GPIO01 to GPIO02
- 21 | Sonoff SC | Enable and Process data via hardware serial interface using GPIO01 and GPIO03. Change baudrate to 19200 bps
- 22 | Sonoff BN-SZ | Set light type to 1 PWM channel disregarding SetOption15
- 23 | Sonoff 4Ch Pro | Button handling disregarding SetOption13 only allowing single press to enable RF learning while holding the button
+ 21 | Sonoff SC | Enable and process data via hardware serial interface using GPIO01 and GPIO03. Change the baud rate to 19200 bps
+ 22 | Sonoff BN-SZ | Set light type to 1 PWM channel disregarding `SetOption15`
+ 23 | Sonoff 4Ch Pro | Button handling disregarding `SetOption13` only allowing single press to enable RF learning while holding the button
24 | Huafan SS |
- 25 | Sonoff Bridge | Enable and Process data via hardware serial interface using GPIO01 and GPIO03. Change baudrate to 19200 bps. Process 16 buttons in web GUI. Enable EFM8BB1 firmware upload
+ 25 | Sonoff Bridge | Enable and Process data via hardware serial interface using GPIO01 and GPIO03. Change the baud rate to 19200 bps. Process 16 buttons in web GUI. Enable EFM8BB1 firmware upload
26 | Sonoff B1 | Set light type to RGBWC using MY92x1
27 | Ailight | Set light type to RGBW using MY92x1
28 | Sonoff T1 1Ch | [See Sonoff Touch](#SonoffTouch)
@@ -254,24 +254,24 @@ BASE | Module | Description
38 | Arilux LC11 |
39 | Sonoff Dual R2 | Process buttons as single press only
40 | Arilux LC06 |
- 41 | Sonoff S31 | Selects GPIO types for the CSE7766 (serial connected energy monitoring chip) with Rx and Tx hardware serial (even parity) on GPIO01 and GPIO03 respectively. Sets serial interface to 4800 baud and disables serial logging
+ 41 | Sonoff S31 | Selects component types for the CSE7766 (serial connected energy monitoring chip) with Rx and Tx hardware serial (even parity) on GPIO01 and GPIO03 respectively. Sets serial interface to 4800 baud and disables serial logging
42 | Zengge WF017 |
43 | Sonoff Pow R2 |
- 44 | Sonoff IFan02 | Enable command Fanspeed. Disable Interlock and PulseTime. Tune status information, MQTT data and GUI. Sync with microcontroller. Process Domoticz Fan state
+ 44 | Sonoff IFan02 | Enable command [`FanSpeed`](Commands#fanspeed). Disable `Interlock` and `PulseTime`. Tune status information, MQTT data and GUI. Sync with microcontroller. Process Domoticz Fan state
45 | Blitzwolf SHP | Module specific power monitoring calibration
46 | Shelly 1 |
47 | Shelly 2 |
- 48 | Xiaomi Philips | Process Color Temperature using PWM2 and Intensity using PWM1
+ 48 | Xiaomi Philips | Process color temperature using PWM2 and intensity using PWM1
49 | Neo Coolcam |
50 | ESP SwitCh |
51 | Obi Socket |
52 | Teckin |
53 | APLIC WDP303075 |
- 54 | Tuya Dimmer | Enable and Process data via software or hardware serial interface using GPIO 107 and 108 or forced GPIO01 and GPIO03. Change baudrate to 9600 bps. Process all Buttons
+ 54 | Tuya Dimmer | Enable and process data via software or hardware serial interface using component 107 and 108. Change the baud rate to 9600 bps. Process all buttons
55 | Gosund SP1 v23 |
- 56 | Armtronix Dimmers | Enable and Process data via software or hardware serial interface using GPIO 148 and 149. Change baudrate to 115200 bps.
+ 56 | Armtronix Dimmers | Enable and process data via software or hardware serial interface using component 148 and 149. Change baudrate to 115200 bps.
57 | SK03 Outdoor (Tuya) |
- 58 | PS-16-DZ | Enable and Process data via software or hardware serial interface using GPIO 148 and 149. Change baudrate to 19200 bps.
+ 58 | PS-16-DZ | Enable and process data via software or hardware serial interface using component 148 and 149. Change the baud rate to 19200 bps.
59 | Teckin US |
60 | Manzoku Strip (EU 4) |
61 | Obi Socket 2 |
@@ -279,7 +279,7 @@ BASE | Module | Description
63 | Digoo DG-SP202 |
64 | KA10 |
65 | Luminea ZX2820 |
- 66 | Mi Desk Lamp | Process rotary and Button1 data specific to this device
+ 66 | Mi Desk Lamp | Process rotary and `Button1` data specific to this device
67 | SP10 |
68 | WAGA CHCZ02MB |
69 | SYF05 |