mirror of https://github.com/arendst/Tasmota.git
so75 and templates fixes
parent
41df9ee857
commit
381a86c98c
9
ADC.md
9
ADC.md
|
@ -1,10 +1,15 @@
|
||||||
ESP8266 has a single ADC pin available. It may be used to read voltage at ADC pin or to read module supply voltage (VCC).
|
ESP8266 has a single ADC pin available. It may be used to read voltage at ADC pin or to read module supply voltage (VCC).
|
||||||
> When referring to the ADC pin these terms are used interchangeably: ADC (Analog-to-digital Converter), TOUT, Pin6, A0 or Analog0.
|
> When referring to the ADC pin these terms are used interchangeably: ADC (Analog-to-digital Converter), TOUT, Pin6, A0 or Analog0.
|
||||||
|
|
||||||
By default Tasmota uses ADC pin to read voltage. The signal comes from an analog [peripheral](peripherals), or sometimes from the device itself (see [Shelly 2.5](Shelly-2.5)). The signal can be interpreted as temperature, lux, button or "generic".
|
By default Tasmota uses ADC pin to read voltage. The signal comes from an analog [peripheral](peripherals), or sometimes from the device itself (see [Shelly 2.5](Shelly-2.5)).
|
||||||
|
|
||||||
The reading will show in web UI's sensor section as "Analog0 %value%" and published in `tele/%topic%/SENSOR` JSON response as `"ANALOG":{"A0":%value%}`. The pin has a 10-bit resolution, which means _%value%_ can be between `0` and `1024`.
|
After wiring a peripheral to A0 pin you have to configure it in **Configure Module**:
|
||||||
|
|
||||||
|
![ADC configuration](https://i.postimg.cc/qqYmYG3v/ADC.png)
|
||||||
|
|
||||||
|
The reading will show in web UI's sensor section as "Analog0 %value%"
|
||||||
|
A message will be published in `tele/%topic%/SENSOR` JSON response as `"ANALOG":{"A0":%value%}`. The pin has a 10-bit resolution, which means _%value%_ can be between `0` and `1024`.
|
||||||
|
![ADC in web UI](https://i.postimg.cc/zv9jpXsL/Analog0.png)
|
||||||
### Rule triggers
|
### Rule triggers
|
||||||
Use these triggers in rules:
|
Use these triggers in rules:
|
||||||
|
|
||||||
|
|
|
@ -425,6 +425,7 @@ SetOption71<a id="SetOption71"></a>|Set DDS238 Modbus register for active energy
|
||||||
SetOption72<a id="SetOption72"></a>|Set reference used for total energy   »6.6.0.15<BR>`0` = use firmware counter *(default)*<BR>`1` = use energy monitor (e.g., PZEM-0xx, SDM120, SDM630, DDS238, DDSU666) hardware counter
|
SetOption72<a id="SetOption72"></a>|Set reference used for total energy   »6.6.0.15<BR>`0` = use firmware counter *(default)*<BR>`1` = use energy monitor (e.g., PZEM-0xx, SDM120, SDM630, DDS238, DDSU666) hardware counter
|
||||||
SetOption73<a id="SetOption73"></a>|Set HTTP Cross-Origin Resource Sharing (CORS)   »7.0.0.1<BR>`0` = disable CORS *(default)*<BR>`1` = enable CORS
|
SetOption73<a id="SetOption73"></a>|Set HTTP Cross-Origin Resource Sharing (CORS)   »7.0.0.1<BR>`0` = disable CORS *(default)*<BR>`1` = enable CORS
|
||||||
SetOption74<a id="SetOption74"></a>|Enable internal pullup for single DS18x20 sensor   »7.0.0.1<BR>`0` = disabled *(default)*<BR>`1` = internal pullup enabled
|
SetOption74<a id="SetOption74"></a>|Enable internal pullup for single DS18x20 sensor   »7.0.0.1<BR>`0` = disabled *(default)*<BR>`1` = internal pullup enabled
|
||||||
|
SetOption75<a id="SetOption75"></a>|Set grouptopic behaviour ([#6779](https://github.com/arendst/Sonoff-Tasmota/issues/2116))  »7.0.0.1<BR>`0` = GroupTopic using FullTopic replacing %topic% _(default)_<BR>`1` = GroupTopic is `cmnd/%grouptopic%/`
|
||||||
SetOption80<a id="SetOption80"></a>|[Blinds and shutters](blinds-and-shutters) support  »6.6.0.14<BR>`0` = disable blinds and shutters support *(default)*<BR>`1` = enable blinds and shutters support
|
SetOption80<a id="SetOption80"></a>|[Blinds and shutters](blinds-and-shutters) support  »6.6.0.14<BR>`0` = disable blinds and shutters support *(default)*<BR>`1` = enable blinds and shutters support
|
||||||
SetOption81<a id="SetOption81"></a>|Set PCF8574 component behavior for all ports  »6.6.0.14<BR>`0` = set as regular state *(default)*<BR>`1` = set as inverted state
|
SetOption81<a id="SetOption81"></a>|Set PCF8574 component behavior for all ports  »6.6.0.14<BR>`0` = set as regular state *(default)*<BR>`1` = set as inverted state
|
||||||
|
|
||||||
|
|
24
Templates.md
24
Templates.md
|
@ -28,7 +28,7 @@ Time to create your template.
|
||||||
![GPIO configuration](https://i.postimg.cc/d1j4sYZp/template5.png)
|
![GPIO configuration](https://i.postimg.cc/d1j4sYZp/template5.png)
|
||||||
|
|
||||||
- Any unused GPIO that has cannot have a peripheral connected should be set to `None (0)`. In our example the device has no exposed GPIO's so the unused ones are set to `0` compared to the original BlitzWolf module.
|
- Any unused GPIO that has cannot have a peripheral connected should be set to `None (0)`. In our example the device has no exposed GPIO's so the unused ones are set to `0` compared to the original BlitzWolf module.
|
||||||
- GPIOs can have peripherals connected to (exposed GPIOs) should be set tio `User (255)`. This allows future configuration through the **Configure Module** dialog without the need to create a new template.
|
- GPIOs that can have peripherals connected to (exposed GPIOs) should be set to `User (255)`. This allows future configuration through the **Configure Module** dialog without the need to create a new template.
|
||||||
|
|
||||||
> A `Sonoff TH` is a good example. It has a jack connected to GPIO4 that allows a user to plug in a sensor. Assigning GPIO4 as `255` allows a Template to have correct for this device even if nothing is plugged in. But, when a user decides to connect a sensor using the jack, GPIO4 can be set to the type of sensor through the Configure Module page.
|
> A `Sonoff TH` is a good example. It has a jack connected to GPIO4 that allows a user to plug in a sensor. Assigning GPIO4 as `255` allows a Template to have correct for this device even if nothing is plugged in. But, when a user decides to connect a sensor using the jack, GPIO4 can be set to the type of sensor through the Configure Module page.
|
||||||
|
|
||||||
|
@ -68,8 +68,7 @@ When there:
|
||||||
|
|
||||||
The device will reboot with a name reflecting your template name and `Module 0` selected which has your new template stored.
|
The device will reboot with a name reflecting your template name and `Module 0` selected which has your new template stored.
|
||||||
|
|
||||||
![It is finished](https://i.postimg.cc/28hN4qvf/template-import3.png
|
![It is finished](https://i.postimg.cc/28hN4qvf/template-import3.png)
|
||||||
)
|
|
||||||
|
|
||||||
### Merge Template and module settings
|
### Merge Template and module settings
|
||||||
You can set up your device in module **Configuration - Configure Module** and use command `Template 255` to merge the settings of the Module with current template into a new Template named "Merged".
|
You can set up your device in module **Configuration - Configure Module** and use command `Template 255` to merge the settings of the Module with current template into a new Template named "Merged".
|
||||||
|
@ -88,9 +87,9 @@ A user provided template can be stored in Tasmota using the [`Template`](command
|
||||||
|
|
||||||
``Template {"NAME":"AnotherModuleName"}`` updates the name of a stored template
|
``Template {"NAME":"AnotherModuleName"}`` updates the name of a stored template
|
||||||
|
|
||||||
``Template {"FLAG":0}`` deprecated legacy option
|
``Template {"FLAG":0}`` changes FLAG value
|
||||||
|
|
||||||
``Template {"BASE":0}`` updates the base of a stored template to Generic
|
``Template {"BASE":18}`` updates the base of a stored template to Generic
|
||||||
|
|
||||||
**After setting a template in command line it is necessary to issue `Module 0` command if the device doesn't reboot on its own.**
|
**After setting a template in command line it is necessary to issue `Module 0` command if the device doesn't reboot on its own.**
|
||||||
|
|
||||||
|
@ -131,12 +130,17 @@ See [Components](Components) for a complete list
|
||||||
[Google Sheet](https://docs.google.com/spreadsheets/d/10aYCaR3P09omn_vryFGyyq7dS-XK54K2fGAcb4gruik) with the components by number or alphabetically.
|
[Google Sheet](https://docs.google.com/spreadsheets/d/10aYCaR3P09omn_vryFGyyq7dS-XK54K2fGAcb4gruik) with the components by number or alphabetically.
|
||||||
|
|
||||||
## FLAG
|
## FLAG
|
||||||
**This parameter is deprecated and should always be `0`**
|
Used to configure the [ADC](ADC) type. In most templates this should be set to `0`.
|
||||||
The FLAG value is an 8-bit mask where each bit controls a feature. Add FLAG values to set multiple bits.
|
|
||||||
|
|
||||||
FLAG | Mask | Feature description
|
FLAG | Feature description
|
||||||
-----|----------|------------------------------
|
-----|------------------------------
|
||||||
0 | xxxxxxxx | No special features
|
0 | No features
|
||||||
|
1 | Analog value
|
||||||
|
2 | Temperature
|
||||||
|
3 | Light
|
||||||
|
4 | Button
|
||||||
|
5 | Buttoni
|
||||||
|
15 | User configured (same as GPIO `255`)
|
||||||
|
|
||||||
## BASE
|
## BASE
|
||||||
BASE is the starting module setup for the custom template. Some modules include special programming. If your device is similar to an existing built-in module it is best to use that as a starting point. When you're not sure which BASE module is suitable for your device use the `Generic (18)` module. A list of hard-coded devices can be found in [Modules](Modules).
|
BASE is the starting module setup for the custom template. Some modules include special programming. If your device is similar to an existing built-in module it is best to use that as a starting point. When you're not sure which BASE module is suitable for your device use the `Generic (18)` module. A list of hard-coded devices can be found in [Modules](Modules).
|
||||||
|
|
Loading…
Reference in New Issue