-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Entity not avaliable: pvopt_opt_cost, pvopt_base_cost #269
Comments
Hmmmm, Pv_opt is occasionally failing to load consumption data from sensor.solis_house_load. It strictly doesn't need it, it loads both power and energy and will use power in preference of energy. It might be a generic problem with Beta-9 you are running as I only download the energy sensors, however I think your energy sensor is not correct in config.yaml (so it has nothing to fall back on if power isn't working right) can you attach that file please? |
Note: from tomorrow I'm on hols for the week, will pick this up again on my return. |
@stevebuk1 voila! |
Try commenting out all of these lines in config.yaml: id_consumption_today: sensor.{device_name}_consumption_today The first entry is incorrect for the Solax modbus integration - it should be sensor.solis_house_load_today. I don't think that is the cause of the problems tho as Pv_opt seems to recognise that its not found and instead revert to the system default. I think the cause of the problem is the 2nd and 3rd entries when a call is made through Appdeamon to load the consumption history in W . Its clear from #270 that some systems struggle to get it done with 10seconds and I suspect loading consumption as W is a significant size. Here, the system defaults appear deliberately set to entities that don't exist, and if this happens the system reverts to using kWh, which it then converts to W. I suspect loading kWh history is significantly smaller but perhaps slightly less accurate. Try it and post a log please. |
@stevebuk1 voila! It looks like its working, although my read only 'off' keeps flicking back over to on, similarly choosing Zappi from the dropdown box, but not sure how much of a difference they make. Also not sure I understand the "current setting forced discharge" is that right? |
re the readonly setting, if you want Pv_opt to start up in readonly mode, find this line in config.yaml:
and change false to true. The EV charger control is the beginnings of support for EVs. If you have a Zappi and its seen as part of the house load, then you'll need to set this to Zappi otherwise the consumption history that Pv_opt uses to predict your use will include the EV charging data. If your Zappi is outside of the house load (i.e on its own Henley block) you can leave it set to None. If you do have a Zappi that is seen as part of the house load and/or are on IOG let me know as I have a mature Beta that supports IOG i.e will pick up any extra cheap slots and prevent the house battery discharging when the EV is charging. It also includes all the code for setting the default for the EV selector correctly. |
Apologies I've got myself confused. You were running the Beta release of Pv_opt before (v3.16.0-Beta-9) but your latest logs show its changed back to the main production release (v3.15.5). Was this deliberate? |
Yep we have a zappi and are on IOG !
From: stevebuk1 ***@***.***>
Sent: 02 October 2024 13:35
To: fboundy/pv_opt ***@***.***>
Cc: pbcjh10 ***@***.***>; Author ***@***.***>
Subject: Re: [fboundy/pv_opt] Entity not avaliable: pvopt_opt_cost, pvopt_base_cost (Issue #269)
re the readonly setting, if you want Pv_opt to start up in readonly mode, find this line in config.yaml:
read_only: false # If true the inverter will not be controlled
and change false to true.
The EV charger control is the beginnings of support for EVs. If you have a Zappi and its seen as part of the house load, then you'll need to set this to Zappi otherwise the consumption history that Pv_opt uses to predict your use will include the EV charging data. If your Zappi is outside of the house load (i.e on its own Henley block) you can leave it set to None.
If you do have a Zappi that is seen as part of the house load and/or are on IOG let me know as I have a mature Beta that supports IOG i.e will pick up any extra cheap slots and prevent the house battery discharging when the EV is charging.
—
Reply to this email directly, view it on GitHub <#269 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AE3A5ETLAGUGQGCM7XMXJALZZPR55AVCNFSM6AAAAABPB3MNY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBYGUZTCNJRGA> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/AE3A5EW7YYAWP2I2XHZFPKLZZPR55A5CNFSM6AAAAABPB3MNY2WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUOLYMTM.gif> Message ID: ***@***.*** ***@***.***> >
|
No!
From: stevebuk1 ***@***.***>
Sent: 02 October 2024 13:59
To: fboundy/pv_opt ***@***.***>
Cc: pbcjh10 ***@***.***>; Author ***@***.***>
Subject: Re: [fboundy/pv_opt] Entity not avaliable: pvopt_opt_cost, pvopt_base_cost (Issue #269)
Apologies I've got myself confused. You were running the Beta release of Pv_opt before (v3.16.0-Beta-9) but your latest logs show its changed back to the main production release (v3.15.5). Was this deliberate?
—
Reply to this email directly, view it on GitHub <#269 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AE3A5EXK4RQ5RAE2N2CNOY3ZZPUZXAVCNFSM6AAAAABPB3MNY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBYGU4DIMRSGQ> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/AE3A5EULVIFGMXXXVEGXPA3ZZPUZXA5CNFSM6AAAAABPB3MNY2WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUOL3TSA.gif> Message ID: ***@***.*** ***@***.***> >
|
Apologies I got myself confused. You are already running v3.16.0-Beta-9 and are on IOG. In which case, take a look at the config.yaml here: Add the section called "EV parameters" to your own config.yaml - this will ensure Zappi is selected on each startup. I'll post later on with some additional lines to add to config.yaml which will enable addtional logging, then I can have a look at your forced discharge question. |
Near the top of your config.yaml file there is the following line:
Change false to true. In the user area, add the following line: debug_categories: W Once you see a charge/discharge plan that doesnt make sense, attach Pv_opt.log. |
So I re-downloaded files after the beta 9 confusion above and now its failing again. Although i've fixed the Zappi default as you suggested. I've just tried to tweak it to correct the sensor to be this one; id_consumption_today: sensor.solis_house_load_today but having it correct or commented out didn't seem to make a difference. I attach logs and my yaml! ![image](https://github.com/user-attachments/assets/040f9d9c-63ab- pv_optc.log |
Hi, I think its just the case that now that debug is set true, there is just so much logging the system takes forever. Beta-9 contains a logging filter so we can see the little bits we need to.
into to your config.yaml. Unless you really need it, I'd also comment out the last 13 lines in config.yaml, i.e. all this text:
|
So I had a bit of time to try and look at this again. I still have the entity not avaliable sensor.pvopt_status error. I played with things a bit and did a few reboots and now it seems to have randomly sprung to live. I attach the latest bits including config.yaml error(5).log The charging plan is like this; I want to check your thoughts on it. Surely what I want (in the cloudy weather today) is accumulate solar today, perhaps with a discharge just prior to 13:00. But then after that, its nearly evening, I dont want it to dump the battery to grid just after. It should surely hold onto the this (or atleast provide it to house load) rather than discharge to grid? Is it trying to be too clever? Or is this a settings problem in terms of charge and discharge thresholds? |
A dump at some point early evening is usual (Pv_opt doesnt tend to delay it to the very last slots unless those slots save you more money than earlier slots), but I'd agree a discharge to 23% doesnt look right, especially when it thinks its still going to be at 22% at 23:00. The next day, your car charging plan lasts till 7am, so the 6:30-7am charge slot is at cheap rate, but I would have expected Pv_opt have a continuous charging slot from 23:30 to 07:00 rather than a car hold for 23:00 to 6:30, then a charge. I think the problem is the setting of ev_part_of_house_load in config.yaml. At the moment, when you charge your car, does the car charging drain the house battery? If it doesn't, then you need to change this line:
to this:
i.e. uncomment the line. As it is, EV charge consumption is being substracted from house consumption which is going to give you almost zero house consumption at the points the car was historically charging, which would explain the forecast of a 23% battery at 17:30 but still at 22% at 23:00. This would explain most of the strange behaviour. Could you also change:
to
as without that the line *** edits - corrected a few times and explanations. |
Upon further inspection I don't think this is the problem as Pv_opt isnt finding any Zappi consumption sensors (or any Zappi entities at all for that matter). This is the cause of the entries in error.log, but setting ev_part_of_house_load = False will correct that as consumption data isnt needed. I'll take a longer look at what is going on from the logs you've provided, but a Pv_opt.log with debug= true will help immensely as it includes a printout of the expected energy flows, pricing, SOC and car charging expectations for each half hour slot making diagnosis of most problems easy. |
Thanks - sorry I'd re-copied bits in from your sample above as somewhere I'd introduced a formatting error. I have the zappi integration set up with 4 devices and 75 entities. Where can I see which ones pvopt is looking for? I attach a new pv_opt where you can see its failing to find sensors. |
For Zappi consumption, PV_opt looks for all entities of type "sensor" that have "zappi" and also "charge_added_session" in the name. If it finds these it will report them as follows:
(the ***** bit is the redacted personal details that is the Zappi S/N etc) |
Thanks for the new logs. Your house consumption data has some extremely weird figures in it, its around 4W(!) all night and then literally zero after 5pm. We need to fix this first before doing anything else. You are logging from the right sensor (sensor.solis_house_load_today) so it must be the data that it is reading from it. In config.yaml, can you change:
to
which will add power consumption logging. Just run one interation (10 mins or so) and post the new pv_opt.log. That will allow me to see what the 7 day consumption history is. |
Voila! Another odd charging plan with only charging between 05:30 and 7? Is it getting confused on history IOG charging sessions (and ignoring the obvious 23:30-05:30 session? |
Thanks! So, Pv_opt expects sensor.solis_house_load_today to be reporting kWh, so it increments all day and resets to 0 at midnight. It is what the house consumes, irrespective of whether the grid is supplying it or the battery is supplying it. Your sensor.solis_house_load_today is reporting very low values overnight with no increments, its resetting itself regularly, and consistently reports no increments from 4.30pm to 11.30pm. I don't think its the right sensor. Below is an image from my own system that shows two days history from sensor.solis_house_load_today and also sensor.solis_grid_import_today. The first day shows an EV charging day and the 2nd shows a non-EV charging day. If we take the 2nd day, you can see that the grid sensor is showing the battery being charged overnight and then it stops incrementing as the battery takes over,. sensor.solis_house_load_today reports the house consumption for the entire 24 hour period. You'll need to locate the two sensors that show this behaviour otherwise Pv_opt isnt going to work. Post a screenshot when you've found them and we can then change the names over in config.yaml so Pv_opt can find them. |
To assist with the above and also the Zappi issue, I'll do a Beta-10 this evening that will do some additional power consumption logging and also log any/all Zappi sensors. |
Was about to say the same. I think they've fitted the Solis CT clamp on backwards, as your grid export looks more like your grid import. That will also probably sort out house_load_today as well. Its easily done, as the Solis CT clamp arrow points the opposite direction to almost everyone elses CT clamp arrow!! |
As promised here is a Beta-10 release which adds logging of the kWh sensor on each optimiser run and also will log all entities with "zappi" in the name on startup to see if we can find the Zappi consumption sensor. Just copy over your existing pv_opt.py, Appdeamon will automatically restart PV_opt. |
Okay, I've updated. |
Agreed, wait a few days to build a history, then try another screengrab snesor.solis_house_load_today and see if that makes more sense. If so, set "Load History Days" to 2 or 3 and increment as the days go by.
Thanks for the Zappi sensor names, that explains why Pv_opt isnt finding them, as they don't contain the word Zappi. Pv_opt currently auto searches. I think "myenergi" might be a better search string but I'm also thinking we need to allow sensor redirection via config.yaml as per the Solis integration settings. Also, Pv_opt only supports one car charger at the moment. For IOG its relatively easy to add another one as all we really need to do is load the consumption data from an additional charger. Give me a few days and I'll come up with something for both of these. We will continue to use this issue thread to track the house battery charge plan issues and the unavailable entities (pvopt_opt_cost etc), but for all EV integration issues (two charger support and Zappi entities not found) please use this thread := #121 |
Agreed, that looks far better!
…On Wed, 23 Oct 2024, 10:51 pbcjh10, ***@***.***> wrote:
This looks more positive;
image.png (view on web)
<https://github.com/user-attachments/assets/fdc318f3-b7cc-420b-a000-1980f22548c9>
—
Reply to this email directly, view it on GitHub
<#269 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASVRJMHKQFOQC4IYOV54YRTZ45WTPAVCNFSM6AAAAABPB3MNY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZRGU2TSOBVGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
It does look like somethings gone a bit wrong, the battery is going betwen 95% and 100% which is what it usually does if the inverter is commanded to charge. The inverter charge start/end times might have some errant values in them, flicking read only to off and waiting for an optimiser run should sort it, but I'd probably just go direct to the Solax entities and check all charge start / end and discharge start / end times are the same. Also check the Energy Storage Control switch is not in Backup/Reserve mode, if so change it to Timed Charge/Discharge as per mine below, or to SelfUse. Until we get both Zappis reporting consumption so we can substract from overall consumption neither the charge plans or the forecast SOC is going to make much sense. In the interim you could turn "Use Consumption History" to off and set a value on the slider that will then appear on the dashboard. Appreciate with an ASHP that probably is going to be a bit oversimplified. |
So I turned it on to see what happens. Its now come up with a more sensible looking charging plan and moved the inverter setting to backup reserve -which I guess is how its going to hold charge at 100% overnight during the cheap rate? I did change the sensor names for my first zappi (the one IOG is tied to) to include zappi, not sure if that means it'll get picked up or not. I also turned off "allow forced discharge" I figure I dont want that atm, as the ASHP will probably overwhelm my puny battery anyway. error(6).log |
Ok its all kicking into life. Editting the entity names is meaning its finding at least one Zappi consumption sensor but the edit has probably the reason why its only got 1 day rather than 7, hence ultimately its going to vastly overestimate your house load and generate a charge plan to suit. Its just a case of waiting for the sensors to build history and it should settle down. I'll still need to add the other Zappi somehow.
|
I've been a bit delayed on this, sorry. Will get to it as soon as I can. |
Touching base here. Not nagging at all. Here are the log files and screens;
I had a look at my config yaml and it seemed different. Not sure if an update made it go wrong. So things now look like this after a restart.; |
A reboot based on the 2nd (corrected config.yaml) this gives this screen and these logs; I had turned your 'auto' tarrif for octopus on which seems to be working. Do I then need to comment out the other bit? I tried commenting out but no difference, still getting tarrif inconsistency?! |
I went back through the thread and re-read this. |
Yes I think you've deduced the issue correctly. You probably copied config.yaml from the repo at some point and lost your changes that we made to remove the consumption sensors in W, which on some systems are so big they don't get read in the 10 seconds that AppDaemon allows. Your kWh consumption sensors seem to be making good sense now. The only concern is the bar chart has a bar called "Loadrate" that is showing in excess of 35,000kWh. It should be set to a sensor that reads in W (power), not kWh (energy), mine is set to sensor.solis_house_load. The same problem is in your "Solar Forecasts versus Actual" chart.
No, if |
On your dashboard, go into edit mode, click on the 3 vertical dots on the right hand side and then click "raw configuration editor": Then change the entry at what should be at line 24 to what your entity name is in your screengrab above. Be patient with this editor, its very slow, don't hold down any delete keys! |
Apologies, thats the standard production dashboard. I've editted my post above to say change it to whatever yours is called in "Solis Inverter House load". To find the actual name, click on the 'gear' icon. |
For you, Line 24 should read Everyones entity names are different so the dashboards supplied tend to need editting. |
I havent needed to adjust much. I have no export tariff so discharging is off for me. I've changed "Solcast Confidence Level" from 50% to 40%, as I find mine mostly underestimates my solar, and have upped "Load Margin" from 10% to 20% as I have a 12kWh battery and a 10kWH average daily consumption, so I'd like a fuller battery to deal with the randomness we switch the oven on at. Other than that I left everything else unchanged. I think until we subtract your 2nd Zappi from the house load your plans won't make much sense, but you can always turn "Use Consumption History" to Off and set an average kWh per day until PV_opt supports multiple chargers. I too started with 5kWh and have since added another US2000C and then a US5000C to increase capacity to my current level. If I get an ASHP I'll be adding more! |
Is there a specific setting that will force charge the battery, or atleast make the system think about charging battery whenever we get a cheap IOG block? For example - battery currently empty (well 20% which is limit), just plugged in car and its 7p until 4pm. I'd like the battery to go "oh hey, crap solar today lets top up". |
That didn't look right. It should pick up the cheap slots as you say. Can
you post a log?
…On Sun, 3 Nov 2024, 12:42 pbcjh10, ***@***.***> wrote:
Is there a specific setting that will force charge the battery, or atleast
make the system think about charging battery whenever we get a cheap IOG
block?
For example - battery currently empty (well 20% which is limit), just
plugged in car and its 7p until 4pm. I'd like the battery to go "oh hey,
crap solar today lets top up".
Is this a generic problem or a setting I can tweak? or is it because I
have cyclic discharge off? Like whenever its got a <= car sign here, why's
it not also topping up the battery?
image.png (view on web)
<https://github.com/user-attachments/assets/82ff4632-692d-4814-a2be-b34ef038c1c8>
—
Reply to this email directly, view it on GitHub
<#269 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASVRJMCP6AH6BNKR4MMSZH3Z6YK2XAVCNFSM6AAAAABPB3MNY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJTGQYTINJUHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
With the power consumption logging we had enabled, unfortunately the log files only stretch back an hour or so. However, most of the testing on Pv-opt has been done with car plugins after 5pm and I suspect the problem is that reloads of the slot prices on a morning / early afternoon plugin don't go far enough in advance to create a decent charge plan (Pv_opt was originally written around Agile where prices don't become available until 4pm). Its either that or the recent algorithm changes that Octopus have made in the last week - charge plans now update regularly. I've recently changed the code to load car slots every 10 minutes rather than just on plugin (and thats working as these are the "<= Car" entries you are seeing) but the prices fed to house battery charge planning are only reloaded on car plugin and will take 20 minutes to become active (delays added to ensure Octopus recalculations have time to complete). I've created 17.0-Beta-13 with additional logging to try and get to the bottom of root cause. Overwrite your local files with these: https://github.com/stevebuk1/pv_opt/blob/dev/apps/pv_opt/pv_opt.py and then please change the "debug_categories" entry in config.yaml to the following:
|
Running pv_opt on a HA Green.
Set up eventually!
Solis inverter, Pyton tech batteries.
Using Solax modbus where I have 169 entities.
However, I have a dashboard error and my dashboard never displays a PV Opt Result.
pv_opt.log
main.log
error.log
This is the dashboard:
The text was updated successfully, but these errors were encountered: