June 06, 2008

SunSPOT Alarm System

In a research project I'm working on called ISIS, we are looking into how hard it is to integrate our research with "independent third party software". Since we don't have time to find such third party software (we have a workshop next week), I sat down to make the crISIS Alarm System. It is a highly pluggable module based alarm system, running in OSGi, where new AlarmModules may be created and by anyone, and they will pop up in the system automatically as they are deployed in the OSGi container.

So, sitting there, having two SunSPOTs and a base station on my desk, more or less screaming at me; WE CAN BE ALARM MODULES!!!

Not a bad idea, I thought. Some hours later, I have two alarm modules connected to my alarm system via the base station, running in OSGi, all without breaking a sweat (ok, that's lie). The SunSPOT now triggers when switch1 is pressed, or when it is moving, and it's communicating it to the base station through my lovely custom 'protocol'. I intended to use a listener on the accelerometer, but that proved to be too time consuming, so I ended up with a movement check (like the one in the developers guide).

So if you are interested, you may go to our GForge site and check out the code, or just test the alarm system, and who knows, maybe you will be creating your own alarm modules? In any case, if you want to try it out, you should also take a look at the documentation (I know, it's boring to read, but I have a lot of pictures in it!).

I'm using felix and knopflerfish when testing the bundles.

Drop me a line in the comments if you like it (or if you don't....like it I mean...).