Hi there,
I have a problem with the Experimental Rules in the PaperUI.
I use Openhab 2.5.9 as a docker container.
Docker-Compose file
version: '3.3'
services:
openhab2:
image: openhab/openhab:2.5.9
ports:
- "20070:8080"
- "5007:5007"
volumes:
- /etc/localtime:/etc/localtime
- /etc/timezone:/etc/timezone
- /etc/openhab/conf:/openhab/conf
- /etc/openhab/userdata:/openhab/userdata
- /etc/openhab/addons:/openhab/addons
environment:
- USER_ID=997
- GROUP_ID=996
- EXTRA_JAVA_OPTS=-Duser.timezone=Europe/Berlin
- OPENHAB_HTTP_PORT=8080
- OPENHAB_HTTPS_PORT=8443
labels:
- "traefik.docker.network=web"
- "traefik.http.routers.openhab.rule=Host(`some.dns.name`)"
- "traefik.http.routers.openhab.tls=true"
- "traefik.http.routers.openhab.tls.certresolver=leresolver"
- "traefik.http.routers.openhab.entrypoints=websecure"
- "traefik.http.services.openhab.loadbalancer.server.port=8080"
- "traefik.http.routers.openhab.middlewares=authopenhab"
- "traefik.http.middlewares.authopenhab.basicauth.users=username:password"
- "traefik.http.middlewares.authopenhab.basicauth.removeheader=true"
depends_on:
- influxdb
- grafana
restart: always
networks:
- web
- internal
influxdb:
image: influxdb:latest
ports:
- "8086:8086"
volumes:
- influxdb_storage:/var/lib/influxdb
depends_on:
- grafana
restart: always
labels:
- traefik.enable=false
networks:
- internal
grafana:
image: grafana/grafana
#ports:
# - 3000
labels:
- "traefik.docker.network=web"
- "traefik.http.routers.grafana.rule=Host(`some.dns.name`)"
- "traefik.http.routers.grafana.tls=true"
- "traefik.http.routers.grafana.tls.certresolver=leresolver"
- "traefik.http.routers.grafana.entrypoints=websecure"
- "traefik.http.services.grafana.loadbalancer.server.port=3000"
volumes:
- grafana_storage:/var/lib/grafana
restart: always
networks:
- web
- internal
volumes:
influxdb_storage: {}
grafana_storage: {}
networks:
web:
external: true
internal:
external: false
When I add “It is a weekend” the rule is “UNINITIALIZED - HANDLER_INITIALIZING_ERROR”. The same problem occours when I use “It is a weekday”.
Screenshot from the rule:
Screenshot from the error:
In the events.log I found this error message:
2020-10-17 17:56:36.959 [.event.RuleStatusInfoEvent] - 1098bff6-ad2c-4812-8528-038b64ad87a0 updated: UNINITIALIZED (HANDLER_INITIALIZING_ERROR): Getting handler 'ephemeris.WeekendCondition' for module '3' failed: Config parameter 'offset' is missing in the configuration of module '3'.
After this I changed the offset in the rule from nothing to “0”. But the error occours again.
Then I took a look at the “automation_rules.json”.
The offset is set to “0” in the .json file.
automation_rules.json
"1098bff6-ad2c-4812-8528-038b64ad87a0": {
"class": "org.openhab.core.automation.dto.RuleDTO",
"value": {
"triggers": [
{
"id": "1",
"label": "it is a fixed time of day",
"description": "Triggers at a specified time",
"configuration": {
"time": "16:35"
},
"type": "timer.TimeOfDayTrigger"
}
],
"conditions": [
{
"inputs": {},
"id": "3",
"label": "It is a weekend",
"description": "Checks if the current day is on the weekend.",
"configuration": {
"offset": 0.0
},
"type": "ephemeris.WeekendCondition"
}
],
"actions": [
{
"inputs": {},
"id": "2",
"label": "send a command",
"description": "Sends a command to a specified item.",
"configuration": {
"itemName": "Hue_Switch_Ankleidezimmer",
"command": "ON"
},
"type": "core.ItemCommandAction"
}
],
"configuration": {},
"configDescriptions": [],
"uid": "1098bff6-ad2c-4812-8528-038b64ad87a0",
"name": "Test",
"tags": [],
"visibility": "VISIBLE"
}
}
I know that the condition “It is a weekend” uses ephemeris.
I added in the service folder the file “ephemeris.cfg” and add the following parameters:
city=Würzburg
country=de
dayset-workday=[MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY]
dayset-weekend=[SATURDAY,SUNDAY]
region=by
But the error occours again and again.
Does someone has an idea to fix this?
Thanks a lot.
Sebastian