Binding supports two Bridges, that is two ways to connect to your Nikobus installation:
-
nikobus:pc-link-serial
and
nikobus:pc-link-ip
Since v1 did not include the tcp/ip
version I guess most will use serial, so start with adding
Bridge nikobus:pc-link-serial:mypclink [ portName = "<serial port>", refreshInterval = 30 ] {
}
to your .things file. portName
is the port to use and should be the same as defined in nikobus.cfg
, parameter serial.port
of your v1 setup, so if you had:
serial.port=/dev/ttyUSB0
in nikobus.cfg
than add
Bridge nikobus:pc-link-serial:mypclink [ portName = "/dev/ttyUSB0", refreshInterval = 30 ] {
}
refreshInterval
defines how often Nikobus modules are “asked” for their status so having i.e. 30 as above, binding will read one module’s status each 30s, iterating through all defined ones. I’m currently testing with 10s interval and seems to work fine (v1 binding had 600s by default!). Reading module’s state helps OH being in sync with your Nikobus installation.
Binding currently support 2 modules (things):
-
switch-module
and
dimmer-module
each module has 12 channels:
-
output-1
,
-
output-2
,
- …
output-12
the main difference between switch-module
and dimmer-module
is that switch-module has outputs (channels) defined as Switch
and dimmer-module as Dimmer
.
That said, one needs to add each physical Nikobus module to the .things file:
- using
switch-module
for switching module i.e. 05-000-02,
- using
dimmer-module
for dim-controller i.e 05-007-02.
Address of the modules are the same as it is in v1 binding.
So during v1 -> v2 migration one needs to go through the v1 .items file and for each line like:
Switch LP “Licht B” (Schakelmodule) { nikobus="BC00:5” }
add to your .things file (if not added already):
Thing switch-module BC00
and for each line like:
Dimmer Light_GF_Dining_Ceiling "Ceiling" (GF_Dining, Lights) { nikobus="6B00:10" }
add
Thing dimmer-module 6B00
At the end the .things file should look something like:
Bridge nikobus:pc-link-serial:mypclink [ portName = "/dev/ttyUSB0", refreshInterval = 30 ] {
Thing dimmer-module 6B00
Thing dimmer-module 0700
Thing switch-module BC00
Thing switch-module 4C6C
Thing switch-module A063
}
Number of things should be the same as the number of modules in your Nikobus installation and make sure the mapping is correct - switch to switch-module
and dim-controller to dimmer-module
.
Now lets migrate .items file. Entries as:
Switch LP “Licht B” (Schakelmodule) { nikobus="BC00:5” }
should be updated to
Switch LP “Licht B” (Schakelmodule) { channel="nikobus:switch-module:mypclink:BC00:output-5" }
and entries as
Dimmer Light_GF_Dining_Ceiling "Ceiling" (GF_Dining, Lights) { nikobus="6B00:10" }
should be updated to
Dimmer Light_GF_Dining_Ceiling "Ceiling" (GF_Dining, Lights) { channel="nikobus:dimmer-module:mypclink:6B00:output-10" }
With above in place you can use your existing .sitemap file as before.
All above can be setup through the Paper UI too