Ruby

Tags:

I use Prowl to send notifications from our home monitoring system to my iPhone and iPad etc.

But I have been using the gem "ruby-growl" to do this for quite a while.

Growl was just updated to version 1.3 - and this broke "ruby=-growl".

But to help others with the same problem - drop in "growl_notify" - make a few simple changes, and all is good again.

The high level software in the house monitoring system works on a simple principle

201112042149.jpg

(Click for a larger pic)

All the data collected from the various sensors is sent to a memcached instance running on one (or more) of the servers, and stored together with a timestamp.

A small library makes it easily accessible for all the other software in the system.

In a simple display it looks like this :

As I was feeling rather under the weather on Friday and Saturday I spent some quiet time rewriting parts of the home monitoring software, but before I write up something about the details I;d better describe some of the high level details

201112042136.jpg

(Click for larger image)

On the right hand side are a large number of jeenodes and other nodes with a variety of sensors.

I managed to get my mongodb data (see earlier postings) to play nice with Rails3 and Google maps

By using the Cartographer gem I managed to turn the listingsdata into

201104302041.jpg

and

201104302042.jpg

in just a few lines of extra code.

So now I have a mongodb with listings information on a few 100.000's of companies - all displaying nicely on a set of dynamic maps.

I have been experimenting with Mongodb's geospatial searches lately - and even though the documentation is less than perfect I have at long last managed to create the necessary geo indexes and get rudimentary "near" searches working.

The first challenge was to make sure locations were in the correct format - something like this:
201104252016.jpg

notice that I had to make sure the coordinates were specified as numeric.

Also note the inclusion of the _id key - this has to be the unique and persistent id for the document, otherwise mongodb will generate its own primary key - which may not be what you want to live with.

Syndicate content