A Forum run by Enthusiasts of MidNite Solar

Charge Controllers and Clippers => The "KID" charge controller => Topic started by: ricardo on June 26, 2018, 01:54:17 PM

Title: Another dashboard for shed PV
Post by: ricardo on June 26, 2018, 01:54:17 PM
Got bored last night, decided to use the diagram plugin for Grafana to sketch this dashboard. -- kinda like it

600W In -> KID -> 600W Inverter + 225 ah @ 24V  (its a small system, backup power for emergencies, runs landscape lighting overnight)
Title: Re: Another dashboard for shed PV
Post by: ricardo on June 26, 2018, 01:58:17 PM
btw -- i'm very pleased with the KID's performance ..  seattle has seen several cloudy days this summer and when the sky finally opens up the KID has handled the higher end of its range with no issues .. highest power i've seen is about 732W from a 600W array ..
Title: Re: Another dashboard for shed PV
Post by: ClassicCrazy on June 26, 2018, 02:19:10 PM
Nice graphics  - what is that dashboard - Node-Red or did you say you used something else to make it ?

I am assuming you got the updated Kid firmware from Midnite and it is all working fine .  They don't seem to have posted it on their website yet .

Larry
Title: Re: Another dashboard for shed PV
Post by: ricardo on June 26, 2018, 02:39:21 PM
I'm using Grafana to create these dashboards .. its an open source graphing package.

To use something like grafana you need a source for the data that is going to be graphed, in my case i'm using InfluxDB which is also open source .. it is a time-series database, which is a very efficient way of storing/retrieving many records of single values that change over time.  -- i use node-red to read the values from the KID serial out, and then i write them to Influx DB.

this gives me an independent store of all the data from my PV system for as long as i want to store it .. (i do the same for the grid-tried PV on my roof which is a 9kw system). -- i plan to store all the data indefinately (i think i calculated that the hard-drive i had would be enough space for 25+ years of storage -- i think the computer and HD will die before that)

I did get the beta firmware from Mario . i was assuming that they would post it on this forum for others to try ..  so far i've not had any issues with it, and it fixes the pc-mode debug flag issue.
Title: Re: Another dashboard for shed PV
Post by: ricardo on June 26, 2018, 02:45:53 PM
This is what my grid-tied dashboard looks like

I took inspiration from the stuff being done by EmonPi ..  i tried using their DB and graphing package too -- but ended up liking grafana better.

Title: Re: Another dashboard for shed PV
Post by: ricardo on June 26, 2018, 02:49:51 PM
the grid tied stuff has better time resolution .. i'm using an Egauge meter to measure the solar and consumption circuits .. which is basically realtime and storing the data in 5s intervals.

but nobody really needs that sort of resolution in the PV system (i should qualify that run-of-the-mill homeowners dont need real-time) .. and the KID's update rate of 1/minute is good enough.  (also it means that the amount of space to store the data is pretty tiny)
Title: Re: Another dashboard for shed PV
Post by: Highflyer on June 26, 2018, 03:51:19 PM
Ricardo,

Very nice!  Are you planning on letting other use your monitoring system?
Title: Re: Another dashboard for shed PV
Post by: ricardo on June 26, 2018, 04:11:31 PM
Quote from: Highflyer on June 26, 2018, 03:51:19 PM
Ricardo,

Very nice!  Are you planning on letting other use your monitoring system?

I'm going to migrate all the stats gathering to a raspberri pi this week (lower power use -- going with a raspberri pi zero-w) .. if i made it a standalone system with all the parts built into a single image would others be interested ? 
Title: Re: Another dashboard for shed PV
Post by: Highflyer on June 26, 2018, 04:44:29 PM
I would bet there would be other interested in a software package that monitored the Kid.  Other topics here have talked about it.  I know I would. I have several remote Kids and I would love to know the system state remotely.  I just have not had the time to figure it out.
Title: Re: Another dashboard for shed PV
Post by: Vic on June 26, 2018, 04:49:07 PM
ricardo,

Thanks again for sharing your endeavors.   Looks great !

Have been dragging my feet in choosing a platform to start with   ...   almost 100 years ago,  used to do embedded controllers.   The "high level" programming was done in Assembly Language.

But,  there always seems to be projects with higher priority,   around here.

Bet that many of us are quite interested in what you are doing,   and just how you are doing it.   Thank you very much for your generous sharing,  for the good of many.

Vic
Title: Re: Another dashboard for shed PV
Post by: ClassicCrazy on June 26, 2018, 08:11:23 PM
Before I saw this I had just ordered a Raspberry Pi 3 + ( newest version) and a Pi Zero W . Both from Adafruit with shipping for $50.
Do you know if the Pi 3 + can run multiple things at once ? I use my existing older Pi B to run Weewx weather program . I am hoping I can run the Weewx and the Node-Red and maybe Mosquitto mqqt server all at the same time .

I know one thing I learned -- don't try to use some old cheap SD card in the Raspberry Pi or it will crash all the time.

