Use AI-On-The-Edge and MQTT to add it into the energy dashboard. Easy peasy and each meter will only cost you about $7 in parts.
1 Like
I have gotten https://myaccount.thameswater.co.uk/ajax/waterMeter/getSmartWaterMeterConsumptions
to work in Postman. You can use this to import to postman.
{
"info": {
"name": "Thames Water",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "getSmartWaterMeterConsumptions",
"request": {
"method": "GET",
"header": [
{
"key": "cookie",
"value": "{{CookieData}}",
"type": "text"
},
{
"key": "referer",
"value": "https://myaccount.thameswater.co.uk/mydashboard/my-meters-usage",
"type": "text"
},
{
"key": "x-requested-with",
"value": "XMLHttpRequest",
"type": "text"
}
],
"url": {
"raw": "https://myaccount.thameswater.co.uk/ajax/waterMeter/getSmartWaterMeterConsumptions?meter={{MeterID}}&startDate=22&startMonth=09&startYear=2024&endDate=22&endMonth=09&endYear=2024&granularity=H&isForC4C=false",
"protocol": "https",
"host": [
"myaccount",
"thameswater",
"co",
"uk"
],
"path": [
"ajax",
"waterMeter",
"getSmartWaterMeterConsumptions"
],
"query": [
{
"key": "meter",
"value": "{{MeterID}}"
},
{
"key": "startDate",
"value": "22"
},
{
"key": "startMonth",
"value": "09"
},
{
"key": "startYear",
"value": "2024"
},
{
"key": "endDate",
"value": "22"
},
{
"key": "endMonth",
"value": "09"
},
{
"key": "endYear",
"value": "2024"
},
{
"key": "granularity",
"value": "H"
},
{
"key": "premiseId",
"value": "",
"disabled": true
},
{
"key": "isForC4C",
"value": "false"
}
]
},
"description": "This is the API the site uses to get data, I just found it in the browser"
},
"response": []
}
],
"variable": [
{
"key": "MeterID",
"value": "Replace with your meter ID which looks like 310000000"
},
{
"key": "CookieData",
"value": "Replace with cookie data from a recent signin to myaccount.thameswater.co.uk"
}
]
}
There are a lot of odd required headers and parameters. This is as small as I could get it.
I havenāt worked out the sign-on yet, so Iām using a cookie from a recent valid sign-on to the site. Youāll need to find your meter ID too. I didnāt see where to get that in the site yet, you may need to find that in inspect too.
Thereās a ton of good data that comes back. Sorry for the aggressive redacting
{
"IsError": false,
"IsDataAvailable": true,
"Lines": [
{
"Label": "0:00",
"Usage": X.0,
"Read": XXXXXX.0,
"IsEstimated": false,
"MeterSerialNumberHis": "XXXXXXXXX"
},
...
{
"Label": "23:00",
"Usage": X.0,
"Read": XXXXXX.0,
"IsEstimated": false,
"MeterSerialNumberHis": "XXXXXXXXX"
}
],
"IsConsumptionAvailable": false,
"AlertsValues": null,
"TargetUsage": 0.0,
"AverageUsage": XX,
"ActualUsage": XXXXX,
"MyUsage": "NA",
"AverageUsagePerPerson": XXXXX,
"IsMO365Customer": false,
"IsMOPartialCustomer": false,
"IsMOCompleteCustomer": false,
"IsExtraMonthConsumptionMessage": false
}