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

2Mar/142

Dynamic DNS Updates For Multiple Hosts On A Synology

Need to update multiple DYNDNS.org hosts on your Synology? Frustratingly you can't update multiple hosts with the GUI on a Synology. Once you select DYNDNS.org 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 DYNDNS.org 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 DYNDNS.org 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 "[DYNDNS.org]" should become "[DYNDNS2.org]" and if you wanted a third hostname updated, "[DYNDNS3.org]", 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.

 

Filed under: Computers, Software 2 Comments
16Feb/140

Closed Loop Monitoring For Motorola Paging System

IMG_20140216_155802824

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....

IMG_20140216_154558527_HDR

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.

IMG_20140216_154615645

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.

IMG_20140216_155103542_HDR

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

 

25Nov/130

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...

PagerMonitorProjectFiles
Title: PagerMonitorProjectFiles (130 clicks)
Caption:
Filename: PagerMonitorProjectFiles.zip
Size: 91 kB

Filed under: Uncategorized No Comments
13Feb/130

Healthy Habitats For Home Labs

iStock_000015238547XSmallI've slowly been able to expand my home lab to include the type of equipment that allows me to continually improve my technical skills as well as experiment with home automation and DIY electronics. As my home lab has grown so has the need to ensure it's kept healthy. One way to ensure it stays healthy is to make sure it's got a nice  comfortable habitat in which to work and live.

My first feeble attempt to monitor the environment where I keep my server rack was to buy a cheap-o temp and humidity meter from eBay.  It worked in so much as I could tell what the temperature and humidity was if I bothered to go down to the basement and look. I'm lazy, heck I have IP KVMs so I don't have to go downstairs to reboot a server, I'm not going to go down there to check the environmental conditions. Something better had to be implemented....

I started looking for environmental monitors/sensors on eBay thinking I could pick something up cheap from one of the numerous companies that sell used computer equipment. Data centers are always upgrading such things and I was confident I'd get something to meet my needs for less than $100USD. Wow, I was ever so wrong. I found some things around the $100USD range but they typically required other pieces or sensors that costs as much or more. This was starting to suck.

Not sure why it took so long, but I finally remembered I had purchased a temperature and humidity sensor from AdaFruit.com many months back for a project I hadn't completed. I also remembered I had an Ethernet shield and I always have a few Arduinos on hand. I had struck gold, I'll build my on networked environmental sensor and I can do it for FREE (as I already owned all the pieces).

Thanks to AdaFruit.com's learning site, I was able to get my DHT22 temperature and humidity sensor working in just a few minutes but I needed some way to get to the data remotely over the network. I hooked up my Ethernet shield and started messing about with building a HTTP client and after a bit realized there had to be someone who had done this already. I found this article which leveraged the Ethernet shield to log the data to a cloud service which had a nice user interface for making sense of the data points I was capturing. Exosite was going to be a great, no fantastic solution! I downloaded the Arduino library for Exosite and I was done in about 30 minutes.

20130213-164324.jpgThis is why I love Arduinos and the community of Arduino users. I was able to build an environmental sensor that was networked, captured historical data points and even has alerting features (via email) in about an hour and for about $75USD in parts.

Check out my Exosite portal here.

Now I've just got find a nice way to mount this in my rack and add a display for local viewing of the temperature and humidity for those times I actually am standing in front of the rack. But I'll save that for another post....

My example code and high resolution pictures can be downloaded below.

LabSensor
Title: LabSensor (380 clicks)
Caption:
Filename: LabSensor.zip
Size: 2 MB

11Feb/130

Great read for battery powered projects!

iStock_000015833126XSmallI've had many a project lately that needed to use batteries rather than being powered from the mains. I've been reading lots lately about saving power in AVR chips and general concepts for power conservation in my projects. It's made me a better engineer in general and I think all my future projects will benefit from the knowledge regardless of their power source. During all my research I did stumble upon this article that I thought would be useful to the masses and thought I'd share it with everyone.

http://www.sparkfun.com/tutorials/309

 

 

 

 

 

Filed under: AVR, Electronics No Comments
24Sep/120

I <3 Raspberry Pi

I finally got my shipment of Raspberry Pis today and I am stoked! I didn't pay the crazy prices on eBay and so I now have a $36 computer. I've allocated both of my PIs as XBMC boxes to power my basement and living room TVs. I had been running a BoxeeBox and while I initially loved it, I've grown to HATE it. They should rename it "FlakeyBox"; a $200 box of crap.

Anyhow, I spent about 30 minutes working on it and I have my first Pi up and running and streaming 1080 video to my TV without issue. If you are in the market for a Pi allow me to suggest Adafruit. If you want information on how you too can use a Raspberry Pi as a media center, check this site out. There are several different firmwares available for XBMC but I've settled on Raspbmc for now, it's fast enough for daily use and seems very stable.

 

Update (2/11/2013):

Make sure you use a powered USB hub and pick up one of these power supplies for your PI, otherwise it'll be very unstable. I learned this the hard way. These power supplies from AdaFruit supply 5.25V to the PI which helps with it's rather shoddy power design which will allow the board to become under powered and reset.

Page 1 of 1312345...10...Last »