https://github.com/creativeprojects/openhab-calendar
https://github.com/creativeprojects/openhab-calendar
ical icalendar openhab2
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/creativeprojects/openhab-calendar
- Owner: creativeprojects
- Created: 2020-09-08T17:00:18.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-11-27T21:58:42.000Z (about 2 years ago)
- Last Synced: 2025-01-05T21:44:40.172Z (about 1 year ago)
- Topics: ical, icalendar, openhab2
- Language: Go
- Homepage:
- Size: 74.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# openhab-calendar
Simple script to load information from an iCalendar into OpenHAB.
The iCal binding (in OpenHAB v2) didn't work for me because:
- it can't use a Digest authentication
- it's a bit tedious to setup rules in Xtend
- it's much easier to debug on my local machine
Example configuration file:
```json
{
"rules": [
{
"priority": 10,
"name": "Override",
"calendar": {
"url": "http://calendars/override"
},
"result": "OVERRIDE"
},
{
"priority": 20,
"name": "Away",
"calendar": {
"url": "http://calendars/away"
},
"result": "AWAY"
},
{
"priority": 30,
"name": "DayOff",
"weekdays": [
"Mon",
"Tue",
"Wed",
"Thu",
"Fri"
],
"calendar": {
"url": "http://calendars/dayoff"
},
"result": "DAYOFF"
},
{
"priority": 40,
"name": "Office",
"weekdays": [
"Mon",
"Tue",
"Wed",
"Thu",
"Fri"
],
"calendar": {
"url": "http://calendars/office"
},
"result": "OFFICE"
},
{
"priority": 50,
"name": "WorkFromHome",
"weekdays": [
"Mon",
"Tue",
"Wed",
"Thu",
"Fri"
],
"result": "WFH"
},
{
"priority": 60,
"name": "Weekend",
"weekdays": [
"Sat",
"Sun"
],
"result": "DAYOFF"
}
],
"post-rules": [
{
"priority": 10,
"name": "First day of week-end",
"when": { "is": "DAYOFF"},
"previous": { "not": "DAYOFF" },
"next": { "is": "DAYOFF" },
"result": "JOBBIES"
}
],
"default": {
"name": "Unknown",
"result": "ERROR"
},
"servers": {
"http": {
"listen": "http://:6060"
}
},
"authentication": [
{
"url": "http://calendars/",
"username": "username",
"password": "password"
}
]
}
```