Hardware: RPi 3
OS: Raspbian GNU/Linux 8 (jessie)
JRE: OpenJDK Runtime Environment (Zulu 8.31.1.122-linux_aarch32hf) (build 1.8.0_181-b122)
OH: 2.5.6 (Build)
I’m in the process of migrating my rules to jython and the NGRE. Good, if slow (a function of my available time, rusty programming skills and learning python at thr same time), progress being made.
I’m at the point where I’m moving over to the ToD rules provided here: https://github.com/rkoshak/openhab-rules-tools
The current problem I’m having is working our why it’s not working - TimeOfDay gets set to Dawn, but then I get the following error:
2020-07-31 00:02:03.918 [WARN ] [jsr223.jython.Ephemeris Time of Day ] - The following Items are are NULL: [u'Default_Night'] kicking off initialization
2020-08-02 11:24:58.734 [INFO ] [jsr223.jython.Ephemeris Time of Day ] - Today is a weekend day, there are 3 time periods today.
2020-08-02 11:24:58.764 [WARN ] [jsr223.jython.Ephemeris Time of Day ] - The following Items are are NULL: [u'Weekend_Day', u'Weekend_Morning', u'Weekend_Night'] kicking off initialization
2020-08-02 11:24:58.767 [WARN ] [internal.defaultscope.ScriptBusEvent] - Item 'InitItems' does not exist.
2020-08-02 11:25:03.791 [ERROR] [jsr223.jython.Ephemeris Time of Day ] - There are still etod Items that are NULL, cancelling
btw: my log files are full of the output for the get-key-value
and get-metadata
for what looks like every single item defined - is that correct?
Thanks
James
.items:
DateTime Default_Dawn { channel="astro:sun:local:civilDawn#start", etod="DAWN"[type="default"] }
DateTime Default_Morning { channel="astro:sun:local:rise#start", etod="MORNING"[type="default"] }
DateTime Default_Day { channel="astro:sun:local:rise#end", etod="DAY"[type="default"] }
DateTime Default_Dusk { channel="astro:sun:local:civilDusk#start", etod="DUSK"[type="default"] }
DateTime Default_Evening { channel="astro:sun:local:set#start", etod="EVENING"[type="default"] }
DateTime Default_Night { init="22:10:00", etod="NIGHT"[type="default"] }
DateTime Weekend_Morning { init="07:30:00", etod="MORNING"[type="weekend"] }
DateTime Weekend_Day { channel="astro:sun:set120:set#start", etod="DAY"[type="weekend"] }
DateTime Weekend_Night { init="22:45:00", etod="NIGHT"[type="weekend"] }
ephemeris.cfg
country=gb
region=en
org.openhab.ephemeris:dayset-weekend = [SATURDAY,SUNDAY]
org.openhab.ephemeris:dayset-school = [MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY]
console output:
openhab> smarthome:items list | grep Default_
Default_Morning (Type=DateTimeItem, State=2020-08-02T05:20:00.000+0100, Label=null, Category=null)
Default_Night (Type=DateTimeItem, State=NULL, Label=null, Category=null)
Default_Dusk (Type=DateTimeItem, State=2020-08-02T19:46:00.000+0100, Label=null, Category=null)
Default_Day (Type=DateTimeItem, State=2020-08-02T09:00:00.000+0100, Label=null, Category=null)
Default_Dawn (Type=DateTimeItem, State=2020-08-02T04:39:00.000+0100, Label=null, Category=null)
Default_Evening (Type=DateTimeItem, State=2020-08-02T20:42:00.000+0100, Label=null, Category=null)
openhab> smarthome:items list | grep Weekend_
Weekend_Day (Type=DateTimeItem, State=NULL, Label=null, Category=null)
Weekend_Night (Type=DateTimeItem, State=NULL, Label=null, Category=null)
Weekend_Morning (Type=DateTimeItem, State=NULL, Label=null, Category=null)
openhab> smarthome:items list | grep TimeOfDay
TimeOfDay (Type=StringItem, State=DAWN, Label=null, Category=null)