Close

simple web page

A project log for Web based solar panel monitoring/managment

Arduino enable web server to monitor a small solar array and power management systems.

garyGary 05/26/2014 at 20:190 Comments

I like the table view of the solar voltage and current but it was more of a pain to parse the output for automatic data collection so I update the output to just provide a single string output with the label, voltage, current and watts. I used a simple bash script and curl to pull the web data every 5 minutes and create a CSV file.

Web page view from arduino.

Bash Script......

#!/bin/bash

date=`date`

CMD=`curl -s 192.168.1.177 | grep Panel`

source=`echo $CMD | awk '{print $1}'`

volts=`echo $CMD | awk '{print $2}'`

amps=`echo $CMD | awk '{print $3}'`

watts=`echo $CMD | awk '{print $4}'`

echo "$date,$source,$volts,$amps,$watts"

crontab entry to pull the data and save it in a file

*/5 * * * * /home/gary/getpower.sh >> /home/gary/solarout.csv

Discussions