OBSOLETE.Solar Edge Modbus integration combined with the new Energy Dashboard

The templates are in the first post. The utility meters are the ones I use in the energy dashboard. There is also a screenshot of the energy dashboard configuration…

Thanks for this, I’m also working through trying to get this all running

I’m unable to see where this sensor is defined “sensor.solaredge_lifetime_energy”
As such the “Solar Lifetime Energy kW” value is 0

Which is used in this code block

I do have a “sensor.solaredgemodbus_lifetime_production” sensor which looks to have the needed value

Fixed my own issue
Needed the SolarEdge cloud integration as well :crazy_face:

Only remaining issue is the solar_exported_power_yearly sensor is not showing up for usage in the Energy page for some reason
It has data :confused:

Fixed, after switching to Mariadb for recorder :confused:

Remko, thanks so much for providing the config files! I am a rank newbie at HA, so I must be doing something wrong. I copied your yaml lines into sensors.yaml and template.yaml - both are in the config folder with configuration.yaml. Then I added the configuration.yaml text you provided and changed the config to my setup: the IP of my inverter and set read-battery to false - my installation does not have a battery.

I wasn’t sure how to “include” the sensors and template yaml’s, so added these lines to my configuration.yaml file:

sensor: !include sensors.yaml
template: !include template.yaml

“Check Configuration” gave me an error:

Component error: solaredge_modbus - Integration ‘solaredge_modbus’ not found.

Can you please point me to what I may be doing incorrectly?

Thanks again!

I have documented the entire setup and configuration here:

I did use another custom modbus component to get it all to work, so the above configuration is not valid anymore. Please follow the guide in the linked thread, then it should work. If you have any questions you can also send me a direct message.

But looking at your error message, you have not installed the custom modbus integration yet.

Thanks, Remko! Yes, you are correct - I realized that after posting this - installed last night. I’ll go through your full setup post and see if I can get it to work.

Thanks again!

Interestingly MWh is not a valid unit of measurement for device_class of energy.
It only allows Wh or kWh.

Doesn’t cause many problems except long term statistics won’t be stored, but they are probably not required.

Yeah, I did noticed that. But as you mentioned…does not have an effect and I only use this sensor to just display the current status. I don’t use it in any statistics.

Hi @scottda this looks great! Do you mind to share your Dashboard? Would give me some Idea whats possible in Grafana and I wouldn´t have to start from scratch. Thanks!

1 Like

Hi @marschall.philipp , sorry i tried to post the json code here for you but its too big, it wont let me attach a json file either. Any other way you can think of to share the json with you? thanks

Hi All,

Exactly what I’d like to set up. Unfortunately, I’ve only gotten as far as installing the modbus_solaredge integration via HACS I think, and configuring it. I’m not actually receiving any data from it at all.

I know it all works as I currently have it connected to C-Bus and sending data back fine.

Regs,
Paul

Remko,
Thank you for sharing. Can you please help me? I am new HA user so this may well be basic stuff. I am getting HA errors when I validate the server configuration. I’m sure it’s something basic.

I note that you refer to sensors.yaml and template.yaml when none exist in my new installation. I found reference online that tells me how to reference these new files within the configuration.yaml so added 2 more lines to what appear to be existing external references:

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml*
scene: !include scenes.yaml
sensors: !include sensors.yaml
template: !include template.yaml

I’ve created the 2 additional files and inserted your text exactly as you quote (copied by highlighting text and simple plain text pasting). I am getting errors that

Configuration invalid

Invalid config for [solaredge_modbus]: expected a dictionary for dictionary value @ data[‘solaredge_modbus’][‘host’]. Got ‘192.168.0.30’
expected a dictionary for dictionary value @ data[‘solaredge_modbus’][‘name’]. Got ‘SolarEdge Modbus’
expected a dictionary for dictionary value @ data[‘solaredge_modbus’][‘port’]. Got 1502
expected a dictionary for dictionary value @ data[‘solaredge_modbus’][‘read_battery’]. Got True
expected a dictionary for dictionary value @ data[‘solaredge_modbus’][‘read_meter1’]. Got True
expected a dictionary for dictionary value @ data[‘solaredge_modbus’][‘read_meter2’]. Got False
expected a dictionary for dictionary value @ data[‘solaredge_modbus’][‘scan_interval’]. Got 3. (See /config/configuration.yaml, line 24).
Integration error: sensors - Integration ‘sensors’ not found.

I can confirm that my MODBUS is enabled as I’ve been using with an old HA build but that HACS added integration would not show me battery details and I hope to get that with your setup.

Any advice would be most welcome. Thanks.

Tony

Hi @Tonywheeler60,

Honestly speaking, there’s no need anymore for using any of the methods described in @Remko 's post for adding the Modbus Sensors to the EnergyDashboard.

Just install the integration (I would prefer HACS) and it should be ok.
the sensors will be available by default - and without the need of creating utiliy meters and what ever else was mentioned in the linked topic :slight_smile:

Thanks, but I’ve tried that and the battery sensor is missing altogether. Plus this installation creates detail by summarising entities that simply do not exist - calculating and reformatting them?
Am I missing something?

can you give more details about the “summarising entities that do not exist” ?
The integration does simply one thing - it collects the data the inverter delivers on the modbus interface.

If you want to have import / export data, you need to have a modbus meter installed on your inverter.

During the setup of the integration, you can then check weather a meter is installed (m1 up to m3) or / and a battery.
Then it should also delivers battery information…

Agree, I have gotten rid of the previous modbus integration and chnaged it to the one available via HACS. During configuration you can select meter 1 and battery 1 and that gives me all the data required for the energy dashboard. I am not getting rid of my entire configuration since I have some other UI elements which require values, the modbus does not directly provides (stuff like daily imported etc)

I am cleaning up my configuration now and when I am done with that I will repost my entire setup here. May take a few days though…

I’m having problem with the life time sensor, when I divide it by 1000 to get the value in kWh I sometimes get 0 when the value is missing. And that’s not a big issue but the energy dashboard look bad when it happens. Does anyone know how to filter that away or ignore it. I have the lifetime kWh sensor in the template.yaml

Please see my latest post in this thread for the configuration I use now. This also takes care of the “jumping to 0” problem

Hi @scottda, I’am using the modbus TCP to collect data from my solaredge inverter and power meter.
I’m also using an Influx Db and Grafana.
I’ve not been able from now to create an “historical” card with data such as " Solar generation last week / today / month … "
The reason is that the value i’ve got from modbus is a “state_class: total_increasing” i suppose.
Can you maybe give me a little explanation on how you managed to do it ?
Thanks in advance,

Mathieu