Hi,
I am using Home Assistant with the latest release (2022.08).
Also I am using SBFspot on a pi to collect data from my solar inverters via LAN (not bluetooth).
I used instructions like these
It’s working so far. The data I got are correct.
But when I am integrate the sensor in the energy dashboard the values are wrong during the day.
3 or 4 hours a day the kWh output is far too high and I do not know why that’s happening. On my west side I have 3,2 kWp solar power. So 17 kWh in one hour is not possible
Attached a screenshot from today.
Mh… I do not know what you mean.
Yaml for the sensor?
Today were 9 hours with wrong values.
Energy dashboard counted 98.376,1 kWh power
But the east site produced 12 kWh today.
I have also a sensor for “today total power”.
But the values are also wrong for some hours a day as with the total value.
Could I use in some way the current power?
It’s counted in Watts.
So caluclating that in one hour I should geht kWh and use that for the energy dashboard?!
Your last reset value template is not finding its target, and being ignored i think (there might be an error in logs.)
last_reset_value_template string (optional)
Defines a template to extract the last_reset. Available variables: entity_id. The entity_id can be used to reference the entity’s attributes.
I don’t know whats going on here.
I changed it like your example.
Removed entries in groups.yaml.
Sensors are working. I am getting correct values.
Just the energy dashboard calculates wrong values.
Couple of hours the data are correct and some hours it’s far too high. Over 20 000 kWh and so on.
Here a screenshot from today.
The data are correct here.
I think the problem is:
Sometimes there are no values.
Cronjob runs every 5 minutes. And sometimes there are no values, so 0.
And next run there are values again I think the energy dashboard calculates wrong!?
I don’t know why there are sometimes no values …
Edit:
Looked with mqtt explorer.
One mqtt transmission I saw:
Retained messages don’t play well with statistics/energy dash. Statistics does some maths over a period of time and then outputs the value. Which is why there is a delay in the beginning. When a retained message is found it throws out the maths, because of the diffence in the retained value and the expected value.
The main benefit of retained messages is for when HA restarts. It doesn’t have to wait for a value. So when you look your inverter sensors they don’t all say “unknown”. SBFspot only takes data from your inverter every 5 mins during the day and stops overnight(depending on how it’s setup). So when you restart you will be waiting for a new message to show up before your sensors switch from unknown to a proper value. That could be potentially until morning and the first new day data arrives.
You can use -finq to force an enquiry to get values over night or on boot.
-r is generally the retained flag. Although not sure what you have setup. You can remove the flag and delete the retained message.
Thank you. I removed the -r option and deleted the retained message. Ich will report back n some weeks if another of the wrong values appeared in the dashboard.
I had some good values the last 3 weeks, when the sun shined the whole day.
Last days we had rainy days and the inverter didn’t work.
When the cronjob runs (every one hour) I got zero values.
So I got wrong values again.
You need to figure out why you are getting 0 values for ETotal. Even if the inverter isn’t producing power it should still be able to send out a non zero ETotal value.
This shouldn’t stop your inverter working… converting solar sure, but it should still work and be able to send values out.
It would probably also be good to filter out the 0 values before you send it to the dashboard.
Is your sync time resetting your inverter time or something?
ETotal should be cumulative, it should be putting out energy produced since the day the inverter was installed. I didn’t notice when you posted a few weeks back that ETotal was also putting out zero values.
What do you have in your sync time setting for SBFspot.cfg and what time is on the inverter and what time is it trying to sync to?
Probably best to turn off time sync with sbfspot and set the correct time on your inverter.
To filter you would need to do something like this.
You need to figure out the time thing first though I think, otherwise you can’t really make the filter if you are having daily ETotal values starting at zero.