-
Notifications
You must be signed in to change notification settings - Fork 1
PowerOnState Configuration
PowerOnState | | Show current relay power on state
PowerOnState | 0 | off | Keep relay(s) off after power on
PowerOnState | 1 | on | Turn relay(s) on after power on
PowerOnState | 2 | toggle | Toggle relay(s) on from last saved
PowerOnState | 3 | (default) Turn relay(s) on as last saved
PowerOnState | 4 | Turn relay(s) on and disable further relay control
PowerOnState | 5 | After a pulsetime period, Turn relay(s) on and disable further relay control
by DEFAULT the relay(s) will power on with the last saved state on a reboot/restart.
If MQTT is defined and PowerRetain is used the last state will be stored permanently in MQTT database.
PowerRetain | | Show current MQTT power retain state
PowerRetain | 0 | off | (default) Disable MQTT power retain on status update
PowerRetain | 1 | on | Enable MQTT power retain on status update
The stored MQTT message will always override the PowerOnState!!!
To check, if there is a value set for the power switch you can use mosquitto_sub
mosquitto_sub -p 1883 -u <username> -P <password> -t cmnd/+/power
If there are retained messages there should be an output similar to: (the "r1" shows that this message was retained)
Client mosqsub/3795-raspberryp received PUBLISH (d0, q0, r1, m0, 'cmnd/setting/ESP_004554/power', ... (1 bytes))
on
Client mosqsub/3795-raspberryp received PUBLISH (d0, q0, r1, m0, 'cmnd/setting/ESP_267688/power', ... (1 bytes))
off
Client mosqsub/3795-raspberryp received PUBLISH (d0, q0, r1, m0, 'cmnd/setting/ESP_675667/power', ... (1 bytes))
on
cmnd/+/power could also something different depending what you have defined as IN folder for commands. "power" needs to be replaced by power1,power2 and so on, if you have more relays or use "cmnd/#". Be aware that MQTT does **NOT SUPPORT **wildcards "cmnd/+/Power?"
#define SUB_PREFIX "cmnd"
Now you can see, if there are messages stored that Power ON/OFF and need to be deleted. To delete use:
mosquitto_pub -p 1883 -u <username> -P <password> -d -n -r -t cmnd/ESP_0C220C/power
The -n sends an empty key and the -r store this change permanently
Home | Wiki | What's new | Tutorials | FAQ | Troubleshooting | Button usage | Commands | Rules
Home
Theo's Tasmota Tips
What's New
Getting Started
Upload tools
- SonOTA
- OTA over SCP
- Esptool
- Arduino IDE
- PlatformIO
- PlatformIO CLI
- Visual Studio Code
- Python HTTP OTA server
- Node Red OTA server and firmware manager
Usage
- Button Functionality
- MQTT Features
- Supported Commands
- Using Rules
- Sensor Configuration
- PowerOnState Configuration
- SwitchMode/SwitchTopic
- Button Multipress
- Energy Saving
- KNX Features
- Misc. Tips
Devices - Additional Info
- Sonoff Basic
- Sonoff SV
- Sonoff S20 Smart Socket
- Sonoff S26 Smart Socket
- Sonoff Dual / Dual R2
- Sonoff 4CH / 4CH Pro
- Sonoff RF and Slampher
- Sonoff RF Bridge 433
- Sonoff Pow / Pow R2
- Sonoff Touch
- Sonoff T1
- Sonoff B1 / B1 R2
- Sonoff iFan02
- Sonoff SC
- Sonoff PSA
- Sonoff S31
- Shelly 1 and 2
- Wemos D1 R1 & R2
- Wemos D1 Mini
- HuaFan Smart Socket
- Hyleton-313 Smart Plug
- MagicHome LED controller
- H801
- Arilux LC02
- SP108E LED controller
- Blitzwolf SHP2
- Tuya Dimmer
- PS-16-DZ Dimmer
- Armtronix Dimmers
- Other Devices
- retired
Home Automation Integration
- OpenHAB
- Home Assistant
- Domoticz - Manual configuaration
- Domoticz - Automatic discovery
- HomeBridge
- HomeSeer
- SmartThings
- IP-Symcon
- IOBroker
- TasmoAdmin
- Alexa
- Yeti
- NodeRed Examples
- Securing your Setup
Other Integrations
Further Topics
- MQTT Overview
- Remote Button
- Modified Kaku
- PZEM004T Energy Monitor
- IR Extension
- S20 sensor
- Wiring additional things to a module
- Sonoff Basic DHT11 Wiring
- Expand Sonoff 4CH with jack plug
- Defining new module types
- GPIO Locations
- JSON Status Responses
- Expand Sonoff Basic to 4MB Flash
- Time Proportioned Output support
- PID Control with Sonoff Devices
- Sensor-API
- Sensors Supported by Tasmota
- Syslog Setup
ESP32
Misc