Also under `Home page > Settings > Control panel` with the menu `Security` the option `Authentication` has to be disabled if the option 'useAuthentication' is not set.
This option may be enabled if the option 'useAuthentication' is set and BIN-RPC is not used.
In this case, a user and password must be created.
This can be done under `Home page > Settings > Control panel` with the menu `User management`.
This can be done under `Home page > Settings > Control Panel` in the `User Management` menu.
The new user should have the following configuration:
The user and password must then be entered in the 'Username' and 'Password' settings.
If this is not done the binding will not be able to connect to the CCU and the CCU Thing will stay uninitialized and sets a timeout exception or a authentication error
- [Windows BidCos service](https://eq-3.de/service/downloads.html?kat=download&id=125) (included in "LAN Usersoftware" download)
- [OCCU](https://github.com/eq-3/occu)
The Homematic IP Access Point **does not support** this API and and can't be used with this binding.
Homematic IP support:
- CCU2 with at least firmware 2.17.15
- [RaspberryMatic](https://github.com/jens-maus/RaspberryMatic) with the [HM-MOD-RPI-PCB](https://www.elv.de/homematic-funkmodul-fuer-raspberry-pi-bausatz.html) or [RPI-RF-MOD](https://www.elv.de/homematic-funk-modulplatine-fuer-raspberry-pi-3-rpi-rf-mod-komplettbausatz.html) RF module
- [piVCCU](https://github.com/alexreinert/piVCCU)
- [YAHM](https://github.com/leonsio/YAHM)
These ports are used by the binding by default to communicate **TO** the gateway:
- RF components: 2001
- WIRED components: 2000
- HMIP components: 2010
- CUxD: 8701
- TclRegaScript: 8181
- Groups: 9292
And **FROM** the gateway to the binding:
- XML-RPC: 9125
- BIN-RPC: 9126
CCU Autodiscovery:
- UDP 43439
**Note:** The binding tries to identify the gateway with XML-RPC and uses henceforth:
- **CCU**
- **RF**: XML-RPC
- **WIRED**: XML-RPC
- **HMIP**: XML-RPC
- **CUxD**: BIN-RPC (CUxD version >= 1.6 required)
- **Groups**: XML-RPC
- **Homegear**
- BIN-RPC
- **Other**
- XML-RPC
## Supported Things
All devices connected to a Homematic gateway.
All required metadata are generated during device discovery.
With Homegear or a CCU, variables and scripts are supported too.
## Discovery
Gateway discovery is available:
- CCU
- RaspberryMatic >= 2.29.23.20171022
- Homegear >= 0.6.x
- piVCCU
For all other gateways you have to manually add a bridge in a things file. Device discovery is supported for all gateways.
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.
### Automatic install mode during discovery
Besides discovering devices that are already known by the gateway, it may be desired to connect new devices to your system - which requires your gateway to be in install mode.
Starting the binding's DiscoveryService will automatically put your gateway(s) in install mode for a specified period of time (see installModeDuration).
**Note:** Enabling / disabling of install mode is also available via GATEWAY-EXTRAS.
You may use this if you prefer.
**Exception:** If a gateway is not ONLINE, the install mode will not be set automatically.
For instance during initialization of the binding its DiscoveryService is started and will discover devices that are already connected.
However, the install mode is not automatically enabled in this situation because the gateway is in the status INITIALIZING.
## Bridge Configuration
There are several settings for a bridge:
- **gatewayAddress** (required)
Network address of the Homematic gateway
- **gatewayType**
Hint for the binding to identify the gateway type (auto|ccu|noccu) (default = "auto").
**Warning:** The option "factoryResetOnDeletion" also unpairs a device, so in order to avoid unpairing on deletion completely, both options need to be set to false! (default = false)
- **factoryResetOnDeletion**
If set to true, devices are automatically factory reset when their corresponding things are removed.
Due to the factory reset, the device will also be unpaired from the gateway, even if "unpairOnDeletion" is set to false! (default = false)
- **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 roller shutters 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 the binding.
The disadvantage is of course, that all events for this channel are delayed.
The `Type` is the device type, channel number and UPPERCASE channel name separated with an underscore.
Note that, for Homegear devices, in contrast to the specification of the Thing above no `HG-` prefix is needed for the specification of the Type of the Channel.
**Note:** don't forget to add the `HG-` type prefix for Homegear devices
## Virtual device GATEWAY-EXTRAS
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.
A virtual datapoint (Switch) to reload all values for all devices, available in channel 0 in GATEWAY-EXTRAS
### RELOAD_RSSI
A virtual datapoint (Switch) to reload all RSSI values for all devices, available in channel 0 in GATEWAY-EXTRAS
### INSTALL_MODE
A virtual datapoint (Switch) to start the install mode on the gateway, available in channel 0 in GATEWAY-EXTRAS
### INSTALL_MODE_DURATION
A virtual datapoint (Integer) to hold the duration for the install mode, available in channel 0 in GATEWAY-EXTRAS (max 300 seconds, default = 60)
## Virtual datapoints
Virtual datapoints are generated by the binding and provide special functionality for several device types.
### RSSI
A virtual datapoint (Number) with the unified RSSI value from RSSI_DEVICE and RSSI_PEER, available in channel 0 for all wireless devices
### DELETE_MODE
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
### DELETE_DEVICE_MODE
A virtual datapoint (Enum) to configure the device deletion with DELETE_MODE, available in channel 0 for each device
- **LOCKED:** (default) device can not be deleted
- **RESET:** device is reset to factory settings before deleting
- **FORCE:** device is also deleted if it is not reachable
- **DEFER:** if the device can not be reached, it is deleted at the next opportunity
**Note:** if you change the value and don't delete the device, the virtual datapoints resets to LOCKED after 30 seconds
### ON_TIME_AUTOMATIC
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 useful to automatically turn off the datapoint after the specified time.
### BUTTON
A virtual datapoint (String) to simulate a key press, available on all channels that contains PRESS_ datapoints.
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.
**Examples:**
Assumed you mapped the virtual datapoint to a String item called `Display_Options`.
### DISPLAY_SUBMIT (only HM-Dis-WM55 and HM-Dis-EP-WM55)
Adds multiple virtual datapoints to the HM-Dis-WM55 and HM-Dis-EP-WM55 devices to easily send (colored) text and icons to the display.
**Note:** The HM-Dis-EP-WM55 has only a black and white display and therefore does not support datapoints for colored lines. In addition, only lines 1-3 can be set.
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.
If a button is still not working and you do not see any PRESS_LONG / SHORT in your log file (log level 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
A device may return this failure while fetching the datapoint values.
I have tested pretty much but I did not find the reason.
The HM-ES-TX-WM device for example always returns this failure, it is impossible with the current CCU2 firmware (2.17.15) to fetch the values.
I have 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 an 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.
**`openhab.log` contains an exception with message: `Buffering capacity 2097152 exceeded` resp. discovery detects no devices**
In case of problems in the discovery or if above mentioned error message appears in `openhab.log`, the size for the transmission buffer for the communication with the gateway is too small.
The problem can be solved by increasing the `bufferSize` value in the bridge configuration.