PowerDetector
PowerDetector is an application that can be used to monitor the power connected to the device. Basically just plug the device (iPhone) into a charger and plug that charger into a wall outlet. When the power goes off/on the app will send notifications to the email addresses that have been configured in the app.
In order for the app to work correctly Siri Automations must be configured to connect the power events to the application. Basically the Siri Automation calls into the app each time the power goes on or off. Additionally Siri Automations can be used to run a recurring notification (keep alive) so that the app sends a message once a day with the current power state. The app does not need to be currently running on the device for it to work because Siri will automatically start the app when the power state changes and the emails will be sent.
Privacy Policy
The privacy policy can be found here.
Settings
There are a number of settings that must be set in order for the app to send messages.
- Enable Notifications: this toggle turns on or off the notifications from the app. With this off, the app will not send any notifications to the email addresses when the power state changes. Keep Alives will not be sent either.
- Add Date to Notifications: This toggle controls whether the current date and time are appended to the message sent. This is handy when determining exactly when the power was lost or restored, rather than relying on the time that the message was received at the client.
- Email 1,2,3: These email addresses specify the recipients of messages that this app sends. The email can either be an actual email address such as “(user)@gmail.com” or a texting address such as “(phone number)@mms.att.net” to send to an AT&T phone number through the email system.
- Email Subject: These two fields set the message text to be sent for the power on and power off messages.
- Email Message: These two fields set the message text to be sent for the power on and power off messages.
Email Account Setup
In order to send email notifications an email account is required with an email provider such as gmail. You need to provide the email address and the app password for the account and the port number in the settings for this app. The password is somewhat more involved because you need to provide an “App Password” rather than the actual account password. In the case of gmail, you can ask gmail to generate such a password, which is generally approximately a 16 character random string. Use this password rather then the normal account password and gmail will allow this app to send email through it to the destinations specified above. It is advisable to create a new separate email account with gmail for this app to use rather than use an existing gmail account.
In order to create an app password, search on google with a search string similar to the following “gmail sign in with app passwords”. You can find up to date instructions for creating the app password from the search results.
- Email: Enter the email address of the account that you are sending messages from - the account created above
- Password: Enter the app password here not the account password
- Name: Enter the name of the destination person you are sending to (can be any name as this doesn’t affect the send)
- Port: Generally port 587 is the correct port number to use.
Keep Alive Settings
Keep Alives: This app has the option to send a periodic message to the email destinations, reporting the current power state. Typically you might configure this to send once a day or once a week.
- Subject: Enter the subject for the Keep Alive periodic message
- Msg Power On and Off: Enter the message to send for each of the on and off states
- Email1,2,3: Toggle on the button for each email destination that should receive the periodic keep alive
Testing
On the previous view before clicking on the Keep Alive view, there is a “Send Test Msg” button that makes it easy to check if the email server and destinations are configured correctly. Simply click this button and a test email will be sent to the configured emails. Ensure that the top switch “Enable Notifications” is on. It can take several seconds for the email to get through. You can check in the sent email folder on the gmail account configured for the Sending Email Account if you are having problems. Any messages successfully sent should show up in that folder.
Siri Automation Setup
Three Siri automations are required to complete the app setup. To enable these settings run the “ShortCuts” app that comes with iOS.
- Once Shortcuts is running click the center tab at the bottom that says “Automation”.
- Click the “+” in the upper right to create a new Automation
- In the Search box type “charger”
- Click on the “Charger” line that appears and make sure “IsConnected” is selected
- Click on “Run Immediately” just under that and be sure that “Notify when Run” is off
- Click Next in the upper right
- Type “Power” in the search box that appears and select the “Power is On” tile
- The Automation is now complete and will return to the list of Automations and there should be an entry with a title like “When <your phone name> is connected to power”
- Perform the same steps again but this time under the Charger pick the “Is Disconnected” state and under Power select the “Power is Off” tile
Keep Alive
If you want to be informed periodically (once per day for example) that the power is still active at your location, create an additional automation shortcut:
- Click the “+” in the upper right to create a new Automation
- Click on “Time of Day” in the list and select “Time of Day” on the next view and then select the time you want the event to fire.
- Also select under “Repeat” whether you want it to run daily, weekly or monthly.
- Also select “Run Immediately” rather than run after confirmation. Leave “Notify when Run” off.
You should have these three automations when you are done: