Hi, I am running your great binding on OH4.2, installed from Marketplace. Using Solcast service with two sc-planes.
And I am having trouble with getPower action used in rule:
"Script execution of rule with UID 'solcast-1' failed: An error occurred during the script execution: Could not invoke method: org.openhab.binding.solarforecast.internal.actions.SolarForecastActions.getPower(org.openhab.core.thing.binding.ThingActions,java.time.Instant,java.lang.String[]) on instance: null in solcast".
val solarforecastActions = getActions("solarforecast","solarforecast:sc-site:homeSite") // this is definitely OK
val granularityInMinutes = 30
var observedDateTime = LocalDateTime.now
val endDT = observedDateTime.plusDays(1)
endDT = endDT.minusMinutes(30)
var influx_content = ""
while (observedDateTime.isBefore(endDT)) {
val powerAvg = solarforecastActions.getPower(observedDateTime).toString().replace(' kW', '')
influx_content = influx_content + "solcast_power_estimate value=" + powerAvg + " " + epoch +"\n"
observedDateTime = observedDateTime.plusMinutes(granularityInMinutes)
}
I was using same code on OH3 and it works. I am using very similar script with getDay action with no problem on OH4.2.
Can you help me pls? Thanks.
Hi, I am running your great binding on OH4.2, installed from Marketplace. Using Solcast service with two sc-planes. And I am having trouble with getPower action used in rule:
"Script execution of rule with UID 'solcast-1' failed: An error occurred during the script execution: Could not invoke method: org.openhab.binding.solarforecast.internal.actions.SolarForecastActions.getPower(org.openhab.core.thing.binding.ThingActions,java.time.Instant,java.lang.String[]) on instance: null in solcast".
I was using same code on OH3 and it works. I am using very similar script with getDay action with no problem on OH4.2. Can you help me pls? Thanks.