Updated external content (Jenkins build 423)

pull/1131/head
openHAB Build Server 2019-12-13 04:34:46 +00:00
parent 2b219e32e7
commit 380564bcd0
11 changed files with 334 additions and 280 deletions

View File

@ -28,34 +28,34 @@ For example, in the configuration `Kitchen_Player.id=de:ad:be:ef:12:34` would be
### Standard Actions
* `squeezeboxPower(String playerId, boolean power)`
* `squeezeboxMute(String playerId, boolean mute)`
* `squeezeboxVolume(String playerId, int volume)`
* `squeezeboxPlay(String playerId)`
* `squeezeboxPause(String playerId)`
* `squeezeboxStop(String playerId)`
* `squeezeboxNext(String playerId)`
* `squeezeboxPrev(String playerId)`
- `squeezeboxPower(String playerId, boolean power)`
- `squeezeboxMute(String playerId, boolean mute)`
- `squeezeboxVolume(String playerId, int volume)`
- `squeezeboxPlay(String playerId)`
- `squeezeboxPause(String playerId)`
- `squeezeboxStop(String playerId)`
- `squeezeboxNext(String playerId)`
- `squeezeboxPrev(String playerId)`
### Actions to play a URL on your Squeezebox devices
For example, start a radio stream when you wake up in the morning.
* `squeezeboxPlayUrl(String playerId, String url)`: Plays the URL on the specified player using the current volume
* `squeezeboxPlayUrl(String playerId, String url, int volume)`: Plays the URL on the specified player at the specified volume
- `squeezeboxPlayUrl(String playerId, String url)`: Plays the URL on the specified player using the current volume
- `squeezeboxPlayUrl(String playerId, String url, int volume)`: Plays the URL on the specified player at the specified volume
### Actions to speak a message on your Squeezebox devices
* `squeezeboxSpeak(String playerId, String message)`
* `squeezeboxSpeak(String playerId, String message, int volume)`
* `squeezeboxSpeak(String playerId, String message, int volume, boolean resumePlayback)`
- `squeezeboxSpeak(String playerId, String message)`
- `squeezeboxSpeak(String playerId, String message, int volume)`
- `squeezeboxSpeak(String playerId, String message, int volume, boolean resumePlayback)`
Note: You need to have filled in the `ttsurl` details within the Squeezebox section in the configuration.
Given the changes Google have made to their TTS usage allowances, you might have better luck registering for a key at <http://www.voicerss.org/api/>.
You can check you have the url and api working by pasting it into a browser with some text at the end
```
```java
https://api.voicerss.org/?key=YOUR_KEY_GOES_HERE&f=44khz_16bit_stereo&hl=en-gb&src=This is Major Tom to Ground Control
```
@ -63,19 +63,19 @@ Then you can use the action in your rules however you want.
## Examples
### Send an announcement to the specified player using the current volume
Send announcement to specified player using current volume
```java
squeezeboxSpeak("Kitchen_Player", "This is Major Tom to Ground Control")
```
### Send an announcement to the specified player at the specified volume
Send announcement to specified player at specified volume
```java
squeezeboxSpeak("Kitchen_Player", "I'm stepping through the door", 100)
```
### Send an announcement to the specified player at the specified volume
Send announcement to specified player at specified volume
If `resumePlayback=true` resume to actual playlist after finishing message.
@ -85,7 +85,7 @@ You might have to tweak some settings on your Squeezebox server and player regar
squeezeboxSpeak("Kitchen_Player", "And I'm floating in a most peculiar way", 100, false)
```
### Generating dynamic strings
Generating dynamic strings
```java
squeezeboxSpeak("Kitchen_Player"," temperature outside is " + Weather_Temperature.state.format("%d") + " degrees celsius",75,true)

View File

@ -53,11 +53,14 @@ Used to execute commands through an event, triggered at the start or the end of
The event summary is free selectable. The event description must fullfill special syntax.
Syntax is `<BEGIN|END>:<Item-Name>:<Command>`.
Each item trigger must be a single line without linebreaks. Every line which starts with "BEGIN" will be executed at the begin of the event. Each line with an "END" will be executed at the end of the event. You can define multiple lines, which must not be ordered. For example:
<pre>BEGIN:Heater_Livingroom:22
```
BEGIN:Heater_Livingroom:22
BEGIN:Heater_Corridor:22
END:Heater_Livingroom:16
END:Heater_Corridor:16
END:Notification_Dummy:Heizung heruntergefahren</pre>
END:Notification_Dummy:Heizung heruntergefahren
```
Additionaly you can define an item to listen to upcoming changes of an item (which will be triggered through an event). Two types are available the command which will be set and the trigger time.
Syntax is `caldavCommand="itemName:<Item-Name to listen to> type:<VALUE|DATE>"`
@ -65,7 +68,7 @@ Furthermore a switch can be defined to disable the automatic execution (through
Syntax is `caldavCommand="itemName:<Item-Name to listen to> type:<DISABLE>"`
openhab.cfg
`caldavCommand:readCalendars=<calendar-id>` (multiple calendars can be seperated by commas)
`caldavCommand:readCalendars=<calendar-id>` (multiple calendars can be separated by commas)
## Description of type
* VALUE: the value which will send to the command (can be of any type, depends on command in event and accepted commands of item)
@ -74,7 +77,11 @@ openhab.cfg
## Default item
Since 1.9.0, the CalDAV Command binding also supports a default item which may optionally be added to openhab.cfg:
<pre>caldavCommand:defaultItemOnBegin=&lt;item&gt;</pre>
```
caldavCommand:defaultItemOnBegin=<item>
```
If the command calendar contains items whose description does not follow the `BEGIN/END:<item>:<value>` pattern AND a default item is specified, then the respective lines are interpreted as `BEGIN:<defaultItemOnBegin>:<line>`
This is really nice to use in combination with a rule such as used for [voice control](https://github.com/openhab/openhab/wiki/Controlling-openHAB-with-your-voice) - set the default item to: `caldavCommand:defaultItemOnBegin=VoiceCommand`
@ -96,8 +103,8 @@ Binding file: org.openhab.binding.caldav-personal-version.jar
* Used to show upcoming/active events in openhab.
### openhab.cfg
* `caldavPersonal:usedCalendars=<calendar-id>` (multiple calendars can be seperated by commas)
* `caldavPersonal:homeIdentifiers=<values seperated by commans>` (if one of these identifiers can be found inside the place of the event, this event will not be used for presence)
* `caldavPersonal:usedCalendars=<calendar-id>` (multiple calendars can be separated by commas)
* `caldavPersonal:homeIdentifiers=<values separated by commans>` (if one of these identifiers can be found inside the place of the event, this event will not be used for presence)
### items
* `caldavPersonal="calendar:'<calendar-ids, comma separated>' type:'<UPCOMING|ACTIVE|EVENT>' eventNr:'<event-nr, first one is 1>' value:'<NAME|DESCRIPTION|PLACE|START|END|TIME>"'`
@ -140,24 +147,34 @@ You've got the option to show just specific events.
# Tested calDAV Servers with examples
As far as i know are these
## ownCloud (my reference implementation)
caldavio:openhab_tasks:url=http://server.de/owncloud/remote.php/caldav/calendars/openHAB/tasks
caldavio:openhab_tasks:username=username
caldavio:openhab_tasks:password=password
caldavio:openhab_tasks:reloadInterval=10
caldavio:openhab_tasks:preloadTime=20000
```
caldavio:openhab_tasks:url=http://server.de/owncloud/remote.php/caldav/calendars/openHAB/tasks
caldavio:openhab_tasks:username=username
caldavio:openhab_tasks:password=password
caldavio:openhab_tasks:reloadInterval=10
caldavio:openhab_tasks:preloadTime=20000
```
## baikal
caldavio:kalendername:url=https://server_ip/baikal/cal.php/calendars/username/kalender_id
caldavio:kalendername:username=username
caldavio:kalendername:password=password
caldavio:kalendername:reloadInterval=10
caldavio:kalendername:preloadTime=20000
```
caldavio:kalendername:url=https://server_ip/baikal/cal.php/calendars/username/kalender_id
caldavio:kalendername:username=username
caldavio:kalendername:password=password
caldavio:kalendername:reloadInterval=10
caldavio:kalendername:preloadTime=20000
```
## google (performance issue, because the timestamp of files is not correct)
caldavio:openhab_tasks:url=https://www.google.com/calendar/dav/email@gmail.com/events
caldavio:openhab_tasks:username=email@gmail.com
caldavio:openhab_tasks:password=password
caldavio:openhab_tasks:reloadInterval=10
caldavio:openhab_tasks:preloadTime=20000
## (zarafa?)
```
caldavio:openhab_tasks:url=https://www.google.com/calendar/dav/email@gmail.com/events
caldavio:openhab_tasks:username=email@gmail.com
caldavio:openhab_tasks:password=password
caldavio:openhab_tasks:reloadInterval=10
caldavio:openhab_tasks:preloadTime=20000
```
## Locate URL
This site may help to find the Calendar URL (i.e. Google Shared Calendars):
@ -167,9 +184,13 @@ http://www.ict4g.net/adolfo/notes/2015/07/04/determingurlofcaldav.html
If 2-factor authentication has been enabled, create an application password using https://support.google.com/accounts/answer/185833?hl=en Use this password instead of your account password.
# Persistence
caldav-persistence:calendarId=history
caldav-persistence:duration=10
caldav-persistence:singleEvents=false
```
caldav-persistence:calendarId=history
caldav-persistence:duration=10
caldav-persistence:singleEvents=false
```
Saves the events to the calendar named history with a length of 10 minutes
# Presence Simulation
@ -192,60 +213,57 @@ In every case, the binding org.openhab.io.caldav-<version>.jar is needed. For ex
openhab.cfg
################################ CalDav Binding #######################################
#
#caldavio:<calendar-id>:url=
#caldavio:<calendar-id>:username=
#caldavio:<calendar-id>:password=
#caldavio:<calendar-id>:reloadInterval=<minutes>
#caldavio:<calendar-id>:preloadTime=<minutes>
#caldavio:timeZone=<e. g. Europe/Berlin>
```
################################ CalDav Binding #######################################
# Dienstlicher/privater Kalender
caldavio:dienstlich:url=http://192.168.2.5/owncloud/remote.php/caldav/calendars/user/pers%C3%B6nlich
caldavio:dienstlich:username=user
caldavio:dienstlich:password=password
caldavio:dienstlich:reloadInterval=60
caldavio:dienstlich:preloadTime=2880
caldavio:timeZone=Europe/Berlin
# Dienstlicher/privater Kalender
caldavio:dienstlich:url=http://192.168.2.5/owncloud/remote.php/caldav/calendars/user/pers%C3%B6nlich
caldavio:dienstlich:username=user
caldavio:dienstlich:password=password
caldavio:dienstlich:reloadInterval=60
caldavio:dienstlich:preloadTime=2880
caldavio:timeZone=Europe/Berlin
# Müllkalender
caldavio:muell:url=http://192.168.2.5/owncloud/remote.php/caldav/calendars/user/m%C3%BCll
caldavio:muell:username=user
caldavio:muell:password=password
caldavio:muell:reloadInterval=1440
caldavio:muell:preloadTime=2880
caldavio:timeZone=Europe/Berlin
# Müllkalender
caldavio:muell:url=http://192.168.2.5/owncloud/remote.php/caldav/calendars/user/m%C3%BCll
caldavio:muell:username=user
caldavio:muell:password=password
caldavio:muell:reloadInterval=1440
caldavio:muell:preloadTime=2880
caldavio:timeZone=Europe/Berlin
# Command-kalender``
caldavio:command:url=http://192.168.2.5/owncloud/remote.php/caldav/calendars/user/command
caldavio:command:username=user
caldavio:command:password=password
caldavio:command:reloadInterval=10
caldavio:command:preloadTime=1440
caldavio:timeZone=Europe/Berlin
# Command-kalender
caldavio:command:url=http://192.168.2.5/owncloud/remote.php/caldav/calendars/user/command
caldavio:command:username=user
caldavio:command:password=password
caldavio:command:reloadInterval=10
caldavio:command:preloadTime=1440
caldavio:timeZone=Europe/Berlin
# Additionally needed binding: org.openhab.binding.caldav-command-<version>.jar
# used to execute commands by a triggered event
# multiple calendars (calerdar-id) can be seperated by commas
#caldavCommand:readCalendars=<calendar-id>
caldavCommand:readCalendars=command
# Additionally needed binding: org.openhab.binding.caldav-command-<version>.jar
# used to execute commands by a triggered event
# multiple calendars (calerdar-id) can be separated by commas
#caldavCommand:readCalendars=<calendar-id>
caldavCommand:readCalendars=command
# Additionally needed binding: org.openhab.binding.caldav-personal-<version>.jar
# used to record and simulate presence and to show upcoming/active events
# multiple calendars (calerdar-id) can be seperated by commas
#caldavPersonal:usedCalendars=<calendar-id>
caldavPersonal:usedCalendars=dienstlich,muell
# Additionally needed binding: org.openhab.binding.caldav-personal-<version>.jar
# used to record and simulate presence and to show upcoming/active events
# multiple calendars (calerdar-id) can be separated by commas
#caldavPersonal:usedCalendars=<calendar-id>
caldavPersonal:usedCalendars=dienstlich
# If one of these identifiers can be found inside the place of the event,
# this event will not be used for presence
#caldavPersonal:homeIdentifiers=<values seperated by commas>
# If one of these identifiers can be found inside the place of the event,
# this event will not be used for presence
#caldavPersonal:homeIdentifiers=<values separated by commas>
```
The items-File:
String OfficeCalName0 "Termin jetzt [%s]" <calendar> { caldavPersonal="calendar:dienstlich type:ACTIVE eventNr:1 value:NAME" } //eventNr for concurrent events
DateTime OfficeCalTime0 "Beginn [%1$tT, %1$td.%1$tm.%1$tY]" <calendar> { caldavPersonal="calendar:dienstlich type:ACTIVE eventNr:1 value:START" } //eventNr for concurrent events
String OfficeCalName1 "nächster Termin [%s]" <calendar> { caldavPersonal="calendar:dienstlich type:UPCOMING eventNr:1 value:NAME" }
DateTime OfficeCalTime1 "Beginn [%1$tT, %1$td.%1$tm.%1$tY]" <calendar> { caldavPersonal="calendar:dienstlich type:UPCOMING eventNr:1 value:START" }
String OfficeCalName2 "übernächster Termin [%s]" <calendar> { caldavPersonal="calendar:dienstlich type:UPCOMING eventNr:2 value:NAME" }
DateTime OfficeCalTime2 "Beginn [%1$tT, %1$td.%1$tm.%1$tY]" <calendar> { caldavPersonal="calendar:dienstlich type:UPCOMING eventNr:2 value:START" }
```
String OfficeCalName0 "Termin jetzt [%s]" <calendar> { caldavPersonal="calendar:dienstlich type:ACTIVE eventNr:1 value:NAME" } //eventNr for concurrent events
DateTime OfficeCalTime0 "Beginn [%1$tT, %1$td.%1$tm.%1$tY]" <calendar> { caldavPersonal="calendar:dienstlich type:ACTIVE eventNr:1 value:START" } //eventNr for concurrent events
String OfficeCalName1 "nächster Termin [%s]" <calendar> { caldavPersonal="calendar:dienstlich type:UPCOMING eventNr:1 value:NAME" }
DateTime OfficeCalTime1 "Beginn [%1$tT, %1$td.%1$tm.%1$tY]" <calendar> { caldavPersonal="calendar:dienstlich type:UPCOMING eventNr:1 value:START" }
String OfficeCalName2 "übernächster Termin [%s]" <calendar> { caldavPersonal="calendar:dienstlich type:UPCOMING eventNr:2 value:NAME" }
DateTime OfficeCalTime2 "Beginn [%1$tT, %1$td.%1$tm.%1$tY]" <calendar> { caldavPersonal="calendar:dienstlich type:UPCOMING eventNr:2 value:START" }
```

