Ruby Gem for use with the Enphase "Elighten" API version 2
Add this line to your application's Gemfile:
gem 'enlighten'
And then execute:
$ bundle install
Add the following line to an initializer at config/initializers/enlighten.rb
:
Enlighten::System.config(
key: '<your key>', user_id: '<your user ID>'
)
From the Example App: https://github.com/datadude/enlighten-example
def home
@system = Enlighten::System.new(params[:id])
@summary = @system.summary
@inventory = @system.inventory
@envoys = @system.envoys
@production = @system.monthly_production(:start_date=>1.month.ago - 1.day)
@stats = @system.stats(:start_at=>DateTime.new(Time.now.year,Time.now.month,Time.now.day,7,0), :end_at=>Time.now)
end
- Fork it ( https://github.com/[my-github-username]/enlighten_system/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request