Reading Australian smart meter data

Thanks, i believe i got the premise_id, I tested it but i think i may not got the rest of the command correctly.

Can you please confirm this command is correct?

python3 main.py 123456 [email protected] EMAIL APP PASSWORD smtp.gmail.com 587

is this correct?

i think your issue there is you are using the outgoing smtp mail server not the imap one, try with imap.gmail.com and port 993. if that dosnt work probably best to open an issue on github (just to avoid spaming this thread)

(i am assuming you are replacing EMAIL APP PASSWORD with your actual password)

Thanks and I just realised this is a closed thread :slight_smile:

I tried the imap.gmail.com 993 and still doesnt work.

The script ran but I believe it gave out sample output instead.

yeah, it looks like i forgot to remove the test data when i pushed to github. in main.py, if you remove line 42 (the import), remove usage_data from the function call on line 43 and uncomment line 44 it should work.

ill push an update to githug to fix it when i am home from work tonight done. i also pushed some changed that make it non blocking that were nesaserry for HA to be happy. this is mostly switching from the requests library to httpx for the web calls

(also, i dont think this is really closed. it is solved for the OP but plenty of other people are in different situations that need help and find this thread that its still fairly used.)

@TomW1605 I’d be keen to read updates on your progress on integrating the output into HA (via the Historical Sensor code).

I’m taking a look at getting my power data from the AusNet/MyHomeEnergy service. I’ve managed to fetch fairly up-to-date data (within an hour I think) using a script, and while I still have some authentication challenges to consider[*], I also want to start working towards injecting the data into HA.

[*]MyHomeEnergy authenticates with a Captcha, making things painful for automation. But once logged in, I can capture my auth cookie from my browser and use that in my script. The cookie only works for 30 minutes and then my auth fails. But after 15 minutes of using a valid cookie, my requests are given a new auth cookie to use, and they work fine for another 30 minutes. So if I send requests often enough, and keep switching cookies as new ones are offered, I think I can go indefinitely (as long as HA doesn’t crash, or my internet goes down). I’ve managed to go 24 hours so far.

here is my repo with the historical sensor integration GitHub - TomW1605/ha-synergy: synergy integration for home-assistant. unfortunately there seems to be a bug in the integration that is causing sql write errors that HA is interpreting as a corrupt DB causing it to dump the whole DB and start again. it is fairly easy to restore the DB by hand (just delete the new one, rename the old one back to its original name and restart HA) but thats not at all practical for production.

this is a known issue also impacting the energy sensor the auther wrote the historical sensor code for Database gets corrupted after restart if integration is configured · Issue #58 · ldotlopez/ha-ideenergy · GitHub

My energy distributor (CitiPower/Powercor in Melbourne) allows customers to register a Zigbee device for an in-home display.

Vic is different. They mandated all smart meters must support Zigbee/SEP.

No idea whether you can get a device you could connect in to HA though.

Literally a few posts up in this thread … Reading Australian smart meter data - #15 by The_DuFF

I have been in touch with my NSW retailer about direct access to my meter data.
The meter is supplied by PlusES, & after much too-ing & fro-ing, they have agreed to give me access as they should under Australian regulations:
I queried AEMO about this issue. Their reply follows:
(Start)
AEMC
to (redacted)
Last Wednesday at 8:33 AM
Hi (redacted)

Thank you for your enquiry.

We understand that you seek information on whether the National
Electricity Rules (NER) allow local access to your smart meter.
This access would allow you to attach a device that reads energy data from
your smart meter.

Clauses 7.15.3(g and (h) of the NER provides:

  • A customer can request their electricity retailer for a read
    only password for local and remote access to energy data recorded
    by their meter - The retailer must provide the read only password within 10
    business days.
  • The access is subject to the authorisation of the relevant Metering
    Coordinator for the meter.

We trust this information assists.
Regards AEMC.

(end)
Their reply:
We can offer Mini hub device to support Modbus protocol over RS485
interface which the customer can then interface to any software that
supports Modbus protocol for local real time energy data monitoring.

This device will be a RS485>Webserver interface, which should be easy to interface to HA. I am not sure if the Costs will be available until I get more info. It would be nice to have the peak/off-peak/shoulder info, but having real access to the data will be great.

I will report on how it goes…

3 Likes

do you know if any of that applies to WA? i know we are on a different grid so im not sure we are covered by the same rules and requierments

EDIT: well, should have just googled NER first. the first result just imediatly had a map of where it applies
image

Thanks Doug, I’ve requested the same from Energex (QLD) with the following:
to: [email protected]
Subject: HEMS alternative
Hi Team,
I would like to request read only access to the smart meter data gathered by the intellihub system at my premises. The AEMC states in the National Electricity Rules that I can obtain access to the smart meter data in cluses 7.15.3 (g and h)

  • A customer can request their electricity retailer for a read
    only password for local and remote access to energy data recorded
    by their meter - The retailer must provide the read only password within 10 business days.
  • The access is subject to the authorisation of the relevant Metering Coordinator for the meter.

As such, can you please provide me access to the API address and a read only account for the following device:

My account: 9999900000

My Meter number: QB0111111 / EDA222222

My Provider: OVO Energy

My Address: XXX, YYY QLD 4999.

Thanks in advance,

Will keep you posted here on how this goes - if it works, I say request it away!

Good luck! I have yet to receive confirmation I will definitely get access. I feel one thing that might come out of it is that the meter suppliers will decide that perhaps it would be a good idea to make Zigbee access Australia universal instead of just SA & Vic.
One positive thing with zigbee is that it can be used to control (ie load shed) devices for Energy resellers (one would hope with customer consent). I feel that the future of a reliable grid will depend on this. Not everyone will have a V2G vehicle & want to use it positively…Some EV owners will just arrive home & plug in their EV adding to the Max demand issue 5pm>8pm. I will be suggesting moving to Zigbee enabled metering to my local State pollie in NSW. But first I wait for access.