The Homematic IP Access Point does not support this API and can't be used with this binding. But you can control Homematic IP devices with a CCU2 with at least firmware 2.17.15.
All devices connected to a Homematic gateway. All required openHAB metadata are generated during device discovery. With Homegear or a CCU, variables and scripts are supported too.
## Discovery
Gateway discovery is only available for Homegear, you need at least 0.6.x for gateway discovery. For all other gateways you have to manually add a bridge in a things file.
The binding has a gateway type autodetection, but sometimes a gateway does not clearly notify the type. If you are using a YAHM for example, you have to manually set the gateway type in the bride configuration to CCU.
If autodetection can not identify the gateway, the binding uses the default gateway implementation. The difference is, that variables, scripts and device names are not supported, everything else is the same.
The interval in seconds to check if the communication with the Homematic gateway is still alive. If no message receives from the Homematic gateway, the RPC server restarts (default = 300)
- **reconnectInterval**
The interval in seconds to force a reconnect to the Homematic gateway, disables aliveInterval! (0 = disabled, default = disabled)
If you have no sensors which sends messages in regular intervals and/or you have low communication, the aliveInterval may restart the connection to the Homematic gateway to often. The reconnectInterval disables the aliveInterval and reconnects after a fixed period of time.
Think in hours when configuring (one hour = 3600)
- **timeout**
The timeout in seconds for connections to a Homematic gateway (default = 15)
- **socketMaxAlive**
The maximum lifetime of a pooled socket connection to the Homematic gateway in seconds (default = 900)
- **rfPort**
The port number of the RF daemon (default = 2001)
- **wiredPort**
The port number of the HS485 daemon (default = 2000)
- **hmIpPort**
The port number of the HMIP server (default = 2010)
- **cuxdPort**
The port number of the CUxD daemon (default = 8701)
The first parameter after Thing is the device type, the second the serial number. If you are using Homegear, you have to add the prefix ```HG-``` for each type. This is necessary, because the Homegear devices supports more datapoints than Homematic devices.
As additional parameters you can define a name and a location for each thing. The Name will be used to identify the Thing in the Paper UI lists, the Location will be used in the Control section of PaperUI to sort the things.
* **delay**: delays transmission of a command **to** the Homematic gateway, duplicate commands are filtered out
* **receiveDelay**: delays a received event **from** the Homematic gateway, duplicate events are filtered out (OH 2.2)
The receiveDelay is handy for dimmers and rollershutters for example. If you have a slider in a UI and you move this slider to a new position, it jumps around because the gateway sends multiple events with different positions until the final has been reached. If you set the ```receiveDelay``` to some seconds, these events are filtered out and only the last position is distributed to openHab. The disadvantage is of course, that all events for this channel are delayed.
The binding supports one virtual device and some virtual datapoints. Virtual datapoints are generated by the binding and provides special functionality.
The GATEWAY-EXTRAS is a virtual device which contains a switch to reload all values from all devices and also a switch to put the gateway in the install mode to add new devices. If the gateway supports variables and scripts, you can handle them with this device too
The type is generated: GATEWAY-EXTRAS-[BRIDGE_ID]. Example: bridgeId=ccu, type=GATEWAY-EXTRAS-CCU
A virtual datapoint (Switch) to remove the device from the gateway, available in channel 0 for each device. Deleting a device is only possible if DELETE_DEVICE_MODE is not LOCKED
A virtual datapoint (Number) to automatically set the ON_TIME datapoint before the STATE or LEVEL datapoint is sent to the gateway, available for all devices which supports the ON_TIME datapoint
This is usefull to automatically turn off the datapoint after the specified time
A virtual datapoint (String) to control the display of a 19 button Homematic remote control (HM-RC-19), available on channel 18
The remote control display is limited to five characters, a longer text is truncated.
You have several additional options to control the display.
* BEEP _(TONE1, TONE2, TONE3)_ - let the remote control beep
* BACKLIGHT _(BACKLIGHT_ON, BLINK_SLOW, BLINK_FAST)_ - control the display backlight
* UNIT _(PERCENT, WATT, CELSIUS, FAHRENHEIT)_ - display one of these units
* SYMBOL _(BULB, SWITCH, WINDOW, DOOR, BLIND, SCENE, PHONE, BELL, CLOCK, ARROW_UP, ARROW_DOWN)_ - display symbols, multiple symbols possible
You can combine any option, they must be separated by a comma. If you specify more than one option for BEEP, BACKLIGHT and UNIT, only the first one is taken into account and all others are ignored. For SYMBOL you can specify multiple options.
**SHORT & LONG_PRESS events of push buttons do not occur on the event bus**
It seems buttons like the HM-PB-2-WM55 do just send these kind of events to the CCU if they are mentioned in a CCU program. A simple workaround to make them send these events is, to create a program (rule inside the CCU) that does just have a "When" part and no "Then" part, in this "When" part each channel needs to be mentioned at least once. As the HM-PB-2-WM55 for instance has two channels, it is enough to mention the SHORT_PRESS event of channel 1 & 2. The LONG_PRESS events will work automatically as they are part of the same channels. After the creation of this program, the button device will receive configuration data from the CCU which have to be accepted by pressing the config-button at the back of the device.
**INSTALL_TEST**
If a button is still not working and you do not see any PRESS_LONG / SHORT in your log file (loglevel DEBUG), it could be because of enabled security. Try to disable security of your buttons in the HomeMatic Web GUI and try again. If you can't disable security try to use key INSTALL_TEST which gets updated to ON for each key press
**-1 Failure**
A device may return this failure while fetching the datapoint values. I've tested pretty much but i did not found the reason. The HM-ES-TX-WM device for example always returns this failure, it's impossible with the current CCU2 firmware (2.17.15) to fetch the values. I've implemented two workarounds, if a device returns the failure, workaround one is executed, if the device still returns the failure, workaround two is executed. This always works in my tests, but you may see a OFFLINE, ONLINE cycle for the device.
Fetching values is only done at startup or if you trigger a REFRESH. I hope this will be fixed in one of the next CCU firmwares.
With [Homegear](https://www.homegear.eu) everything works as expected.
The gateway autodetection of the binding can not clearly identify the gateway and falls back to the default implementation. Use the ```gatewayType=ccu``` config to force the binding to use the CCU implementation.
The CCU only sends a event if a datapoint of a device has changed. There is (currently) no way to receive a event automatically when a variable has changed. To reload all variable values, send a REFRESH command to any variable.
e.g you have a item linked to a variable with the name Var_1
**Note:** adding new and removing deleted variables from the GATEWAY-EXTRAS Thing is currently not supported. You have to delete the Thing, start a scan and add it again.