I’ve got a web dashboard that lets me see my utility usage for both my water & electricity usage. I’ve noticed the website uses json endpoints that actually populate this data into the dashboards and I’d love to get it pulled into my Home assistant. Is there anyone who could help me with this?
I’ve gotten as far as tracking down the endpoint in the “Network” tab of my and getting it working in in postman if I copy the request from there, but I can’t figure out anything past that, and as soon as my login-cookie expires on the site, it stops working.
My local power & water company uses a platform called “Sensus Analytics” and you can find ~70 different utility companies using this same analytics platform using this platform with a google search ‘inurl:"sensus-analytics.com"
’ so I think adding support for this one would be really useful for a lot of people.
These json endpoints seems to have everything we need. Here are some samples of the values I was able to get from the JSON endpoint for reference. And I’ve got a bunch of endpoints for my water as well.
{
"messageList":[
],
"operationSuccess":true,
"widgetList":[
{
"id":"meters",
"premium":false,
"size":0,
"dataIdentifier":null,
"summary":null,
"data":{
"labelMaxLength":25,
"devices":[
{
"usageUnit":"KWH",
"meterAddress1":"[censored]",
"lastRead":1641700800000,
"billing":true,
"dailyUsage":22.61,
"showToday":true,
"meterLong":[censored],
"alertCount":15,
"meterId":"[censored]",
"daily":true,
"dailyAlert":35.0,
"vacation":true,
"billingAlert":1000.0,
"multiday":false,
"meterLat":[censored],
"latestReadUsage":"59468.73",
"latestReadTime":1641625200000,
"billingUsage":692.7
}
],
"accountNumber":"[censored]"
},
"commodity":"electric"
}
],
"errors":[
],
"messageInfoList":[
],
"messageIterator":[
]
}
{
"messageList":[
],
"operationSuccess":true,
"widgetList":[
{
"id":"usagedetail",
"premium":false,
"size":1,
"dataIdentifier":null,
"summary":null,
"data":{
"ticks":[
1641099600000,
1641186000000,
1641272400000,
1641358800000,
1641445200000,
1641531600000,
1641618000000
],
"hasPrev":true,
"usage":[
[
"SKWH",
"FAHRENHEIT",
"SKWH"
],
[
1641099600000,
26.067000000002736,
37.5,
null,
null
],
[
1641186000000,
27.11699999999837,
27.5,
null,
null
],
[
1641272400000,
21.5679999999993,
36.5,
null,
null
],
[
1641358800000,
34.5,
33.7,
null,
null
],
[
1641445200000,
24.930999999996857,
16.8,
null,
null
],
[
1641531600000,
27.588999999999942,
15.9,
null,
null
],
[
1641618000000,
22.609999999999996,
null,
null,
null
]
],
"tempUnit":"FAHRENHEIT",
"thresholdAmt":35.0,
"start":1641099600000,
"hasNext":false,
"deviceId":"[censored]",
"earliest":1582761600000,
"thresholdUnit":"KWH",
"showPartDay":false,
"showToday":true,
"end":1641704399772,
"latest":1641704399999
},
"commodity":"electric"
},
{
"id":"usagedetail",
"premium":false,
"size":0,
"dataIdentifier":null,
"summary":null,
"data":{
},
"commodity":"electric"
}
],
"errors":[
],
"messageInfoList":[
],
"messageIterator":[
]
}
{
"operationSuccess":true,
"errors":[
],
"data":{
"showToday":true,
"ticks":[
1612155600000,
1614574800000,
1617249600000,
1619841600000,
1622520000000,
1625112000000,
1627790400000,
1630468800000,
1633060800000,
1635739200000,
1638334800000,
1641013200000
],
"hasPrev":true,
"usage":[
[
"SKWH",
"FAHRENHEIT",
"SKWH"
],
[
1612155600000,
753.086000000003,
59.7,
null,
null
],
[
1614574800000,
772.265999999996,
68.9,
null,
null
],
[
1617249600000,
827.1870000000054,
79.4,
null,
null
],
[
1619841600000,
1082.1349999999948,
87.3,
null,
null
],
[
1622520000000,
1612.0080000000016,
94.3,
null,
null
],
[
1625112000000,
1594.9660000000003,
87.0,
null,
null
],
[
1627790400000,
1785.489999999998,
93.9,
null,
null
],
[
1630468800000,
1464.8640000000014,
91.3,
null,
null
],
[
1633060800000,
1085.685000000005,
82.0,
null,
null
],
[
1635739200000,
913.2959999999948,
64.4,
null,
null
],
[
1638334800000,
986.948000000004,
62.4,
null,
null
],
[
1641013200000,
215.5509899999955,
50.9,
null,
null
]
],
"tempUnit":"FAHRENHEIT",
"start":1612155600000,
"zoom":"year",
"end":1641704399999,
"hasNext":false,
"deviceId":"[censored]",
"earliest":1582761600000,
"latest":1641704399350
}
}
{
"operationSuccess":true,
"errors":[
],
"data":{
"showToday":true,
"ticks":[
1641618000000,
1641618900000,
1641619800000,
1641620700000,
1641621600000,
1641622500000,
1641623400000,
1641624300000,
1641625200000,
1641626100000,
1641627000000,
1641627900000,
1641628800000,
1641629700000,
1641630600000,
1641631500000,
1641632400000,
1641633300000,
1641634200000,
1641635100000,
1641636000000,
1641636900000,
1641637800000,
1641638700000,
1641639600000,
1641640500000,
1641641400000,
1641642300000,
1641643200000,
1641644100000,
1641645000000,
1641645900000,
1641646800000,
1641647700000,
1641648600000,
1641649500000,
1641650400000,
1641651300000,
1641652200000,
1641653100000,
1641654000000,
1641654900000,
1641655800000,
1641656700000,
1641657600000,
1641658500000,
1641659400000,
1641660300000,
1641661200000,
1641662100000,
1641663000000,
1641663900000,
1641664800000,
1641665700000,
1641666600000,
1641667500000,
1641668400000,
1641669300000,
1641670200000,
1641671100000,
1641672000000,
1641672900000,
1641673800000,
1641674700000,
1641675600000,
1641676500000,
1641677400000,
1641678300000,
1641679200000,
1641680100000,
1641681000000,
1641681900000,
1641682800000,
1641683700000,
1641684600000,
1641685500000,
1641686400000,
1641687300000,
1641688200000,
1641689100000,
1641690000000,
1641690900000,
1641691800000,
1641692700000,
1641693600000,
1641694500000,
1641695400000,
1641696300000,
1641697200000,
1641698100000,
1641699000000,
1641699900000,
1641700800000,
1641701700000,
1641702600000,
1641703500000
],
"hasPrev":true,
"usage":[
[
"KWH",
"FAHRENHEIT",
"KWH"
],
[
1641618000000,
0.245,
null,
null,
null
],
[
1641618900000,
0.2,
null,
null,
null
],
[
1641619800000,
0.204,
null,
null,
null
],
[
1641620700000,
0.589,
null,
null,
null
],
[
1641621600000,
0.196,
null,
null,
null
],
[
1641622500000,
0.213,
null,
null,
null
],
[
1641623400000,
0.249,
null,
null,
null
],
[
1641624300000,
0.156,
null,
null,
null
],
[
1641625200000,
0.215,
null,
null,
null
],
[
1641626100000,
0.194,
null,
null,
null
],
[
1641627000000,
0.102,
null,
null,
null
],
[
1641627900000,
0.195,
null,
null,
null
],
[
1641628800000,
0.13,
null,
null,
null
],
[
1641629700000,
0.145,
null,
null,
null
],
[
1641630600000,
0.196,
null,
null,
null
],
[
1641631500000,
0.096,
null,
null,
null
],
[
1641632400000,
0.173,
null,
null,
null
],
[
1641633300000,
0.177,
null,
null,
null
],
[
1641634200000,
0.105,
null,
null,
null
],
[
1641635100000,
0.173,
null,
null,
null
],
[
1641636000000,
0.226,
null,
null,
null
],
[
1641636900000,
0.195,
null,
null,
null
],
[
1641637800000,
0.173,
null,
null,
null
],
[
1641638700000,
0.183,
null,
null,
null
],
[
1641639600000,
0.484,
null,
null,
null
],
[
1641640500000,
0.214,
null,
null,
null
],
[
1641641400000,
0.126,
null,
null,
null
],
[
1641642300000,
0.12,
null,
null,
null
],
[
1641643200000,
0.28,
null,
null,
null
],
[
1641644100000,
0.177,
null,
null,
null
],
[
1641645000000,
0.194,
null,
null,
null
],
[
1641645900000,
0.153,
null,
null,
null
],
[
1641646800000,
0.195,
null,
null,
null
],
[
1641647700000,
0.168,
null,
null,
null
],
[
1641648600000,
0.175,
null,
null,
null
],
[
1641649500000,
0.28,
null,
null,
null
],
[
1641650400000,
0.467,
null,
null,
null
],
[
1641651300000,
0.222,
null,
null,
null
],
[
1641652200000,
0.474,
null,
null,
null
],
[
1641653100000,
0.334,
null,
null,
null
],
[
1641654000000,
0.22,
null,
null,
null
],
[
1641654900000,
0.211,
null,
null,
null
],
[
1641655800000,
0.19,
null,
null,
null
],
[
1641656700000,
0.852,
null,
null,
null
],
[
1641657600000,
1.241,
null,
null,
null
],
[
1641658500000,
0.969,
null,
null,
null
],
[
1641659400000,
1.25,
null,
null,
null
],
[
1641660300000,
1.206,
null,
null,
null
],
[
1641661200000,
1.293,
null,
null,
null
],
[
1641662100000,
0.971,
null,
null,
null
],
[
1641663000000,
0.149,
null,
null,
null
],
[
1641663900000,
0.144,
null,
null,
null
],
[
1641664800000,
0.225,
null,
null,
null
],
[
1641665700000,
0.508,
null,
null,
null
],
[
1641666600000,
0.113,
null,
null,
null
],
[
1641667500000,
0.138,
null,
null,
null
],
[
1641668400000,
0.145,
null,
null,
null
],
[
1641669300000,
0.09,
null,
null,
null
],
[
1641670200000,
0.153,
null,
null,
null
],
[
1641671100000,
0.137,
null,
null,
null
],
[
1641672000000,
0.112,
null,
null,
null
],
[
1641672900000,
0.137,
null,
null,
null
],
[
1641673800000,
0.11,
null,
null,
null
],
[
1641674700000,
0.14,
null,
null,
null
],
[
1641675600000,
0.145,
null,
null,
null
],
[
1641676500000,
0.151,
null,
null,
null
],
[
1641677400000,
0.178,
null,
null,
null
],
[
1641678300000,
0.137,
null,
null,
null
],
[
1641679200000,
0.672,
null,
null,
null
],
[
1641680100000,
0.13,
null,
null,
null
],
[
1641681000000,
0.258,
null,
null,
null
],
[
1641681900000,
0.15,
null,
null,
null
],
[
1641682800000,
0.153,
null,
null,
null
],
[
1641683700000,
0.225,
null,
null,
null
],
[
1641684600000,
0.137,
null,
null,
null
],
[
1641685500000,
0.126,
null,
null,
null
],
[
1641686400000,
0.1,
null,
null,
null
],
[
1641687300000,
0.199,
null,
null,
null
],
[
1641688200000,
0.081,
null,
null,
null
],
[
1641689100000,
0.183,
null,
null,
null
],
[
1641690000000,
0.088,
null,
null,
null
],
[
1641690900000,
0.0,
null,
null,
null
],
[
1641691800000,
0.0,
null,
null,
null
],
[
1641692700000,
0.0,
null,
null,
null
],
[
1641693600000,
0.0,
null,
null,
null
],
[
1641694500000,
0.0,
null,
null,
null
],
[
1641695400000,
0.0,
null,
null,
null
],
[
1641696300000,
0.0,
null,
null,
null
],
[
1641697200000,
0.0,
null,
null,
null
],
[
1641698100000,
0.0,
null,
null,
null
],
[
1641699000000,
0.0,
null,
null,
null
],
[
1641699900000,
0.0,
null,
null,
null
],
[
1641700800000,
0.0,
null,
null,
null
],
[
1641701700000,
0.0,
null,
null,
null
],
[
1641702600000,
0.0,
null,
null,
null
],
[
1641703500000,
0.0,
null,
null,
null
]
],
"tempUnit":"FAHRENHEIT",
"start":1641618000000,
"zoom":"day",
"end":1641704399999,
"hasNext":false,
"deviceId":"[censored]",
"earliest":1582761600000,
"latest":1641704399989
}
}
If someone is interested in making this integration, I’d be happy to provide access to my analytics account for testing.