Hi @Bluesmell I am looking to get a Fronius inverter solar system soon. How have you interfaced to the smartmeter and inverter? From what I can see these are Modbus, or is that just the interface between those two devices? Do you get the data from the inverter via wifi? Any help / info you could provide would be great. Thanks
@DrewXT That card doesnât work with the Envoy-S sensors as they are. I was using it before a bunch of changes were made that stopped this working for me.
You need to make some new template sensors to get the values needed to work with the card. I donât use this card anymore.
thanks @cjsimmons - what do you use instead of the Power-Wheel card - it is a pretty cool viewâŠ
I have tried custom sensors, and modifying using templates, etc and itâs doing my head in - such a good idea, but has been over-cooked
yeah, itâs a good card, but like you say, itâs over-cooked. Too many features for a now rather small user group. Was good before hand as it was simple and did exactly what you want.
Now I have a custom card that Iâm slowly working on. It just shows the Envoy-S sensors, so nothing special really. Itâs not at a point to share unfortunatly. You might be able to do something with a glance card though.
I hadnât seen that card yet - itâs certainly a good idea to present electricity production and consumption.
I think the Envoy-S should have all the data available required for producing such a triangle view, but the names used for configuring that custom card seem to be misleading or at least not matching the entity names of the envoy integration.
- solar_power_entity: This is the solar electricity production (
sensor.envoy_current_energy_production
) - grid_power_consumption_entity: This appears to be the imported electricity from the grid; can be calculated from the envoy entities: if consumption > production: consumption - production, else: 0.
- grid_power_production_entity: This appears to be the exported electricity into the grid; can be calculated from the envoy entities: if production > consumption: production - consumption, else: 0
Iâll give it a try later today, and report back.
You are correct. When grid_power was split in to these 2 sensors I stopped using it. I asked why they split and the reason was due to the power meters that they were using have these values split and it was easier for them. I donât fully understand why both couldnât be done, but they said there is a formula to convert the -/+ value of the net sensor on the Envoy in to these 2 new sensors. I really couldnât be bothered with more sensors as the sensors I have is all the info I need. I donât need to know how much itâs costing me. I can get this from my power company.
Alright, here is a simple configuration (Home Assistant 0.87.0.dev0, power-wheel-card from dev branch from today):
I assume that your Envoy-S is already set up and working:
- platform: enphase_envoy
ip_address: <Envoy-S IP Address>
Next, you will need to create 2 additional template sensors to calculate the currently exported/imported electricity:
- platform: template
sensors:
exporting:
friendly_name: "Current Energy Exporting"
value_template: "{{ [0, (states('sensor.envoy_current_energy_production') | int - states('sensor.envoy_current_energy_consumption') | int)] | max }}"
unit_of_measurement: 'W'
icon_template: 'mdi:flash'
importing:
friendly_name: "Current Energy Importing"
value_template: "{{ [0, (states('sensor.envoy_current_energy_consumption') | int - states('sensor.envoy_current_energy_production') | int)] | max }}"
unit_of_measurement: 'W'
icon_template: 'mdi:flash'
And then the Lovelace configuration (using the editor in the UI) looks like this:
grid_power_consumption_entity: sensor.importing
grid_power_production_entity: sensor.exporting
solar_power_entity: sensor.envoy_current_energy_production
title_power: Power distribution
type: 'custom:power-wheel-card'
Et voilĂ , this is how all that looks like:
I see - I havenât been part of that journey myself, but I agree that the cost view may be a bit too much, and it wouldnât work for me anyway because I pay more when buying electricity than I am being reimbursed when selling electricity.
I guess the question would be if it is more desirable to have a generic card that works with many inverters, smart metres, etc. and thus likely requires to add some template sensors to calculate intermediate values, or instead have a card just for a single platform such as the Envoy-S that calculates all the required values under the hood.
Yep, thatâs one of the reasons. I buy my power at different rates, so I could put in the highest price I pay, but then it wont be accurate as most power I buy is cheaper.
you are a dead set legend
I had tried various ways of getting the import/export to work using the envoy component but just couldnât get my logic correct⊠Iâve got it looking like this now - just need some sun in the morning to see the card send the power to the left
thank you so much!!!
can this be done within lovelace, and embedded into a glance card?
currently my power glance card looks like this:
to be able to add your exporting/importing arrow as a third option would be awesome for the wifesâ view, as I doubt she cares about the Power Wheel view, which I reckon is pretty cool⊠(thanks again for showing me how to fix it)
The closest I could get is with a sensor that changes label and icon, but it wonât change the iconâs colour.
sensor:
- platform: template
sensors:
energy_import_export:
friendly_name: "Energy"
value_template: "{% if (states('sensor.envoy_current_energy_production') | int - states('sensor.envoy_current_energy_consumption') | int) > 0 %}Exporting{% else %}Importing{% endif %}"
icon_template: "{% if (states('sensor.envoy_current_energy_production') | int - states('sensor.envoy_current_energy_consumption') | int) > 0 %}mdi:arrow-up-box{% else %}mdi:arrow-down-box{% endif %}"
The glance card allows you to define a theme, so maybe that could be a way to change the colour.
absolutely brilliant!! (damn the toaster draws a lot of power)
This thread is great, I didnât think about using icon_template! But wouldnât you rather have the actual ânetâ value with the icon? Hereâs what Iâve built:
The stats at the top are all template sensors using the methods defined in this thread, except instead of just displaying âImportingâ/âExportingâ Iâm calculating the value for each aggregation point.
The top set of stats (and top chart) is from the Sense module, the bottom set of stats (and bottom chart) is from the Envoy.
I like seeing the cross-over of production vs. consumption and what time of day that happens as well as the cleanliness of the solar production in the sense chart. You can see that yesterday was very clear, today there have been some clouds disrupting the production a little.
I love data.
Followed your directions precisely, mineâs looking kinda off:
Do you have any advice? Particularly the arrow direction.
Thank you so much for your contribution.
So, what were the actual sensor values at that point in time and do they make sense? Did the solar panels produce 50W at the time, or consumed 50W at the time?
I am using version 0.0.13 at the moment - maybe something has changed how positive/negative values are interpreted?
Thanks, yes that view is indeed more helpful.
âCurrent Consumptionâ should never be a negative value - except maybe if you had a battery or generator that exports electricity to the grid. Normally this value represents the sum of all the energy consumers in your household. If you get this (negative) value straight from your solar inverter, then you probably need to create a template sensor which turns this into a positive number, and then use that sensorâs value in the power wheel.
I am soon installing solar panel PLUS a Tesla battery.
Anyone has this type of installation?
To close the loop on this: My inverter was not properly reporting consumption which is why the arrows were wonky. Thanks again for your help a few months ago.
Hi Dave,
since Iâm also a Fronius user, hereâs some thoughts on how I integrated those into my intelligent consumption system: Photovoltaics (PV) + battery + hass = maximize auto-consumption