Alert me when Power is ON or OFF using IFTTT or Advanced Plan

Hello,

I am looking for a smart device that can alert me when power in my house is ON or OFF.

So far, I can achieve it using the Sonoff S26 plug by receiving ON notifications when the device recovers from power outage (via the Power On State).

I can also use eWeLink advanced subscription to create a scene such as:

Scene: If Device is ON > Run a webhook (can be used to communicate with third-party services that support webhooks).

However, the problem I’m facing is that I also need to be notified when power goes OFF.

I am aware that the eWeLink app has an option for offline alert. When the device has gone offline for 5 minutes, it will push a notification to me. But this does not allow me to run scenes/automations.

With eWeLink advanced, I can only create scenes as such: IF device is ON or OFF, not if device is Offline.

I am specifically looking to create the following scene:

Scene 2: If Device is Offline > Run a webhook (can be used to communicate with third-party services that support webhooks as mentioned on top).

But it is not possible to create the scene above with eWelink advanced dashboard.

Can you please suggest a solution?

Alternatively, I am considering using a smart light sensor made by one of your competitors (Tuya or Aqara) by plugging the light sensor into a separate power source at my house (such as a ups or portable power station). It would keep measuring the light in a small storage room at my house that has a simple/traditional (non-smart) light bulb connected to the main power at my house, and which is always turned on (the bulb).

If the light sensor detects that it’s dark (this means the power is OFF at the house and there’s no electricity since the bulb is turned off)

If the light sensor detects that there’s light (this means the power is ON at the house and there’s electricity since the bulb is turned on)

The light sensor would be compatible with IFTTT, and would allow me to run applets such as:

IF Light sensor brightness is above OR below 50 lux for example > THEN: Run X Action (such as a webhook, or anything that IFTTT can do).

P.S. I know that IFTTT sometimes has delays. That’s not a problem since speed is not a critical factor in my project.

Can you please help me determine how can I achieve the above project with SONOFF? because I really like your products, and prefer not to buy competitor products.

Thank you in advance for your support

I have a solution that I use for my home to detect if the grid power is off or on, so that I can control other devices such as water heaters etc. I use a Sonoff Mini R2, with the S1 and S2 terminals connected to a relay. The relay is powered from the mains (not via UPS or inverter). When power to the relay is removed, its NO / NC state changes, and the Mini interprets this as an on / off operation and triggers a smart scene. In my case, I also send a WhasApp message to my phone via iHost Node Red. You would get a notification on your eWeLink App anyway from the Mini assuming there is an active internet connection, and you have push notifications enabled on the Mini device.
My system is connected to my inverter with PV and battery backup, which takes care also of my internet connection. If you do not have this, I would suggest a small UPS to power essentials such as the Mini device and your router.
Hope this helps…

8 months… OP is probably far away with this situation.

Very clever move indeed. I had the same problem until this morning. I did what you have done, it works great. here in Kimberley South Africa we have lots of load shedding as they call it, because of useless people in our government. With your idea, it works great, thanks.

Hi Pierred358, any chance you could let us know what relay you used in conjunction with the Sonoff Mini R2 for the power off notications. Many Thanks Jonathan

In my case, my inverter switch-over uses a mechanical contactor switch-over when the grid fails, and the contactor has a NO (normally open) auxiliary relay that I could connect the Mini R2 with (using the S1/S2 contacts).

If you do nor have something similar, you could use any good quality relay, which you power from the mains to give you a NC (normally closed) contact point for the Mini R2. When the mains power fails, the NC contacts will open to give your Mini R2 the state change. These relays could be free-standing (plugged into a wall socket) or wired into your DB. Of course, keep in mind that you must have backup power for your MiniR2 and your network…
Do not use a cheap relay - it is worth spending some money on a good quality relay. The cheapies sometimes overheat and fail when you most need them…