The available reference systems are collected within the Reference Systems team. If you are not already a member, join this public team to get access to the included systems and libraries.
This applications use the camera & utilities library to detect motion and give notice.
This is the application Alarm System SMS:
This demo works on any platform with Java SE, including headless Raspberry-Pi
It also assumes an USB camera is attached or integrated.
On systems with screen attached:
On headless system:
Open the system block called Alarm System SMS and you will notice a periodic timer on the left side of the diagram. A tick is emitted from this timer twice a second. Follow this tick through the block and you will understand how images are captured.
Each image is fed into a Motion detection block that does a differential compare. If changes between two images are above a threshold the images are considered different and motion is detected. Look inside the method handleDetected(). You will see that an alarm is triggered if there is continous motion for more that two seconds. Block Limiter is used to make sure that there is a minimum of 5 minutes between to alarm messages.
The View blocks display the captured image. Closing any of them will stop the system.
Block SMS Send Buffered handles sending of the generated messages. It contains a buffer internally, to be able to store messages which haven’t been sent yet.
Also note the Test motion detection system block that can be used to test the system, but without actually sending SMS.
Block Alarm System Email is a very similar application. However instead of sending SMS it is sending emails to a list of recipients with attached imaged from the camera.