Allow SonoffMiniR2 or BasicR2 to continue timer fonction when OFFLINE

Hi all,

i am trying to figure out why my Sonoff MiniR2 and BasicR2 stop performing their On/Off programmed operations when the Wifi is down. All devices have the 3.7.6 firmware.

They work perfectly when the Wifi is on and they are “online” with it, but as soon as they are “Offline” because of No Wifi, they dont turn On/Off as planned.

I read a post where it says that the devices store the timer information to work offline, but in my case it does not work.
Does anyone have the same issue, or the solution ? Do I need different devices in order to work Offline ?

Thank you very much.

As I have already mentioned in other threads… It works on S26R2, so the fact that some devices work is true.

Unfortunately, I do not have these devices at hand to test for you. :frowning:

Do you use Scheduler, Timer, Loop Timer?

Do you have LAN control in the settings ON?

Thank you very much Morgan.
That is a very useful tip.
Maybe I should try to use S26R2 instead of MiniR2 / BasicR2. Do you know if S26R2 keep their timer settings when the Power is off (electrical outage) or if their memory restored to 0 ?

With my Sonoff devices, I am usng the Ewelink app to set up automatics scenes. I am not sure to know what are Scheduler, Timer. Can you please help ?
Thank you

I mentioned this in another thread… When I did some quick tests and the behavior of the S26R2 indicated that it was unable to remember the settings or load them into memory after a power outage, I speculate that the same behavior may be the case with any Sonoff device.

Why does the device behave like this… I can speculate on reasons.

1, when the device receives power, it starts the boot sequence but stops at the step of trying to establish a Wi-Fi connection and does not load any further resources. The result is that simple settings are not performed.

2, when the device receives power, it starts the boot sequence, connects to Wi-Fi, connects to the cloud from where it downloads the settings and stores them in memory, and when it goes offline, it still remembers the basic settings as long as it does not lose power.
Or it has these settings saved in the device all the time, but because the device startup sequence stops at the attempt to connect to Wi-Fi, it does not proceed to further steps.

But this is just speculation on my part, I don’t know the exact mechanisms that are implemented.

Regardless of these small technical details, the end result you are interested in is the same… The device is unable to perform scheduled tasks after a power loss. It must be constantly powered and only disconnect from WiFi and then it will work. So this excludes any transfer of devices from one place to another or reliability in the event of an emergency power outage. Each device would have to be connected to a UPS to ensure continuity of power.

I mean in the ewelink app, after entering the device panel/tab at the bottom, you usually have two/three icons, that’s what I’m talking about.
In the test, I set the Schedule with two positions, one with ON and after a minute Off it worked without WiFi but provided that there was no power outage… at least that’s how S26R2 and Micro behaved. Unfortunately, I don’t have the models you wrote about so I would check them. Logically, they should be operated in the same way, but someone from Sonoff would have to make an official(@Daniel_Zhan ) statement here.
In your case there are two options, it’s just a problem for you or these models don’t know how to behave like this at all, but some people’s opinions contradict this…

Maybe try resetting to factory settings and setting everything up again. I guess it probably won’t help, but you can try it to be sure.

One more very important thing!!!
You wrote “to set up automatic scenes”… If you really meant it, I have to worry you, but Automatic/Manual Scenes do not work without Internet access, even if there is a Wi-Fi connection!!! I also mentioned this in another thread.

We need to distinguish two things Scenes vs Device Scheduler.
Scenes do not work offline, and even more so when Wi-Fi is not connected. Scenes are handled on the ewelink cloud side, not on devices! To have local scenes you need a device like Sonoff iHost. But here too, the operation of local scenes will require the device to be connected to WiFi all the time because it must have LAN connectivity, the Internet itself may be off, but LAN communication between iHost and your Sonoff devices must be in place for the Scenes to work.
If you don’t have a device to run Scenes locally on your LAN, you won’t be able to do anything with it without the Internet.

In other words, you cannot do as you planned, so that the device has programmed Scenes and has Wi-Fi off. This will never work in any Sonoff device unless it introduces a dedicated solution in the future that will be 100% standalone.

However, I am talking about the Schedule per device functions! These are not Scenes! Go to the ewelink app, select the device, you should see two/three icons at the bottom, the first one on the left is Schedule, they should have names. :slight_smile:
This Scheduler function can be used even when you turn off Wi-Fi, provided that the device does not lose power. This is how I tested S26R2 and Micro! :slight_smile:

To change the behavior of the device it would have to be officially done by Sonoff.
If the device is technically able to store information about the Schedule all the time, then the firmware of the devices would have to be improved so that the schedule could start operating without being hung up due to the fact that there is no Wi-Fi.

The fact of such implementation seems to confirm the operation of “power on state” and “inching mode” - both of them are saved in the device and operate regardless of what happens to the device from the moment the power returns.
In other words, we can set the device to turn on whenever it receives power, for example, and set the time after which it should turn off.
Maybe this solution will be useful to you?

Then the devices would be insensitive to power outages because when the power returns, they would boot and start scheduling and possibly look for Wi-Fi in the background.
But there is one big problem here - real time clock per device. Which Sonoff devices have an RTC that will provide the correct time/date for the schedule after the power returns… I don’t know, but it may be that none or many of them have an RTC that would didn’t survive a power outage and that is why the schedule is only able to work when the device was able to connect to Wi-Fi, although this does not explain where the LAN time comes from… but again, Sonoff has to comment officially.

1 Like

Thank you very much ! Very useful as always.

● Generally, network connection on your smartphone is required to set a schedule/timer/loop timer. While the execution of a timer doesn’t need the internet. However, if the power supply is removed from the device, the list of schedules, timers and loop timers will be cleared. The list will not restore until the device has access to the internet again, since the device needs to connect to the server to get the list of timers.

This means that at the moment it is not possible for the device to work after a power outage when there is no Wi-Fi or Internet.

But it can work without internet/wifi if it has previously downloaded the settings and there is no power outage. But this only applies to schedule/timer/loop timer settings, scenes will still not work.