rule "test ephemeris rule"
when
Item T_TestSwitchX received command ON
then
V_NextHoliday.postUpdate(Ephemeris.isBankHoliday())
end
and get these results:
2021-04-23 20:32:27.310 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'test-1' failed: null in test
2021-04-23 20:32:27.745 [INFO ] [openhab.event.ChannelTriggeredEvent ] - logreader:reader:openhablog:newErrorEvent triggered 2021-04-23 20:32:27.310 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'test-1' failed: null in test
2021-04-23 20:32:27.751 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'logreaderLastError' changed from 2021-04-23 20:31:54.357 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'test-1' failed: null in test to 2021-04-23 20:32:27.310 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'test-1' failed: null in test
It must have stopped working at some point before the last holiday, but I’ve had it in the back of my mind that Ephemeris stopped working at some point but it hasn’t been critical to my workflow, but will be come summer. I can go check logs to confirm, but can’t seem to figure out how to test/reset/confirm how it should work. I don’t think the developer toolbar can parse Ephemeris functions (they all error out).
Any tips on how to test basic Ephemeris functionality?
Sure that the Ephemeris call is the problem ? What if V_NextHoliday is null ?
I suggest you put the current line into a comment and just add a loginfo row to print out the result of the ephemeris function call. If that one fails, too the problem indeed is with that function call.
V_NextHoliday has data from the last time it successfully changed.
I left both postUpdate and sendCommand fail
isBankHoliday is a remnant of testing… it was originally:
Ephemeris.getNextBankHoliday()
I tried changing the logging but didn’t see any new info at TRACE, and thus removed the bundle from the console. However, I am unable to reinstall it. Maybe a bad, pre-caffeine, action:
Experimenting is fine,but trying random stuff less productive.
Conduct experiments one step at a time;
someItem.postUpdate(someStuff)
“doesn’t work”. What exactly is this someStuff? Find out before trying to do things with it. Use temporary logging to find out.
The trouble with posting snippets that could never have worked is that it distracts potential helpers from your real problems.
At the moment, you don’t know if getNextBankHoliday returns anything at all, or just something unsuitable to update that type of Item. Why not find out?
Thanks @rossko57 - I thought I had mentioned above that logging the result of the ephemeris command yields the same errors in the logs - no new information…
rule "test ephemeris rule"
when
Item T_TestSwitchX received command ON
then
logInfo("Results:", Ephemeris.getNextBankHoliday().toString)
end
Welp, not sure how it resolved, but I restored the backup of the textual config file I disabled last night, and restarted the bundle and all is working. Not 100% sure when it stopped working (sometime between presidents day and patriots day, a Massachusetts holiday) but it is back and working now.