Will look forward to whatever you share Ricardo - everyone has been wanting a good way to monitor the Kid.

Larry


Title: Re: Another dashboard for shed PV
Post by: ricardo on June 27, 2018, 02:31:12 AM
the pi-3 looks like alot of bang for your buck .. so i'm pretty sure you'll be able to run multiple packages in that platform.

i'm going to order a pi-3 so i can put together either a walkthrough to setup a pi for KID monitoring or maybe even an SD card image that you can download to do it yourself.

the pi that came in the mail to day is a zero-w .. i'm in the process of setting it up to replace the power hungry mid 2007 mac mini thats listening to the KID right now.

i think even the pi zero can do quite a bit of work .. i'm disabling the stuff thats not needed (like a graphical interface) so that it has more power for the stuff i do need.
Title: Re: Another dashboard for shed PV
Post by: ClassicCrazy on June 27, 2018, 09:39:47 AM
Ricardo -
There are two Pi 3 models
Pi 3
and Pi3 plus  (+)
Easy to confuse - the plus is the newest one same price as the other.
https://www.adafruit.com/product/3775
and the Pi Zero W not to confuse with the Pi Zero for anyone else out there.
ha ha !

Larry
Title: Re: Another dashboard for shed PV
Post by: bee88man on June 28, 2018, 12:20:03 PM
Just received a emonPi from OEM. It hasan Aurdino, NodeRed and MQQT and more pre-loaded to uSD onboard. Has ethernet, One Wire temp, meter-pulse reader and small packet RFM69 CW. I have a PV diversion to immersion that stop export of PV to grid with zero-crossing bursts.It is Aurdino and has matching RFM69CW radio..

I'm a newbie, but plenty of shared help can make for a quick study.
Title: Re: Another dashboard for shed PV
Post by: ClassicCrazy on June 28, 2018, 03:33:47 PM
Sounds like a nice box with all the connections already made for sensors.

Larry
Title: Re: Another dashboard for shed PV
Post by: bee88man on June 29, 2018, 10:27:09 AM
I failed to mention that emonPi also has two current transformer inputs also and can measure, display and log stats of PV production and grid traffic.
Title: Re: Another dashboard for shed PV
Post by: ricardo on June 29, 2018, 05:29:02 PM
Quote from: bee88man on June 29, 2018, 10:27:09 AM
I failed to mention that emonPi also has two current transformer inputs also and can measure, display and log stats of PV production and grid traffic.

I have an egauge that i use on my grid tied micro inverter system .. it is very similar to the emonpi in that you can measure power across 2 or more AC circuits.

for an offgrid system using a KID CC it would be a good compliment since the KID can't shed much light into the AC side of the panel..  if you have a WBJR you can deduce the entire load connected to the system, but the emonpi can shed more granular data about the AC circuits.

also  you can get a better resolution with an emonpi ..
Title: Re: Another dashboard for shed PV
Post by: bee88man on July 02, 2018, 09:03:43 AM
My desire is to set up or to find a way to have the separate PV Router's diverted energy tally sent to the emonPi by a serial cable or maybe add the RFM69HCW radio to the PV Router to send the packets. The PV Router's pcb has solder pads already for the radio.

Would this diverted energy tally need to be done in NodeRed somehow?
Title: Re: Another dashboard for shed PV
Post by: ricardo on July 02, 2018, 04:54:10 PM
i dont know what ports the emon pi exposes .. but if they expose a USB port you can do a serial to USB connection from the KID to the emon pi -- decode the data and then send it to wherever you are storing your data.  (i would guess some form of emoncms running on a pi or on the cloud)

that decoding and sending of data can be done in node-red which the emonpi should already have running inside it (or you can add)
Title: Re: Another dashboard for shed PV
Post by: ricardo on July 05, 2018, 10:23:34 AM
so after futzing about for a few days with the Raspberry Pi Zero W -- i failed to get a satisfactory set of packages loaded so it can be a standalone stats gateherer and server .. the problem is that the zero is a first generation ARM chip and most software packages are either old or missing .. 

so for now i've abandoned that idea (it still runs node-red no problem) -- and i'm going to build a standalone solution on a raspberry pi 3B+ .. which is the latest rev of the pi .. the upside is that there should be more software support .. the downside is that it uses more power .. (the zero uses < 1 watt .. the 3 will use about 1.5 to 2 watts) ..

still better than running some old computer you had lying around (in my case the old mac mini i used would eat up 20 watts) ..

anyways .. i'm still spending some time on putting together a reasonable rpi image .. 
Title: Re: Another dashboard for shed PV
Post by: ClassicCrazy on July 05, 2018, 11:51:33 AM
Thanks for the update   ,  my Pi Zero and Pi 3b+  have arrived and sitting next to me - I haven't had the time to mess with them yet.

Larry
Title: Re: Another dashboard for shed PV
Post by: ricardo on July 09, 2018, 11:33:28 AM
things went far smoother and easier with the PI 3B+ ... and that little machine has some oomph compared to the zero-w.  (4 cores is overkill for this project)

