Showing posts with label geek. Show all posts
Showing posts with label geek. Show all posts

Thursday, January 20, 2011

Graphing the interSeptor

After a considerable amount of mucking around, I persuaded various things to work together, and I now have Cacti making nice web-accessible graphs for me. My next project is to get a small "widget" display for OOAB that shows Current/Max/Min/Av values for temperature and RH.


If anyone ever needs them, the Jacarta interSeptor SNMP OIDs you need to read the Temp and Humidity are:
.1.3.6.1.4.1.19011.1.3.1.1.3.2.1.3 = current temperature
.1.3.6.1.4.1.19011.1.3.1.1.3.2.1.5 = current RH 
The values need to be multiplied by 0.1 to get a real temperature, as it stores the value as an integer with .1 of a degree increments.

Basically, the steps are to:
  1. Get a dyndns account or similar and make your router use it (if your machine/router/ has a dynamic IP address)  
  2. Use the port forward/firewall function of your router to forward any SNMP requests (port 161) to your interSeptor's internal IP address
  3. Install Cacti
  4. Use the SNMP OIDs to create graphs. 
  5. Because cacti uses dynamic references to its graphs, you're going to need to publish the graphs somewhere using the built in FTP function, or publish them to another web-accessible directory on the server running cacti. 
Temperature
Relative Humidity
Graphs
(these are still a work in progress)

New Gadget: Jacarta interSeptor

Today I received a Jacarta interSeptor from RS Components, which I plan to use for monitoring the balcony's temperature and humidity levels. Essentially, this (rather pricey) toy sticks a thermometer and hygrometer into a box that speaks http. I could theoretically add another sensor to monitor temperatures and humidity elsewhere (like in my wine rack!) but the optional sensors are also $$$.

The little sensors can be on the end of up to 20m of straight through Ethernet cabling, and the interSeptor unit itself can be anywhere with a network point and some power (why the heck don't they support PoE?!). You can also use the sensors to monitor high/low or open/closed circuits, so you can interface them with other things, along with a host of "official" sensors.

The sensor specifications recommend operating temperatures of 0-80ºC and 10-90% RH. You can set alarms ("thresholds") from -15 to 65ºC and from 5-95% RH. The accuracy is stated as +/- 1ºC and +/- 3% RH, which seems adequate for my purposes (although the RH could do with being a little higher).

Several somewhat minor but quite frustrating things immediately hit me:
  1. It has a Fat Plug (aka "wall wart")
  2. It's an English-style Fat Plug, which doesn't plug into sockets in South Africa
  3. It doesn't work like they say it does.
I hate Fat Plugs with a passion. Fat plugs are generally a major pain in the rear end to fit into multiplug adaptors. Having a UK plug on a product sold in South Africa is somewhat annoying - fortunately, I had an adaptor lying around I could use. That was a minor inconvenience compared to trying to talk to the thing.

In terms of "not working", theoretically, the interSeptor should use DHCP to pick up an IP address. However, for some reason, v2.03 of the firmware for these devices doesn't actually seem to work with DHCP servers (I tried two different ones, one on a Mikrotik router, and one on a Netgear router). With the Mikrotik, I could see the DHCP server offering a lease, but the interSeptor wasn't accepting it (or rejecting it) - it was point blank refusing it.

I wrote to their technical support, explaining the DHCP problem. They sent me the latest version of the firmware, v2.08. Of course, there's a bit of a Catch 22 here, in that if it doesn't DHCP, you can't upgrade the firmware, because you can't actually connect to the device... To their credit, they respond pretty fast!

Solving intractable problems like this often takes up chunks of my time at work, so I thought I'd try a different approach. I have a Sunix USB to Serial (RS232) adapter, and as the interSeptor comes with a serial cable and instructions on how to configure it through there, I thought I'd give it a try - after downloading drivers for Windows 7, and TeraTerm, as HyperTerm is no longer part of Windows. No joy at all on either COM port, or plugged into either of the 2 serial ports on the Sunix adapter. Irksome.

Being a network device, these little gadgets come pre-configured with an IP address, so as a last ditch attempt to connect to the blasted thing, I decided to try changing my computer's IP address manually to something within the same subnet range as the pre-configured IP on the interSeptor, and simply plugging a straight Ethernet cable between my computer and the device. This, of course, worked. I upgraded the firmware, and now the device quite happily talks DHCP.

Now comes the frustrating bit...!

The whole point of getting something like this is to let me keep a virtual eye on the plants when I'm not at home. What I'd like to do would be to have the device accessible over the Internet to Those In The Know (i.e. me). It would also be quite cool to have a little applet that sits on the blog here showing the live and historical temperature and humidity levels.

Whilst I can make it work oh-so-happily on the LAN (from either of the two subnets) I *cannot* persuade it to talk to the broader "internet". I have yet to pin down whether it's an issue with the Netgear router not doing it's firewall rules correctly (tried updating that to the latest firmware!) or that the interSeptor only responds to local (RFC1918 addresses), or those within the same subnet - given that I have NAT between the two subnets here, no matter which one I'm actually in, the devices on the other side will still "think" I'm in their subnet.

I've spent pretty much my whole evening on this now and am feeling like it's time for bed. There *must* be a sneaky way I can get information out across the Internet that doesn't rely on me setting up email alerts - but that's a job for another day... SNMP might be the way (and the included CD has the MIB).

The little Java viewer applets are quite cool, but only available within the LAN so far :/

These gadgets have a lot of promise, but so far, GRRR!!! To be more useful to gardeners, they should make the sensors weatherproof, make them work with DHCP (which they have done - IF yours has the right firmware) and I think the sensors could do with measuring up to 100% RH.

This "review" might seem a little negative at the moment, but I'm sure as soon as I have it worked out, I'll be singing its praises...!