{"id":20019017,"url":"https://github.com/ojarva/python-helen-electricity-usage","last_synced_at":"2025-09-22T08:16:19.856Z","repository":{"id":25119663,"uuid":"28541292","full_name":"ojarva/python-helen-electricity-usage","owner":"ojarva","description":"Small library for fetching electricity usage statistics from Helsingin Energia website.","archived":false,"fork":false,"pushed_at":"2024-03-03T06:06:21.000Z","size":24,"stargazers_count":9,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T14:11:28.323Z","etag":null,"topics":["electricity","home-automation","parser","scraper"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ojarva.png","metadata":{"files":{"readme":"README.rst","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-12-27T16:40:49.000Z","updated_at":"2023-08-01T09:19:49.000Z","dependencies_parsed_at":"2024-11-13T09:33:10.137Z","dependency_job_id":null,"html_url":"https://github.com/ojarva/python-helen-electricity-usage","commit_stats":{"total_commits":21,"total_committers":5,"mean_commits":4.2,"dds":0.7142857142857143,"last_synced_commit":"92f92f3215fb604c0c81782a5855786cb9ab1598"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ojarva%2Fpython-helen-electricity-usage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ojarva%2Fpython-helen-electricity-usage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ojarva%2Fpython-helen-electricity-usage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ojarva%2Fpython-helen-electricity-usage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ojarva","download_url":"https://codeload.github.com/ojarva/python-helen-electricity-usage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252414294,"owners_count":21744082,"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":["electricity","home-automation","parser","scraper"],"created_at":"2024-11-13T08:25:31.064Z","updated_at":"2025-09-22T08:16:14.805Z","avatar_url":"https://github.com/ojarva.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Helsingin Energia electricity usage scraper\n===========================================\n\nThis small script fetches per-hour electricity usage from Helsingin\nEnergia (Helen) website. This is unofficial implementation which may\nbreak at any time, if Helen changes their website or implements any\nadditional validations.\n\nInstallation:\n\n::\n\n  pip install helen_electricity_usage\n\nUsage:\n\n::\n\n  from datetime import datetime, timezone\n  import helen_electricity_usage\n  helen = helen_electricity_usage.Helen(username, password, delivery_site_id)\n  helen.login()\n  begin = datetime(year=2023, month=1, day=1, hour=0, minute=0, second=0, tzinfo=timezone.utc)\n  end = datetime(year=2023, month=1, day=1, hour=23, minute=59, second=59, tzinfo=timezone.utc)\n  print(helen.get_electricity(begin, end))\n\nTo obtain username and password, register using `web interface\n\u003chttps://www.helen.fi/kirjautuminen\u003e`_ (paper invoice is required).\nAfter registering and signing in, delivery site id is available on the URL of Sähkö/Electricity page as well as on the page\nunder Käyttöpaikka/Consumption location\n\n::\n  https://web.omahelen.fi/personal/reports/electricity-consumption?location=\u003cdelivery_site_id\u003e\u0026resolution=month\u0026date=2023-01-01\n\n\nSample output (python dictionary):\n\n::\n\n  {\n    \"intervals\": {\n      \"electricity\": [\n        {\n          \"start\": \"2022-12-24T00:00:00+00:00\",\n          \"stop\": \"2022-12-24T23:59:59+00:00\",\n          \"resolution_s\": 3600,\n          \"resolution\": \"hour\",\n          \"unit\": \"kWh\",\n          \"measurements\": [\n            {\n              \"value\": 0.11,\n              \"status\": \"valid\"\n            },\n            {\n              \"value\": 0.12,\n              \"status\": \"valid\"\n            },\n            {\n              \"value\": 0.11,\n              \"status\": \"valid\"\n            },\n            {\n              \"value\": 0.12,\n              \"status\": \"valid\"\n            },\n            {\n              \"value\": 0.11,\n              \"status\": \"valid\"\n            },\n            {\n              \"value\": 0.12,\n              \"status\": \"valid\"\n            },\n            {\n              \"value\": 0.79,\n              \"status\": \"valid\"\n            },\n            {\n              \"value\": 0.35,\n              \"status\": \"valid\"\n            },\n            {\n              \"value\": 0.28,\n              \"status\": \"valid\"\n            },\n            {\n              \"value\": 0.26,\n              \"status\": \"valid\"\n            },\n            {\n              \"value\": 0.21,\n              \"status\": \"valid\"\n            },\n            {\n              \"value\": 0.26,\n              \"status\": \"valid\"\n            },\n            {\n              \"value\": 1.08,\n              \"status\": \"valid\"\n            },\n            {\n              \"value\": 1.03,\n              \"status\": \"valid\"\n            },\n            {\n              \"value\": 0.39,\n              \"status\": \"valid\"\n            },\n            {\n              \"value\": 0.47,\n              \"status\": \"valid\"\n            },\n            {\n              \"value\": 3.33,\n              \"status\": \"valid\"\n            },\n            {\n              \"value\": 3.83,\n              \"status\": \"valid\"\n            },\n            {\n              \"value\": 1.19,\n              \"status\": \"valid\"\n            },\n            {\n              \"value\": 0.43,\n              \"status\": \"valid\"\n            },\n            {\n              \"value\": 0.4,\n              \"status\": \"valid\"\n            },\n            {\n              \"value\": 0.32,\n              \"status\": \"valid\"\n            },\n            {\n              \"value\": 0.13,\n              \"status\": \"valid\"\n            },\n            {\n              \"value\": 0.12,\n              \"status\": \"valid\"\n            }\n          ]\n        }\n      ]\n    }\n  }\n\nMissing data can be identified from the status being 'invalid' and value is 0.0.\nUsually the data is available next day, but that is not guaranteed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fojarva%2Fpython-helen-electricity-usage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fojarva%2Fpython-helen-electricity-usage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fojarva%2Fpython-helen-electricity-usage/lists"}