Tasmota Sonoffs all randomly turning on at Midnight. Big timer issue?

Hi,

I'm having an issue that all my devices are getting turned on at midnight. This is a bit of a disaster as it turns on the heating and everything. So I end up waking up at like 4am sweating!

Can someone have a look at these and see if it stands out what I'm doing wrong? It doesn't happen all the time, say 3 times a month.

The main control for the system is through two Big timers, and a Nora setup for Google home.


Thanks for your time!

Hi. Firstly, can't tell you anything from just screenshots.

Secondly, put debug nodes everywhere and when it happens again, see what is triggering it.

Lastly, if you want someone to take a closer look, you'll probably need to post your flow (export, copy, paste in here between three back ticks) e.g.

```
code pasted here
```

Ah ok, sorry I wasn't sure on what the correct protocol for sharing flows was.
Sunset lights flow:

[{"id":"dabcd590.5636e","type":"tab","label":"Sunset lights","disabled":false,"info":""},{"id":"df978af3.fcf6f","type":"bigtimer","z":"dabcd590.5636e","outtopic":"","outpayload1":"ON","outpayload2":"OFF","name":"Sunset on timer Sun-Thurs","comment":"Also turns off lights mon-fri at 00:45","lat":"54.0046033","lon":"-6.4008879","starttime":"5004","endtime":"45","starttime2":0,"endtime2":0,"startoff":"-30","endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"ON","outtext2":"OFF","timeout":1440,"sun":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":false,"sat":false,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"repeat":false,"atstart":true,"odd":false,"even":false,"x":180,"y":240,"wires":[["1a7468a3.3c6387","99a0538e.3d8fe","2fce3123.6e8a66","50a3b4ae.fcc0c4","ae7f077d.5947a8","87d73be9.8346c8","1783fb0f.8e20fd","88609162.5c924"],[],[]]},{"id":"1a7468a3.3c6387","type":"mqtt out","z":"dabcd590.5636e","name":"","topic":"cmnd/SaltLamp/POWER","qos":"1","retain":"","broker":"43c3d1a1.5b2cf","x":510,"y":60,"wires":[]},{"id":"99a0538e.3d8fe","type":"mqtt out","z":"dabcd590.5636e","name":"","topic":"cmnd/FrontDoorLight/POWER","qos":"1","retain":"","broker":"43c3d1a1.5b2cf","x":530,"y":120,"wires":[]},{"id":"2fce3123.6e8a66","type":"mqtt out","z":"dabcd590.5636e","name":"","topic":"cmnd/SroomFireplace/POWER","qos":"1","retain":"","broker":"43c3d1a1.5b2cf","x":530,"y":180,"wires":[]},{"id":"50a3b4ae.fcc0c4","type":"mqtt out","z":"dabcd590.5636e","name":"","topic":"cmnd/SroomLightRight/POWER","qos":"1","retain":"","broker":"43c3d1a1.5b2cf","x":530,"y":240,"wires":[]},{"id":"ae7f077d.5947a8","type":"mqtt out","z":"dabcd590.5636e","name":"","topic":"cmnd/SroomLeftLight/POWER","qos":"1","retain":"","broker":"43c3d1a1.5b2cf","x":530,"y":300,"wires":[]},{"id":"87d73be9.8346c8","type":"mqtt out","z":"dabcd590.5636e","name":"","topic":"cmnd/KitchenLamp/POWER","qos":"1","retain":"","broker":"43c3d1a1.5b2cf","x":520,"y":360,"wires":[]},{"id":"1783fb0f.8e20fd","type":"mqtt out","z":"dabcd590.5636e","name":"","topic":"cmnd/LandingLight/POWER","qos":"1","retain":"","broker":"43c3d1a1.5b2cf","x":520,"y":420,"wires":[]},{"id":"88609162.5c924","type":"mqtt out","z":"dabcd590.5636e","name":"","topic":"cmnd/FishTankLight/POWER","qos":"1","retain":"","broker":"43c3d1a1.5b2cf","x":520,"y":480,"wires":[]},{"id":"eb2cf8ff.2f4768","type":"bigtimer","z":"dabcd590.5636e","outtopic":"","outpayload1":"ON","outpayload2":"OFF","name":"Sunset On timer Fri-Sat","comment":"Also turns off lights at 3am Fri-Sat","lat":"54.0046033","lon":"-6.4008879","starttime":"5004","endtime":"165","starttime2":0,"endtime2":0,"startoff":"-30","endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"ON","outtext2":"OFF","timeout":1440,"sun":true,"mon":false,"tue":false,"wed":false,"thu":false,"fri":true,"sat":true,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"repeat":false,"atstart":true,"odd":false,"even":false,"x":190,"y":360,"wires":[["1a7468a3.3c6387","99a0538e.3d8fe","2fce3123.6e8a66","50a3b4ae.fcc0c4","ae7f077d.5947a8","87d73be9.8346c8","1783fb0f.8e20fd","88609162.5c924"],[],[]]},{"id":"43c3d1a1.5b2cf","type":"mqtt-broker","z":"","name":"LocalMQTT","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

Google to Sonoff flow:

[{"id":"26b3bbbf.60d694","type":"tab","label":"Google to sonoff","disabled":false,"info":""},{"id":"9a71d9.722ade28","type":"inject","z":"26b3bbbf.60d694","name":"","topic":"All lights on","payload":"ON","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":560,"y":80,"wires":[["7bdb26f1.ac2018","c15901a7.e38f08","c5e00626.f7d688","9837d8db.ce0098","fef023e7.09275","6de745ad.e34914","aba4624f.b52f2","f9dccc15.ec6d5"]]},{"id":"7bdb26f1.ac2018","type":"mqtt out","z":"26b3bbbf.60d694","name":"","topic":"cmnd/SaltLamp/POWER","qos":"1","retain":"","broker":"43c3d1a1.5b2cf","x":910,"y":200,"wires":[]},{"id":"d89e4af5.7b7e08","type":"inject","z":"26b3bbbf.60d694","name":"","topic":"All lights off","payload":"OFF","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":560,"y":120,"wires":[["f9dccc15.ec6d5","7bdb26f1.ac2018","c15901a7.e38f08","c5e00626.f7d688","fef023e7.09275","6de745ad.e34914","aba4624f.b52f2"]]},{"id":"c15901a7.e38f08","type":"mqtt out","z":"26b3bbbf.60d694","name":"","topic":"cmnd/FrontDoorLight/POWER","qos":"1","retain":"","broker":"43c3d1a1.5b2cf","x":950,"y":300,"wires":[]},{"id":"c5e00626.f7d688","type":"mqtt out","z":"26b3bbbf.60d694","name":"","topic":"cmnd/SroomFireplace/POWER","qos":"1","retain":"","broker":"43c3d1a1.5b2cf","x":950,"y":420,"wires":[]},{"id":"9837d8db.ce0098","type":"mqtt out","z":"26b3bbbf.60d694","name":"","topic":"cmnd/SroomLeftLight/POWER","qos":"1","retain":"","broker":"43c3d1a1.5b2cf","x":930,"y":520,"wires":[]},{"id":"fef023e7.09275","type":"mqtt out","z":"26b3bbbf.60d694","name":"","topic":"cmnd/SroomLightRight/POWER","qos":"1","retain":"","broker":"43c3d1a1.5b2cf","x":930,"y":640,"wires":[]},{"id":"f9dccc15.ec6d5","type":"mqtt out","z":"26b3bbbf.60d694","name":"","topic":"cmnd/KitchenLamp/POWER","qos":"1","retain":"","broker":"43c3d1a1.5b2cf","x":940,"y":780,"wires":[]},{"id":"6de745ad.e34914","type":"mqtt out","z":"26b3bbbf.60d694","name":"","topic":"cmnd/LandingLight/POWER","qos":"1","retain":"","broker":"43c3d1a1.5b2cf","x":940,"y":900,"wires":[]},{"id":"aba4624f.b52f2","type":"mqtt out","z":"26b3bbbf.60d694","name":"","topic":"cmnd/FishTankLight/POWER","qos":"1","retain":"","broker":"43c3d1a1.5b2cf","x":940,"y":1020,"wires":[]},{"id":"628b3b23.485e1c","type":"nora-light","z":"26b3bbbf.60d694","devicename":"Salt Lamp","lightcolor":false,"brightnesscontrol":false,"passthru":false,"statepayload":true,"brightnessoverride":"","roomhint":"","name":"","nora":"961ac8ef.f85bd","topic":"","onvalue":"ON","onvalueType":"str","offvalue":"OFF","offvalueType":"str","x":460,"y":180,"wires":[["7bdb26f1.ac2018"]]},{"id":"fbc45581.e6811","type":"nora-light","z":"26b3bbbf.60d694","devicename":"Front Door Light","lightcolor":false,"brightnesscontrol":false,"passthru":false,"statepayload":true,"brightnessoverride":"","roomhint":"","name":"","nora":"961ac8ef.f85bd","topic":"","onvalue":"ON","onvalueType":"str","offvalue":"OFF","offvalueType":"str","x":470,"y":300,"wires":[["c15901a7.e38f08"]]},{"id":"320df163.c0fe86","type":"nora-light","z":"26b3bbbf.60d694","devicename":"Fireplace","lightcolor":false,"brightnesscontrol":false,"passthru":false,"statepayload":true,"brightnessoverride":"","roomhint":"","name":"","nora":"961ac8ef.f85bd","topic":"","onvalue":"ON","onvalueType":"str","offvalue":"OFF","offvalueType":"str","x":500,"y":420,"wires":[["c5e00626.f7d688"]]},{"id":"f7506cf4.014de8","type":"nora-light","z":"26b3bbbf.60d694","devicename":"Sitting room right light","lightcolor":false,"brightnesscontrol":false,"passthru":false,"statepayload":true,"brightnessoverride":"","roomhint":"","name":"","nora":"961ac8ef.f85bd","topic":"","onvalue":"ON","onvalueType":"str","offvalue":"OFF","offvalueType":"str","x":480,"y":660,"wires":[["fef023e7.09275"]]},{"id":"13a60249.82a096","type":"nora-light","z":"26b3bbbf.60d694","devicename":"Sitting room left light","lightcolor":false,"brightnesscontrol":false,"passthru":false,"statepayload":true,"brightnessoverride":"","roomhint":"","name":"","nora":"961ac8ef.f85bd","topic":"","onvalue":"ON","onvalueType":"str","offvalue":"OFF","offvalueType":"str","x":460,"y":540,"wires":[["9837d8db.ce0098"]]},{"id":"96e606c4.4c2208","type":"nora-light","z":"26b3bbbf.60d694","devicename":"Kitchen Lamp","lightcolor":false,"brightnesscontrol":false,"passthru":false,"statepayload":true,"brightnessoverride":"","roomhint":"","name":"","nora":"961ac8ef.f85bd","topic":"","onvalue":"ON","onvalueType":"str","offvalue":"OFF","offvalueType":"str","x":480,"y":780,"wires":[["f9dccc15.ec6d5"]]},{"id":"3690976c.88d3f","type":"nora-light","z":"26b3bbbf.60d694","devicename":"landing Light","lightcolor":false,"brightnesscontrol":false,"passthru":false,"statepayload":true,"brightnessoverride":"","roomhint":"","name":"","nora":"961ac8ef.f85bd","topic":"","onvalue":"ON","onvalueType":"str","offvalue":"OFF","offvalueType":"str","x":490,"y":900,"wires":[["6de745ad.e34914"]]},{"id":"9e7f39bd.b40268","type":"nora-light","z":"26b3bbbf.60d694","devicename":"FIsh tank light","lightcolor":false,"brightnesscontrol":false,"passthru":false,"statepayload":true,"brightnessoverride":"","roomhint":"","name":"","nora":"961ac8ef.f85bd","topic":"","onvalue":"ON","onvalueType":"str","offvalue":"OFF","offvalueType":"str","x":480,"y":1020,"wires":[["aba4624f.b52f2"]]},{"id":"2216ec4b.79369c","type":"mqtt in","z":"26b3bbbf.60d694","name":"Salt Lamp","topic":"stat/SaltLamp/POWER","qos":"2","broker":"43c3d1a1.5b2cf","x":140,"y":200,"wires":[["628b3b23.485e1c","91306ae5.4b7898","8b3bdfad.3c456"]]},{"id":"7b016978.c078e","type":"inject","z":"26b3bbbf.60d694","name":"","topic":"Salt lamp on","payload":"ON","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":560,"y":40,"wires":[["7bdb26f1.ac2018"]]},{"id":"4a4a6feb.686e08","type":"mqtt in","z":"26b3bbbf.60d694","name":"FrontDoor light","topic":"stat/FrontDoorLight/POWER","qos":"2","broker":"43c3d1a1.5b2cf","x":140,"y":300,"wires":[["fbc45581.e6811","f58e033d.97b2f"]]},{"id":"c28e19ff.fa0f78","type":"mqtt in","z":"26b3bbbf.60d694","name":"SroomFireplace","topic":"stat/SroomFireplace/POWER","qos":"2","broker":"43c3d1a1.5b2cf","x":140,"y":420,"wires":[["320df163.c0fe86","6d885fee.eb3488"]]},{"id":"be8c85ce.491ab8","type":"mqtt in","z":"26b3bbbf.60d694","name":"SroomLightRight","topic":"stat/SroomLightRight/POWER","qos":"2","broker":"43c3d1a1.5b2cf","x":140,"y":660,"wires":[["f7506cf4.014de8","1c9704f7.9ca34b"]]},{"id":"215fd663.b60e5a","type":"mqtt in","z":"26b3bbbf.60d694","name":"SroomLeftLight","topic":"stat/SroomLeftLight/POWER","qos":"2","broker":"43c3d1a1.5b2cf","x":140,"y":540,"wires":[["13a60249.82a096","241767a9.a1912"]]},{"id":"f8170831.ac97a","type":"mqtt in","z":"26b3bbbf.60d694","name":"KitchenLamp","topic":"stat/KitchenLamp/POWER","qos":"2","broker":"43c3d1a1.5b2cf","x":130,"y":780,"wires":[["96e606c4.4c2208","7b171230.ceb55c"]]},{"id":"b6aad598.0d88c","type":"mqtt in","z":"26b3bbbf.60d694","name":"LandingLight","topic":"stat/LandingLight/POWER","qos":"2","broker":"43c3d1a1.5b2cf","x":130,"y":900,"wires":[["3690976c.88d3f","c83ae8bd.c4eb7"]]},{"id":"d5b0bd37.fe634","type":"mqtt in","z":"26b3bbbf.60d694","name":"FishTankLight","topic":"stat/FishTankLight/POWER","qos":"2","broker":"43c3d1a1.5b2cf","x":130,"y":1020,"wires":[["9e7f39bd.b40268","d86b6799.4f566"]]},{"id":"91306ae5.4b7898","type":"ui_switch","z":"26b3bbbf.60d694","name":"","label":"Salt Lamp","tooltip":"","group":"6e38e03b.a66828","order":0,"width":0,"height":0,"passthru":false,"decouple":"false","topic":"","style":"","onvalue":"ON","onvalueType":"str","onicon":"","oncolor":"","offvalue":"OFF","offvalueType":"str","officon":"","offcolor":"","x":480,"y":240,"wires":[["7bdb26f1.ac2018"]]},{"id":"f58e033d.97b2f","type":"ui_switch","z":"26b3bbbf.60d694","name":"","label":"Front Door Light","tooltip":"","group":"6e38e03b.a66828","order":0,"width":0,"height":0,"passthru":false,"decouple":"false","topic":"","style":"","onvalue":"ON","onvalueType":"str","onicon":"","oncolor":"","offvalue":"OFF","offvalueType":"str","officon":"","offcolor":"","x":470,"y":360,"wires":[["c15901a7.e38f08"]]},{"id":"6d885fee.eb3488","type":"ui_switch","z":"26b3bbbf.60d694","name":"","label":"FIrePlace","tooltip":"","group":"6e38e03b.a66828","order":0,"width":0,"height":0,"passthru":false,"decouple":"false","topic":"","style":"","onvalue":"ON","onvalueType":"str","onicon":"","oncolor":"","offvalue":"OFF","offvalueType":"str","officon":"","offcolor":"","x":480,"y":480,"wires":[["c5e00626.f7d688"]]},{"id":"241767a9.a1912","type":"ui_switch","z":"26b3bbbf.60d694","name":"","label":"Sitting Room Left Light","tooltip":"","group":"6e38e03b.a66828","order":0,"width":0,"height":0,"passthru":false,"decouple":"false","topic":"","style":"","onvalue":"ON","onvalueType":"str","onicon":"","oncolor":"","offvalue":"OFF","offvalueType":"str","officon":"","offcolor":"","x":460,"y":600,"wires":[["9837d8db.ce0098"]]},{"id":"1c9704f7.9ca34b","type":"ui_switch","z":"26b3bbbf.60d694","name":"","label":"Sitting Room Right Light","tooltip":"","group":"6e38e03b.a66828","order":0,"width":0,"height":0,"passthru":false,"decouple":"false","topic":"","style":"","onvalue":"ON","onvalueType":"str","onicon":"","oncolor":"","offvalue":"OFF","offvalueType":"str","officon":"","offcolor":"","x":490,"y":720,"wires":[["fef023e7.09275"]]},{"id":"7b171230.ceb55c","type":"ui_switch","z":"26b3bbbf.60d694","name":"","label":"Kitchen Lamp","tooltip":"","group":"6e38e03b.a66828","order":0,"width":0,"height":0,"passthru":false,"decouple":"false","topic":"","style":"","onvalue":"ON","onvalueType":"str","onicon":"","oncolor":"","offvalue":"OFF","offvalueType":"str","officon":"","offcolor":"","x":480,"y":840,"wires":[["f9dccc15.ec6d5"]]},{"id":"c83ae8bd.c4eb7","type":"ui_switch","z":"26b3bbbf.60d694","name":"","label":"Landing Light","tooltip":"","group":"6e38e03b.a66828","order":0,"width":0,"height":0,"passthru":false,"decouple":"false","topic":"","style":"","onvalue":"ON","onvalueType":"str","onicon":"","oncolor":"","offvalue":"OFF","offvalueType":"str","officon":"","offcolor":"","x":480,"y":960,"wires":[["6de745ad.e34914"]]},{"id":"d86b6799.4f566","type":"ui_switch","z":"26b3bbbf.60d694","name":"","label":"Fish Tank Light","tooltip":"","group":"6e38e03b.a66828","order":0,"width":0,"height":0,"passthru":false,"decouple":"false","topic":"","style":"","onvalue":"ON","onvalueType":"str","onicon":"","oncolor":"","offvalue":"OFF","offvalueType":"str","officon":"","offcolor":"","x":480,"y":1080,"wires":[["aba4624f.b52f2"]]},{"id":"8b3bdfad.3c456","type":"debug","z":"26b3bbbf.60d694","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":320,"y":120,"wires":[]},{"id":"43c3d1a1.5b2cf","type":"mqtt-broker","z":"","name":"LocalMQTT","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"961ac8ef.f85bd","type":"nora-config","z":"","name":"nora config","group":""},{"id":"6e38e03b.a66828","type":"ui_group","z":"","name":"Lights","tab":"30f27008.1bd9d8","order":1,"disp":true,"width":"6","collapse":false},{"id":"30f27008.1bd9d8","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]
```

You need to delete that pastebin immediately. The flow you posted was not sanitised. It has a mobile number and a username/password in it.

I flagged it with pastebin immediatly. Changed the passwords as well.

Not with it this Sunday!! Is the flows I've left here ample to show what the issue might be?

EDIT: When I place debug nodes, how do I record logs from them?

There is a setting that allows the output to go to the Node-RED log. If you want something different, there was a recent thread about a new node called "flogger".

1 Like

For anyone else that has this issue, I contacted the app creator and he said he had no idea. I had to improvise so this is what I did:

Did you put a debug node on the output of the gate to see what was happening?

Actually I mean one showing what is going into the gate.

Yeah. It's outputting an ON signal at midnight. I believe it's on the days that timer becomes live. So the FRI-SAT Timer outputs an on at midnight on Thursday for example.

Sorry, don't follow you. Do you mean you have found a bug in bigtimer? Have you checked you are using the latest version of that node?

One thing you could try is play arround with the system clock on the device runing NR. If you set the system clock to 5 of midnight and wait 5 minutes, you could see if you could reproduce the issue.