mirror of https://github.com/arendst/Tasmota.git
"Components" rather than "GPIOs"
parent
34e4349a3d
commit
ad7dc52b6b
42
Templates.md
42
Templates.md
|
@ -24,7 +24,7 @@ Time to create your template.
|
|||
### Creating your template <img src="https://i.postimg.cc/3xwMStdc/templat-step2.png" align="right">
|
||||
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
|
||||
<a id="ADC0"> </a> 1 | xxxxxxx1 | Use Analog0 (ADC0) as an input if USE_ADC_VCC, defined in ``my_user_config.h``, is disabled<BR><BR>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).<BR><BR>**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
|
|||
<a id="SonoffRF"> </a> 2 | Sonoff RF |
|
||||
<a id="SonoffSV"> </a> 3 | Sonoff SV |
|
||||
<a id="SonoffTh"> </a> 4 | Sonoff TH |
|
||||
<a id="SonoffDual"> </a> 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
|
||||
<a id="SonoffDual"> </a> 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
|
||||
<a id="SonoffPow"> </a> 6 | Sonoff POW |
|
||||
<a id="Sonoff4Ch"> </a> 7 | Sonoff 4Ch |
|
||||
<a id="SonoffS2X"> </a> 8 | Sonoff S2X |
|
||||
<a id="Slampher"> </a> 9 | Slampher |
|
||||
<a id="SonoffTouch"> </a> 10 | Sonoff Touch | Invert LedState 1 functionality
|
||||
<a id="SonoffTouch"> </a> 10 | Sonoff Touch | Invert `LedState 1` functionality
|
||||
<a id="SonoffLED"> </a> 11 | Sonoff LED | Set light type to 2 PWM channels disregarding SetOption15. Fix device specific LED instabilities by disabling GPIO04, GPIO5 and GPIO14
|
||||
<a id="1Channel"> </a> 12 | 1 Channel |
|
||||
<a id="4Channel"> </a> 13 | 4 Channel | [See Sonoff Dual](#SonoffDual)
|
||||
<a id="MotorC/AC"> </a> 14 | Motor C/AC | Force all relays ON at Power On and disable command PowerOnState
|
||||
<a id="MotorC/AC"> </a> 14 | Motor C/AC | Force all relays ON at Power un and disable command `PowerOnState`
|
||||
<a id="ElectroDragon"> </a> 15 | ElectroDragon |
|
||||
<a id="EXSRelays"> </a> 16 | EXS Relay(s) | Enable pulse latching using even/odd numbered relay pairs
|
||||
<a id="WION"> </a> 17 | WION |
|
||||
<a id="Generic"> </a> 18 | Generic | Show Wemos specific pin information in GUI
|
||||
<a id="SonoffDev"> </a> 19 | Sonoff Dev |
|
||||
<a id="H801"> </a> 20 | H801 | Change hardware UART Tx from GPIO01 to GPIO02
|
||||
<a id="SonoffSC"> </a> 21 | Sonoff SC | Enable and Process data via hardware serial interface using GPIO01 and GPIO03. Change baudrate to 19200 bps
|
||||
<a id="SonoffBN-SZ"> </a> 22 | Sonoff BN-SZ | Set light type to 1 PWM channel disregarding SetOption15
|
||||
<a id="Sonoff4ChPro"> </a> 23 | Sonoff 4Ch Pro | Button handling disregarding SetOption13 only allowing single press to enable RF learning while holding the button
|
||||
<a id="SonoffSC"> </a> 21 | Sonoff SC | Enable and process data via hardware serial interface using GPIO01 and GPIO03. Change the baud rate to 19200 bps
|
||||
<a id="SonoffBN-SZ"> </a> 22 | Sonoff BN-SZ | Set light type to 1 PWM channel disregarding `SetOption15`
|
||||
<a id="Sonoff4ChPro"> </a> 23 | Sonoff 4Ch Pro | Button handling disregarding `SetOption13` only allowing single press to enable RF learning while holding the button
|
||||
<a id="HuafanSS"> </a> 24 | Huafan SS |
|
||||
<a id="SonoffBridge"> </a> 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
|
||||
<a id="SonoffBridge"> </a> 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
|
||||
<a id="SonoffB1"> </a> 26 | Sonoff B1 | Set light type to RGBWC using MY92x1
|
||||
<a id="Ailight"> </a> 27 | Ailight | Set light type to RGBW using MY92x1
|
||||
<a id="SonoffT11Ch"> </a> 28 | Sonoff T1 1Ch | [See Sonoff Touch](#SonoffTouch)
|
||||
|
@ -254,24 +254,24 @@ BASE | Module | Description
|
|||
<a id="AriluxLC11"> </a> 38 | Arilux LC11 |
|
||||
<a id="SonoffDualR2"> </a> 39 | Sonoff Dual R2 | Process buttons as single press only
|
||||
<a id="AriluxLC06"> </a> 40 | Arilux LC06 |
|
||||
<a id="SonoffS31"> </a> 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
|
||||
<a id="SonoffS31"> </a> 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
|
||||
<a id="ZenggeWF017"> </a> 42 | Zengge WF017 |
|
||||
<a id="SonoffPowR2"> </a> 43 | Sonoff Pow R2 |
|
||||
<a id="SonoffIFan02"> </a> 44 | Sonoff IFan02 | Enable command Fanspeed. Disable Interlock and PulseTime. Tune status information, MQTT data and GUI. Sync with microcontroller. Process Domoticz Fan state
|
||||
<a id="SonoffIFan02"> </a> 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
|
||||
<a id="BlitzwolfSHP"> </a> 45 | Blitzwolf SHP | Module specific power monitoring calibration
|
||||
<a id="Shelly1"> </a> 46 | Shelly 1 |
|
||||
<a id="Shelly2"> </a> 47 | Shelly 2 |
|
||||
<a id="XiaomiPhilips"> </a> 48 | Xiaomi Philips | Process Color Temperature using PWM2 and Intensity using PWM1
|
||||
<a id="XiaomiPhilips"> </a> 48 | Xiaomi Philips | Process color temperature using PWM2 and intensity using PWM1
|
||||
<a id="NeoCoolcam"> </a> 49 | Neo Coolcam |
|
||||
<a id="ESPSwitCh"> </a> 50 | ESP SwitCh |
|
||||
<a id="ObiSocket"> </a> 51 | Obi Socket |
|
||||
<a id="Teckin"> </a> 52 | Teckin |
|
||||
<a id="APLICWDP303075"> </a> 53 | APLIC WDP303075 |
|
||||
<a id="TuyaDimmer"> </a> 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
|
||||
<a id="TuyaDimmer"> </a> 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
|
||||
<a id="GosundSP1v23"> </a> 55 | Gosund SP1 v23 |
|
||||
<a id="ArmtronixDimmers"> </a> 56 | Armtronix Dimmers | Enable and Process data via software or hardware serial interface using GPIO 148 and 149. Change baudrate to 115200 bps.
|
||||
<a id="ArmtronixDimmers"> </a> 56 | Armtronix Dimmers | Enable and process data via software or hardware serial interface using component 148 and 149. Change baudrate to 115200 bps.
|
||||
<a id="SK03OutdoorTuya"> </a> 57 | SK03 Outdoor (Tuya) |
|
||||
<a id="PS-16-DZ"> </a> 58 | PS-16-DZ | Enable and Process data via software or hardware serial interface using GPIO 148 and 149. Change baudrate to 19200 bps.
|
||||
<a id="PS-16-DZ"> </a> 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.
|
||||
<a id="TeckinUS"> </a> 59 | Teckin US |
|
||||
<a id="ManzokuStripEU_4"> </a> 60 | Manzoku Strip (EU 4) |
|
||||
<a id="ObiSocket2"> </a> 61 | Obi Socket 2 |
|
||||
|
@ -279,7 +279,7 @@ BASE | Module | Description
|
|||
<a id="DigooDG-SP202"> </a> 63 | Digoo DG-SP202 |
|
||||
<a id="KA10"> </a> 64 | KA10 |
|
||||
<a id="LumineaZX2820"> </a> 65 | Luminea ZX2820 |
|
||||
<a id="MiDeskLamp"> </a> 66 | Mi Desk Lamp | Process rotary and Button1 data specific to this device
|
||||
<a id="MiDeskLamp"> </a> 66 | Mi Desk Lamp | Process rotary and `Button1` data specific to this device
|
||||
<a id="SP10"> </a> 67 | SP10 |
|
||||
<a id="WAGACHCZ02MB"> </a> 68 | WAGA CHCZ02MB |
|
||||
<a id="SYF05"> </a> 69 | SYF05 |
|
||||
|
|
Loading…
Reference in New Issue