Lifelong Learning a blog of all the things I've learned about…


DSC Alarm + Envisalink3 + DSCServer + SONOS = Alarm Announcements!

Electricty Chaos

Image courtesy of antpkr at

Long title and a large degree of entropy? Nah! This is a system that was built in layers but the components are largely used and fairly niche in their use. I've just decided that I'd use them to provide something even more niche, an alarm zone announcer for my house. Sounds cool to you then keep on reader, otherwise go back to your other boring business reading materials...

This all started when my wife and I decided to buy our "forever" home. A wonderful home on a bit of land in the city where our families lived, thus, the "forever" home label. The problem with our forever home is that it's a 2 and 1/2 story home and I'm always concerned with security, mainly the security of my family while we are home. I could really care less about someone stealing my junk as long as my family is safe. I wanted a way to ensure we would be aware if someone entered our home while we were home, awake or sleeping.

Long story short, I purchase a DSC Powerseries PC1864 system and the wireless sensors to put on each door and window. After we moved in and I got the system operational I realized the hectic process of leaving each morning would likely result in the alarm not getting armed so I sought out a way to remotely view and control it. I found the Envisalink3 card for my system. Nice little tool but the software is massively lacking in both features and security (no SSL for goodness sakes). That led me to the DSCServer software written for Android and Linux by MikeP. Great product and was the last piece to the puzzle for me....

Well, that was until I noticed my in-laws ADT system had a cool feature which would verbalize the zones that get opened...I loved that so much more than the beep...beep...beep my system made when a door was opened while the alarm was disarmed. Searching the interwebs left me empty, nothing was available to plug into my security system to give me that same awesome feature, I guess I'd have to roll my own. That's where my SONOS system (a total of 5 speakers) comes into play, it's got a wonderful full-featured API and it only took a few minutes to find a full-featured PHP library to control my system.

I leveraged the same raspberry pi that I was using for DSCServer to run apache2 and fixed up a nice PHP page which would announce which zone was opened based on a query string parameter passed to it. I then added an action for each zone in DSCServer to call the URL with the correct query string value for each zone. Volia! My SONOS speakers will quickly pause, a nice British lady will announce which zone was opened, and then the speaker goes back to whatever it was doing before the announcement.

I'm hard to please and this solution while dependent on layers of technology, works exceedingly well. There is a 2-4 second delay in the announcement which I'm strongly suspecting is the lack of power on my Raspberry Pi running DSCServer. I'm going to upgrade it to a Raspberry Pi 2 and see if I can reduce the lag time some. Otherwise, this project is complete.

As always, I believe knowledge should be free and freely shared. The PHP page I wrote is attached to this post for all to use. I've also linked below to the components I used (I'm not endorsing any retailer, it's just where I purchased).

DSC Powerseries Alarm & Envisalink3

DSCServer Software For Envisalink3

SONOS Speakers (I have several Play3s and Play1s)


Title: zoneOpened (66 clicks)
Size: 1 kB


Overlapping Subnets is never a good thing…

Cartoon Crowd, Network ProxiesRecently I had an issue that I couldn't find a solution for using the power of Google. My company has a wonderful tool from BMC called ADDM. It's an enterprise tool that allows you to scan your network and discovery the things that live on the network. One of the configuration tasks is to provide the tool with a set of subnets to scan and when to scan. Unfortunately I can't do subnetting in my head and the list of subnets I did have were of all sizes. What I found out quickly was that I had overlapping subnets supplied to the application, this meant that some subnets were getting scanned multiple times a day which isn't ideal in the enterprise. I could get a simple CSV extract of all the scans I had configured and what subnets were in each but I couldn't find any tools that would allow me to load up that CSV file and identify the overlaps.

Thankfully I have a rather long background in development and after spending about an hour building it in Visual Studio 2013, I had a self-made tool that would load the extract of scans and subnets from ADDM and tell me where I had overlap. It took me about five minutes to remove the overlaps and I was done! All in, I had invested more time searching for a solution than it took to make my own! Just goes to show you how limited life can be if you don't have the ability to find your own solutions to life's problems.

For those who may use ADDM at work, or really anyone who has a list of subnets and wants to identify overlaps. The CSV file was a simple select all and extract to CSV from ADDM. I removed the header and made user all lines had quotes around the subnets. Format is below and I've attached the code to this post, you can find the .exe in the bin folder after you extract the zip. As always this is open to the world but unsupported, use at your own risk. Requires .NET 4 framework.

Each line should look like this (scan or subnet name a comma and then a comma delimited list of subnets in CIDR format with quotes around the list):

Subnet or Scan name,"one or more subnets comma deliminated in CIDR format,"

Title: SubnetOverlapTester (163 clicks)
Size: 258 kB


blink(1) mk2 for the win…

blink(1) mk2 by ThingM

Last week I finally received my two new shiny blink(1) mk2 USB RGB "things"; these were rewards for helping fund the KickStarter project from ThingM. The mk2 is the second generation and even cooler version of thier RGB blink(1) devices. They are hackable USB powered indicators and I had a project in mind for one my mine which I jumped on right away. I wanted a way to indicate to cube mates when I was on the phone and shouldn't be disturbed (folks are always interrupting as they can't tell I'm on the phone before they barge in asking questions, awkward for all involved really). These blink(1) devices are the perfect fit for such a problem. I taped one up on my monitor, fired up Visual Studio and build myself a quick system tray applcation that will allow me to change the indicator color with a single click. The application also automatically switches the indicator when it detects I'm idle for 5 minutes. As soon as I interact with my computer again, the indicator automatically switches the indicator back. Super quick project and couldn't have been possible without the .Net library for the blink(1) by Jean-Francois Talbot and the great hardware from ThingM. As always source code is below and I've even recorded a quick video of the system working. Now to find a project for the other blink(1).....

