Replies: 33 comments
-
|
I just added support for batteries and Solman as a datasource. |
Beta Was this translation helpful? Give feedback.
-
hi in the file Import Energy data into Home Assistant.sql what do I have to change to add the battery data in and out? questi sono i due file che ho generato con il tuo script che devo importare in HA elec_battery_feed_in_high_resolution.csv |
Beta Was this translation helpful? Give feedback.
-
|
In the SQL file for MariaDB you have to specify the ID's of the battery charge and battery discharge. Your provided CSV files only contain information from this month (start date 2nd of March), is this correct? |
Beta Was this translation helpful? Give feedback.
-
ah ok, can I import the two csv together and then run the .sql script just once? |
Beta Was this translation helpful? Give feedback.
-
|
The procedure has not changed from what you have done with the other csv files. Change the Only the data of the battery will be imported when you define only these two sensors. |
Beta Was this translation helpful? Give feedback.
-
Change the sensor_id with the value found in your installation (similar to what you have done with the other sensors. Only the data of the battery will be imported when you define only these two sensors. why? |
Beta Was this translation helpful? Give feedback.
-
|
Could you please download the latest version of the SQL script? |
Beta Was this translation helpful? Give feedback.
-
the same |
Beta Was this translation helpful? Give feedback.
-
|
Could you retry again? I fixed another tablename. |
Beta Was this translation helpful? Give feedback.
-
data import now it is ok |
Beta Was this translation helpful? Give feedback.
-
|
Can you double check the id's?
|
Beta Was this translation helpful? Give feedback.
-
yes: |
Beta Was this translation helpful? Give feedback.
-
|
Seems correct, what have you defined in the energy dashboard in Home Assistant? |
Beta Was this translation helpful? Give feedback.
-
see below: |
Beta Was this translation helpful? Give feedback.
-
|
For how long do you have the battery configured in Home Assistant? Because the total is very low. The script assumes that at least the short-term statistics are there (7 days). |
Beta Was this translation helpful? Give feedback.
-
What is the period that you are displaying here (year/month/day etc.)? |
Beta Was this translation helpful? Give feedback.
-
the whole month of June 2024 |
Beta Was this translation helpful? Give feedback.
-
|
I found the issue. In the configuration of the battery sensors you have specified that the input data should be corrected. This is normally needed when you go, for instance, from Wh to kWh. But in this case your input data is in kWh and your target sensor in Home Assistant is also in kWh. So the correctionfactor should be 1.0 (no correction). You have to delete the incorrect records in case you want to use the database you provided to me. That can be done by the following query. This deletes records from the database so be sure that it is correct! Below the screenshot from my test machine using your database with the corrected import. |
Beta Was this translation helpful? Give feedback.
-
|
ok I run the query to delete the data and import the csv again with the 1.0 modification (no correction). |
Beta Was this translation helpful? Give feedback.
-
YESS !!! |
Beta Was this translation helpful? Give feedback.
-
|
I was double checking something else and saw that your imported data (CSV files) is until the 1st of September but the data in Home Assistant starts at the 8th of September. This causes an incorrect graph. I think you should import again but make sure that the CSV files also contain the data of September 2024. |
Beta Was this translation helpful? Give feedback.
-
|
I only imported data from April 1st to August 31st. I might think about importing data from September 1st to September 7th |
Beta Was this translation helpful? Give feedback.
-
|
Yes that is incorrect. You should also include September (April - September). The script needs to have some overlap between the imported data and the Home Assistant data. You cannot import September 1st to September 7th separately because it has to adjust all the records and it cannot insert data in between. |
Beta Was this translation helpful? Give feedback.
-
but can I import everything or do I have to delete the data from the DB? |
Beta Was this translation helpful? Give feedback.
-
|
You have to execute the delete query again and then use the new CSV's (including the September data) and execute the script. |
Beta Was this translation helpful? Give feedback.
-
could you please tell me the correct query including the month of September? |
Beta Was this translation helpful? Give feedback.
-
It is the same query as you have been using. |
Beta Was this translation helpful? Give feedback.
-
Yess: |
Beta Was this translation helpful? Give feedback.
-
|
That looks a lot better! |
Beta Was this translation helpful? Give feedback.
-
|
Thanks to you I could retire MeterN!!! |
Beta Was this translation helpful? Give feedback.










Uh oh!
There was an error while loading. Please reload this page.
-
Hi Patrick from the Solarman site, a site used by many Chinese innvrter, it would be interesting to import the data on Home assistant. I attach the export file that I just generated from my portal account:
https://globalhome.solarmanpv.com/plant/infos/exportdata
I only need to import the battery data, but many others will definitely need to import everything
Casa-Daily Statistics-20250316.xlsx
Beta Was this translation helpful? Give feedback.
All reactions