Z-Way is a software to configure and control a Z-Wave network.
The software comes with a full stack from Z-Wave transceiver with certified firmware to a REST API on high level.
Z-Way comes in three parts [cf. [Z-Wave.Me]([Z-Wave.Me](https://www.z-wave.me/index.php?id=1))]:
- a firmware that runs on the Z-Wave transceiver chip
- the communication stack that runs on different host Operating Systems
- an automation engine and optionally a web server to implement a User Interface
All parts together represents a smart home controller for Z-Wave.
The entire infrastructure is maintained and developed by [Z-Wave.Me](https://www.z-wave.me/index.php?id=1) with the help of a large community.
Please note the **known issues** below.
### Approach
The idea behind is the integration of Z-Wave through a bridge (Z-Way controller).
The existing, certified Z-Way stack can be used to build, configure and control the Z-Wave network.
By using the REST API all devices are loaded from Z-Way and represented as openHAB elements.
The sensor data and actuator states are constantly updated and commands are passed to the Z-Way system.
The Binding uses the Z-Way library for Java ([GitHub](https://github.com/pathec/ZWay-library-for-Java)).
## Supported Things
The Z-Way Binding provides different thing types.
The core component is the bridge which represents the Z-Way server.
For the integration of devices, two thing types are available.
In Z-Way there are devices which represent physical devices and (virtual) devices which are defined in Apps.
The difference is that physical devices usually have several functions.
Z-Way server constructs (virtual) devices for each function, such as motion sensors or door contacts.
In openHAB, these functions are bundled into physical devices and represented as things with channels for each function.
This type of thing is a *Z-Wave Device*.
On the other hand all virtual devices are mapped to *Z-Way Virtual Devices* with exactly one channel.
-*Z-Way Server* (Bridge) represents a bridge with general settings and communication tasks.
-*Z-Way Virtual Device* represents one (virtual) device with the corresponding channel. A bridge is necessary as an intermediary between openHAB thing and Z-Way device.
-*Z-Wave Device* represents a device of real world. Each device function will be mapped to a separate channel. The bridge is necessary as an intermediary between openHAB thing and Z-Way device.
## Discovery
A discovery service for Z-Way servers scans local network and must always be started manually.
Z-Way doesn't support any discovery protocol like UPnP for this purpose.
That is why first all IP addresses in local network are checked on port 8083.
If the server answers, a ZAutomation request (*/ZAutomation/api/v1/status*) is performed to ensure, the found server runs Z-Way.
Another discovery service provides available devices (a configured bridge is necessary).
The device discovery service is performed at a specified interval, but can also be started manually.
Note: In the Z-Way server device can be disabled or made invisible. Only for active and visible Z-Way devices channels will created.
## Binding Configuration
No configuration is necessary.
## Thing Configuration
The textual configuration (via \*.thing files) isn't useful because the resulting elements are read-only.
But the configuration and properties of things are changed at runtime and channels are dynamically added and removed.
### Z-Way Server (Bridge)
Besides the username and password all required Z-Way information are found during discovery.
| Configuration Name | Mandatory | Default | Desciption |
| zwayServerIpAddress | | localhost | The IP address or hostname of the Z-Way server. If Z-Way and openHAB are running on the same machine, the default value can be used. |
| zwayServerPort | | 8083 | The port of the Z-Way server (1 to 65535) |
| zwayServerProtocol | | http | Protocol to connect to the Z-Way server (http or https) |
| zwayServerUsername | | admin | Username to access the Z-Way server. |
| zwayServerPassword | X | | Password to access the Z-Way server. |
| pollingInterval | | 3600 | Refresh device states and registration from Z-Way server in seconds (at least 60). |
| sensorCO2 | Number | CarbonDioxide | SensorMultilevel - *Special case:* no probe type for carbon dioxide sensors available - probe title *CO2 Level* acts as selection criterion |
| sensorEnergy | Number | Energy | SensorMultilevel - energy |
| sensorMeterKWh | Number | Energy | SensorMultilevel - meterElectric_kilowatt_per_hour |
| sensorMeterW | Number | Energy | SensorMultilevel - meterElectric_watt |
| switchPowerOutlet | Switch | PowerOutlet | SwitchBinary - *Special case:* no probe type for power outlet available - icon *switch* acts as selection criterion |
The following channels represent universial channels if no further device information are available, only depending on the Z-Way device types (for available device types see [Z-Way Documentation](https://zwayhomeautomation.docs.apiary.io/#reference/devices)).
| Channel Type ID | Item Type | Category | Assigned for Z-Way device type |