Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

growatt

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

growatt

  • 0.2.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Growatt API

Version

This is a wrapper for the Growatt rest API. Main objective is to turn inverter on/off. This has been testen with MOD-9000TL-X.

Installation

Add this line to your application's Gemfile:

gem 'growatt'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install growatt

Usage

Before you start making the requests to API provide the endpoint and api key using the configuration wrapping.

require 'growatt'
require 'logger'

# use do block
Growatt.configure do |config|
  config.username = ENV['GROWATT_USERNAME']
  config.password = ENV['GROWATT_PASSWORD']
  config.logger = Logger.new(TEST_LOGGER)
end

# or configure with options hash
client = Growatt.client
client.login

Resources

Authentication

# setup
#
begin
  client = Growatt.client
  client.login
  # turn invertor off
  client.turn_inverter('<serial_no>', false)
rescue Growatt::AuthenticationError => e
  puts "Error logging in growatt api"
  puts e
end

Publishing

  1. Update version in version.rb.
  2. Add release to CHANGELOG.md
  3. Commit.
  4. Test build.
> rake build

  1. Release
> rake release

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/jancotanis/growatt.

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
"# growatt"

FAQs

Package last updated on 03 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc