In order to avoid potential confusion and give some understanding of concepts, i’ll describe how the original DeviSmart system works.
A DeviReg Smart™ hardware is a floor heating thermostat, installed in a standard European (AKA German AKA Schuko) wall box. The thermostat has a wi-fi connectivity and can be controlled by a smartphone app. The app supports multiple such thermostats and can organize them in zones, but it’s all managed by the app. Thermostats don’t know about each other.
The connection is maintained via a custom cloud AKA Grid, maintained by Trifork company. The grid is a peer-to-peer encrypted network. Both smartphone and thermostat are clients in terms of this network. They connect to the grid server and become peers. A peer may ask the grid to establish a connection to another peer. Peers are identified by 32-byte ID’s AKA public keys. A device chooses its key pair once in the lifetime and retains it, becoming known by the public key. In order to connect to a thermostat, the phone app must know its public key.
There is a process of initial pairing for a newly installed thermostat, which knows neither any peers nor Wifi settings. In this and only in this mode it becomes a wifi access point itself and opens up for local connection for any peer. The first connected peer (it is a smartphone app) is expected to add itself to device’s whitelist and configure the wifi. After wifi has been configured local connection is no longer permitted, and the thermostat talks only to peers it knows only via the grid.
In order to add more users to the setup the smartphone app has configuration sharing mode, employing the aforementioned one-time password. The sending phone issues the password; the receiver is expected to supply it. Communication between two participating phones is done via the same grid. During the sharing process sending phone also gets receiver’s peer ID and registers it on all the thermostats it knows, granting the access for a new user.
Users’ smartphones also don’t know about each other, each stores own copy of the thermostats list. If a new thermostat is being added to the setup, the smartphone who has added it needs to re-share the configuration between other users.
So, the easiest way for OpenHAB to get plugged in is to receive the configuration from the smartphone, where things are already set up. Technically it is possible to auto-discover thermostats in initial pairing mode (that’s how the smartphone finds them), but:
- This would require to change wi-fi settings on the OpenHAB server.
- This would require the user to hard-reset all his/her thermostats; this is the only way to bring them back into initial pairing mode. They would lose all pairings, settings and schedules
- Consequence of (2): the original smartphone app would no longer work. Unless you implement full support for configuration sharing on OpenHAB side.
So it is a bad way to go, especially during initial development phase. Initial pairing mode requires too much functionality to be present. And i don’t even have a spare unused thermostat to develop it.