I also have Envoy R with microinverters but I can’t seem to connect it to HA. Could you please share us an example of the code you have that works for you?
Thanks!!!
The easiest way nowadays, if you use version 0.76 or upwards, is the enphase_envoy
sensor.
If you prefer to stick with manual configuration using the rest
sensor, you could scroll up a bit to see my working configuration.
I’m using Fronius Symo inverter with Fronius Smartmeter. All data can easly accessed with JSON calls.
And how do you use the data from Home Assistant?
Thanks.
Hi, I am using Hovall’s solar system, it works very well. I purchased the solar panels from Hovall, and they send me the whole solar system.
hey mate - wondering if you’ve had a look at the power-wheel custom card, and have any idea how to grab the grid consumption/production from the Envoy-S from the JSON? Lovelace: Power wheel card
I can get the consumption figure, which goes positive or negative depending on the state, however the card doesn’t behave nicely - trying to determine if I’m flogging a dead horse or not, trying to get it to work
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.