Hello, I am new to Hassbian started working on this from last 1 week. And its an amazing platform for me. I personally love all the possible customisations I can do, which make me feels like more personalised
But from last few days I am facing 2 issues.
My light (Night lamp) automatically get turned OFF at 07:00AM around in the morning. Even I don’t have any automation configured yet. Also I don’t have any routine setup in Alexa. And RETAIN is set TRUE.
I am unable to keep the records of all the ON and OFF even using recorder with sqlite with purge value of 15 days. So every time I reboot Raspberry pi 3 it lost all the switch state, the light stays ON because I guess I have RETAIN value as TRUE that’s. But the switch shows in Hassbian dashboard shows that switch is OFF even the light is ON.
I have a basic setup of NodeMCU v1.0 with 5v relay connected.
recorder:
purge_keep_days: 15
exclude:
entities:
- sun.sun # Don't record sun data
- sensor.dark_sky_summary
- sensor.dark_sky_icon
- sensor.dark_sky_temperature
- sensor.dark_sky_apparent_temperature
- sensor.dark_sky_wind_speed
If someone can suggest what to do, because I have been scratching my head from a last 2 days for these 2 problems and seems like everyone is talking about tasmota and other stuff, but nothing related to my problem, so opening this new topic.
Also what @DavidFW1960 says; don’t use the retain: true flag. It can mess up the sync between MQTT broker and client and can cause strange behaviour if the NodeMCU restarts or loses connection to either WiFi or MQTT broker.
After you remove the retain flag, you might need to clear the persistence database… easiest way in hass.io is to remove the Mosquito broker and add it back again.
@DavidFW1960 Thanks for the suggestion, I am using Hassbian, so any command for that? or I have to remove and re-add the whole Mosquitto is the only option?
I am still not able to AUTOMATICALLY ON the lights if power supply goes down (pi 3 also gets turned OFF completely). And come back again, it should keep the light ON as it was ON before.
Also sometimes home Hassbian dashboard don’t show any entity at all. I have quite few sensors, switch and lights attached. But sometimes it do not show when I open the control panel. I have to restart the Hassbian server to see them back again. Seems like there is some instability problem in this.
I have the exact same problem, When ever i see a power failure ( which i see a lot of ) all my switches turn off. Its a huge problem as my Wife get annoyed if she has to turn on the fan again after a power cut.
Any way the state can be restored?
SonOffs running factory firmware retain the state.