Very simple Web page for PC Mode stats

Started by Nomad1, September 06, 2018, 01:44:03 PM

Previous topic - Next topic

Nomad1

Hi guys!
I'm new to this forum, so before asking dumb questions I want first to present my small gift for this community: very simple web page, displaying data coming from KID in PC Mode.
It lacks fancy graphs and whistles, but that's the kind of data I expect to see from my rig while not at home.

Project page on GitHub: https://github.com/Nomad1/KIDStats

Installation
Note: it requires at least basic Linux knowledge, since the script is written in Bash and it could be tricky to port it to Windows.

Grab the code from git, put pv.php file to your favorite web server with PHP support (you might need to give it some permissions to read from /tmp/ folder), edit read_midnite.sh script to point to your serial device, and add it to your crontab.
I.e. I set it to be called every minute:
* * * * * /etc/read_midnite.sh

After that you can access http://127.0.0.1/pv.php page and see something like a picture in attachment.

That's all. Enjoy!

Update 09/08/18:
Now you can use the script on your favorite PI, or OpenWRT router without PHP. Idea is simple: add file read_midnite_ext.sh to your cron and give it valid path for pv.php file (used as a template) and for pv.html file (output page). Script uses awk and bc, so you might need to install them as well.
Programmer

boB


Very cool Nomad !

Thank you for contributing this !  These are the kinds of things that make the open comms and forum so useful !

boB
K7IQ 🌛  He/She/Me

ClassicCrazy

Nomad,
Which firmware version are you using for your Kid ?
Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

Nomad1

Quote from: ClassicCrazy on September 06, 2018, 07:38:42 PM
Nomad,
Which firmware version are you using for your Kid ?
Larry

I'm on 1864 beta, from the announcement topic in this forum. 1860 won't work because of debug issues.
Programmer

harryn

Thanks for this  - we try to use Linux by default and it is annoying when we can only find win s/w.