About Jartweb

Greetings, Earthling, or…

Jartweb was my original attempt at setting up a basic web site, from many years ago. It started out as hand-crafted HTML code on a local server, then passed through one or two free hosting accounts, before being morphed into a wider site managed by Dreamweaver. It then decided to change its citizenship and became fluent in PHP as well as uprooting and settling at Streamline for a while. Having got itchy feet, it packed its bags, booked the removals lorry and moved lock, stock and two smoking keyboards, to Tsohosts, where it is currently settling in, unpacking the cases, and finding small fragile pieces of pottery broken in the bottom of the crate. The new house is about the same size as the previous one, but the rooms are nicer, the neighborhood is better, and there is a fresher air about the place.

Thankyou very much for the very detailed trip on the slough to cowley pea hey I want to use part of it on my bike with a small trailer thinking of getting on from middle green and finishing at little Britain lake will this be possible many thank theresa

Thanks for your comment.
I think you will be OK though I recall that the path is mostly uncovered (i.e. grass/dirt) and there were a few places it was a bit muddy and I had to step to the side to avoid the mud (it was a day after some rain). Also if your trailer is too wide, you might have to get off and walk it under one or two bridges as the towpath is narrow at some points. I recall at least one cyclist on the day I was there but no trailer attached. Worst case, you might need to turn back!
Andrew

Love your canal pics, I’m obsessed with the river lea and grand union canal and its surrounding areas, they truly feel like a land that time forgot.

So happy to see someone is documenting this…wondering, i am producing a little fanzine for my record label Blank Editions , we are based in hackney…and i wanted to ask if i could use one of your images for the cover of my little home made zine…no bother if not, ill go down there and shoot a pic myself, it just WONT be as good as yours 🙂

I have not yet tried to run more than the two DS18B20s of my current built. Elsewhere I have seen that the kernel driver for these devices on the Pi is designed to handle up to 10 devices, so it should be possible. I need to built a 10 way device soon so will have a go at the software then. My thoughts are:
1. Detect how many devices are plugged in (by enumerating the number directories that get set up in the relevant location)
2. Go through the devices one by one up to the maximum number present, reading them one at at time.
3. Store the results in an array.
4. Send the array values, two at a time to the LCD display and store them in the raw data file.

I am not yet sure how to handle the higher and possibly variable number of devices in Cacti. Perhaps I can set up a maximum of 10 channels (rather than the current 2) and for those that are not present, Cacti will not read any data and hopefully not get too confused?

The issue for both is that the devices are enumerated based on serial numbers so swapping out one device and swapping in another of an earlier serial number may upset the ordering (i.e. channel 3 becomes channel 4 and the new device becomes channel 3). I could fix this by storing a list of serial numbers and allocating them to specific channels, but my python knowledge is a it sketchy at the moment.

For the current python code, here is where the code determines the location of the two sensors:

# set up the location of the two DS18B20 sensors in the system
device_folder = glob.glob(‘/sys/bus/w1/devices/28*’)
device_file = [device_folder[0] + ‘/w1_slave’, device_folder[1] + ‘/w1_slave’]

and this bit does the actual reading, based on the locations returned by the above code:

and this is the main piece of code that asks for the sensors to be read and then cleans up the output.
Several parts of this code (and other code that displays the values) make the assumption that there are just two sensors, so a major re-write is needed!

Yes I believe there is a lot of room for expansion, and what you have done already is pure brilliant!

I have been trying to modify the python script to read 4 sensors (0,1,2,3) but just cannot get it to run. I would run the number of channels in cacti that I have sensors I think that would be okay as you mentioned.

My Python knowledge is to say, non existant but I have tried everything I can think of to get the script to see 4 sensors.

I will be interested to see how you get on coding the bigger system, as this is of vast use!

Well, I found some spare time and after a quick browse of the internet and a bit of hacking around, the following seems to work OK. I only have two sensors fitted on my test system, but this code should work for any number of sensors (up to the max 10 allowed by the kernel).