Make your own alarm system with your raspberry pi
April 7, 2019A konyks senso with a raspberry pi and… You have now your diy alarm!
What you need
About the konyks senso sensor
The konyks senso sensor is basically a door opening sensor. It should work with ifttt, google home and alexa. However… I tried to configure it on ifttt, but only the “door closed” event is triggered, not the “door opened”. So… I thought about how to use this new toy with my awesome raspberry pi. And… surprise: the sensor never answers to ping, except when an event is triggered. It means that when the door is opened, the sensor wakups and answers to ping. And that is what we will use here.
Let’s code
You can find a simple proof of concept sourcecode on the Raspberry-pi-alarm repo.
Simple installation
$ git clone https://github.com/gpenverne/raspberry-pi-alarm.git
$ make install
Configure it!
Open the listener.py
file: you have to edit the line 11 to put your chromecast name:
chromecast_name = 'my-chromecast-name'
Launch it!
$ make start
Explain it…
The make start
command will start a simple static file server (using the python3 http.server library), and launch the listener.py
script. This script will check if the sensor answers to ping, and will play the alarme.mp3
sound file on the chromecast.
To conclude
The repository is only a proof of concept, I have a custom version to turn on/off the alarm using google home, and to stop the alarm. But it’s a very customised version ;)
You May Also Enjoy
How to earn money with your raspberry pi
How to earn money with a raspbery pi? It’s simple, with earnapp.
Functional tests with puppeteer and gherkin scenarios
For my custom needs, I was looking for puppeteer functional testing suite. As a php developer, I ordinary use behat to write and play my functional tests...
Make sound volume presets for your chromecasts
Sometimes, I tell to Google “Up the volume”, or “Down the volume” on one or several chromecast devices. But the next day, when I want to listen music aga...
Retropie with a gameboy advance as controller
You have a gameboy advance. You have an amazing retropie installation. So… You have already your perfect controller…Inside Gadgets did it!I bought this w...
How to listen an audio cd to your chromecast installation?
Using a raspberry, an usb cd reader, a wifi dongle… Stream an audio cd to a multi-chromecasts room ! How to ?What you need ...
How to mount put.io as a drive using python?
Mount put.io as a drive using python.Retrieving a token1) Go to https://put.io/oauth/apps/new , create an app (fill something in all fields, it does not ...
When you click on links to various merchants on this site and make a purchase,
this can result in this site earning a commission.
Affiliate programs and affiliations include, but are not limited to,
the eBay Partner Network and Amazon.