{"id":16242509,"url":"https://github.com/adriankumpf/discovergy","last_synced_at":"2025-03-19T17:31:31.947Z","repository":{"id":38300776,"uuid":"277192689","full_name":"adriankumpf/discovergy","owner":"adriankumpf","description":"A simple wrapper for the Discovergy REST API","archived":false,"fork":false,"pushed_at":"2025-03-10T19:21:23.000Z","size":139,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-10T20:29:17.287Z","etag":null,"topics":["api-wrapper","discovergy","elixir","smartmeter"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/adriankumpf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-07-04T22:12:47.000Z","updated_at":"2025-03-10T19:21:22.000Z","dependencies_parsed_at":"2024-05-31T10:43:47.842Z","dependency_job_id":"8f9dc406-4ff3-41e5-9ec9-75ae8fe6ea7e","html_url":"https://github.com/adriankumpf/discovergy","commit_stats":{"total_commits":96,"total_committers":3,"mean_commits":32.0,"dds":0.5625,"last_synced_commit":"0c974045b88164e0fedd53f2633e6a60a7e57fcd"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adriankumpf%2Fdiscovergy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adriankumpf%2Fdiscovergy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adriankumpf%2Fdiscovergy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adriankumpf%2Fdiscovergy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adriankumpf","download_url":"https://codeload.github.com/adriankumpf/discovergy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244006290,"owners_count":20382443,"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":["api-wrapper","discovergy","elixir","smartmeter"],"created_at":"2024-10-10T14:11:27.338Z","updated_at":"2025-03-19T17:31:31.688Z","avatar_url":"https://github.com/adriankumpf.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Discovergy\n\n[![Build Status](https://github.com/adriankumpf/discovergy/workflows/CI/badge.svg)](https://github.com/adriankumpf/discovergy/actions)\n[![Docs](https://img.shields.io/badge/hex-docs-green.svg?style=flat)](https://hexdocs.pm/discovergy)\n[![Hex.pm](https://img.shields.io/hexpm/v/discovergy?color=%23714a94)](http://hex.pm/packages/discovergy)\n\n\u003e A client for the [Discovergy REST API](https://api.discovergy.com/docs/), providing access to meters and measurements.\n\n## Installation\n\nAdd `:discovergy` and `:finch` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:discovergy, \"~\u003e 0.6\"},\n    {:finch, \"~\u003e 0.16\"}\n  ]\nend\n```\n\n## Usage\n\nCreate a `Discovergy.Client` and authenticate with the Discovergy API using your email address and password.\n\n```elixir\niex\u003e {:ok, client} = Discovergy.Client.new() |\u003e Discovergy.Client.login(email, password)\n{:ok, %Discovergy.Client{}}\n```\n\nThen pass the `client` to the respective endpoint function. For example, to list all meters the user has access to:\n\n```elixir\niex\u003e Discovergy.Metadata.get_meters(client)\n{:ok, [%Discovergy.Meter{\n  administration_number: \"\",\n  current_scaling_factor: 1,\n  first_measurement_time: 1563286659367,\n  full_serial_number: \"1ESY1161229886\",\n  internal_meters: 1,\n  last_measurement_time: 1593949473598,\n  load_profile_type: \"SLP\",\n  location: %Discovergy.Location{\n  city: \"Greven\",\n   country: \"DE\",\n   street: \"Sedanstr.\",\n   street_number: \"8\",\n   zip: \"48268\"\n  },\n  manufacturer_id: \"ESY\",\n  measurement_type: \"ELECTRICITY\",\n  meter_id: \"c1972a89ce3a4d58aadcb7908a1d31c7\",\n  scaling_factor: 1,\n  serial_number: \"61229886\",\n  type: \"EASYMETER\",\n  voltage_scaling_factor: 1\n}]}\n```\n\nOr to obtain the last measurement of a particular meter:\n\n```elixir\niex\u003e Discovergy.Measurements.get_last_reading(client, \"c1972a89ce3a4d58aadcb7908a1d31c7\")\n{:ok, %Discovergy.Measurement{\n  time: ~U[2019-07-16 22:00:00.000Z],\n  values: %{\n    \"energy\" =\u003e 441576730000,\n    \"energyOut\" =\u003e 2154853000,\n    \"power\" =\u003e 205980,\n    \"power1\" =\u003e 63090,\n    \"power2\" =\u003e 53780,\n    \"power3\" =\u003e 89100,\n    \"voltage1\" =\u003e 234100,\n    \"voltage2\" =\u003e 234000,\n    \"voltage3\" =\u003e 233800\n  }\n}}\n```\n\n## License\n\nThis project is Licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadriankumpf%2Fdiscovergy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadriankumpf%2Fdiscovergy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadriankumpf%2Fdiscovergy/lists"}