What if my internet connection fails

I am leaving home for a few days and need a schedule to keep running on a sonoff basic switch, the internet connection is very bad some days in my area and I want to know if the set schedule will execute when the internet is down for multiple hours at a time?

I think the timer you setup via the device setting page are stored in the flash on the device itself, which means the timer will run without Internet, maybe you can have a try first.

Yes, your schedule will continue to operate without Internet. HeisenBerg is correct.

I put a S31 on my router, and set it up to restart daily at 3 am. Works great. I have not seen in another WiFi smart plug this feature that works. You can test it yourself. Simply setup a schedule a few minutes in advance of your current time. And let it save. Then unplug your router or cable modem. Watch your app, you will see that device turn off then back on.

1 Like

Thank you both, that is exactly what I want do do with my router and I did set up and test without internet and it worked great.

1 Like

That’s right, my friend, the programmed timer would work even if there is no internet, since it runs locally from the device itself,

1 Like

I’ve already replied to this question with YES, it will start your router if the router loses power. AND you can create a scheduled time for your router to perform an OFF & ON daily if you wish, to make sure you have a good connection. The schedule is saved locally in the plug. THAT is a brilliant move on Sonoff’s part. VERY SMART of them to do this for us.

So, I wanted to also suggest that everyone should look for other places that need reliable Internet connections and put a Sonoff S31 there. For instance do you have an security camera that you depend on? Put a S31 WiFi Plug there too. Give it a schedule where it turns off for 1-2 minutes and back on daily. Think of it as a camera RESTART just in case.

I am lazy. I have several cameras where the 5V adapter is high or hidden and a pain to get the ladder out and climb up and unplug and plug back in when it hiccups. So, I put a S31 or Basic RFR2 on the camera’s power adapter. I gave it a OFF & ON schedule at 3 am. Having done that, I never have to restart the cameras. A couple of the cameras have a Restart button in their firmware, but they are not reliable. SO, the S31 is a great complement.

I am on a couple of other forums, and I have encouraged people to put WiFi Plugs on their cameras. Many have thought it a great idea and have done it. And naturally, I have plugged the S31 when asked. Because I know it has the LAST POWER STATE option that few WiFi plugs do.

Hi all,
i am reading your posts about the Sonoff modules (Basic, MiniR2, etc) keeping the proprammed On/Off settings EVEN WHEN WIFI IS OFF.
I have a few Sonoff MiniR2 installed and working fine for a long time, but when my Router is OFF (no WIFI at all), all the Sonoff Mini R2 are OFFLINE on the Ewelink app, and they do not start their programmed cycles On/Off.
Of course, when the Wifi is restored, the Sonoff modules work fine again because they are back online.
I am only interested in the fact that the Sonoff modules continue to work during the period when internet is OHH (even if it lasts days).
So my question is : does it really work with Sonoff BASIC ? Is it only with Sonoff BASIC ? Is there another Sonoff Wifi relay/switch that keeps executing the programs even without Wifi ?
Thank you very much !

Hello,
I tried the following with Sonoff MiniR2 and Sonoff BasicR2 : same result. Not functionning without Wifi.
All my Sonoff devices have the firmware 3.7.6 as of today. They all have LAN activated (but I dont understand the point since my network was turned off foor this test).
My Sonoff devices were programmed (via Ewelink) to turn On at a certain hour and then Off later in the day. Then I unplugged my wifi router to check if they were still following the program (turning On and Off) at the hours I programmed. The Sonoff devices did NOT turn On or Off when they were Offline.
So i guess it is because they only work when ONline, meaning the orders to tun On / Off come from the network/Wifi and are NOT stored in the memory of the Sonoff devices.
Sad for me because I was really hoping it would work.
Is there another Sonoff device that would store the programmed On/Off settings and function when they dont receive a Wifi signal ?
Thank you very much for your help.
JC

Sonoff devices usually do not work as you would like.
Many functions are cloud-dependent, meaning they stop working without internet access.

There are two issues to distinguish… no internet connection and no wifi connection to your LAN for the sonoff device.

If there is no Internet, some functions, depending on the device model, may not work, and scenes will not work either.

