Our Solar Integration (SolArk) 🪫

Hey there - not sure why I was surprised to see the number of solar posts out there asking about Hubitat integration but I figured I would share the great experience that I have had with my SolArk & Hubitat marriage. My goal was to have grid independence, support my home and my car's usage, and to sell solar production during peak hours and as a Hubitat user to have the system connected to my smart home, of course :wink:

But as you guessed, there wasn't any support for SolArk on Hubitat at the time. However, I saw that SolArk had an API with documentation that I could tap - and besides I'd done enough coding with APIs before. So I did it! And to be honest, the main take-away for me; Hubitat has a lot of great untapped device parameters that could be used for a ton of totally interesting API integrations. . .

For total debutants, an inverter - this is basically a power-transformer-substation in your garage, ideal for monitoring everything from your batteries, to Solar, to home usage, and grid feed because it does the necessary DC/AC power conversions and tracks the energy output.

We have an all-in-one inverter called a SolArk 12K. It has a 9kw limit on DC conversions, so if I run my 3.8kw AC and 6.0kw car charger together, so for math buffs voila that's just 800w watts from the Grid. Otherwise, we have 8kw solar panels and a 38kwh battery plugged in too. We are pretty much off the grid and I drive ~ 400miles a week, while most of the late afternoon production is sold to the grid at peak rates. Winter is a more frugal time for solar; with a system this size our 4bd home basically draws no power, so we pay our gas heater and approx 30-60% of the car charger usage at a rate of about 6.6 cents per mile charged on the grid. I'm pretty sure there have been a couple outages in our neighborhood so far, we never notice them but occasionally there is a .3 second energy drop when the grid supply is cut...

What do I do with my data? Dashboards, sure. But mainly I have rules for controlling the smart-switch on the car charger so that my home doesn't draw unnecessarily from the grid and I always have enough power for the home if we are disconnected totally in the event of an outage.

This SolArk Inverter driver I wrote is available on HPM - and for that ton of totally interesting API integrations. . . KEEP LOOKING for other services with an API to tap for home automation - it can probably be done with Hubitat. With error handling and token handling framework, I would use this driver as a template for other API reporting integrations too :blush:

4 Likes

I just got a 10KW Hoymiles system installed and ther is an API. :slight_smile:
I see there is a HA integration so maybe I'll get lucky here if a keen coder gets a system and we cn get some live data.
It's a pain opening the app all the time but the excitement will wear off :frowning:
Right now I don't have my final approval to backfeed the grid so I manually have to lower the charging port kW on my Ioniq 5 if I don't want the grid trying to top up as I have no credits yet.

@dnickel Have you looked at the Hoymiles API documentation ? With Solark there are three queries my driver runs; one to login and get a token, another to query the inverter/plant details, and a third to get real time power usage. Essentially, the http query headers / bodies can just be replaced with the other API's parameters, and then fine tuned with the results from your debug logs to establish the proper device attributes :disguised_face:

If you can identify those queries in the API documentation - it could be pretty plug and play for me to set you up as far as the code goes, then a little groovy math is always fun :rofl:

Would love to see a Hubitat integration with EG4 Solar products all-in-one inverters. I have a 6000xp and PowerPro battery system. They have an existing app and likely an API. Anyone feel free to take it on!

Yeah, never ventured into Groovy.
My software days are gone at 65 unless you want some VB, Cobol or Pascal systems work. :rofl:
I'm just not into the frustration of learning a new language. I avoided C++ and Java so that was probably my downfall 25 years ago.