User Tools

Site Tools


howto:smartmeter

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
howto:smartmeter [2023/07/12 19:29] – created Wulf Rajekhowto:smartmeter [2025/02/18 12:21] (current) Wulf Rajek
Line 9: Line 9:
 Once signed up, zip files with data can be downloaded from the consumer portal. The zip file download contains half-hourly data up to the previous day. Once signed up, zip files with data can be downloaded from the consumer portal. The zip file download contains half-hourly data up to the previous day.
  
-Further to the zip file download, n3rgy.com also offers a consumer API. The API contains data of the current day as well, but it is delayed. Test at 7pm shows data up to 1pm of the same day.+Further to the zip file download, n3rgy.com also offers a consumer API. The API contains data of the current day as well, but it is delayed. Test at 9am shows data up to 6.30am and at 10pm up to 6pm, 10.30pm up to 9pm of the same day.
  
 Example scripts: https://github.com/n3rgy/consumer-data Example scripts: https://github.com/n3rgy/consumer-data
Line 22: Line 22:
 import requests import requests
 import pandas as pd import pandas as pd
 +import datetime
 +
 +start = datetime.date.today().strftime("%Y%m%d") + '0000'
 +end = (datetime.date.today() + datetime.timedelta(days=1)).strftime("%Y%m%d") + '0000'
 +
 AUTH = "MAC-OF-IHD" AUTH = "MAC-OF-IHD"
 headers = {'Authorization': AUTH} headers = {'Authorization': AUTH}
 url = "https://consumer-api.data.n3rgy.com/" url = "https://consumer-api.data.n3rgy.com/"
 path = 'electricity/consumption/1/' path = 'electricity/consumption/1/'
-query = '?start=202307010000&end=202307130000'+query = '?start='+start'&end='+end
 api_url = url + path + query api_url = url + path + query
 r = requests.get(url=api_url, headers=headers) r = requests.get(url=api_url, headers=headers)
Line 37: Line 42:
  
 Octopus energy offers an API to access historic data and account data. Data is only available up to 1am of the current day. Octopus energy offers an API to access historic data and account data. Data is only available up to 1am of the current day.
 +
 +https://developer.octopus.energy/
  
 Some code to access and work with the data can be found here: Some code to access and work with the data can be found here:
 https://guylipman.medium.com/accessing-your-octopus-smart-meter-data-3f3905ca8fec https://guylipman.medium.com/accessing-your-octopus-smart-meter-data-3f3905ca8fec
 https://github.com/gjlipman/smartmeter https://github.com/gjlipman/smartmeter
 +
 +===== Octopus Agile Tools =====
 +
 +Homeassistant sensors:
 +https://github.com/badguy99/octoblock
 +
 +===== Links =====
 +
 +
 +https://github.com/AnonTester/octopus_agile_battery_scheduler
 +https://pypi.org/project/growattServer/
 +https://github.com/Sjord/growatt_api_client
 +https://github.com/indykoning/PyPi_GrowattServer
 +https://github.com/indykoning/PyPi_GrowattServer/pulls
 +https://github.com/indykoning/PyPi_GrowattServer/issues/74
  
  
howto/smartmeter.1689186556.txt.gz · Last modified: 2023/07/12 19:29 by Wulf Rajek