For long time I have wanted to be able to monitor my Alarm System through the web, but I have never felt confident about the security of the web servers and tools available for this. I was also aware of some implementations using Arduino microcontrollers to achieve this task.
When I received my Azure Sphere Starter Kit from Avnet, and I learn more about Azure IoT Central Apps, I finally got confident I could develop a system to monitor my Alarm Panel in a safe environment.
My project relies in code written by other people. Specifically,
* Mark Kimsal: https://github.com/markkimsal/homesecurity
* Jose Castellanos Molina: https://github.com/matlock08/homesecurity
I have translated big portions of their code from c++ to c in order to create a High Level App. I had to write some functionality provided by Arduino, and also I had to modify the way the data goes out to the Panel, since it uses inverted signal, and I could not find how to do it with the Azure Sphere device's UART. Also I had to figure it out how to track the signal on the incoming UART signal, since the same input cannot be used for both GPIO and UART at the same time.
I could achieve the reading from the Panel and broadcasting Panel properties to an Azure IoT Central App.
In order to make it simple I have limited my project to the 8 default zones in the Panel.
I also created an event "triggered" which is fired when the Alarm Panel is armed and a zone is faulted. An email is sent immediately.
Going beyond the original goal of my project I have attempted to send commands from the Azure IoT Central App to the Panel. The commands available in my App are shown below.
This feature is not stable in the current state of the source code. Some times the command does not reach the Panel. It is mainly due to the fact that I have to use Software Serial functionality to overcome the inverted signal requirements to communicate with the Panel. It may be necessary to use a RTC App to handle sending data to the Panel.
A template to the Azure IoT Central App can be found here
Follow the "Building the Project" session of the Readme file in GitHub to assemble and run the Project.
Comments