Reef Discussion

macca_75

Member
Apr 22, 2012
2,125
844
You won't believe it @Rob, but I have actually made a little progress on the new front end. Only 1 more little hurdle (getting multiple axis to work) and I a=think I have all the building blocks.
 

Rob

Member
Apr 26, 2012
743
424
@macca_75 sounds great for a new front end, as I think I am getting the doco (see page 5) together for the backend software install. I found a great writeup on getting Apache2, php and mysql installed and running complete with some web admin packages. I'll post a link in my writeup when I have tried it myself. I still need to crack a simple no fail way to setup Apache once installed to run my cgi scripts and ajax calls without having to change lots of files.

I also looked at a project where Raspberrypi used the cosm engine for data recording and display. raspberrypi gathers data then posts it to cosm for recording and display.

Cosm also has phone apps, only downside is you need a very reliable connection to the web as you push all data to cosm. makes the RPi role very easy collect data and squirt it across to COSM and the rest is done for you. COSM has web interfaces biult automatically depending on how many points you are recording.

Check this out basically is identical except weather data http://airpi.es/whatisthis.php
 

macca_75

Member
Apr 22, 2012
2,125
844
Yeah - I can upload my Solar to COSM, which will keep 6 second intervals and then upload to pvoutput.

A little to granular for me and not worth the extra step. I really want to keep the data hosted locally (and yeap - RRDtools does seem the way to go as you predicted).

One of the guys here uses his PI to upload to COSM and COSM to pvoutput so he already has it all working (oh - and he streams media to his TV from it as well).
 
Hi Rob,

Regarding my offer to create a "user" manual for your AquaPi. I have made a start but before I go on, I just want to check you are Ok with me taking your notes from page 5 and converting them into a "user" manual. If you check out the link below, you will see the start of it. Needs some tiding up, font changes etc but it gives you an idea of what I have in mind. Dare I say the Aqua Pi needs a logo/graphic of some kind now that it is all coming together!.......any graphic designers out there will to help!

https://docs.google.com/file/d/0B5usV8coTRBATWR0TmdnUExXQlk/edit
 

Rob

Member
Apr 26, 2012
743
424
Could not get to googledocs from my ipad. however At this stage I am continually updating that install guide on page 5 so don't reference this at the moment as no part is complete. really want to keep the guide within the bounds of the reefuge. It may eventually go into the reefuge wiki if we ever complete this to a final interface I want it referenced to this site as my contribution to the Reefuge. Lets not get ahead of ourselves.

@macca_75 has some ideas on a new interface which we also need to investigate. He is using the original interface. I plan on completing the how to test serial interface soon and then probably rethink the web interface from my first interface. At that time I may rewrite the words around the descriptions in the install guide with some more background. The actual read script and interface / logging will probably need as much description as what we have done so far in device connection.
 
OK, making some progress on my missing BUS.0 folder. It appears in the directory listing -
root@raspberrypi:/mnt/1wire# ls
drwxr-xr-x 1 root root 8 Apr 30 15:09 bus.0
drwxr-xr-x 1 root root 8 Apr 30 15:09 settings
drwxr-xr-x 1 root root 8 Apr 30 15:09 statistics
drwxr-xr-x 1 root root 32 Apr 30 15:09 structure
drwxr-xr-x 1 root root 8 Apr 30 15:09 system
drwxr-xr-x 1 root root 8 Apr 30 15:09 uncached

But not in the web interface
top highest level directory
uncached uncached directory
settings settings directory
system system directory
statistics statistics directory
structure structure
directory
 
Just plugged in my fried temp sensor and got the following....maybe it is not fried -

drwxrwxrwx 1 root root 8 Apr 30 15:17 28.931295040000
drwxr-xr-x 1 root root 8 Apr 30 15:09 alarm
drwxr-xr-x 1 root root 8 Apr 30 15:09 bus.0
drwxr-xr-x 1 root root 8 Apr 30 15:09 settings
drwxrwxrwx 1 root root 8 Apr 30 15:17 simultaneous
drwxr-xr-x 1 root root 8 Apr 30 15:09 statistics
drwxr-xr-x 1 root root 32 Apr 30 15:09 structure
drwxr-xr-x 1 root root 8 Apr 30 15:09 system
drwxr-xr-x 1 root root 8 Apr 30 15:09 uncached
 
IMPORTANT
Style A boards you need to change the owserver line above to use I2C port 0
/opt/owfs/bin/owserver -p 3001 --i2c=/dev/i2c-0:ALL
Rob,

Just for info, I have a Model A board and I have to keep my owserver line using port 1 as it does not recognise port 0. It is the same when I run the i2cdetect command, it only sees it on port 1 not on port 0
 
OK I have some good news, both the board and the temperature sensor is working when I use OWFS (see below) :) Still cannot have the the problem of the web page so I am going to compile the new version of OWFS to see if this works.

