-
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 52 replies
-
Can you follow the instructions at #38 to turn debug mode on, restart HA and share what you see in the logfile when your automation does a solcast retrieve |
Beta Was this translation helpful? Give feedback.
-
v4.1.6 is available. And yes, you could try that, but not before the midnight UTC API reset please. I want to see the logs of next forecast fetch. |
Beta Was this translation helpful? Give feedback.
-
I'm having the same issue as @simar7, but I have 4 sites (2 API tokens), only 1 shows in the site breakdown within attributes. I updated to v4.1.6 before doing an update with debug logging on and it shows an interesting result, some sensors show 0 for 3/4 sites, some show duplicate data: Debug logs below (hopefully I retrieved these correctly):
|
Beta Was this translation helpful? Give feedback.
-
I just went back through my ha history and I added the second API key on Sept 2, is there something iffy with my config if the message is still coming up this long afterwards? I did update the version to 4.1.16 just before this reboot, could that cause the message? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Thinking out loud here. Generally when a zero is returned from a calculation function, where a far more positive response would be expected it is because an exception is occurring. These exceptions are logged as 'error' level. I see none of this in the logs shared. Updating the code as instructed at #166 (comment) should yield an immediate thumbs up or down for the attributes after an HA restart. What I expect to see is that the 'duplication' of results is now gone because this duplication was not actually a site breakdown, but rather the total for all sites duplicated across the site breakdown sensors, which was wrong. Sorry. What is breaking my head is the initial report by @simar7, where the 'power now' sensor sees zeros. This should have seen duplication, because it gets its value from splined data, yet instead it 'kind of' worked well but for one site only, which makes little sense. My head is further broken by @bajarrr reporting zeros for 'peak forecast today', which has nothing to do with the broken spline site breakdown that is fixed by the previously mentioned patch. There must be a futher issue lurking, but I haven't found it yet, and my primary install does not exhibit it making it harder to spot. Any and all sensor/attribute/logging data that I can get post applying the patch above will be greatly appreciated. Don't hold back. @bajarrr, your four-site set up is not something that I do, so I will particularly value experience. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I have news. I know what is going wrong. I hacked together a set of fictional sites/usage caches to match your The cause is a bear trap that was laid by the former author, Oziee of which I have wandered into in the woods. (The underlying reason is calculation of what is called a 'forecast list slice'. The end-time basis for this is the length of all forecasts, which is questionable logic. It works great if every site timeline lines up, but not so much if sites have been added at a later date, which is absolutely the case here. The site breakdown arrays are of differing length, so the end index is dead wrong for newly added sites, hence the zero values. It also explains why a bajillion other folks are not chiming in with "Me too!", because they, like me set all sites up on the same day.) What I need to do is change the logic to something more sensible. I should be able to do that tonight, but it is not going to be a single-line replacement / move on / know that it will be fixed in the next release for good. It may involve downloading a whole new Are you two up for field testing in that way? Then again, it might just end up being a whole method replaced, with other bits changed not being important. I'll let you know the state of play in a while. |
Beta Was this translation helpful? Give feedback.
-
If you switch to the post 4.1.6 branch at BJReplay (https://github.com/BJReplay/ha-solcast-solar/tree/Post-v4.1.6) you can grab the This includes the earlier fix, plus this one. Enjoy, and report back! I look forward to hearing that all is brilliant with sites breakdown. (I haven't overlooked your prior comment @simar7. It's on the to-do list to check out.) |
Beta Was this translation helpful? Give feedback.
-
v4.1.7 is released, fixing all this. Closing. |
Beta Was this translation helpful? Give feedback.
There is an issue at line 1080 (v4.1.6). Oops.
If one or both of you could please replace this one line in
/config/custom_components/solcast_solar/solcastapi.py
:With this:
Then restart HA all should be well with the sites breakdown with the 'power now' sensor attributes (and others that utilise splined data).
This does not explain the zero attribute values for some sensors like `peak forecast today' (which I can't replicate) so I'm lo…