Do you expect an urgent shipment from the post office? Although my mailbox is installed in my house and I do not have a long distance to go to the mailbox, but I'm interested in whether something was thrown in or not.
With a Particle Photon and a mobile solution via Power Shield and a LiPo Accu as well as a simple opening switch (= Reed Switch) I was able with the help of IFTTT to set up an SMS signaling on my smartphone.
WiringD2 and D4 are for the two cables of the reed switch; the other magnetic reed contact is lifted when the flap is opened and the trigger is triggered.
The lid opening is checked every 2 seconds and the trigger is processed according to an "if-then-else"-clause.
Since the photon is online via WiFi, the IFTTT service can be used to receive the fired Particle.Publish command and then send one - and only one SMS (checked by a variable named firstfire) - to the smartphone number stored at IFTTT.
if ((proximity == HIGH) and (firstfire == true)) // If the pin reads HIGH, the switch is open // the pin reads LOW, the switch is closed
{
Serial.println(">> Alarm >> Switch open");
digitalWrite(LED_PIN, HIGH); // Turn the LED on
Particle.publish("myBriefkasten", "Briefkasten-Deckel ist geöffnet worden", PRIVATE);
firstfire = false;
}
So I will be informed promptly about incoming mail.
Expansion Options- Sleep mode to save energy
- Monitoring of the lid opening only during the day (not on weekends or public holidays and not at night - ie at the typical delivery times by the postman)
- The PowerShield offers a Gauge function, which is not used here
- alternative energy solution with batteries conceivable
Here is a similar reed switch, which is waterproof and can be used in aquariums.
Comparable Projects From Me with Focus......Power Shield:
https://www.hackster.io/ingo-lohs/particle-power-shield-with-headers-v2-1-unboxing-e3c875
...Energy via Battery:
https://www.hackster.io/ingo-lohs/mintyboost-kit-v3-unboxing-08edb4
...Reed Switch Controls a Door with Particle Electron:
https://www.hackster.io/ingo-lohs/myreed-switch-controlled-by-particle-electron-3ea4be
Comments
Please log in or sign up to comment.