Enphase Envoy with Energy Dashboard

I see the point being made.
The 11pm figures are from 11pm-12am and are displayed on the day before.
The 12am figures are from 12am-1am and are displayed on the next day.

They’re not displayed though. Is is because people think that the statistics cover the period 11.12 to 12.12pm (as an example of the hourly period)?

Although the run is done at that time, it only takes into account statistics recorded during the the hour (i.e. 11.00:00 to 11:59:59)

Ah yes you are right.

I am sitting here and it’s 9am and I’m still looking at a graph for 7am. Surely it can’t be 2 hours late.

Looking at sql database which shows times in utc. My Timezone is 10 hours ahead

So the line that says created at 22:12, if I add 10 hours that makes it 8:12 am created. And it’s for the period starting at 7am and finishing at 8 am. The label for this data is 7am

The 9.12 run processes the data from 8am to 9am. So at 9.12 you will see the 8am data appear because it covers the period 8am to 9am.

The 7am data shows the period 7am to 8am.

It should be better labelled to be clear the period it covers rather than just the start time of the period.

1 Like

I Agree this is confusing - I retract my statement above though cause after further checks I just did I believe it is displaying correctly.

To provide it - I have a separate log that graphs my power usage - overnight my Hot water is heated by offpeak electricity. Last night the hot water started to be heated between these times 22:00 -23:35 and 01:55 - 02:11.

Image 001

This matches exactly the Energy graphs for today - note there is no large spike in the first bar, so that data is showing midnight to 1:00am, the second bar is slightly increased due to the 3kw heater cutting in for a few minutes at the end of the hour, then a large spike from 2:00am

The “issue” is the graph labelling is causing the confusion.

1 Like

Ok, it’s now 9:17 and the data for 8am -9am just got created at 9:12am

The graph now shows this as 8am

Here is the sql backend data in utc. Add 10 hours and that is what the time is locally

So when you see 11pm on the graph, that should represent the data that occurred between 11pm and 12am for that day. I think that the only issue is the labelling isn’t clear.

In essence, it takes 1.2 hours (1h 12m) to display the last hour of data which will be labelled as the hour the sample started recording at.

1 Like

OK I think I can now understand it. I was mislead by the labeling.
The penny dropped when you said it was the start time not the finish time as I was assuming.
Thank you for having the patience and perseverance to explain it to this 70 yr old fella.
Would you care to update the “issue”?
I have posted a comment in the issue about the labeling.
Your explanation will be far better than mine

1 Like

Glad that confusion is sorted.

I have figured out how to get SQLite Web.
I have loaded it and execute the SQL query

SELECT *
FROM "statistics"
Where metadata_id = 8
Order by created desc

This is what I get but have yet to figure out what it is telling me.

How did you know that the Metadata_ID = 8 was your import energy sensor?

Close. Go to statistics_meta table to match the correct id with your sensor

Got it! It was 37. Thank you


One more question if I may
Last 2 columns
what do they mean?

That’s the statistic. In your case it is how many kWh accumulated since last reset (22 aug).

All HA does is subtract latest value from previous value and graphs it

Thank you once again

1 Like

FYi - I had issues with this just now and found the the correct syntax is:

update "statistics_meta" 
set unit_of_measurement = "kWh"
where id = "25"

Maybe it didn’t like the mixed single and double quotes?

Curious, I am playing with my Enphase now, and I noticed that my results are updating every 1 or so minutes on HA. I have seen that a few people are able to get updates every 1 second. I was wondering how to do that… I tried checking the Enphase site and calling them, but I have had no luck. I assume this is on the enphase side - not HA, but I was hoping someone might have an idea.

Ideally, I would like to see the consumption real time, so that we can determine how much each appliance is using in real time by turning it off and on. Of course, I can wait a minute each time, but it would be nicer if I could get an update every second.

Thank you

Yep, 1 second updates are able to be done via this script. I currently have this working myself.

The 1 second updates are currently only possible by running this script on a computer that has python. In my case I have a windows 10 computer that I leave on all the time where I just leave this python script running and it polls the envoy every second and then publishes the output to Home Assistant via the mqtt protocol.
The installer password was rather easy to decrypt too. Let us know if you need a hand as I just went through this myself.

See

Mentioned here

1 Like

This is great… I will take a look. I am using a Windows 10 Hyper-V to run my instance of HA. So I can do the same. I tried to setup a installer account, which I was able to do, but I noticed that I could not access my enphase installer account. Enphase told me only the installer that setup the system has access… not just any installer. If you have a link to decrypt the installer credentials, that would be great too. This is an amazing thread and I am learning so much about HA and Enphase!

Here is how I got the installer password.

Went to http://envoy.local (top of screen)

Copied and pasted my serial number into serialnumber = of passwordCalc.py (left of screen)
then I pressed Run / Run Module and it spits out the password in blue on the output (right of screen)

1 Like

Next step is setting up MQTT broker (if not already using one)

Setup a user for mosquito and remember the password you make up for it.

image

Then install Mosquito broker Integration

  1. Navigate in your Home Assistant frontend to SupervisorAdd-on Store.
  2. Find the “Mosquitto broker” add-on and click it.
  3. Click on the “INSTALL” button.

image

image

Once we have the installer password, we can then edit the envoy_to_mqtt_json.py file and run it.

Then you can verify MQTT is working by listening to /envoy/json
go to configuration / mosquito mqtt broker / configure / listen to a topic

image

1 Like

@del13r Genius Simply a genius. Thank you for this information. I was able to follow your instructions and get the data I was looking for… This is great!

1 Like