Keeping the battery shield always charging

I would want a way to detect when the power goes off in my house. It currently happens at least one a day in this season, and an alert on my phone would be great. I was thinking to use IFTTT for this part.
To power the spark during the power failure, I was thinking to use the battery shield, which would get its power from a wall charger. So when the power goes down, the spark is still powered by the battery.
To detect that the spark is powered by the battery, I could connect an input to the wall charger 5V through a resistor.

My main doubt is on the battery shield. Is it ok to keep it always connected to the wall charger? The battery would be used a few minutes per day only.
Thanks for your advise

Some thoughts.

You could use the Core to control the charging via a relay.
The current battery shield seems to have no way of getting the charging state of it, but if you could (maybe with the new battery shield) you might want to keep the battery between 10% and 90% to extend battery life.
But most important, how would the Core communicate with the cloud - unless you’ve got a battery backed WiFi plus internet too?

Yes, your plan will work. The charger chip used on the battery shield will manage the charge state no problem.

Your idea of connecting the 5V input from the wall charger to identify the presence/absence of wall power is a good one.

I would suggest adding some kind of debounce so that a simple glitch doesn’t falsely report a power outage.

Once thing to watch out for is the battery life (while the power is off), you may want to check out some of the threads on the forum that discuss low(er) power modes, in order to increase the time that the core will operate without power, and thence be able to report the re-reinstatement of the power. Without code to specifically lower the power usage, I think you will be limited to approx 3 hours life from a fully charged battery.

Thanks for the answers. We actually have a diesel generator that automatically starts during power failure. However it takes around 10-20sec to starts, so the battery is needed only during this time, I don’t really need low power mode.
When the WIFI goes back, I can send information related to the failure to the cloud.
I’ll give it a try.

Should work fine in that situation - but I would test whether the 5V wall-wart output drops quickly enough to give you a clear indication, if your genny kicks in within 10 seconds.

Report back, it sounds like a great little application.