Title: blink(1)SysBarCTRL (640 clicks)
Size: 682 kB


Dynamic DNS Updates For Multiple Hosts On A Synology

Need to update multiple hosts on your Synology? Frustratingly you can't update multiple hosts with the GUI on a Synology. Once you select as your provider you'll see there is only the option to enter a single host to be updated. After you add that host, the option to select in the dropdown for the providers so you could add another record is gone. I was able to accomplish this with little effort and here's how you can to.

Since I'm attempting to host a few personal blogs on my Synology, I needed several different domain hosts to get updated. I only tested this using the same credentials with different hosts targets. You may very well be able to do this for different accounts if needed.

First, you need to make sure you have SSH enabled on your Synology (if not, google it). SSH into your box as root and type in the following command:

vi /etc/ddns.conf

Now you should see the contents of the ddns.conf file on the screen. You'll want to copy all the values exactly except for the "hostname" line which should be changed to match the additional hostname you wish to have updated. You must also add a number the the block the update "[]" should become "[]" and if you wanted a third hostname updated, "[]", etc.

All done, go back to the GUI and open the DDNS service and you should see entries for all the hosts you manually entered. Hope this helps someone else who has a similar need as I did...

Example of what your ddns.conf file will look like.

Example of what your ddns.conf file will look like.



Closed Loop Monitoring For Motorola Paging System


Finished monitors looking sharp in their enclosures.

In my last post I talked about an issue my company had. We couldn't monitor our paging infrastructure from end-to-end and we couldn't find anybody selling anything that could. Before folks start yapping about pagers, you will see them in the healthcare sector for many more years to come when it comes to contacting a doctor for a life safety issue (cardiac arrest, etc) there is nothing currently sold that is as reliable and timely in the crowded RF world of a hospital.

I had built a prototype monitoring system using one of our pagers and an Arduino paired with a Windows Service. Well, it works and it works wonderfully so I was asked to build three more. Using multiple devices ensures we don't get false positives regarding a system outage due to the device or computer failing.

I've long been a fan of Adafruit and they were my first choice when I had my company order the parts needed to build out the rest of the monitoring devices. I leveraged the Arduino enclosure and the protoshield they sell and everything worked out wonderfully. I must say for a home-built gadget, they look pretty darn good and they perform wonderfully.



My apologizes for the quality of the pictures, had to use the cell....


This is the back side of the Motorola pager (after the being removed from the case). The two larger wires on the battery leads and the smaller is the signal wire from the positive side of the beeper on the pager.


This is the protoshield from AdaFruit. Getting ready to finish wiring up the battery leads to my 1.5v regulator on the protoshield and the signal wire to the analog pin. The pager is now powered from the 1.5v regulator.


Finished the wiring. All three wires! This is a much simpler setup than the original prototype.



Arduino in the workplace

Motorola Advisor II connected to an AdaFruit protoboard shield on an Arduino.

Motorola Advisor II connected to an Adafruit protoboard shield on an Arduino.

Recently I was faced with an interesting challenge at work. How could I monitor our paging infrastructure (pagers, yes pagers, I work in healthcare) to ensure it was up and running 24 hours a day, 7 days a week? I had the ability to monitor certain portions of the system but no way to automate the monitoring of the end-to-end system, all the way out to the pager, keep in mind this technology is a one-way technology. My experience in the electronics hobby and having a developer background gave me an idea, I could attach the pager to an Arduino and write a Microsoft Windows service that would receive heartbeats and page received alerts via serial over USB and log those to a file that our enterprise monitoring system could watch. In fact, our enterprise monitoring system could send an email which gets converted to TAP via some SMTP-to-TAP software we have in use already.

So, the enterprise monitoring tool will send a page to our test pager, once the pager receives the page it'll notify the windows service using serial communications, which will in turn write the event to a log file (I could have used the event log). The Arduino will also send a heartbeat message every minute which also gets written to the log file. This will allow our monitoring tool to raise an event if the Arduino goes offline. We'll add some additional business logic in the monitoring software to page several times before opening up an incident but yes, I think this will indeed work and work quite well. How else is a company that is dependent on 1970 open-loop technology monitor it without something like this? I'm curious if others have solved a problem like this and how?

It didn't take me long to get a simple windows service built that listens on the specified COM port for serial messages from the Arduino. There are lots of examples of this being done, just google it. Hooking the pager up to the Arduino was also super simple, I just used the existing connection to the vibration motor on the pager and tied that to an analog pin on the Arduino. I also didn't want to have to bother with batteries for the pager so I hooked up a LM317 adjustable voltage regulator to supply the 1.5V the pager was expecting from the 5V on the USB line. After hooking everything up, I must say the system works quite nicely, we'll see how well it behaves long term but this project proves how useful a simple Arduino can be in the workplace. As always all the project files are attached to this post for everyone.

Till next time...

Title: PagerMonitorProjectFiles (565 clicks)
Size: 91 kB

Page 1 of 1412345...10...Last »