mirror of https://github.com/arendst/Tasmota.git
Updated MCP23008 MCP23017 (markdown)
parent
911362ba18
commit
af236b3ca8
|
@ -256,11 +256,22 @@ If SAVE_STATE / setoption0 is enabled in your firmware configuration then the la
|
||||||
|
|
||||||
To change the state of an output pin you may use:
|
To change the state of an output pin you may use:
|
||||||
```
|
```
|
||||||
sensor29 0,ON // Turn pin 0 ON/HIGH/1
|
sensor29 0,ON // Turn pin ON (HIGH if pinmode 5 or LOW if pinmode 6(inverted))
|
||||||
sensor29 0,OFF // Turn pin 0 OFF/LOW/0
|
sensor29 0,OFF // Turn pin OFF (LOW if pinmode 5 or HIGH if pinmode 6(inverted))
|
||||||
sensor29 0,T // Toggle the current state of pin 0 from HIGH to LOW or LOW to HIGH
|
sensor29 0,T // Toggle the current state of pin from ON to OFF, or OFF to ON
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Telemetry response will be provided accordingly, for example:
|
||||||
|
```
|
||||||
|
MQT: stat/sonoff/RESULT = {"S29cmnd_D0":{"COMMAND":"ON","STATE":"ON"}}
|
||||||
|
MQT: stat/sonoff/RESULT = {"S29cmnd_D0":{"COMMAND":"OFF","STATE":"OFF"}}
|
||||||
|
MQT: stat/sonoff/RESULT = {"S29cmnd_D0":{"COMMAND":"TOGGLE","STATE":"ON"}}
|
||||||
|
```
|
||||||
|
|
||||||
|
`COMMAND = Command which was sent`
|
||||||
|
|
||||||
|
`STATE = New state after execution of command`
|
||||||
|
|
||||||
Telemetry data is provided for pins which are enabled for output. For example, if pin 0 was enabled for OUTPUT the following additional telemetry message will be sent by MQTT at the same time as the normal telemetry interval occurs which reports the current states of pins.
|
Telemetry data is provided for pins which are enabled for output. For example, if pin 0 was enabled for OUTPUT the following additional telemetry message will be sent by MQTT at the same time as the normal telemetry interval occurs which reports the current states of pins.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue