AC3 get data locally

torvall

New member
Question first, details next - is there a way in Windows or on a Raspberry Pi to script locally (on the same network) grabbing datalog files from the Aquacontroller 3? I feel like this should be really obvious, but must be missing something.

The Pi is something a friend is just giving me tomorrow so I'll play with that more when I have it. Now I can telnet to the thing from Windows but I can't see a way to output the data to file and me just telnet'ing and using the "d" command to output data to screen doesn't help in an automation sense. Really, I'm hoping to grab the data, store it, and ideally wipe it from the AC3 so that the next run has only new data.

Is there some easy data output method I am too tired to think of or just don't know about?
 
If you have 3.40 firmware on the AC3, you can pull current status data in XML format.

http://www.reefcentral.com/forums/showthread.php?t=1985407

Thank you for the link, I actually saw that last night before posting and played with the php files, but I didn't have a webserver installed on my home PC so it didn't know what to do with the wget command in the script. I did figure that if I installed one it would work, though I was hoping that maybe there was another way I hadn't considered with this old beast :) Maybe scripting around a telnet session somehow?
 
Okay I got this to work!

I used the Raspberry Pi 3 and created three scripts and an html page for display.

The first script runs every midnight and uses "wget" to grab datalog.xml and outlog.xml. I then use "xmlstarlet" commands to parse the datalog and outlet log xml into a more useful <date>,<value>\n format. After that, a second script is called within this first script using "except" commands. This second script telnets into the Aquacontroller and uses the "r" command to wipe the controller's data. A third script runs every five minutes, uses wget to grab status.xml, and then xmlstarlet again to parse the probe data into <date>,<value>\n. This one is sort of a repeat of the work done earlier with the datalog.xml file, but it's only hourly which is way less useful for a graph.

An html page on the pi then uses the new files along with embedded dygraphs code to display the data.

It's only been running for a day, so there might be some bugs to work out but so far everything is going well.
 
Apparently the forum removed some of my text. Here it is without some things in brackets...

I used the Raspberry Pi 3 and created three scripts and an html page for display.

The first script runs every midnight and uses "wget" to grab datalog.xml and outlog.xml. I then use "xmlstarlet" commands to parse the datalog and outlet log xml into a more useful "date,value\n" format. After that, a second script is called within this first script using "except" commands. This second script telnets into the Aquacontroller and uses the "r" command to wipe the controller's data. A third script runs every five minutes, uses wget to grab status.xml, and then xmlstarlet again to parse the probe data into "date,value\n". This one is sort of a repeat of the work done earlier with the datalog.xml file, but it's only hourly which is way less useful for a graph.

An html page on the pi then uses the new files along with embedded dygraphs code to display the data.

It's only been running for a day, so there might be some bugs to work out but so far everything is going well
 
Back
Top