{"id":21187556,"url":"https://github.com/pb82/sunny","last_synced_at":"2025-03-14T20:23:01.960Z","repository":{"id":257825672,"uuid":"871706183","full_name":"pb82/sunny","owner":"pb82","description":"Mirror of https://gitlab.com/bboehmke/sunny","archived":false,"fork":false,"pushed_at":"2024-10-13T08:39:59.000Z","size":192,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-21T13:08:26.449Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pb82.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-12T17:57:08.000Z","updated_at":"2024-10-13T08:39:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"b782e417-ad4c-428d-9487-283de86214ce","html_url":"https://github.com/pb82/sunny","commit_stats":null,"previous_names":["pb82/sunny"],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pb82%2Fsunny","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pb82%2Fsunny/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pb82%2Fsunny/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pb82%2Fsunny/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pb82","download_url":"https://codeload.github.com/pb82/sunny/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243640251,"owners_count":20323632,"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":[],"created_at":"2024-11-20T18:37:36.953Z","updated_at":"2025-03-14T20:23:01.940Z","avatar_url":"https://github.com/pb82.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![pipeline status](https://github.com/pb82/sunny/badges/master/pipeline.svg)](https://github.com/pb82/sunny/pipelines)\n[![coverage report](https://github.com/pb82/sunny/badges/master/coverage.svg)](https://github.com/pb82/sunny)\n[![godoc](https://godoc.org/github.com/pb82/sunny?status.svg)](https://godoc.org/github.com/pb82/sunny) \n[![Go Report Card](https://goreportcard.com/badge/github.com/pb82/sunny)](https://goreportcard.com/report/github.com/pb82/sunny)\n\n# Sunny\n\nSunny is a library to get actual data from SMA inverters and energy meters \nvia Ethernet (Speedwire).\n\n\u003e Note: SMA \u0026 Speedwire are registered trademarks by\n\u003e [SMA Solar Technology AG](https://www.sma.de/en/company/about-sma.html)\n\nAn example application can be found [here](https://github.com/pb82/sunny-monitor).\n\n## Usage\n\n\u003e The password in the following function is the one of the user account which \n\u003e is by default \"0000\".\n\nTo discover reachable devices call:\n\n```go\ndevices, err := sunny.DiscoverDevices(password)\n```\n\nThis will return a list of device instances that can be used for additional \ncommunication.\n\nTo directly connect to a device use:\n```go\ndevice, err := sunny.NewDevice(address, password)\n```\nWhere address is the IP address of the device.\n\nTo get all current values from a device use `GetValues()`:\n```go\nvalues, err := device.GetValues()\n```\n`values` will be a `map[string]interface{}` with the values of the device.\n\nThe values differs from device to device:\n*  Energy Meter: Every value that is provided. \n   See [Energy Meter Protocol](https://www.sma.de/fileadmin/content/global/Partner/Documents/SMA_Labs/EMETER-Protokoll-TI-en-10.pdf)\n*  Inverters: Provided values that are decrypted.\n   See `valuesDef` in [values.go](values.go)\n\n\u003e Note: The data from energy meters are broadcasted only once a second. \n\n\n## Speedwire Protocol\n\nThe base protocol is implemented based on the information provided SMA\nin the documentation of the \n[Energy Meter Protocol](https://www.sma.de/fileadmin/content/global/Partner/Documents/SMA_Labs/EMETER-Protokoll-TI-en-10.pdf) \nand the\n[Speedwire device discovery](https://www.sma.de/fileadmin/content/global/Partner/Documents/sma_developer/SpeedwireDD-TI-en-10.pdf).\n\nFor the core functionality of the protocol are no public information available.\nBecause the missing information the main protocol structure is based on \nown packet analyses and some existing projects:\n\n*  https://github.com/erijo/energy-utils\n*  https://github.com/SBFspot/SBFspot\n*  https://github.com/Rincewind76/SMAInverter\n*  https://gitlab.com/volkerkettenbach/FHEM-SMA-Speedwire\n*  https://github.com/pvlog/pvlib\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpb82%2Fsunny","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpb82%2Fsunny","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpb82%2Fsunny/lists"}