{"id":21169524,"url":"https://github.com/AlgorithmicEntropy/SolarWattEnergyManagerAPI","last_synced_at":"2025-07-09T19:31:47.539Z","repository":{"id":47176041,"uuid":"326070202","full_name":"AlgorithmicEntropy/SolarWattEnergyManagerAPI","owner":"AlgorithmicEntropy","description":"Python library to acces solar watt energy manager data","archived":false,"fork":false,"pushed_at":"2024-08-24T10:44:59.000Z","size":44,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-14T07:41:56.592Z","etag":null,"topics":["homeassistant","iot","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/LocalSolarWatt/","language":"Python","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/AlgorithmicEntropy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-01T22:58:44.000Z","updated_at":"2024-08-24T10:42:21.000Z","dependencies_parsed_at":"2022-09-19T09:30:28.116Z","dependency_job_id":null,"html_url":"https://github.com/AlgorithmicEntropy/SolarWattEnergyManagerAPI","commit_stats":null,"previous_names":["sebastianwallat/solarwattenergymanagerapi"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlgorithmicEntropy%2FSolarWattEnergyManagerAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlgorithmicEntropy%2FSolarWattEnergyManagerAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlgorithmicEntropy%2FSolarWattEnergyManagerAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlgorithmicEntropy%2FSolarWattEnergyManagerAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlgorithmicEntropy","download_url":"https://codeload.github.com/AlgorithmicEntropy/SolarWattEnergyManagerAPI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225587811,"owners_count":17492632,"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":["homeassistant","iot","python"],"created_at":"2024-11-20T15:51:58.956Z","updated_at":"2025-07-09T19:31:47.520Z","avatar_url":"https://github.com/AlgorithmicEntropy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LocalSolarWatt\n\nA python3 library to access the data of solar watt devices via local api  \nDisclaimer: This library uses an unofficial local api and could therefore break at any point\n\n# Overview\n\nThe package uses the kiwigrid api provided by your solar watt energy manager device.  \nData available:\n\n- Real time power values from inverter, AC sensor and battery (if exists)\n- Long term energy statistics\n\nThis library does some preprocessing by extracting relevant fields and grouping them by device class.  \nFor now this mostly includes data I deem usefully for the integration with home assistant.\n\nNote: Polling the energy manager with a very high interval often could lead to reliability issues (untested).\n\n# Supported devices\n\nAs I only have access to one installation and the api is as far as I'm aware not documented by SolarWatt, I can not\nguarantee that this library works with your setup.  \nIf you encounter issues with your concrete setup, feel free to open a new issue.  \nThe raw json data is available via `http://YOUR_DEVICE_IP/rest/kiwigrid/wizard/devices`  \nIf you can provide the raw json dump, I can try to add support for your device.  \n**Important Note**: This data does contain some sensitive information (especially for the \"Location\" device), so make\nsure to remove any sensitive data before sharing.\n\n## Installation\n\n```\npip install LocalSolarWatt\n```\n\n## Usage\n\n```\nfrom local_solar_watt import EnergyManagerApi, EnergyManagerVersion\n\n# create a new api object\nenergy_api = EnergyManagerApi(EnergyManagerVersion.CLASSIC, \"\u003chost_or_ip\u003e\")\n\n# create a new api object for new energy manager flex\nenergy_api = EnergyManagerApi(EnergyManagerVersion.FLEX, \"\u003chost_or_ip\u003e\")\n\n# optional, change work units to Wh instead of kWh\napi = EnergyManagerApi(EnergyManagerVersion.CLASSIC, \"\u003chost_or_ip\u003e\", work_unit=WorkUnits.Wh)\n\n# with custom logger\nmy_logger = logging.getLogger(\"my_logger\")\nenergy_api = EnergyManagerApi(EnergyManagerVersion.CLASSIC, \"\u003chost_or_ip\u003e\", logger=my_logger)\n\n# test the connection (returns bool based on success)\nstatus = api.test_connection()\n\n# pull data from the device (returns only selected power values, grouped by device class)\nprint(api.fetch_data())\n```\n\n# Development:\n\nProject uses uv for dependency management.\n\nRudimentary unit tests are included in the `tests` folder.\nThese use static data from j́son files and do not require a connection to the device.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlgorithmicEntropy%2FSolarWattEnergyManagerAPI","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAlgorithmicEntropy%2FSolarWattEnergyManagerAPI","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlgorithmicEntropy%2FSolarWattEnergyManagerAPI/lists"}