Comments (7)
Also here are a couple of screenshots from the Enphase Enlighten system showing my meters are both set up and working. Although now that I look at these I'm seeing that the consumption meter is installed as "load only" which your docs explain will omit the "net" entities.....dang! Is this really a limitation on supporting these, or just a preference? There was no way for us to physically instal the CTs in load with solar mode, since my combined meter/breaker panel doesn't have a space to place the CTs in such a location.
![Screenshot 2024-02-21 at 9 37 13 AM](https://private-user-images.githubusercontent.com/17014425/306720535-7a6a479a-081e-4391-aa6f-d5877d7cff68.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTcxNzUwOTEsIm5iZiI6MTcxNzE3NDc5MSwicGF0aCI6Ii8xNzAxNDQyNS8zMDY3MjA1MzUtN2E2YTQ3OWEtMDgxZS00MzkxLWFhNmYtZDU4NzdkN2NmZjY4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA1MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNTMxVDE2NTk1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk5MTBkOGYxMWFmMTg2Y2I4YTQ4ZTVlZGM3ODRiYTg2MzFmM2Y0OTQ0ZDk5ZDFlNThhOTQzM2NmZjk0NWIxMjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.mwr7SEs1Q4IG4-B78OmlUKi36r9-xXkjrHrFquxmVQA)
![Screenshot 2024-02-21 at 9 38 16 AM](https://private-user-images.githubusercontent.com/17014425/306720560-aff91a1b-3af9-400e-8237-91f831e1104c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTcxNzUwOTEsIm5iZiI6MTcxNzE3NDc5MSwicGF0aCI6Ii8xNzAxNDQyNS8zMDY3MjA1NjAtYWZmOTFhMWItM2FmOS00MDBlLTgyMzctOTFmODMxZTExMDRjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA1MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNTMxVDE2NTk1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWYwMmNmOWZiM2JkMDdmNmE3YjAzODA3NzUzZjUwNmFiMzBkYjkzNTZlNjIwMjE0ZmMxNjYxN2NmMWUzMjc4YzgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.mfkrBQ6lLg7Gfz5zfa8EaNpeSqBjrW3XoxVE_iVuQN4)
from home_assistant_custom_envoy.
Hi @jimmyz80, looking at your data in the "envoy_info":
section I see that the consumption CT is configured as total-consumption. (measurementType) The integration expects a net-consumption type to report grid import and export. (See also 180)
"Endpoint-meters": [{
"eid": 704643328,
"state": "enabled",
"measurementType": "production",
"phaseMode": "split",
"phaseCount": 2,
"meteringStatus": "normal",
"statusFlags": []
}, {
"eid": 704643584,
"state": "enabled",
"measurementType": "total-consumption",
"phaseMode": "split",
"phaseCount": 2,
"meteringStatus": "normal",
"statusFlags": []
}
],
That's why the "CTs consumption data not available for your Envoy device."
is showing. So the first question is if the consumption CT is indeed a total-consumption one or a net-consumption one.
from home_assistant_custom_envoy.
Looking at
it is indeed a total-consumption one as indicated by load-only
.
from home_assistant_custom_envoy.
Is this really a limitation on supporting these, or just a preference?
Unless we can find a recipe how to calculate from the 2 other CT's or the other data, its a limitation.
This is an excerpt of the CT meters readings
"Endpoint-meters-readings": [{
"actEnergyDlvd": 12209702.219,
"actEnergyRcvd": 1697.711,
"activePower": 5335.441,
}, {
"actEnergyDlvd": 9779697.983,
"actEnergyRcvd": 111.852,
"activePower": 2201.690,
}
]
First one is the production CT, second the total-consumption. For production CT actEnergyDlvd
is from solar to switchboard, actEnergyRcvd
the other direction. The 12.2MWH seems to match the Enphase screenshot.
For total-consumption CT actEnergyDlvd
is to the house, 9.7MWh. But we just don't know how much of the solar went into the house or to the grid. And the number differs quite a bit from the 11MWh in your screenshots.
from home_assistant_custom_envoy.
Back to clarify a few things and add a few thoughts... :)
This is indeed a load-only consumption CT. It's installed around all of the load wires exiting the panel to circuits in the house (other than the solar backfeed circuit).
For total-consumption CT actEnergyDlvd is to the house, 9.7MWh. But we just don't know how much of the solar went into the house or to the grid.
I think the "we" here might be the key. The Envoy certainly does, since at any given time it just needs to subtract the solar CT from the consumption CT. Anything negative is the current net kW being imported and anything positive is the net kW being exported. I can see it doing this in realtime on my status screen.
![Screenshot 2024-02-21 at 2 32 38 PM](https://private-user-images.githubusercontent.com/17014425/306794662-aafb0e9b-143b-43f3-a30d-a911e60af1b4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTcxNzUwOTEsIm5iZiI6MTcxNzE3NDc5MSwicGF0aCI6Ii8xNzAxNDQyNS8zMDY3OTQ2NjItYWFmYjBlOWItMTQzYi00M2YzLWEzMGQtYTkxMWU2MGFmMWI0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA1MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNTMxVDE2NTk1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM3ZTM3ODFiYWE0OTVkYmI1MjkxZWI3NWEzYTdlYTY2MzFkNjFiOGFhZDRiZTg4NzM5YjQyMmVkNjdmNGI1ZDYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Q1aVuglo1BE6zeE6icrLc_afzcEjPCVnq-wUWA_PvUI)
I can also see the same thing in HA just by calculating this difference between envoy_current_power_consumption and envoy_current_power_production.
So over the lifetime of the system a simple difference between production and consumption will give you the lifetime net import or export. Enphase agrees with this on my lifetime data screen, where I can see 12.2MWh produced minus 9.7MWh consumed = 2.4MWh "net exported".
![Screenshot 2024-02-21 at 2 25 18 PM](https://private-user-images.githubusercontent.com/17014425/306795281-2562e411-0b7f-4c36-b8f2-086494acffb9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTcxNzUwOTEsIm5iZiI6MTcxNzE3NDc5MSwicGF0aCI6Ii8xNzAxNDQyNS8zMDY3OTUyODEtMjU2MmU0MTEtMGI3Zi00YzM2LWI4ZjItMDg2NDk0YWNmZmI5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA1MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNTMxVDE2NTk1MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRkMDRhZmY4NTU3N2RkZDczMjQ3ODdhYTgzOWY5YWY5MGFkMGEwY2U1NjA0MTc3YTdhMTkzYjdhYjU1MjFjNmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.FEZD15j0u9dqziIuGGDr2_hUxP7NCrsvLc8i649mP0E)
The "imported" and "exported" numbers on that screenshot through I believe are calculated internal to the Envoy using its database of historical datapoints for either importing or exporting (every 15min?, 1min?, whatever granularity they use for the internal DB). For clarity I would call these total export and total import because again when you calculate their difference you end up at my net export value. 8.6MWh Total Export - 6.2MWh Total Import = 2.4MWh Net Export. In any case, I don't believe these figures would be available externally in either of the CT setting modes.
It seems to me that the integration could fill in sensor.Envoy_current_net_power_consumption just by computing the difference between envoycurrent_power_consumption and envoy_current_power_production. That's what the Enphase software has to be doing when the CT is in load-only mode (not sure why they only use it internally and don't expose it on the API though...). The Envoy just doesn't have to do this math when the CT is in load-plus-solar mode since then it can read that value directly by virtual of "mechanical calculation" of electrons flowing in both directions through a single CT.
Similarly for:
sensor.Envoy_<sn>_lifetime_net_energy_production
sensor.Envoy_<sn>_lifetime_net_energy_consumption
It seems like you would only ever have data in one of these but not both if they're truly "net", correct? I obviously can't see them on my setup so I can't compare to the Enphase values. But by seeing the word "net" in them I would expect to see sensor.Envoy_lifetime_net_energy_consumption be zero and sensor.Envoylifetime_net_energy_production be 2.4MWh. If instead they ended up being populated by 8.6MWh and 6.2MWh that I earlier referred to as my TOTAL export and import, that seems like an error to me. "Net" would mean the difference calculation has been completed and you ended up with a single positive or negative number which would dictate whether it's written into sensor.Envoylifetime_net_energy_production or sensor.Envoy_lifetime_net_energy_consumption and the other would be zero. Otherwise they're just totals of any detected periods of exports or imports, NOT yet netted out.
Sorry about this being so long winded, and hopefully I was able to articulate things in a somewhat clear fashion. :)
from home_assistant_custom_envoy.
Not entirely relevant to my original topic, but I'm attaching a file that seems to confirm my above hunch that internally the Envoy was using 15min snapshots to create their total export and total import values for any window of time. This was exported from the Enphase Enlighten app. Notice that in every row there's only ever a value in the exported OR imported column but never BOTH. So they just take the production and consumption totals for a 15min window, compute the difference, and then determine if the result goes into the import or export column by checking if the result is positive or negative.
So this total import/export data is clearly something the integration can't provide unless the Enphase API does the math and exposes these totaled up for any given window of time. But I still feel the lifetime NET import and export data, and current net consumption could be provided as I described in my previous post.
4395521_monthly_net_energy_report.csv
from home_assistant_custom_envoy.
I think the "we" here might be the key
Yes you are right. The envoy pushes a blob of data every so often for 15 min time periods and it buffers it if there's network issues. We, mere mortals, can't access that blob.
I can also see the same thing in HA just by calculating this difference between envoy__current_power_consumption and envoy__current_power_production.
We're talking power now, and yes, the diff between sensor.envoy_1234567890121_current_power_production
and sensor.envoy_1234567890121_current_power_consumption
is sensor.envoy_123456789012_current_net_power_consumption
.
- You can make this calc in HA using a template
- Looking at the code it's not overly complicated to do this, but you would need to supply datasets I can use for this case and regression testing
- What is not 100% clear is if these values are snapshots or represent the average of a time interval.
- The individual inverter data seems to be a Wh average for a 5 min interval calculated every 5 min
- The current_power_production and current_net_power_consumption come from the production report and may be similar, but I'm not sure. We need to validate this.
- Using CT numbers may be just snapshot, so collecting these ever 1 minute may be inaccurate.
Back to Energy, That is internally in the Envoy integrated from the powers and calculated. As for 'we ...', we have no reference. If solar produced 12 and the house used 9 then any import/export value pairs that account for 3 net export up to max import of 9 would meet the numbers.
house | solar | import | export |
---|---|---|---|
9 | 12 | 0 | 3 |
9 | 12 | 1 | 4 |
9 | 12 | 2 | 5 |
Haven't delved through all other reports if we can find a reference. That's take some time.
Not sure if I addressed all your items. In summary your are right net power can be calculated and net energy can't unless we find some reference in existing reports. (the endpoint... lines in the diagnostic lines, or for multiple sets run with debug enabled over HA restart and couple of minutes)
from home_assistant_custom_envoy.
Related Issues (20)
- Feature request: Show Battery Temperature HOT 6
- Probleme intégration des valeurs dans Energy HOT 7
- Integration simply stopped working. Reloading times out. HOT 4
- No values when charging and discharging the batteries. HOT 1
- Current and Today's Energy Production with strange values/behaviour HOT 9
- Questions on migrating to new HA Core version HOT 8
- Question: Which Sensor shows the power consumption of the house HOT 2
- Filtrage des valeurs incohérentes HOT 5
- Current measurement does not look ok HOT 4
- disable power production by negative energy prices HOT 4
- All connection attempts failed HOT 16
- HA - Invalid authentication
- Entities have no value anymore after update envoy (automatically by enphase) on 01-04-2024 HOT 10
- Binary Sensor Grid Status no longer available HOT 3
- error communicating with API HOT 5
- support for enlighten v4 API HOT 3
- Question: Which Sensor shows the energy send to the grid? HOT 28
- "Production Current" is non-zero amps at night...huh? HOT 1
- Connectivity issues since a few days HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from home_assistant_custom_envoy.