View File

@ -53,11 +53,14 @@ Used to execute commands through an event, triggered at the start or the end of
The event summary is free selectable. The event description must fullfill special syntax.
Syntax is `<BEGIN|END>:<Item-Name>:<Command>`.
Each item trigger must be a single line without linebreaks. Every line which starts with "BEGIN" will be executed at the begin of the event. Each line with an "END" will be executed at the end of the event. You can define multiple lines, which must not be ordered. For example:
<pre>BEGIN:Heater_Livingroom:22
```
BEGIN:Heater_Livingroom:22
BEGIN:Heater_Corridor:22
END:Heater_Livingroom:16
END:Heater_Corridor:16
END:Notification_Dummy:Heizung heruntergefahren</pre>
END:Notification_Dummy:Heizung heruntergefahren
```
Additionaly you can define an item to listen to upcoming changes of an item (which will be triggered through an event). Two types are available the command which will be set and the trigger time.
Syntax is `caldavCommand="itemName:<Item-Name to listen to> type:<VALUE|DATE>"`
@ -74,7 +77,10 @@ openhab.cfg
## Default item
Since 1.9.0, the CalDAV Command binding also supports a default item which may optionally be added to openhab.cfg:
<pre>caldavCommand:defaultItemOnBegin=&lt;item&gt;</pre>
```
caldavCommand:defaultItemOnBegin=<item>
```
If the command calendar contains items whose description does not follow the `BEGIN/END:<item>:<value>` pattern AND a default item is specified, then the respective lines are interpreted as `BEGIN:<defaultItemOnBegin>:<line>`
This is really nice to use in combination with a rule such as used for [voice control](https://github.com/openhab/openhab/wiki/Controlling-openHAB-with-your-voice) - set the default item to: `caldavCommand:defaultItemOnBegin=VoiceCommand`
@ -132,31 +138,52 @@ You've got the option to show just specific events.
* NAMEANDTIME: name and start- to end time (itemtype:String)
# Logging
* `<logger name="org.openhab.binding.caldav_personal" level="TRACE"/>`
* `<logger name="org.openhab.binding.caldav_command" level="TRACE"/>`
* `<logger name="org.openhab.io.caldav" level="TRACE"/>`
# Tested calDAV Servers with examples
As far as i know are these
# Tested calDAV Servers with Examples
## ownCloud (my reference implementation)
caldavio:openhab_tasks:url=http://server.de/owncloud/remote.php/caldav/calendars/openHAB/tasks
caldavio:openhab_tasks:username=username
caldavio:openhab_tasks:password=password
caldavio:openhab_tasks:reloadInterval=10
caldavio:openhab_tasks:preloadTime=20000
```
caldavio:openhab_tasks:url=http://server.de/owncloud/remote.php/caldav/calendars/openHAB/tasks
caldavio:openhab_tasks:username=username
caldavio:openhab_tasks:password=password
caldavio:openhab_tasks:reloadInterval=10
caldavio:openhab_tasks:preloadTime=20000
```
## baikal
caldavio:kalendername:url=https://server_ip/baikal/cal.php/calendars/username/kalender_id
caldavio:kalendername:username=username
caldavio:kalendername:password=password
caldavio:kalendername:reloadInterval=10
caldavio:kalendername:preloadTime=20000
```
caldavio:kalendername:url=https://server_ip/baikal/cal.php/calendars/username/kalender_id
caldavio:kalendername:username=username
caldavio:kalendername:password=password
caldavio:kalendername:reloadInterval=10
caldavio:kalendername:preloadTime=20000
```
## google (performance issue, because the timestamp of files is not correct)
caldavio:openhab_tasks:url=https://www.google.com/calendar/dav/email@gmail.com/events
caldavio:openhab_tasks:username=email@gmail.com
caldavio:openhab_tasks:password=password
caldavio:openhab_tasks:reloadInterval=10
caldavio:openhab_tasks:preloadTime=20000
## (zarafa?)
```
caldavio:openhab_tasks:url=https://www.google.com/calendar/dav/email@gmail.com/events
caldavio:openhab_tasks:username=email@gmail.com
caldavio:openhab_tasks:password=password
caldavio:openhab_tasks:reloadInterval=10
caldavio:openhab_tasks:preloadTime=20000
```
## Synology Calendar
```
caldavio:openhab_tasks:url=http://server_ip:server_port/homes/username/calendar_name/
caldavio:openhab_tasks:username=username
caldavio:openhab_tasks:password=password
caldavio:openhab_tasks:reloadInterval=10
caldavio:openhab_tasks:preloadTime=20000
```
## Locate URL
This site may help to find the Calendar URL (i.e. Google Shared Calendars):
@ -166,16 +193,20 @@ http://www.ict4g.net/adolfo/notes/2015/07/04/determingurlofcaldav.html
If 2-factor authentication has been enabled, create an application password using https://support.google.com/accounts/answer/185833?hl=en Use this password instead of your account password.
# Persistence
caldav-persistence:calendarId=history
caldav-persistence:duration=10
caldav-persistence:singleEvents=false
```
caldav-persistence:calendarId=history
caldav-persistence:duration=10
caldav-persistence:singleEvents=false
```
Saves the events to the calendar named history with a length of 10 minutes
# Presence Simulation
You can simulate presence with this binding.
To do this you have to
* enable the caldav-command binding
* enbale the caldav-persistence binding
* enable the caldav-persistence binding
* configure the Items you need for simulation for caldav persistence
* configure the caldav persistence to singleEvents=true and an offset you want. One week or two make sense.
* keep openHAB running for a week or more and the persistent events will occur again in the future regarding the offset you set up
@ -191,60 +222,49 @@ In every case, the binding org.openhab.io.caldav-<version>.jar is needed. For ex
openhab.cfg
################################ CalDav Binding #######################################
#
#caldavio:<calendar-id>:url=
#caldavio:<calendar-id>:username=
#caldavio:<calendar-id>:password=
#caldavio:<calendar-id>:reloadInterval=<minutes>
#caldavio:<calendar-id>:preloadTime=<minutes>
#caldavio:timeZone=<e. g. Europe/Berlin>
```
################################ CalDav Binding #######################################
# Dienstlicher/privater Kalender
caldavio:dienstlich:url=http://192.168.2.5/owncloud/remote.php/caldav/calendars/user/pers%C3%B6nlich
caldavio:dienstlich:username=user
caldavio:dienstlich:password=password
caldavio:dienstlich:reloadInterval=60
caldavio:dienstlich:preloadTime=2880
caldavio:timeZone=Europe/Berlin
# Dienstlicher/privater Kalender
caldavio:dienstlich:url=http://192.168.2.5/owncloud/remote.php/caldav/calendars/user/pers%C3%B6nlich
caldavio:dienstlich:username=user
caldavio:dienstlich:password=password
caldavio:dienstlich:reloadInterval=60
caldavio:dienstlich:preloadTime=2880
caldavio:timeZone=Europe/Berlin
# Müllkalender
caldavio:muell:url=http://192.168.2.5/owncloud/remote.php/caldav/calendars/user/m%C3%BCll
caldavio:muell:username=user
caldavio:muell:password=password
caldavio:muell:reloadInterval=1440
caldavio:muell:preloadTime=2880
caldavio:timeZone=Europe/Berlin
# Command-kalender
caldavio:command:url=http://192.168.2.5/owncloud/remote.php/caldav/calendars/user/command
caldavio:command:username=user
caldavio:command:password=password
caldavio:command:reloadInterval=10
caldavio:command:preloadTime=1440
caldavio:timeZone=Europe/Berlin
# Command-kalender``
caldavio:command:url=http://192.168.2.5/owncloud/remote.php/caldav/calendars/user/command
caldavio:command:username=user
caldavio:command:password=password
caldavio:command:reloadInterval=10
caldavio:command:preloadTime=1440
caldavio:timeZone=Europe/Berlin
# Additionally needed binding: org.openhab.binding.caldav-command-<version>.jar
# used to execute commands by a triggered event
# multiple calendars (calerdar-id) can be seperated by commas
#caldavCommand:readCalendars=<calendar-id>
caldavCommand:readCalendars=command
# Additionally needed binding: org.openhab.binding.caldav-command-<version>.jar
# used to execute commands by a triggered event
# multiple calendars (calerdar-id) can be seperated by commas
#caldavCommand:readCalendars=<calendar-id>
caldavCommand:readCalendars=command
# Additionally needed binding: org.openhab.binding.caldav-personal-<version>.jar
# used to record and simulate presence and to show upcoming/active events
# multiple calendars (calerdar-id) can be seperated by commas
#caldavPersonal:usedCalendars=<calendar-id>
caldavPersonal:usedCalendars=dienstlich
# Additionally needed binding: org.openhab.binding.caldav-personal-<version>.jar
# used to record and simulate presence and to show upcoming/active events
# multiple calendars (calerdar-id) can be seperated by commas
#caldavPersonal:usedCalendars=<calendar-id>
caldavPersonal:usedCalendars=dienstlich,muell
# If one of these identifiers can be found inside the place of the event,
# this event will not be used for presence
#caldavPersonal:homeIdentifiers=<values seperated by commas>
# If one of these identifiers can be found inside the place of the event,
# this event will not be used for presence
#caldavPersonal:homeIdentifiers=<values seperated by commas>
```
The items-File:
String OfficeCalName0 "Termin jetzt [%s]" <calendar> { caldavPersonal="calendar:dienstlich type:ACTIVE eventNr:1 value:NAME" } //eventNr for concurrent events
DateTime OfficeCalTime0 "Beginn [%1$tT, %1$td.%1$tm.%1$tY]" <calendar> { caldavPersonal="calendar:dienstlich type:ACTIVE eventNr:1 value:START" } //eventNr for concurrent events
String OfficeCalName1 "nächster Termin [%s]" <calendar> { caldavPersonal="calendar:dienstlich type:UPCOMING eventNr:1 value:NAME" }
DateTime OfficeCalTime1 "Beginn [%1$tT, %1$td.%1$tm.%1$tY]" <calendar> { caldavPersonal="calendar:dienstlich type:UPCOMING eventNr:1 value:START" }
String OfficeCalName2 "übernächster Termin [%s]" <calendar> { caldavPersonal="calendar:dienstlich type:UPCOMING eventNr:2 value:NAME" }
DateTime OfficeCalTime2 "Beginn [%1$tT, %1$td.%1$tm.%1$tY]" <calendar> { caldavPersonal="calendar:dienstlich type:UPCOMING eventNr:2 value:START" }
```
String OfficeCalName0 "Termin jetzt [%s]" <calendar> { caldavPersonal="calendar:dienstlich type:ACTIVE eventNr:1 value:NAME" } //eventNr for concurrent events
DateTime OfficeCalTime0 "Beginn [%1$tT, %1$td.%1$tm.%1$tY]" <calendar> { caldavPersonal="calendar:dienstlich type:ACTIVE eventNr:1 value:START" } //eventNr for concurrent events
String OfficeCalName1 "nächster Termin [%s]" <calendar> { caldavPersonal="calendar:dienstlich type:UPCOMING eventNr:1 value:NAME" }
DateTime OfficeCalTime1 "Beginn [%1$tT, %1$td.%1$tm.%1$tY]" <calendar> { caldavPersonal="calendar:dienstlich type:UPCOMING eventNr:1 value:START" }
String OfficeCalName2 "übernächster Termin [%s]" <calendar> { caldavPersonal="calendar:dienstlich type:UPCOMING eventNr:2 value:NAME" }
DateTime OfficeCalTime2 "Beginn [%1$tT, %1$td.%1$tm.%1$tY]" <calendar> { caldavPersonal="calendar:dienstlich type:UPCOMING eventNr:2 value:START" }
```

View File

@ -55,44 +55,42 @@ Each item binding should have this format:
- COMPLETED
- ALL
## Examples
- Number Print_Jobs_Queued "Unfinished print jobs" (FF_Office) { cups="MX-870#NOT_COMPLETED" }
- Number Print_Jobs_Completed "Completed print jobs" (FF_Office) { cups="http://127.0.0.1:631/printers/MX-870" }
### Example Use Case
The CUPS Binding can be used to switch on a printer if there are print jobs in the queue and switch it off if the queue is empty.
#### Items
Number Print_Jobs_Queued "Unfinished print jobs" (FF_Office) { cups="MX-870#NOT_COMPLETED" }
Switch Printer "Printer"
```
Number Print_Jobs_Completed "Completed print jobs" (FF_Office) { cups="http://127.0.0.1:631/printers/MX-870" }
Number Print_Jobs_Queued "Unfinished print jobs" (FF_Office) { cups="MX-870#NOT_COMPLETED" }
Switch Printer "Printer"
```
#### Rules
import org.openhab.model.script.actions.Timer
var Timer printerTimer = null
rule "CUPS-Printer Queue"
when
Item Print_Jobs_Queued changed
then
if (Print_Jobs_Queued.state>0) {
if (printerTimer!=null) {
printerTimer.cancel
printerTimer=null
}
if (Printer.state==OFF) {
sendCommand(Printer,ON)
}
}
else if (Printer.state==ON) {
printerTimer = createTimer(now.plusMinutes(5)) [|
sendCommand(Printer,OFF)
]
}
end
```
import org.openhab.model.script.actions.Timer
var Timer printerTimer = null
rule "CUPS-Printer Queue"
when
Item Print_Jobs_Queued changed
then
if (Print_Jobs_Queued.state>0) {
if (printerTimer!=null) {
printerTimer.cancel
printerTimer=null
}
if (Printer.state==OFF) {
Printer.sendCommand(ON)
}
}
else if (Printer.state==ON) {
printerTimer = createTimer(now.plusMinutes(5)) [|
Printer.sendCommand(OFF)
]
}
end
```

View File

@ -56,40 +56,46 @@ Item bindings can be either inbound or outbound.
### Inbound (readonly) item bindings
// the temperature/humidity at the indoor unit
Number DaikinTempIn "Temp Inside [%.1f °C]" { daikin="<name>:tempin" }
Number DaikinHumidityIn "Humidity Inside [%.1f %%]" { daikin="<name>:humidityin" }
```
// the temperature/humidity at the indoor unit
Number DaikinTempIn "Temp Inside [%.1f °C]" { daikin="<name>:tempin" }
Number DaikinHumidityIn "Humidity Inside [%.1f %%]" { daikin="<name>:humidityin" }
// the temperature at the outdoor unit
Number DaikinTempOut "Temp Outside [%.1f °C]" { daikin="<name>:tempout" }
```
// the temperature at the outdoor unit
Number DaikinTempOut "Temp Outside [%.1f °C]" { daikin="<name>:tempout" }
### Outbound (command) item bindings
// power
Switch DaikinPower "Power" { daikin="<name>:power" }
// mode of operation - one of Auto/Dry/Cool/Heat/Fan/Night
Number DaikinMode "Mode [%.0f]" { daikin="<name>:mode" }
// temperature set point
Number DaikinTemp "Temp [%.0f °C]" { daikin="<name>:temp" }
// fan mode - one of Auto/F1/F2/F3/F4/F5
Number DaikinFan "Fan [%.0f]" { daikin="<name>:fan" }
// swing mode - one of Off/UpDown
Number DaikinSwing "Swing [%.0f]" { daikin="<name>:swing" }
// timer mode - one of Off-Off/Off-On/On-Off/On-On (start/end timers)
Number DaikinTimer "Timer [%.0f]" { daikin="<name>:timer" }
```
// power
Switch DaikinPower "Power" { daikin="<name>:power" }
// mode of operation - one of Auto/Dry/Cool/Heat/Fan/Night
Number DaikinMode "Mode [%.0f]" { daikin="<name>:mode" }
// temperature set point
Number DaikinTemp "Temp [%.0f °C]" { daikin="<name>:temp" }
// fan mode - one of Auto/F1/F2/F3/F4/F5
Number DaikinFan "Fan [%.0f]" { daikin="<name>:fan" }
// swing mode - one of Off/UpDown
Number DaikinSwing "Swing [%.0f]" { daikin="<name>:swing" }
// timer mode - one of Off-Off/Off-On/On-Off/On-On (start/end timers)
Number DaikinTimer "Timer [%.0f]" { daikin="<name>:timer" }
```
### Sitemap Examples
Text item=DaikinTempOut
Switch item=DaikinPower
Text item=DaikinTemp
Text item=DaikinHumidityIn
Switch item=DaikinMode mappings=[0="Auto", 2="Dry", 3="Cool", 4="Heat", 6="Fan"]
Setpoint item=DaikinTemp minValue="16" maxValue="30" step="1"
Switch item=DaikinFan mappings=[0="Auto", 1="F1", 2="F2", 3="F3", 4="F4", 5="F5"]
Switch item=DaikinSwing mappings=[0="Off", 1="Vertical", 2="Horizontal", 3="Hor/Vert"]
```
Text item=DaikinTempOut
Switch item=DaikinPower
Text item=DaikinTemp
Text item=DaikinHumidityIn
Switch item=DaikinMode mappings=[0="Auto", 2="Dry", 3="Cool", 4="Heat", 6="Fan"]
Setpoint item=DaikinTemp minValue="16" maxValue="30" step="1"
Switch item=DaikinFan mappings=[0="Auto", 1="F1", 2="F2", 3="F3", 4="F4", 5="F5"]
Switch item=DaikinSwing mappings=[0="Off", 1="Vertical", 2="Horizontal", 3="Hor/Vert"]
```

View File

@ -41,7 +41,9 @@ These are mutually exclusive and both must not be simultaneously configured.
Item bindings should conform to this format:
davis="<value-key>"
```
davis="<value-key>"
```
The following table defines the allowable values for `<value-key>`.
@ -86,47 +88,49 @@ The following table defines the allowable values for `<value-key>`.
## Examples
String StationType "StationType: [%s]" { davis="station_type" }
Number Receivers "Receivers: [%.0f]" { davis="receivers" }
Number TransmitterBattery "Transmitter Battery [%.1f]" { davis="transmitter_battery_status" }
Number ConsoleBattVoltage "Console Battery [%.2f V]" { davis="console_battery_voltage" }
```
String StationType "StationType: [%s]" { davis="station_type" }
Number Receivers "Receivers: [%.0f]" { davis="receivers" }
Number TransmitterBattery "Transmitter Battery [%.1f]" { davis="transmitter_battery_status" }
Number ConsoleBattVoltage "Console Battery [%.2f V]" { davis="console_battery_voltage" }
DateTime Date "Date [%1$tA, %1$td.%1$tm.%1$tY]" { davis="time" }
DateTime Date "Date [%1$tA, %1$td.%1$tm.%1$tY]" { davis="time" }
Number InsideTemp "Inside Temp [%.1f °C ]" { davis="inside_temp" }
Number OutsideTemp "Outside Temp [%.1f °C ]" { davis="outside_temp" }
Number DewPoint "Dew Point [%.1f °C ]" { davis="dew_point" }
Number HeatIndex "Heat Index [%.1f °C ]" { davis="heat_index" }
Number WindChill "Wind Chill [%.1f °C ]" { davis="wind_chill" }
Number THSWIndex "THSW Index[%.1f °C ]" { davis="thsw_index" }
Number InsideTemp "Inside Temp [%.1f °C ]" { davis="inside_temp" }
Number OutsideTemp "Outside Temp [%.1f °C ]" { davis="outside_temp" }
Number DewPoint "Dew Point [%.1f °C ]" { davis="dew_point" }
Number HeatIndex "Heat Index [%.1f °C ]" { davis="heat_index" }
Number WindChill "Wind Chill [%.1f °C ]" { davis="wind_chill" }
Number THSWIndex "THSW Index[%.1f °C ]" { davis="thsw_index" }
Number InsideHumidity "Inside Humidity [%.0f %% ]" { davis="inside_humidity" }
Number OutsideHumidity "Outside Humidity [%.0f %% ]" { davis="outside_humidity" }
Number InsideHumidity "Inside Humidity [%.0f %% ]" { davis="inside_humidity" }
Number OutsideHumidity "Outside Humidity [%.0f %% ]" { davis="outside_humidity" }
String BarTrend "Barometer Trend [%s]" { davis="bar_trend" }
Number Barometer "Barometer [%.0f hPa]" { davis="barometer" }
String BarTrend "Barometer Trend [%s]" { davis="bar_trend" }
Number Barometer "Barometer [%.0f hPa]" { davis="barometer" }
Number WindSpeed "Wind Speed [%.1f km/h]" { davis="wind_speed" }
Number WindSpeed10minAvg "Wind Speed 10min Avg [%.1f km/h]" { davis="wind_speed_10min_avg" }
Number WindDirection "Wind Direction [%.0f °]" { davis="wind_direction" }
Number WindSpeed10minHiRes "Wind Speed 10min Avg HiRes [%.1f km/h]" { davis="wind_speed_10min_avg_hires" }
Number WindSpeed2minHiRes "Wind Speed 10min Avg HiRes [%.1f km/h]" { davis="wind_speed_2min_avg_hires" }
Number WindSpeed10minGustHiRes "Wind Speed 10min Avg HiRes [%.1f km/h]" { davis="wind_speed_10min_gust_hires" }
Number WindDirectionGust "Wind Direction Gust [%.0f °]" { davis="wind_direction_10min__gust" }
Number WindSpeed "Wind Speed [%.1f km/h]" { davis="wind_speed" }
Number WindSpeed10minAvg "Wind Speed 10min Avg [%.1f km/h]" { davis="wind_speed_10min_avg" }
Number WindDirection "Wind Direction [%.0f °]" { davis="wind_direction" }
Number WindSpeed10minHiRes "Wind Speed 10min Avg HiRes [%.1f km/h]" { davis="wind_speed_10min_avg_hires" }
Number WindSpeed2minHiRes "Wind Speed 10min Avg HiRes [%.1f km/h]" { davis="wind_speed_2min_avg_hires" }
Number WindSpeed10minGustHiRes "Wind Speed 10min Avg HiRes [%.1f km/h]" { davis="wind_speed_10min_gust_hires" }
Number WindDirectionGust "Wind Direction Gust [%.0f °]" { davis="wind_direction_10min__gust" }
Number RainRate "Rain Rate [%.1f mm/h ]" { davis="rain_rate" }
Number Rain15min "Rain Rate [%.1f mm/h ]" { davis="last_15min_rain" }
Number Rainlast1h "Rain Rate [%.1f mm/h ]" { davis="last_hour_rain" }
Number Rainlast24h "Rain Rate [%.1f mm/h ]" { davis="last_24h_rain" }
Number RainRate "Rain Rate [%.1f mm/h ]" { davis="rain_rate" }
Number Rain15min "Rain Rate [%.1f mm/h ]" { davis="last_15min_rain" }
Number Rainlast1h "Rain Rate [%.1f mm/h ]" { davis="last_hour_rain" }
Number Rainlast24h "Rain Rate [%.1f mm/h ]" { davis="last_24h_rain" }
Number UVIndex "UV Index [%.1f ]" { davis="uv" }
Number Solar "Solar Radiation [%.0f W/m²]" { davis="solar_radiation" }
Number UVIndex "UV Index [%.1f ]" { davis="uv" }
Number Solar "Solar Radiation [%.0f W/m²]" { davis="solar_radiation" }
String firmware_date "Firmware Date: [%s]" { davis="firmware_date" }
String firmware_version "Firmware Version: [%s]" { davis="firmware_version" }
String firmware_date "Firmware Date: [%s]" { davis="firmware_date" }
String firmware_version "Firmware Version: [%s]" { davis="firmware_version" }
String rx_total "RX Packets total: [%s]" { davis="rx_count_total" }
String rx_missed "RX Packets missed: [%s]" { davis="rx_count_missed" }
String rx_resync "RX Resyncs: [%s]" { davis="rx_count_resync" }
String rx_consec "RX Packets received in a row without error: [%s]" { davis="rx_count_consecutive" }
String rx_crc "RX Packets CRC failes: [%s]" { davis="rx_count_crc" }
String rx_total "RX Packets total: [%s]" { davis="rx_count_total" }
String rx_missed "RX Packets missed: [%s]" { davis="rx_count_missed" }
String rx_resync "RX Resyncs: [%s]" { davis="rx_count_resync" }
String rx_consec "RX Packets received in a row without error: [%s]" { davis="rx_count_consecutive" }
String rx_crc "RX Packets CRC failes: [%s]" { davis="rx_count_crc" }
```

View File

@ -43,15 +43,18 @@ A binding beginning with `<` defines an input, while a binding beginning with `>
### diyonxbee.cfg
serialPort=/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A702NX9M-if00-port0
baudRate=9600
```
serialPort=/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A702NX9M-if00-port0
baudRate=9600
```
### Items
Number Living_Temperature "Temperatur [%.1f °C]" <temperature> (GF_Living) { diyonxbee="<0013A20040B40F18:Temperature" }
Switch Living_Motion "Bewegung [MAP(de.map):%s]" <present> (GF_Living,GPresence) { diyonxbee="<0013A20040B40F18:MOTION" }
Color Living_Stripe "Living RGB Stripe" <lights> (GF_Living) { diyonxbee="<0013A20040B40F18:Stripe" }
```
Number Living_Temperature "Temperatur [%.1f °C]" <temperature> (GF_Living) { diyonxbee="<0013A20040B40F18:Temperature" }
Switch Living_Motion "Bewegung [MAP(de.map):%s]" <present> (GF_Living,GPresence) { diyonxbee="<0013A20040B40F18:MOTION" }
Color Living_Stripe "Living RGB Stripe" <lights> (GF_Living) { diyonxbee="<0013A20040B40F18:Stripe" }
```
## Notes
@ -63,8 +66,10 @@ even without using the XBee (any serial console will do).
For the pure sensors, the Arduino has to send lines conaining key=value. From the
example item configuration above, a valid message would be:
Temperature=21.3
MOTION=ON
```
Temperature=21.3
MOTION=ON
```
For the actors, the Arduino has to send the received command back to the sender;
this ensures that the openHAB item state is only updated when the command was

View File

@ -26,6 +26,7 @@ It has been tested on:
* 6360 Cable (v6.04)
* 6490 Cable (v7.02)
* 7490
* 7580 (v7.12)
* 7590 (v6.92)
## Features

View File

@ -31,7 +31,7 @@ Since MCP23017 is digital IO expander on I2C bus, only two types of items are su
* `Switch` for digital output. Find the example below.
```
Contact Test1 "Test 1" (Tests) { mcp23017="{ address:21, pin:'A0', mode:'DIGITAL_INPUT'}" }
Contact Test1 "Test 1" (Tests) { mcp23017="{ address:20, pin:'A0', mode:'DIGITAL_INPUT'}" }
```
configures pin 0 at bank A (GPA0 on datasheet) as input of the IC on address 0x21
@ -40,4 +40,4 @@ configures pin 0 at bank A (GPA0 on datasheet) as input of the IC on address 0x2
Switch Test2 "Test 2" (Tests) { mcp23017="{ address:21, pin:'B1', mode:'DIGITAL_OUTPUT', defaultState:'LOW'}" }
```
configures pin 1 at bank B (GPB1 on datasheet) as output of the IC on adress 0x21
configures pin 1 at bank B (GPB1 on datasheet) as output of the IC on address 0x21

View File

@ -24,6 +24,7 @@ This binding can be configured in the file `services/snmp.cfg`.
| Property | Default | Required | Description |
|----------|---------|:--------:|-------------|
| community | public | No | default community for listening for traps (defaults to public). |
| version | v1 | No | define snmp protocol-version (can be v1 or v2c). |
| port | 162 | No | listening port. See [Binding Port](#binding-port) below. |
| timeout | 1500 | No | timeout period (in milliseconds) when polling SNMP GET and SET requests. |
| retries | 0 | No | number of retries before giving up. The retries will be sent every `timeout` milliseconds. 0 means no retries. |
@ -52,7 +53,7 @@ The syntax for the SNMP binding configuration string depending on whether you ar
GET
```
snmp="<[<address>:<community>:<oid>:<update>]"
snmp="<[<address>:<protocol-version>:<community>:<oid>:<update>]"
```
SET
@ -70,6 +71,7 @@ snmp="<[<address>:<community>:<oid>:0]"
where:
* `<address>` is the IP address[/Port] of the SNMP device. The Port is optional, the default value is 161
* `<protocol-version>` where possible values for protocol-version are v1, v2c and v3 (v3 not supported by the binding at the moment, but possible in future enhancement).
* `<community>` is the SNMP community string
* `<oid>` is the object ID to GET or SET
* `<update>` is the amount of milliseconds the binding waits between periodic queries of the OID
@ -78,9 +80,9 @@ where:
Here are some examples of valid binding configuration strings:
```
snmp="<[192.168.2.111:public:.1.3.6.1.2.1.2.2.1.10.10:10000]"
snmp="<[192.168.2.111:v1:public:.1.3.6.1.2.1.2.2.1.10.10:10000]"
snmp=">[OFF:192.168.2.111:private:.1.3.6.1.4.1.4526.11.16.1.1.1.3.1.2:2]"
snmp="<[192.168.2.111:public:.1.3.6.1.2.1.2.2.1.10.10:0]"
snmp="<[192.168.2.111:v2c:public:.1.3.6.1.2.1.2.2.1.10.10:0]"
```
## Examples
@ -88,8 +90,8 @@ snmp="<[192.168.2.111:public:.1.3.6.1.2.1.2.2.1.10.10:0]"
items/snmpdemo.items
```
Number Switch_POEState2 "PoE WiFi State [%s]" { snmp="<[192.168.2.111:public:.1.3.6.1.4.1.4526.11.16.1.1.1.6.1.2:10000]" }
Switch Switch_POEEnable2 "PoE WiFi Enable [%s]" { snmp="<[192.168.2.111:public:.1.3.6.1.4.1.4526.11.16.1.1.1.3.1.2:10000] >[OFF:192.168.2.111:private:.1.3.6.1.4.1.4526.11.16.1.1.1.3.1.2:2] >[ON:192.168.2.111:private:.1.3.6.1.4.1.4526.11.16.1.1.1.3.1.2:1]" }
Number Switch_POEState2 "PoE WiFi State [%s]" { snmp="<[192.168.2.111:v1:public:.1.3.6.1.4.1.4526.11.16.1.1.1.6.1.2:10000]" }
Switch Switch_POEEnable2 "PoE WiFi Enable [%s]" { snmp="<[192.168.2.111:v1:public:.1.3.6.1.4.1.4526.11.16.1.1.1.3.1.2:10000] >[OFF:192.168.2.111:private:.1.3.6.1.4.1.4526.11.16.1.1.1.3.1.2:2] >[ON:192.168.2.111:private:.1.3.6.1.4.1.4526.11.16.1.1.1.3.1.2:1]" }
String switch1p01desc "switch1 port 01 description [%s]" { snmp="<[192.168.3.222:public:.1.3.6.1.4.1.11863.1.1.3.2.1.1.1.1.2.1:10000]" }
```

View File

@ -181,7 +181,7 @@ Switch Power "Power" (Fan) {alexa="ToggleController.toggleState" [friendlyName
### Item State
* Item states, reported back to Alexa, are formatted based on their [item state presentation](https://www.openhab.org/docs/configuration/items.html#state-presentation) definition if configured. This means you can control the precision of number values (e.g. `%.1f °C` will limit reported temperature value to one decimal point).
* For items that don't have a state, these can be configured as not retrievable, automatically when the item is set as `autoupdate=false` or by using metadata parameter `itemStateRetrievable=false`. In that case, Alexa will not retrieve the given item state, and when a command is issued against that item, the requested state will be returned back without checking the current state in openHAB. If using this feature in a group endpoint, keep in mind that all associated items will need to be configured to either report or not report a state, otherwise the Alexa integration for that endpoint will be broken.
* For items that don't have a state, these can be configured as not retrievable, automatically when the item [parameter `autoupdate`](https://www.openhab.org/docs/configuration/items.html#parameter-autoupdate) is set as `autoupdate=false` or by using metadata parameter `itemStateRetrievable=false`. In that case, Alexa will not retrieve the given item state, and when a command is issued against that item, the requested state will be returned back without checking the current state in openHAB. If using this feature in a group endpoint, keep in mind that all associated items will need to be configured to either report or not report a state, otherwise the Alexa integration for that endpoint will be broken.
### Item Unit of Measurement
* With the introduction of the [unit of measurement](https://www.openhab.org/docs/concepts/units-of-measurement.html) concept, the item unit can be automatically determined for thermostat and temperature using that feature, removing the need of having to set the metadata scale parameter for each of the relevant items or groups.