The HubConnect server is configured using a very simple config.json file which tells the server how many hubs it can expect to connect, what the IP address is, and what port to accept connections on.
Sample config.json
{
"hubs":
[
{
"name": "Server Hub",
"ip": "192.168.1.1",
"port": 22000
},
{
"name": "Hub 1",
"ip": "192.168.1.2",
"port": 22001
},
{
"name": "Hub 2",
"ip": "192.168.1.3",
"port": 22002
}
],
"makerSocket":
{
"enabled": true,
"port": 22010
}
}
|
Field Definitions - Hubs
name: A friendly name of the hub. This is displayed in the console logs.
ip: The IP address of the hub in which to connect to the Hubitat websocket.
port: The port in which to accept a connection from the remote hub.
|
Field Definitions - Maker Socket
enabled: Starts the maker websocket server on the [port] specified.
port: The port in which to accept a connection from any websocket client.
|
Important Tips
Syntax is critical. Using a tool such as JSONLint to validate your configuration file after editing is strongly recommended.
Alternatively, use the configutation tool from the Hubitat Community.