{"id":16810970,"url":"https://github.com/johnf/pvoutput","last_synced_at":"2025-07-15T16:30:56.581Z","repository":{"id":2480750,"uuid":"46646184","full_name":"johnf/pvoutput","owner":"johnf","description":"PVoutput API for Ruby","archived":false,"fork":false,"pushed_at":"2023-09-25T06:30:20.000Z","size":69,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-25T23:44:50.416Z","etag":null,"topics":["solar"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-11-22T04:22:56.000Z","updated_at":"2021-12-30T07:52:43.000Z","dependencies_parsed_at":"2023-10-01T20:37:21.275Z","dependency_job_id":null,"html_url":"https://github.com/johnf/pvoutput","commit_stats":{"total_commits":84,"total_committers":4,"mean_commits":21.0,"dds":0.3928571428571429,"last_synced_commit":"ad703bc9185c9e3d535ca19597327b22ffe9dbd4"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/johnf/pvoutput","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnf%2Fpvoutput","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnf%2Fpvoutput/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnf%2Fpvoutput/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnf%2Fpvoutput/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnf","download_url":"https://codeload.github.com/johnf/pvoutput/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnf%2Fpvoutput/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265445302,"owners_count":23766445,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["solar"],"created_at":"2024-10-13T10:17:16.679Z","updated_at":"2025-07-15T16:30:56.336Z","avatar_url":"https://github.com/johnf.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PVOutput\n\n[![Actions Status](https://github.com/johnf/pvoutput/workflows/Test/badge.svg)](https://github.com/johnf/pvoutput/actions)\n[![Coverage Status](https://coveralls.io/repos/johnf/pvoutput/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/johnf/pvoutput?branch=master)\n[![Gem Version](https://badge.fury.io/rb/pvoutput.svg)](http://badge.fury.io/rb/pvoutput)\n\n\nRuby library for talking to the PVOutput API.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'pvoutput'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install pvoutput\n\n## Usage\n\nIn order to use pvoutput in your application you need to use\n\n```ruby\nrequire 'pvoutput/client'\n```\n\nFirst step is to create a PVOutput client using your PVOutput assigned system_id and api_key\n\n```ruby\npvoutput = PVOutput::Client.new(system_id, api_key)\n```\n\nAt the moment you [donate](http://pvoutput.org/donate.jsp) to PVOutput you can enable the donation mode by creating a PVOutput client using\n\n```ruby\npvoutput = PVOutput::Client.new(system_id, api_key, true)\n```\n\nNow you can report your real time status to PVOutput using\n\n```ruby\npvoutput.add_status(\n  options\n)\n```\n\nThe add_status operation accepts the following options\n\n| Option           | PVOutput Parameter |\n| ---------------- | ------------------ |\n| energy_generated | v1 |\n| power_generated  | v2 |\n| energy_consumed  | v3 |\n| power_consumed   | v4 |\n| temperature      | v5 |\n| voltage          | v6 |\n| cumulative       | c1 |\n| net              | n |\n\nAs example\n\n```ruby\nclient.add_status(\n  :energy_generated =\u003e 100,\n  :power_generated  =\u003e 50,\n  :temperature      =\u003e 30,\n  :voltage          =\u003e 200,\n)\n```\n\nYou can report your daily output to PVOutput using\n\n```ruby\npvoutput.add_output(\n  options\n)\n```\n\nThe add_output operation accepts the following options\n\n| Option                | PVOutput Parameter |\n| --------------------- | ------------------ |\n| output_date           | d |\n| energy_generated      | g |\n| peak_power            | pp |\n| peak_time             | pt |\n| condition             | cd |\n| min_temp              | tm |\n| max_temp              | tx |\n| comments              | cm |\n| import_peak           | ip |\n| import_off_peak       | io |\n| import_shoulder       | is |\n| import_high_shoulder  | ih |\n| consumption           | c |\n\nAs example\n\n```ruby\nclient.add_output(\n  :output_date      =\u003e '20160228'\n  :energy_generated  =\u003e 15000,\n  :max_temp      =\u003e 30\n)\n```\n\nYou can report also a batch of daily output values to PVOutput using\n\n```ruby\npvoutput.add_batch_output(\n  options\n)\n```\n\nThe add_batch_output operation accepts a hash with the date as key and within that the following options\n\n| Option                | PVOutput Parameter |\n| --------------------- | ------------------ |\n| energy_generated      | g |\n| peak_power            | pp |\n| peak_time             | pt |\n| condition             | cd |\n| min_temp              | tm |\n| max_temp              | tx |\n| comments              | cm |\n| import_peak           | ip |\n| import_off_peak       | io |\n| import_shoulder       | is |\n| import_high_shoulder  | ih |\n| consumption           | c |\n\nAs example\n\n```ruby\nclient.add_output(\n  :'20150101' =\u003e {\n    :energy_generated =\u003e 1239, },\n  :'20150102' =\u003e {\n    :energy_generated =\u003e 1523 },\n  :'20150103' =\u003e {\n    :energy_generated =\u003e 2190 },\n)\n```\n\n## Debugging\n\nYou can enable HTTParty debugging to see the requests by setting `PVOUTPUT_DEBUG=true`\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`.\n\n## Release\n\nTo release a new version:\n  * Create a branch for the release\n  * Update the version number in `version.rb`\n  * Update CHANGELOG.md\n  * git commit -pm 'Release 1.x.x'\n  * git tag v1.x.x\n  * git push\n  * git push --tags\n  * In GitHub add the Change Log section to the release and save it\n  * Check everything looks OK in GitHub Actions\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/johnf/pvoutput. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnf%2Fpvoutput","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnf%2Fpvoutput","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnf%2Fpvoutput/lists"}