-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PowerOnState is not obeyed #2140
Comments
Check your mqtt server for retained messages as tasmota is never requesting any status from the mqtt server. In case off T1 also clear the possible rf code it might have learned while you pressed the key too long. Again, not tasmota related. |
I have a similar issue I am using a Sonoff SV with a temperature sensor, a reed switch and home assistant to control my garage door. Any help is highly appreciated! |
@jnherm All that is configurable and user related, not Tasmota related. For example two mistakes can be made here by user (not Tasmota):
A car which is steered to the wall is not bad designed - only the parameter is wrong selected - the direction.
Subscription can not have retain flags, only the result of a subscription is retain by a previously publish command which had set the retain flag. So in that case you (as user) have done the mistake as explained above: Ether you has set same topic for status and cmnd or a thirds system sets the retain flag for cmnd to Tasmota. |
@niklasfink - you have forgot the third system and you may have skipped my sentence
Retained message are stored in broker until they are explicit delete. This can not be done by simply send a non-retain message over the retained. Example
To delete a retained message you have to send a retained null message to broker. If the HASS system does not make that, the wrong retained message will stay forever within broker. THIS will often make the wrong retain cmnd MQTT message which is then subscribed by Tasmota. |
Clearing RF codes is documented by iTead as it is not controlled by Tasmota so you should be able to find RF specific information on their site. |
I want to report back on this issue. After I deleted any retained message in my broker by sending a null message with the retain option on using Node-Red, my system has been stable for the last 24 hours. I was checking the logs and at the moment that the system reconnects to MQTT, my sonoff does not get the ON state as it used too. So far so good, I will keep monitoring and I will report back. |
How are these retained messages created? I don't think I ever had the PowerRetain set to ON, so it should've never retained any message. How can I prohibit this from happening again? Also, how do I delete retained messages? :-) |
The first time that I used the "Tasmotized" Sonoff device in Home Assistant I copied my regular settings for my MQTT garage controller and modified just the topics, but kept the other settings and for that reason I ended with the retain setting on. |
@niklasfink PowerRetain sets default to 0 (OFF). If you compile your own firmware, please check Deleting a retained msg depends environment you are using - As @JuliusLedoux aleady explained, one possible way to delete a retained topic is
My favorite client on Linux is MQTT.fx. Clients overview can be found under The Seven Best MQTT Client Tools. |
Sending null vale is exactly what protocol says about it mosquitto_pub -t -r -n Quick but a bit dirty way to delete ALL retained messages is to stop broker and delete persistence file, |
Dear M4RiO32s, |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I used this and everytime i reboot my switch or i restart my homeassistant it detects state as it is, |
Hi, Added your config example to the wiki. Thanks If your issue is not solved, please reopen it. Thanks |
Hi, I'm using a Sonoff T1 and am noticing a sudden power toggle during day or night, without interacting with the device. Upon further research, I found out that after the device reboots, it turns power ON, even though it was OFF before rebooting.
I played around with the settings a bit, but I can't figure out why it is doing that. The specific settings are:
This is how the log looks like when rebooting and then switching the light ON, even though it was OFF:
I'm using Mosca as my MQTT broker. I would assume there is a power ON message saved on the broker which then gets read by the Sonoff, even though I set the settings to not read it (PowerRetain 0).
Any help appreciated. :-)
The text was updated successfully, but these errors were encountered: