I split out the date/time to make for easier import to a spread sheet. This script queries the arduino every 5 minutes and collects current data. Runs out of cron.
#!/bin/bash
DAY=`date +%D`
TIME=` date +%T`
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 "$DAY,$TIME,$source,$volts,$amps,$watts"
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.