Enphase Envoy with Energy Dashboard

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

@vk2him is the real hero with the code.
I just helped take some pics.

2 Likes

I’m getting the following error in the HAS logs sometimes at startup (5 in succession):


Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/connection.py:89 
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 16:45:31 (5 occurrences) 
Last logged: 16:45:31

[281473253665088] Received invalid command: energy/info

Has anyone else seen this? My Energy dashboard seems to populate just fine…

Maybe this

I saw that, but I haven’t excluded anything from Recorder, and my Energy dashboard is populating just fine. Seems to only happen at HA startup, and not every time. Can anyone see if they have the same message in the logs?

Hi @vk2him,

Something about the visual layout of power wheel turned me off and I didn’t feel I could commit to it.
I have instead decided to go with the Tesla Style Solar Power Card as it sort of looks like the Energy Dashboard card.

Once installed, I used the following sensors in the card config.

type: custom:tesla-style-solar-power-card
# 3 flows between bubbles
grid_to_house_entity: sensor.mqtt_import_power
generation_to_grid_entity: sensor.mqtt_export_power
generation_to_house_entity: sensor.mqtt_consumption
# extra values to show as text above icons
grid_extra_entity: sensor.mqtt_instant_cost_per_hour
house_extra_entity: sensor.today_energy_total_cost
generation_extra_entity: sensor.temp

That’s an interesting looking display - I might try it out and see.

I have abandoned the Tesla style as I couldn’t read it easily from a distance

Hi @del13r. I’m thinking of trying out the mqtt setup to get some realtime info. What do you do with the realtime sensors? Do you only use them for a display like yours at https://community.home-assistant.io/t/enhpase-envoy-on-2021-8-with-new-energy-feature/328668/220, or have you integrated them with the energy dashboard stuff you’ve so lovingly developed?