pi@raspberrypi /mnt/1wire/28.931295040000 $ cat temperature
21.1875pi@raspberrypi /mnt/1wire/28.931295040000 $ cat temperature
21.1875pi@raspberrypi /mnt/1wire/28.931295040000 $ cat temperature
21.1875pi@raspberrypi /mnt/1wire/28.931295040000 $ cat temperature
21.1875pi@raspberrypi /mnt/1wire/28.931295040000 $ cat temperature
21.1875pi@raspberrypi /mnt/1wire/28.931295040000 $ cat temperature
21.1875pi@raspberrypi /mnt/1wire/28.931295040000 $ cat temperature
21.1875pi@raspberrypi /mnt/1wire/28.931295040000 $ cat temperature
21.1875pi@raspberrypi /mnt/1wire/28.931295040000 $ cat temperature
21.1875pi@raspberrypi /mnt/1wire/28.931295040000 $ cat temperature
21.1875pi@raspberrypi /mnt/1wire/28.931295040000 $ cat temperature
21pi@raspberrypi /mnt/1wire/28.931295040000 $ cat temperature
21pi@raspberrypi /mnt/1wire/28.931295040000 $ cat temperature
21pi@raspberrypi /mnt/1wire/28.931295040000 $ cat temperature
21pi@raspberrypi /mnt/1wire/28.931295040000 $ cat temperature
21pi@raspberrypi /mnt/1wire/28.931295040000 $ cat temperature
21pi@raspberrypi /mnt/1wire/28.931295040000 $ cat temperature
20.75pi@raspberrypi /mnt/1wire/28.931295040000 $ cat temperature
20.75pi@raspberrypi /mnt/1wire/28.931295040000 $ cat temperature
20.75pi@raspberrypi /mnt/1wire/28.931295040000 $ cat temperature
20.75pi@raspberrypi /mnt/1wire/28.931295040000 $ cat temperature
22.0625pi@raspberrypi /mnt/1wire/28.931295040000 $ cat temperature
22.0625pi@raspberrypi /mnt/1wire/28.931295040000 $ cat temperature
22.0625pi@raspberrypi /mnt/1wire/28.931295040000 $
 
Last update from me today! I have just rebuilt my SD card again and compiled version 2.9p0 of the OWFS software to see if it resolved the webserver issue mentioned above. Well, I now get no webserver with this version at all but when I go into the mounted filesystem after running "sudo /opt/owfs/bin/owfs --i2c=ALL:ALL --allow_other /mnt/1wire", I can successfully read the temperature from the sensor -

pi@raspberrypi /mnt/1wire/28.931295040000 $ cat temperature
21.125

The fact that I cannot either see the webpage or the bus.o on the webpage, could this be some sort compatibility issues with the OWFS software and the Models or build of the Pi's. I have only recently purchased mine and I assume they are all the same.

Right, I am signing off for the evening.....well my evening and your early morning :)
 

Rob

Member
Apr 26, 2012
743
424
Raspberrypi port number was changed, I thought it was between Style A and B. However just did a search and it turns out RPi Sold before October 2012 uses port 0 so current Style A & B boards use port 1. Sorry I have updated the doco

I will try starting mine up with ALL:ALL and not specifiy the port address implicitly and see if it works
 
OK next dumb question. I am connecting my temperature sensor directly to the scokets (holes) on the 1-wire board. How would I wire several 1-wire sensors to these sockets e.g. 3 tempurature sensors, humidity sensor etc. It is this bit in the instructions I do not understand from a wiring point of view.

All 1wire devices are just connected in parallel so you will have to connect all sensor cables together
As always, many thanks
 

MagicJ

Moderator
Jul 11, 2011
9,650
3,761
Hobart, Tasmania
From Rob's post above

Sensor 1Wire Board
Red -> 5VDC (Supply +ve)
Black -> RT (Return -ve)
White -> OW (1wire Data)
So, join all the Red wires from each of the sensors, all of the Black wires from each of the sensors, and all of the white wires from each of the sensors and insert them into the sockets on the 1 wire board.

You might think that this would make it impossible to read from each of the sensors if they are all joined together but every one wire device has a unique ID code which can be identified by the controller.
 
Thanks for the info above. I brought a breadboard and after someone explaining the concept on how these work (did I say I knew nothing about electronics!), I wired up 2 temperature sensors

I still cannot see the bus.0 through the web browser -
top highest level directory
uncached uncached directory
settings settings directory
system system directory
statistics statistics directory
structure structure directory

However, I can see them through the OW file system -
root@raspberrypi:/mnt/1wire# ls
28.6EBB94040000 alarmsettings statistics system
28.931295040000 bus.0simultaneous structure uncached

This is the out of tank temp sensor -
cat 28.931295040000/temperature
21.5625root@raspberrypi:/mnt/1wire#

This is the in tank temp sensor -
cat 28.6EBB94040000/temperature
23.5625root@raspberrypi:/mnt/1wire#
As I run a Model A version of the Raspberry Pi, I am wodering if it is anything to do with that? I was using a 2GB SD Card and have replaced that with a 32GB SD Card just in case it was a storage issue.

So I think I am as far as I can go now with the temp sensors but it looks like I am not going to get the web interface working. Is there any web logs I can check to see if there are any errors?

I am about to purchase the pH, ORP and serial interfaces but just concerned that if the interface you are producing is going to use the web interface and I cannot get this working, I may not be able to get to the pH and ORP data.

Many thanks
 

Attachments

Rob

Member
Apr 26, 2012
743
424
You do Not need the web interface it's just convienient to see if it runs. As you can get temperatures via owfs that's all you need. I'll post up something on how you can now store the data

I doubt the problem you are having is with the model Aver B. or memory. it's got to be how you are starting owserver and owhttpd. Especially as owfs is working they are all basically the same. You can get data from the sensors now so might be easier to just like with it, unless you play with another sdcard.