So i have a simple install using docker for all 3 components (nodered, inlfuxdb, grafana) .. docker should make it easier to update in the future. -- i've made a simple dashbard (tailored to my small 24v, 600W, 225ah system)  -- tailoring the gauges for a different size system can be done easily.

no real attempt to make the system secure since i expect that if you try this you will be running it inside a secure network, and expose just the ports you need to the outside world ..

there are a few more things i want to do before i post an image that you can flash into an SD card.  (like testing that it works to clone the image, and putting together a list of instructions).. 

i chose a 16GB sd card for the image because i am cheap and didnt want to spring for the 32GB -- my guesstimate is that a 16GB card has enough room for over 10 years worth of data at the 1 minute resolution that the KID publishes -- i probably will configure the db to reduce the resolution to 1 hour for data older than 2 years .. and i think that should mean that the setup would have enough room for 25+ years.  (ie: the raspberri pi or sd card will die before you run out of space).

i haven't yet attempted to reduce the power usage of the pi, at the moment it consumes .4a @ 5v (~2 watts), its possible to bring that down (disable ehternet if you use wifi, disable a few cores, disable the HDMI port after you configure it), but i think i might leave that as an excercise to the end-user .. here is what the nodered flow looks like, and what the dashboard looks like ..

another neat project to add on would be to make an image for a separate raspberri pi that had an LCD attached to it as a remote viewer of the KID data.  -- you could mount that on the wall or have it sitting on the mantle.
Title: Re: Another dashboard for shed PV
Post by: ricardo on July 09, 2018, 11:37:01 AM
another fun project would be to use the GPIO pins to attach a temperature probe (or two) to the pi .. then you can also capture ambient temperature near where the pi is installed ..
Title: Re: Another dashboard for shed PV
Post by: ClassicCrazy on July 09, 2018, 01:45:19 PM
wow  that looks great Ricardo .
I have been using my Kid to charge some odd and ends batteries so it is not on all the time . I have Classic which is the work horse charge controller here.  But I think I will reconfigure some things so I can fire up the Kid and put it to full time work again so I can try out your Node-Red monitoring.  I do have a lot of one wire temperature sensors around here that I could add on for temperature too - am using them on an arduino now to monitor fridge and freezer temps and also have another set of temp sensors outside reporting via ESP8266 . Nice thing about the one wire temp sensors is you can have a bunch of them on just one pin since they all have their own address .

I think you should upgrade to a Classic so you would save me and a lot of others bunch of effort making a Node-Red interface for it ! I will have to buy a lottery ticket so if I win I am definitely buying you a Classic !

Regarding the SD card - seems like the 32 GB and 16 GB are not too different in price any more.  The last two I bought are Samsung Evo 32 GB at local walmart - I see the price is even less right now ( always priced a lot more in the store so  you have to show them the internet price and they will give that  to you ).  https://www.walmart.com/ip/Samsung-32GB-EVO-Micro-SDHC-Class-10-Card-with-Adapter/813427777

I also want to get a camera for my Pi  -- maybe just for the Zero W  . Looking into the options for those.

Larry
Title: Re: Another dashboard for shed PV
Post by: Westbranch on July 09, 2018, 02:10:34 PM
Hi Larry,what will you be using the camera for?  Security?
Title: Re: Another dashboard for shed PV
Post by: ricardo on July 09, 2018, 06:06:58 PM
I hope that the next offgrid system i get to build is large enough to need one or more classics. (or maybe by then midnite has released the b17) ..
Title: Re: Another dashboard for shed PV
Post by: ClassicCrazy on July 09, 2018, 07:07:29 PM
Quote from: Westbranch on July 09, 2018, 02:10:34 PM
Hi Larry,what will you be using the camera for?  Security?

I had a Yi Home camera - they are just fun to play around with. I built a small mobile solar cart - built on an old bicycle trailer frame . It is just a couple older panels , charge controller , battery but it makes for a nice power supply to move around outside . I built two of them - one I have in the garden for electric fencer , the other I have a Linksys router with DDWRT linked as repeater to my home wifi . So on that one I have an ESP8266 microcontroller with temperature sensors and I had the Yi camera which link to the repeater router that has a backfire wifi antenna to get back to my home router. It is fun to monitor the critters,  sky and storms, and anyone else who passes in front of it.  But my Yi was an indoor camera and I left it out through too many heavy windy rainstorms which got it wet under the small canopy I had made for it. Someone wrote an operating system for the Pi with a lot of features - so you can save the video on your own server instead of having to use the Yi chinese paid servers , or the other option was the built in sd card -- but that is a bit of a pain to go through and review . The Pi software will I think let you fast forward through video , and it has software motion detection too so it will only record on motion if you set it up that way.  You can get an inexpensive Pi camera for $5 or some that cost more with infared lights and night capture.  Linus just made youtube summary of it https://youtu.be/H7p5YEOrlSc

Larry