arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
22.22k stars 4.81k forks source link

Add option for pulstime #2345

Closed mpuff closed 6 years ago

mpuff commented 6 years ago

Hello.

Is it possible to add an option to send an mqtt off command when the pulsetime command is set. Because when the pulstime option set the item to the off state, in the mqtt broker is only the on command as last state, when the homeautomation software do a restart, it will check the last state of the item in the mqtt broker, and the item gets on again. so a motor will start again ore something else.

curzon01 commented 6 years ago

homeautomation should check the status topic, not the command topic

PulseTime1 20

18:03:12 MQT: stat/tasmota/esp08/RESULT = {"PulseTime1":"20 (Active 0)"}

Power1 ON

18:03:17 MQT: stat/tasmota/phesp08/RESULT = {"POWER1":"ON"}
18:03:17 MQT: stat/tasmota/phesp08/POWER1 = ON
18:03:19 MQT: stat/tasmota/phesp08/RESULT = {"POWER1":"OFF"}
18:03:19 MQT: stat/tasmota/phesp08/POWER1 = OFF
mpuff commented 6 years ago

I have tasmota on an wemosd1 mini, i have checked now, i do not have an mqtt stat with POWER, only result messages from RESULT1 - RESULT11 In RESULT11 i have the message that the POWER state is OFF, but as mqtt command i have in the broker always ON Because i only send an ON command with the homeautomation software, not the status OFF The Status OFF will the Tasmota set localy, without to send an mqtt command. I think the broker does set the last command after a restart

curzon01 commented 6 years ago

Because i only send an ON command with the homeautomation software, not the status OFF

I did the same manual, doesn't matter if using web gui or MQTT message

I think the broker does set the last command after a restart

Stop homeautomation sending retain messages, this always makes a lot of trouble. Also delete all current related retain message from broker.

mpuff commented 6 years ago

Ok , thank you for your help. I will change the retain to 0 (off)