LAN mode is intended for communication between devices within the LAN network, but they still must be connected to WiFi and have communication within the LAN network. If your situational model is to turn off the Wi-Fi router and the devices lose connection to the network, it is obvious that they will not work, LAN mode has nothing to do with it.

Many Sonoff devices in 2023 have LAN mode… what does this mean, it means that when the devices are connected to the WiFi router and communication in your LAN network is available, you can then run the ewelink app and still control devices that support LAN mode. But remember that control does not mean support for scenes or other cloud-dependent functions.

The device that replaces the cloud or creates a local cloud is the iHost, which is intended to provide cloud functionality but locally in the LAN without the need for Internet access.

Another example is Sonoff Zigbee Bridge Pro which supports local scenes but only for devices paired to it, i.e. ZigBee.

Many people replace the ewelink cloud with their own automation systems such as Home Assistant in order to, among other things, be able to function when there is no Internet access.

Can the device have a running schedule in LAN mode? Yes, provided that it was set when there was Internet access. Tested on S26R2 and Micro. You cannot edit or add new variables in LAN mode.

Will the schedule work when the device is not only without the Internet but also not connected to Wi-Fi? Yes, tested on S26R2.
But there is a very important thing to note! The device cannot perform a power loss cycle! Otherwise it won’t work.
When the device is connected to Wi-Fi and has access to the cloud, we set the schedule, then turn off Wi-Fi, the device is still able to execute the schedule (tested only a few minutes after going offline), but if there is a power outage, the device will not work. Probably the software not loaded into memory and the boot sequence which will not do anything more than try to connect to Wi-Fi.
The above conclusions are based on short testing based on only two devices and may not be reliable on a large scale and over the long term.

3 Likes

Hello Morgan,

thank you very much for taking the time to explain. Very clear and very useful to me !

I did try your explanation today, and it works as you say.

If they are LAN-enabled, the devices work normally as long as they have access to the Wifi, even if there is no connection to internet.

As soon as there is no Wifi accessible by the devices (routeur turned off), the devices go Offline and you cannot control them and they do not operate the programmed scenes.

Regarding the S26R2, do you mean that they lose all memory of programs and timer as soon as they have a power outage or unplugged ? Don’t they have a battery inside to keep the store programs On/Off ? I will try the same process as I did with your precious help and post it here afterwards.

What I am really looking for, is a timer-switch device that we keeps running its programmed schedules EVEN WHEN THERE IS NO WIFI AND NO INTERNET. For example, far away from the house, when the Wifi doesn’t go. My dream would be to be able to program the devices with the Ewelink app (being in a Wifi area), and then install them in a zone where there is no Wifi at all. Is there such a device ?

Thanks again !

1 Like

As I wrote in your thread…

There is no chance for the device to work after a power outage, when the power is restored they will not be able to synchronize to the cloud, they do not have a battery or such functionality. When they lose power, they lose schedule/timer/loop timer settings. However, the Scenes function cannot work without the Internet, except when you have iHost and perhaps NSPanel pro on the LAN, but the device must still have WiFi connectivity.

● 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.

No, not from Sonoff so that it is compatible with ewelink.

The simplest solution for turning the power on and off is a socket with a timer… There are plenty of them on the market in various varieties, but the cheap ones are not manageable via the network.

Loose examples…

https://www.amazon.com/Baomain-THC15A-Digital-Programmable-Switch/dp/B01M7ZUWI7

https://www.amazon.com/Century-Indoor-24-Hour-Mechanical-Outlet/dp/B01LPSGBZS

https://www.amazon.com/Decker-Timers-Programmable-Indoor-Grounded/dp/B094PFJ5JW

https://www.amazon.com/Techbee-Countdown-Programmalbe-Electrical-Appliances/dp/B086DN9QT3

2 Likes

“There is no chance for the device to work after a power outage, when the power is restored they will not be able to synchronize to the cloud, they do not have a battery or such functionality. When they lose power, they lose schedule/timer/loop timer settings. However, the Scenes function cannot work without the Internet, except when you have iHost and perhaps NSPanel pro on the LAN, but the device must still have WiFi connectivity.”

I fully understand that scenes are dependent on a server somewhere in the cloud or local. If I understand the above paragraph correctly, how does the wi-fi without internet restore the schedule/timer/loop timer settings after a device power cut? where do the settings come from then? Hope my question makes sense.

