This is a binding for integrating [Heatmiser](https://www.heatmiser.com) room and underfloor heating control products.
The NeoHub (bridge) binding allows you to connect openHAB via TCP/IP to Heatmiser's NeoHub and integrate your Heatmiser smart thermostats, smart plugs, and accessories.
![NeoHub](doc/neohub-2.jpg)
## Supported Things
The binding supports the following types of Thing..
| NeoHub | The Heatmiser NeoHub bridge which is used to communicate with NeoStat and NeoPlug devices |
| NeoStat | Heatmiser Neostat Smart Thermostat |
| NeoPlug | Heatmiser NeoPlug Smart Plug |
| NeoContact | Heatmiser Contact Sensor, wireless door or window contact |
| NeoTemperatureSensor | Heatmiser Wireless Air Sensor, wireless temperature sensor |
## Discovery
You have to manually create a single (Bridge) Thing for the NeoHub, and enter the required Configuration Parameters (see Thing Configuration for NeoHub below).
If the Configuration Parameters are all valid, then the NeoHub Thing will automatically attempt to connect and sign on to the hub.
If the sign on succeeds, the Thing will indicate its status as Online, otherwise it will show an error status.
Once the NeoHub Thing has been created and it has successfully signed on, it will automatically interrogate the HeoHub to discover all the respective Heatmiser device Things that are connected to it.
If in the future, you add additional Heatmiser devices to your system, the binding will discover them too.
## Thing Configuration for "NeoHub"
The NeoHub Thing connects to the hub (bridge) to communicate with any respective connected Heatmiser device Things.
It signs on to the hub using the supplied connection parameters, and it polls the hub at regular intervals to read and write the data for each Heatmiser device.
The NeoHub supports two Application Programming Interfaces "API" (an older "legacy" one, and a modern one), and this binding can use either of them to communicate with it.
Before the binding can communicate with the hub, the following Configuration Parameters must be entered.
| preferLegacyApi | ADVANCED: Prefer the binding to use older API calls; if these are not supported, it switches to the new calls (Default=false) |
## Connection Refused Errors
From early 2022 Heatmiser introduced NeoHub firmware that has the ability to enable / disable the NeoHub `portNumber` 4242.
If this port is disabled the OpenHAB binding cannot connect and the binding will report a *"Connection Refused"* warning in the log.
In prior firmware versions the port was always enabled.
But in the new firmware the port is initially enabled on power up but if no communication occurs for 48 hours it is automatically disabled.
Alternatively the Heatmiser mobile App has a setting (Settings | System | API Access | Legacy API Enable | On) whereby the port can be permanently enabled.
| meshNetworkQoS | Number:Dimensionless | RF mesh network Quality-of-Service; this is the percentage of configured devices that are currently connected online via the RF mesh network |
## Channels for "NeoStat" Thermostat
The following Channels, and their associated channel types are shown below.
| sensorTemperature | Number:Temperature | Actual measured temperature |
| batteryLowAlarm | Switch | The battery is low (Off=Ok, On=Alarm) |
## Channel Configuration (Optional)
The Heatmiser devices are connected to the NeoHub by means of an RF (radio frequency) mesh network.
Occasionally it is possible that a device might drop out of the mesh.
This is usually a temporary issue (e.g. interference), and the device usually reconnects itself automatically.
If a device drops out of the mesh, you can select whether openHAB shall either a) change the Channel value to `UNDEF`, or b) hold the value that it had prior to the drop out.
The choice of a) or b) is determined by an optional Channel configuration parameter `holdOnlineState` as follows.
| holdOnlineState | Switch | If the respective device drops out of the RF mesh, the behaviour is as follows:<br> - Off: openHAB changes the Channel's state to `UNDEF`<br> - On: openHAB holds the Channel's state unchanged<br>The default setting is Off |
The purpose of `holdOnlineState` is so you can choose to overlook value fluctuations if drop outs occur e.g. to "hold" the values in a temperature graph display.
Note: if a drop out occurs, the Thing will always change its status to `OFFLINE` (irrespective of the `holdOnlineState` setting).