This is an alert system I built for my Nan so she can quickly let us know if she needs assistance. I used a particle Electron with the photon battery shield. All details and a video of how it works can be found in the repo read me here: https://github.com/saphieng/nanny-alert
Features of the system are:
Alerts multiple people via email using SendGrid API webhook
RGB for easy status indication
Buzzer for audible feedback that alert has been sent
3G mobile connection to avoid connection loss during blackout
LiPo backup and charging so the system stays online during power outage
Blackout detection that alerts if power outage is detected
Ability to monitor battery status using Particle Cloud API
Alert button built into box as well as remote for backup if remote fails
Press and hole to test system without sending alerts to all users
Nice project, but why are you using the Photon Battery Shield?
The Electron has all its capabilities onboard already
Including a regulator that can take 12V - another piece of HW that I don’t see required.
A simple barrel receptacle connected to GND and VIN on the Electron should be enough and save you 40 $.
BTW, since you are using PUBLIC events with a rather short name you may encouter false triggers by other devices PUBLIC events that start with the same short sequence of characters. You should definetly go for PRIVATE events and subscribe via MY_DEVICES.
Also there is no need to include both application.handParticle.h the latter is the only one needed.
It’s a good question. I originally built this project from start to finish with a Photon. Everything was wired up and mounted in the box to be purely WiFi as I thought Nan wouldn’t want to worry about SIM card subscriptions etc and I didn’t think mobile was necessary. However, Mum was worried that if there was a black out the system would be down. After some googling I came across a forum post you made that said Photon shields can work with Electron if you don’t mind the pins overhanging. So converting my project from WiFi to 3G was as simple as flashing an Electron with the same code and swapping the boards!! I was stoked to know that it’s that easy to make this a WiFi or 3G enabled device so easily. Initially I thought I would have to wire it up to a different harness. This also enabled the blackout detection feature which was a nice add on.
Thanks for taking a look at the code! I didn’t realise the events would interfere. I’ll make them private. Will also remove the redundant header file inclusion.
Then you would probably be happy to know that the on-board fuel gauge of the Electron works exactly the same as the one on the Particle Power Shield, so you should be able to just remove that entirely without any change to your code.
In fact, when you build for the Electron the FuelGauge object will already be using the on-board one and not the external one
Yeah that's good to know. The issue is the whole thing was hard wired into the shield. I CBF re-wiring everything to remove the Photon shield when it worked so well just un-plugging and plugging in a board. If I re-built it with the idea that it would only be 3G or only be WiFi I would definitely save myself the hassle. While in prototype though I may come back to switching back to the photon.