Many thanks for this info, I wasn’t aware of this new limitation. These are very hard restrictions provided by Solcast and as you can see in my Screenshot before I’m able to perform 50 requests per day which enables me personally to get each 2 hours updates for 2 planes. That’s why the default is setted to 120 minutes. Sadly this seems not to apply anymore.
Hello. I have one question. I just update to OH 4.2.1 (from 4.1.0) and now I am seeing this error on my Thing:
Exception during update: solarforecast:fs-plane:homeSite:homeNorthEast # Forecast invalid time range
My definition looks like this:
Bridge solarforecast:fs-site:homeSite "ForecastSolar Home" [ location="auto-detect", channelRefreshInterval=1] {
Thing fs-plane homeNorthEast "Vorhersage NordOst-Panels" [ refreshInterval=30, azimuth=45, declination=9, kwp=5.88, damping=1]
Thing fs-plane homeSouthWest "Vorhersage SüdWest-Panels" [ refreshInterval=30, azimuth=-135, declination=9, kwp=5.88, damping=1]
}
Can anybody here tell me what may be wrong?
Is this a log seen once or is it occuring more often?
I’ve seen this rarely during startup but not repeatedly. Also item updates are working properly.
Ok, got the same result with your config.
There are changes from Marketplace version installed before and the official binding.
Refer to readme regarding config parameters, see below
location
auto-detect
is removed.
Either put your coordinates in or remove this config parameter for taking openHAB location settingschannelRefreshInterval
is removed
damping
is splitted intodampAM
(morning) anddampPM
(evening)
Below config is working fine for me
Bridge solarforecast:fs-site:homeSite "ForecastSolar Home" {
Thing fs-plane homeNorthEast "Vorhersage NordOst-Panels" [ refreshInterval=30, azimuth=45, declination=9, kwp=5.88, dampAM=1, dampPM=1]
Thing fs-plane homeSouthWest "Vorhersage SüdWest-Panels" [ refreshInterval=30, azimuth=-135, declination=9, kwp=5.88, dampAM=1, dampPM=1]
}
Please double check also your .items
file with the connections to the channels mentioned in readme.
Thanks a lot! After updating the .things
and .items
definition, I got it to work again.
BTW previously I had an item definition also for the forecast for tomorrow (channel day1
). Did that get removed? (I did not really use it - just being curious.)
Yes, please spend some time on the previous posted readme
- These are the available channels
- The example section contains a small rule how to obtain the energy prediction for tomorrow
- With the rule actions you can check energy prediction for any time period you you want, e.g. for the next hour
Got it, thank you! An explicit changelog would have been nice, but you are right - in some form all the info is there.
Hi!
When trying to check a time too far in the future (using the getEnergy action) I get an exception about this, saying “Query 2024-08-27 00:00:00 too late. Valid range: 2024-08-25 05:43:26 - 2024-08-26 20:12:33”. Is there any way to check the valid range before even trying so I won’t go this far in the future?
I’m using the forecast.solar public profile, not even sure what the valid range is, seems to be around 30 hours from now.
Yes, via Thing Actions getForecastBegin
and getForecastEnd
Ah, I thought I checked the entire docs. Apparently not
I disable the Thing by script in the evening at 18:00 and enable it in the morning at 06:00.
This allow a polling every 180min at least.
Maybe an option to set the polling start time / end time can be added optional to the thing?
Upcoming version for OH4.3 comes with possibility of manual updates. This allows everybody to define it’s own strategy of updating Solcast planes.
Preliminary version can be found in top post, readme in github shows example:
- Set
refreshInterval=0
forsc-plane
- Rule example shows update only during daylight
Now you can define your personal update strategy using specific times, or bind it to astro binding triggers, or whatever you want.
I installed the new SNAPSHOT 4.3 on my OH 4.2.
Not sure it is supposed to work.
fs-plane
are working normally.
However, I don’t get the sc-plane
working.
I set the refreshInterval=0
.
The Thing state for sc-site does change between UNKOWN
and OFFLINE
.
Any idea what is happening ?
2024-09-19 20:09:34.144 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:WeWeHome' changed from OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Sued # Day 2024-09-19 not available in forecast. Invalid time range to OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Nord # Day 2024-09-19 not available in forecast. Invalid time range
2024-09-19 20:09:34.144 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:WeWeHome' changed from OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Nord # Day 2024-09-19 not available in forecast. Invalid time range to OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Sued # Day 2024-09-19 not available in forecast. Invalid time range
The following is the JavaScript code I want to use to trigger the update manually, as per your documentation.
var sc_plane_sued = things.getThing("solarforecast:sc-plane:WeWeHome:Dach_Sued");
var sc_plane_nord = things.getThing("solarforecast:sc-plane:WeWeHome:Dach_Nord");
if(items.Solcast_WeWeHome_PV_Daytime.state == 'ON') {
var solareForecastActions_sued = actions.get('solarforecast', 'solarforecast:sc-plane:WeWeHome:Dach_Sued');
var solareForecastActions_nord = actions.get('solarforecast', 'solarforecast:sc-plane:WeWeHome:Dach_Nord');
solareForecastActions_sued.triggerUpdate;
solareForecastActions_nord.triggerUpdate;
}
Example in readme shows DSL rule, for JavaScript you need the brackets to execute the function.
After that update will happen in the next minute.
For debugging add some console_log
entries e.g. to check items.Solcast_WeWeHome_PV_Daytime.state
has the right state.
I indeed missed the brackets I fixed this and the Refresh is working in general.
However, I’m still not clear with the Bridge States.
If the state is UNKOWN and the triggerUpdate() is done, the data gets updated.
However, if the state is OFFLINE, the triggerUpdate() does raise and Bridge Offline alert, and nothing gets updated.
Furthermore status is changing from UNKNOWN to OFFLINE, back to UNKOWN, without doing anything.
Something is still wrong - not sure this is because I run the new 4.3 SNAPSHOT with OH 4.2.1?
The following message is logged 3x per minute, without doing a triggerUpdate.
2024-09-21 16:36:05.492 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:WeWeHome' changed from OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Nord # Day 2024-09-21 not available in forecast. Invalid time range to OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Sued # Day 2024-09-21 not available in forecast. Invalid time range
2024-09-21 16:36:05.492 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:WeWeHome' changed from OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Sued # Day 2024-09-21 not available in forecast. Invalid time range to OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Nord # Day 2024-09-21 not available in forecast. Invalid time range
just changed again to UNINITIALIZED
2024-09-21 16:40:00.482 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:WeWeHome' changed from OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Nord # Day 2024-09-21 not available in forecast. Invalid time range to UNINITIALIZED
I would say no, I’ve the same test environment
What does it mean in general? Are there some traces which shows the update?
Don’t care too much about these states - they are simply indicating no data available.
See my short test
// sc-site created - UNKNOWN due to no plane available
2024-09-23 13:04:14.025 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:28f99996e4' changed from UNINITIALIZED to INITIALIZING
2024-09-23 13:04:14.029 [DEBUG] [solcast.handler.SolcastBridgeHandler] - No PV plane defined yet
2024-09-23 13:04:14.029 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:28f99996e4' changed from INITIALIZING to UNKNOWN
// sc-plane added - due to no data available bridge switches OFFLINE
2024-09-23 13:04:51.271 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:28f99996e4:f6c5041896' changed from UNINITIALIZED to INITIALIZING
2024-09-23 13:05:14.037 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:28f99996e4' changed from UNKNOWN to OFFLINE: Exception during update: solarforecast:sc-plane:28f99996e4:f6c5041896 # Day 2024-09-23 not available in forecast. Invalid time range
// logging in script - manual update triggered
2024-09-23 13:07:20.606 [INFO ] [nhab.automation.script.ui.0e12239fbf] - org.openhab.binding.solarforecast.internal.actions.SolarForecastActions@66ec6dbe
2024-09-23 13:07:20.616 [INFO ] [nhab.automation.script.ui.0e12239fbf] - solarforecast:sc-plane:28f99996e4:f6c5041896 manual update triggered
// approx 1 minute later first sc-plane then sc-site switching ONLINE
2024-09-23 13:08:16.349 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:28f99996e4:f6c5041896' changed from INITIALIZING to ONLINE
2024-09-23 13:08:16.351 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:28f99996e4' changed from OFFLINE: Exception during update: solarforecast:sc-plane:28f99996e4:f6c5041896 # Day 2024-09-23 not available in forecast. Invalid time range to ONLINE
It means, that the triggered update does work, in the following condition:
- if bridge thing
solarforecast:sc-site:WeWeHome
is in statusUNKNOWN
- if
solarforecast:sc-plane:WeWeHome:Dach_Sued
isINITIALIZING
- if
solarforecast:sc-plane:WeWeHome:Dach_Nord
isINITIALIZING
- if all things above are
ONLINE
Now the issues I have:
The thing status of sc-site
(bridge) does change from UNKOWN
to OFFLINE
after some time without doing anything automatically. I don’t know the reason, but the following seems to be the trigger.
Below the the log file, after starting OH 4.2.1 in a new Docker Container.
The status is as mentioned about UNKNOWN, INITIALIZING, INITIALIZING
.
If the triggerUpdate is executed in this state, the data is fetched and items get updated as expected.
After the triggerUpdated, the Status will change to ONLINE for sc-site and sc-plane.
Everything is good at this point.
However, if the triggerUpdate is not executed quick enough, the bridge thing sc-site
does change its status to OFFLINE
.
In this condition, no triggerUpdates are possible anymore!
[Stefan@WeWeNAS-3 logs]$ grep 'solarforecast:sc-plane:WeWeHome' *
events.log:2024-09-25 20:28:54.283 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:WeWeHome:Dach_Nord' changed from UNINITIALIZED (HANDLER_MISSING_ERROR): Handler factory not found to UNINITIALIZED (NOT_YET_READY)
events.log:2024-09-25 20:28:54.284 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:WeWeHome:Dach_Sued' changed from UNINITIALIZED (HANDLER_MISSING_ERROR): Handler factory not found to UNINITIALIZED (NOT_YET_READY)
events.log:2024-09-25 20:28:54.363 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:WeWeHome:Dach_Sued' changed from UNINITIALIZED (NOT_YET_READY) to UNINITIALIZED (BRIDGE_UNINITIALIZED)
events.log:2024-09-25 20:28:56.603 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:WeWeHome:Dach_Nord' changed from UNINITIALIZED (NOT_YET_READY) to UNINITIALIZED (BRIDGE_UNINITIALIZED)
events.log:2024-09-25 20:28:56.636 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:WeWeHome:Dach_Nord' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
events.log:2024-09-25 20:28:56.645 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:WeWeHome:Dach_Sued' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
events.log:2024-09-25 20:29:08.678 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:WeWeHome' changed from UNKNOWN to OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Nord # Day 2024-09-25 not available in forecast. Invalid time range
events.log:2024-09-25 20:29:08.686 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:WeWeHome' changed from OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Nord # Day 2024-09-25 not available in forecast. Invalid time range to OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Sued # Day 2024-09-25 not available in forecast. Invalid time range
events.log:2024-09-25 20:29:08.689 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:WeWeHome' changed from OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Sued # Day 2024-09-25 not available in forecast. Invalid time range to OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Nord # Day 2024-09-25 not available in forecast. Invalid time range
events.log:2024-09-25 20:29:08.690 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:WeWeHome' changed from OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Nord # Day 2024-09-25 not available in forecast. Invalid time range to OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Sued # Day 2024-09-25 not available in forecast. Invalid time range
events.log:2024-09-25 20:29:08.692 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:WeWeHome' changed from OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Sued # Day 2024-09-25 not available in forecast. Invalid time range to OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Nord # Day 2024-09-25 not available in forecast. Invalid time range
events.log:2024-09-25 20:29:08.696 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:WeWeHome' changed from OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Nord # Day 2024-09-25 not available in forecast. Invalid time range to OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Sued # Day 2024-09-25 not available in forecast. Invalid time range
events.log:2024-09-25 20:30:00.276 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:WeWeHome:Dach_Nord' changed from INITIALIZING to UNINITIALIZED
events.log:2024-09-25 20:30:00.285 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:WeWeHome:Dach_Nord' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
events.log:2024-09-25 20:30:00.285 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:WeWeHome:Dach_Sued' changed from INITIALIZING to UNINITIALIZED
events.log:2024-09-25 20:30:00.290 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:WeWeHome:Dach_Sued' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
events.log:2024-09-25 20:30:00.290 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:WeWeHome' changed from OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Sued # Day 2024-09-25 not available in forecast. Invalid time range to UNINITIALIZED
events.log:2024-09-25 20:30:00.296 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:WeWeHome:Dach_Nord' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to UNINITIALIZED (BRIDGE_UNINITIALIZED)
events.log:2024-09-25 20:30:00.296 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:WeWeHome:Dach_Sued' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to UNINITIALIZED (BRIDGE_UNINITIALIZED)
events.log:2024-09-25 20:30:05.318 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:WeWeHome:Dach_Nord' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
events.log:2024-09-25 20:30:05.319 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:WeWeHome:Dach_Sued' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
events.log:2024-09-25 20:31:05.829 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:WeWeHome' changed from UNKNOWN to OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Nord # Day 2024-09-25 not available in forecast. Invalid time range
events.log:2024-09-25 20:31:05.830 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:WeWeHome' changed from OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Nord # Day 2024-09-25 not available in forecast. Invalid time range to OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Sued # Day 2024-09-25 not available in forecast. Invalid time range
events.log:2024-09-25 20:31:05.830 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:WeWeHome' changed from OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Sued # Day 2024-09-25 not available in forecast. Invalid time range to OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Nord # Day 2024-09-25 not available in forecast. Invalid time range
events.log:2024-09-25 20:31:05.830 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:WeWeHome' changed from OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Nord # Day 2024-09-25 not available in forecast. Invalid time range to OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Sued # Day 2024-09-25 not available in forecast. Invalid time range
.
.
.
events.log:2024-09-25 20:39:05.837 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:WeWeHome' changed from OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Sued # Day 2024-09-25 not available in forecast. Invalid time range to OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Nord # Day 2024-09-25 not available in forecast. Invalid time range
events.log:2024-09-25 20:39:05.837 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:WeWeHome' changed from OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Nord # Day 2024-09-25 not available in forecast. Invalid time range to OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Sued # Day 2024-09-25 not available in forecast. Invalid time range
events.log:2024-09-25 20:39:05.837 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:WeWeHome' changed from OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Sued # Day 2024-09-25 not available in forecast. Invalid time range to OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Nord # Day 2024-09-25 not available in forecast. Invalid time range
events.log:2024-09-25 20:39:05.837 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:WeWeHome' changed from OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Nord # Day 2024-09-25 not available in forecast. Invalid time range to OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Sued # Day 2024-09-25 not available in forecast. Invalid time range
events.log:2024-09-25 20:40:00.198 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:WeWeHome:Dach_Nord' changed from INITIALIZING to UNINITIALIZED
events.log:2024-09-25 20:40:00.202 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:WeWeHome:Dach_Nord' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
events.log:2024-09-25 20:40:00.203 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:WeWeHome:Dach_Sued' changed from INITIALIZING to UNINITIALIZED
events.log:2024-09-25 20:40:00.206 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:WeWeHome:Dach_Sued' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
events.log:2024-09-25 20:40:00.206 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:WeWeHome' changed from OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Sued # Day 2024-09-25 not available in forecast. Invalid time range to UNINITIALIZED
events.log:2024-09-25 20:40:00.210 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:WeWeHome:Dach_Nord' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to UNINITIALIZED (BRIDGE_UNINITIALIZED)
events.log:2024-09-25 20:40:00.210 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:WeWeHome:Dach_Sued' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to UNINITIALIZED (BRIDGE_UNINITIALIZED)
events.log:2024-09-25 20:40:05.222 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:WeWeHome:Dach_Nord' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
events.log:2024-09-25 20:40:05.223 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:WeWeHome:Dach_Sued' changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
events.log:2024-09-25 20:41:05.217 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-site:WeWeHome' changed from UNKNOWN to OFFLINE: Exception during update: solarforecast:sc-plane:WeWeHome:Dach_Nord # Day 2024-09-25 not available in forecast. Invalid time range
I created a cron to run the triggerUpdate at 7:00 10:00, 12:00, 14:00 and 17:00
cronExpression: 0 0 7,10,12,14,17 * * ? *
To run the update in a good bridge condition, I toggle the status in the script if the bridge is OFFLINE
.
This workaround does work fine, and the items get updated as expected.
Now the next problem:
Today the triggerUpdate at 7:00 worked fine. The thing states change to ONLINE
after doing the first Update. At 10:00 the next triggerUpdate was executed and items got updated as expected.
However, at 12:00 the sc-plane
from Dach_Sued changed to ERROR: COMM
, with Error 429.
As far as I understood, this error code should not happen when doing the update the 3rd time!?
It was just the 6th event in total, but I should have 10 for free.
After a few minutes the bridge state change to OFFLINE again.
Any clue what’s going wrong?
Many thanks
var log = Java.type("org.slf4j.LoggerFactory").getLogger("org.openhab.model.script.Rules.Solcast_Update_Forecast");
var sc_site = things.getThing("solarforecast:sc-site:WeWeHome");
if(items.Solcast_WeWeHome_PV_Daytime.state == 'ON') {
if (sc_site.status == 'OFFLINE'){
// toggle thing - workaround
sc_site.setEnabled(false);
java.lang.Thread.sleep(5000);
sc_site.setEnabled(true);
java.lang.Thread.sleep(5000);
}
var solareForecastActions_sued = actions.get('solarforecast', 'solarforecast:sc-plane:WeWeHome:Dach_Sued');
var solareForecastActions_nord = actions.get('solarforecast', 'solarforecast:sc-plane:WeWeHome:Dach_Nord');
solareForecastActions_sued.triggerUpdate();
solareForecastActions_nord.triggerUpdate();
log.debug("solareForecastActions_sued: {}", solareForecastActions_sued);
log.debug("solareForecastActions_nord: {}", solareForecastActions_nord);
}
These traces are indicating some basic problems. See HANDLER_MISSING_ERROR
and Handler factory not found
.
You said you installed OH4.3 snapshot e.g. dropped it into addons folder? Did you deinstall previous Marketplace or official version?
Only the OH4.3 snapshot is installed (dropped it to Addon Folder). The previous version was deinstalled.
openhab> bundle:list | grep Solar
345 | Active | 80 | 4.3.0.202409151215 | openHAB Add-ons :: Bundles :: SolarForecast Binding
openhab>
I did some closer monitoring and added some additional debug points to the script, to confirm the number of triggerUpdates doesn’t exceed 10.
Unfortunately I cannot see how many attempts are used when checking on the solcast website. This information is not displayed anymore.
But according to the logs it’s only 6 between 7:00 and 12:00. Error 429 should not be triggered.
openhab.log.6.gz
2024-09-30 07:00:19.661 [INFO ] [script.Rules.Solcast_Update_Forecast] - sc-plane - solareForecastActions_sued: org.openhab.binding.solarforecast.internal.actions.SolarForecastActions@6f236832
2024-09-30 07:00:19.662 [INFO ] [script.Rules.Solcast_Update_Forecast] - sc-plane - solareForecastActions_nord: org.openhab.binding.solarforecast.internal.actions.SolarForecastActions@3fad7e7b
openhab.log.7.gz
2024-09-30 10:00:00.280 [INFO ] [script.Rules.Solcast_Update_Forecast] - sc-plane - solareForecastActions_sued: org.openhab.binding.solarforecast.internal.actions.SolarForecastActions@6f236832
2024-09-30 10:00:00.280 [INFO ] [script.Rules.Solcast_Update_Forecast] - sc-plane - solareForecastActions_nord: org.openhab.binding.solarforecast.internal.actions.SolarForecastActions@3fad7e7b
2024-09-30 12:00:00.280 [INFO ] [script.Rules.Solcast_Update_Forecast] - sc-plane - solareForecastActions_sued: org.openhab.binding.solarforecast.internal.actions.SolarForecastActions@6f236832
2024-09-30 12:00:00.280 [INFO ] [script.Rules.Solcast_Update_Forecast] - sc-plane - solareForecastActions_nord: org.openhab.binding.solarforecast.internal.actions.SolarForecastActions@3fad7e7b
2024-09-30 14:00:20.281 [INFO ] [script.Rules.Solcast_Update_Forecast] - sc-plane - solareForecastActions_sued: org.openhab.binding.solarforecast.internal.actions.SolarForecastActions@2514c2b1
2024-09-30 14:00:20.281 [INFO ] [script.Rules.Solcast_Update_Forecast] - sc-plane - solareForecastActions_nord: org.openhab.binding.solarforecast.internal.actions.SolarForecastActions@33c7b988
2024-09-30 17:00:20.281 [INFO ] [script.Rules.Solcast_Update_Forecast] - sc-plane - solareForecastActions_sued: org.openhab.binding.solarforecast.internal.actions.SolarForecastActions@4216a787
2024-09-30 17:00:20.281 [INFO ] [script.Rules.Solcast_Update_Forecast] - sc-plane - solareForecastActions_nord: org.openhab.binding.solarforecast.internal.actions.SolarForecastActions@1ae3ed1
openhab.log
[Stefan@WeWeNAS-3 logs]$
I think the main issue related to HTTP error 429, starting at 12:00.
2024-09-30 12:00:21.377 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:WeWeHome:Dach_Sued' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): HTTP Status Code 429
2024-09-30 12:00:21.387 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'solarforecast:sc-plane:WeWeHome:Dach_Nord' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): HTTP Status Code 429
In the morning at 7:00 or 10:00 everything is still fine as below:
openhab.log
2024-09-30 10:00:00.279 [DEBUG] [script.Rules.Solcast_Update_Forecast] - Attempting to update sc-plane - checking valid daytime ...
2024-09-30 10:00:00.280 [DEBUG] [script.Rules.Solcast_Update_Forecast] - Attempting to update sc-plane - Solcast_WeWeHome_PV_Daytime state: ON - sc-site.status:
2024-09-30 10:00:00.280 [DEBUG] [script.Rules.Solcast_Update_Forecast] - Attempting to update sc-plane - sc_site state: ONLINE
2024-09-30 10:00:00.280 [INFO ] [script.Rules.Solcast_Update_Forecast] - sc-plane - solareForecastActions_sued: org.openhab.binding.solarforecast.internal.actions.SolarForecastActions@6f236832
2024-09-30 10:00:00.280 [DEBUG] [script.Rules.Solcast_Update_Forecast] - triggered Update for sc-plane:WeWeHome:Dach_Sued
2024-09-30 10:00:00.280 [INFO ] [script.Rules.Solcast_Update_Forecast] - sc-plane - solareForecastActions_nord: org.openhab.binding.solarforecast.internal.actions.SolarForecastActions@3fad7e7b
2024-09-30 10:00:00.280 [DEBUG] [script.Rules.Solcast_Update_Forecast] - triggered Update for sc-plane:WeWeHome:Dach_Nord
Is it expected to have below log entry 3x every 10min?
Updated cache entry: org.openhab.binding.solarforecast.internal.actions.SolarForecastActions
I’m lost why this isn’t working