Solar Generation Monitoring

Hi All - I’m new! Got my ST hub yesterday and am excited to get in the game. One thing I’ve been wondering about is if there is any plans (options?, limitations?) for integrating monitoring of Solar Panels in ST. I tried to do some searches in these forums, groups and projects, but didn’t find anything.

I’ve got a set of solar panels on my home with Enphase inverters. There is web support and I can currently monitor via the web or an iOS app.

1 Like

@ppmo Currently, ST requires their cloud to access any IP device. If you have an API endpoint of some kind that’s accessible from the cloud, it wouldn’t be too hard to write a custom device handler to poll it regularly and pull out the value(s) you want.

For my foscam, I wanted to find the alarm state (on or off), so I just created a poll method. Foscam values are line separated, so I just traverse through till I find what I want:

If you have a web interface, you could just as easily grab the HTML and parse it that way (although a proper API would be far nicer to deal with).

Sounds like I just need to get in there and start playing then. There is an API (which I haven’t explored at all).

http://enphase.com/api/

From that link:
Overview
With the Enlighten System Data API, you can develop client applications to request data from existing Enphase systems for an authorized user, and refine the results of the request using query parameters. Currently, the API supports read-only access to your Enlighten data and alerts, at the system level.
Use of the API is subject to the Enphase Energy API License Agreement.

Wow - that API looks great. It should be pretty easy (relatively) to get this running as a ST device type. You could have a tile change color based on how much juice is being stored - very cool!

I did already get some things working. I’m pulling system summary and alerts. I’ve got various generation stats (current, daily total and weekly). I’m planning to get a background color change based on any system faults being reported, but have to read up on the app code a little bit more first. It wasn’t working right, but I only spent a few hours so far.

@pete molina

Would you mind sharing your code? I just got my Enphase gateway working and would love to be able to integrate it to ST!

Interesting. Is there an API for Vivint Solar?

Well now. If I pull the trigger on a solar install, I can tell whose inverters I’ll insist on!

@ppmo can you share your code ? I would like to work on this but if you can share that would be great.

Has anyone else written an api for enlighten ?

I got my ST hub yesterday. Here is my attempt at integrating Enlighten with ST. This is currently limited to energy today and energy lifetime.

https://github.com/usirsiwal/smartthings-enlighten/blob/master/enlighten.groovy

As a new user, I cannot post the message as hyperlink :frowning:

@umesh31 Very Cool, I just tried your driver but I needed to fork your code and add Key as a preference.

Not sure you should share your key to public ?

I have it working…very nice. I plan to start expanding it now. We can share ideas if you like. Greaet Job just the kick start I needed !

Does anyone have any ideas on getting data out of a SunPower system? I have two Power-One Aurora inverters.

@Ron You are right. I wonder why they care though. I will roll my key that will make the old key useless.

BTW, the poll does not work for me. So I am using Pollster to update the data. https://github.com/statusbits/smartthings/tree/master/Pollster.

It will be good to switch to using schedule instead of poll.My plan is to add instant, daily, monthly, year to date, and life-time production. Also look up average energy cost and turn it into $ savings.

I just received by ST (on the Wednesday evening). Once I am more familiar I will have more ideas.

@Bryan_Fleming Does SunPower system published API?

@Ron I merged your changes in my repo.

Your key charges the data usage to your account. Free account has certain limits on how often you query and how much data etc. They charge for higher usage. So you want people using this device code to register for their own account and use that, not use yours.

Yea I was thinking schduled might work better also. You can configure like a crontab job and just poll every 30min or something like that.

Sounds like a good plan to add the data. I can’t think of a really good use for this which has delayed my implementing it but your implementation is cool. Thanks for sharing !

I didn’t add it to my source control but I added some debugging and I am trying to add the “Powered By Enphase” logo but I can’t get it to show a logo based on a URL so far. I have tried this for other apps and failed also. Not sure what I am doing wrong.

At some point in distant future, the number of API calls may become a problem. I don’t foresee it in near future. But I rolled my key anyway.

It seems schedule works only from App and not from the device. So I will continue to use Pollster.

I don’t think so… I cant find anything.

A dumb question, What would be the best way and logic. I want a power outlet to turn on if my current power production is more then 1kw and if it falls below 1kw have the power outlet turn off? We don’t have true net-metering and want to have my battery charger on only when i am producing power.

All Aurora’s have an RS-485 interface. Some have RS-232. What is your model number?