The device doesn’t do it, it can’t do it… that’s the point.

We discussed this in another thread.

In short…

If the device loses power and is unable to connect to the Internet to access the ewelink cloud, it will not have any settings for “schedule/timer/loop timer”, unfortunately there is nothing you can do about it.

When the device starts, it tries to connect to your Wi-Fi, if it succeeds, it tries to connect to the cloud, and if it succeeds, it downloads the settings and stores them locally. When it later loses Internet connection or even your home WiFi is turned off, the device still remembers the settings for “schedule/timer/loop timer” but if the device loses power for any reason, even for 1 second, all these settings are lost. and the device will not work until it connects to the Internet again and downloads these settings again.

I’m talking about the situation without iHost on the local network. If you have an iHost, theoretically most devices should use local scenes and probably “schedule/timer/loop timer”… But you still need a wifi connection on your home network between the devices and the iHost.

Thanks for that. I have been using Sonoff switches since 2017 and have probably had more than 2000 power cuts and a few fibre faults on my wi-fi modem and yet never noticed schedules not working when the power returns. It could be that I was just lucky with the timings between the various events.
I have purchased an iHost, but gave up with it and have reverted back to eWelink’s cloud service for scenes which are simpler and more logical to use than iHost - not that they are perfect either. My biggest issue is that auto scenes are triggered immediately after editing and saving them if the conditions happen to be met.

Apparently you were lucky that you didn’t notice and it didn’t affect your automation.

If your operating model is not sensitive to the loss of functionality when you lose connection to the cloud, then ok. :slight_smile:

However, there are a lot of people for whom this situation destroys a large part of the automation. But that’s a separate discussion. :slight_smile:

Unfortunately, this is how they currently work… It would probably be nice if the ewelink team changed the operation status to disabled after creation.

If this is for any reason a big problem for you, I might suggest taking a partisan approach to the topic…

Create multiple scenes with names so that you can recognize them.
Set triggers and actions to anything that doesn’t interfere with your actions, just some nonsense that doesn’t affect your environment.

Save and then deactivate the scene. Now go back to scene editing and set exactly what you need and save the scene. And when you’re ready, start doing Enabled for the scenes.

This way you are able to create scenes that will not perform actions that may be problematic for you right after saving the scene.

Yes, it is not very convenient to create shadow scenes and then edit them to make a proper scene out of them, but…

If I disable a scene before editing and then save it again it doesn’t get triggered. Right! However if I then manually enable it after saving it then it does get triggered immediately which is still not what I want. If I create a manual scene to enable the auto scene then it enables it but it doesn’t get triggered, so that’s a clumsy way around the problem. Having said that, I previously believed that enabling an auto scene in a manual scene would trigger it but it seems not so.

What specific application do you have for such a specific scene?

Because the Scene behaves this way, it has such a task to execute immediately as soon as it meets the conditions and act when it is active.

How else would you like to solve this? Do you want to have an active scene that has the conditions met and still not execute? You can delay the execution of the action, but I doubt it would suit you.

Make sure the conditions are not met for the trigger, otherwise the logic flow is probably correct in the scenes.
Automatic scenes are automatic and try to execute immediately based on their settings.
How do you want to postpone the execution of the scene if the conditions are met and the scene is active and at the same time we do not use the delay in “Then”? This doesn’t make any sense :slight_smile:

I know what you are saying, however, the auto scene I am talking about needs to be triggered when a device transitions from off to on. The only option I have in the conditions is to say If the device is on then … which means that if the scene was disabled and I re-enable it when the device is still on then the auto scene is triggered. Once the scene is done, then it will only be triggered again by the transition of the device state to on which is what I’m after.

1 Like

Ok… so the usual “Constraints” for Actions. Many automation software have had this for years, too bad ewelink doesn’t. :slight_smile:

This has been a VERY GOOD discussion on scenes and schedules and how some functions in Sonoff devices work. Thank all of you for your contributions. Its an interesting read.

Many extra atta-boys goes to Morgan for those amazing explanations.

I posted at the top, but I was only referring to the S31 as saving and storing schedules and working when Internet down. Did not try other devices.