Tasmota device resets to default config

1,943 views
Skip to first unread message

mohan RatiRam

unread,
Feb 17, 2022, 1:20:07 AM2/17/22
to TasmotaUsers
friends,

I have a fairly simple setup with an E18-d80nk sensor (configured as button1) connected on D2 (GPIO4) pin of Wemos D1-mini and a simple rule to update a counter whenever the sensor detects an object.

rule 1 on button1#state do backlog var1=var1 + 1
rule1 1

the telemetry data will periodically push this value to a locally configured MQTT broker.

The devices is working well for several hours but suddenly stops responding. Every time this happens I found the device configuration is reset to it's default config.

The doc says ALL Tasmota settings (equal to Reset 1) after 7 power cycles but I don't think this is applicable to my situation as I am powering the my device via a power bank.

greatly appreciated if anyone can steer me into the right direction!

best,
mohan

mohan RatiRam

unread,
Feb 17, 2022, 1:34:08 AM2/17/22
to TasmotaUsers
just wanted to add that I am running the latest Tasmota build. I tried with another Wemos but the problem still persists. I will swap in another sensor as soon as they arrive but in the mean time if you guys have any suggestions please roll them in.

much appreciated guys!

cheers
mohan 



Philip Knowles

unread,
Feb 17, 2022, 1:34:44 AM2/17/22
to mohan RatiRam, TasmotaUsers
You should really use switch rather than button as the input may stay on for a long time so you may get unwanted 'hold' results. That may or may not be the issue.
I realise that you may just be showing the rule as an example but the syntax should be
Rule1 on switch1#state=1 do add1 1 endon

Regards

Phil K


From: sonof...@googlegroups.com <sonof...@googlegroups.com> on behalf of mohan RatiRam <moha...@gmail.com>
Sent: Thursday, February 17, 2022 6:20:07 AM
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Tasmota device resets to default config
 
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/a102573e-7e0b-471e-a810-3fef30b0a5e1n%40googlegroups.com.

mohan RatiRam

unread,
Feb 17, 2022, 1:49:42 AM2/17/22
to TasmotaUsers
I made the changes you suggested and reconfigured D2 (GPIO4) to switch1 ... when the sensor detects an object it does a power recycle. Did I overlook something ?

112:15:35.399 MQT: stat/tasmota_DAB78F/RESULT = {"Rule1":{"State":"ON","Once":"OFF","StopOnError":"OFF","Length":34,"Free":477,"Rules":"on switch1#state=1 do add1 1 endon"}}
12:15:35.700 CFG: Saved to flash at F9, Count 68, Bytes 4096
12:15:38.920 SRC: Switch
12:15:38.926 MQT: stat/tasmota_DAB78F/RESULT = {"POWER":"ON"}
12:15:38.929 MQT: stat/tasmota_DAB78F/POWER = ON
12:15:39.560 CFG: Saved to flash at F8, Count 69, Bytes 4096
12:15:39.571 SRC: Switch
12:15:39.576 MQT: stat/tasmota_DAB78F/RESULT = {"POWER":"OFF"}
12:15:39.580 MQT: stat/tasmota_DAB78F/POWER = OFF
12:15:40.559 CFG: Saved to flash at F7, Count 70, Bytes 4096
12:15:52.782 WIF: Checking connection...

mohan RatiRam

unread,
Feb 17, 2022, 2:05:08 AM2/17/22
to TasmotaUsers
btw, while I am trying to make it work with switch1,  this is the "exact" command I was using and it works well for several hours until it crashes ...

rule 1 on button1#state do backlog var1=var1 + 1
rule1 1

I overlooked mentioning that I am using a custom Tasmota build (using the latest source) that supports expression

regards
mohan




On Thursday, 17 February 2022 at 12:04:44 UTC+5:30 knowles...@gmail.com wrote:

mohan RatiRam

unread,
Feb 17, 2022, 2:40:39 AM2/17/22
to TasmotaUsers
I got your recommendation running. I needed to do switchMode1 1 

I have a good feeling that your recommendation about the unwanted 'hold' state the button might be causing. I will let it run for few hours and keep you posted if it remedies my situation. fingers crossed :) 


thanks a bunch Phil!

best,
mohan
Reply all
Reply to author
Forward
0 new messages