Aquacontroller III Data Logging with Raspberry Pi

Discussion in 'DIY Forums' started by farnzi, Jan 17, 2017.

  1. farnzi

    Joined:
    Dec 25, 2011
    Messages:
    315
    Likes Received:
    8
    Location:
    Eagan
    Fishies collected:
    1,532
    Have you ever logged into your AC3 to make some change and then been completely annoyed when you tried to look at a graph and it was completely empty? I was. Every damn time I seemed to want to look at the hourly logs that this thing saved they seemed to be gone so I decided to code around it and data hoard whatever it had.

    I used a Raspberry Pi 3 connected to my local network 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 datalog.xml is 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.

    All in all it took a few hours of learning a few new commands (and a lot of Googling), but nothing proved impossible and it's been worth it. I'm thinking of some additional alerting and analysis that can be done for some more fun. Maybe looking at the outlet logs to see patterns or history or usage. If anyone else is interested and has one of these dinosaurs, I can get you some more information or scripts.
     
  2. OP
    farnzi

    Joined:
    Dec 25, 2011
    Messages:
    315
    Likes Received:
    8
    Location:
    Eagan
    Fishies collected:
    1,532
    If someone tried to send me a PM, sorry - didn't know this thing was full. It's empty now and you can resend.
     
  3. cypho

    cypho I contributed!
    Lifetime Member Event Committee

    Joined:
    Jan 28, 2014
    Messages:
    664
    Likes Received:
    58
    Location:
    Minnetonka
    Fishies collected:
    6,865
    Next step. Loose the AC-3 and connect the sensors directly to the PI.
     
  4. OP
    farnzi

    Joined:
    Dec 25, 2011
    Messages:
    315
    Likes Received:
    8
    Location:
    Eagan
    Fishies collected:
    1,532
    That would be pretty cool. I don't know how you would control the outlets, but I assume you could just use the pins on the pi.
     
  5. cypho

    cypho I contributed!
    Lifetime Member Event Committee

    Joined:
    Jan 28, 2014
    Messages:
    664
    Likes Received:
    58
    Location:
    Minnetonka
    Fishies collected:
    6,865
    #5 cypho, Jan 19, 2017
    Last edited: Jan 19, 2017

Share This Page