Nikobus addresses

I’m trying to get started connecting OpenHAB to the Nikobus installation in my house. I observed that the addresses I capture in the OpenHAB logs are not the same as those reported by the Nikobus windows application. For example for a particular switch the Nikobus software has the address 12BDD8, while OpenHAB reports #N26EF52. Can anyone clarify if this are just two different representations of the same address, or if there are really 2 unrelated addresses.

Have you checked
Enable the logging (enabling debug logging is different for openhab 2.2.0 and above since the logger changed), press a button and write down the address you see in the openhab log. This recorded address corresponds in openhab with the button press.

Discovering Module Addresses and Channels

In order to configure items in openHAB, you will first need to know the module addresses and channels of your switch and dimmer modules.

This binding’s root logger is org.openhab.binding.nikobus. Enable DEBUG logging to discover module addresses and channels that will be logged. In openHAB 2, this can be performed from the console at the openhab> prompt:

log:set DEBUG org.openhab.binding.nikobus

Press Control-C to stop monitoring the log and return to the prompt.

When done, you can return the binding’s logging to the quieter INFO level

Yes, I have done that. My question was: why is this address different from the one I see in Nikobus and is there a way to translate between the two?

Edit: For the switch modules there does seem to be a correlation: When Nikobus has 9C1D, then OpenHAB reports 1D9C.

Edit 2: To clarify: #N26EF52 is the command I see logged when I press a button, while 12BDD8 is the address of that button in Nikobus.

I have since figured it out, so I’m leaving a note here in case any one else finds this info useful. Essentially, you have to reverse the bits to end up with the bus address:

  • Convert to binary representation
  • Take bits 2 till 22
  • Prepend 3 bits for the button.
  • Reverse the order
  • Convert back to hex
  • Prepend “#N#”

i try to follow your conversion but i am missing something or it is my english

my switch adres is 3C879E and the nikobus command is #N9E784F
3C879E is binary 0011 1100 1000 0111 1001 1100

take bit 2 till 22 so xx11 1100 1000 0111 1001 110x
what do you mean with prepend 3 bits (adding 3 bits left or right)

22 bits plus 3 added ? 1111 0010 0001 1110 0111 0xxx

if i reverse these bits i get xxx0 1110 0111 1000 0100 1111
convert to hex 0E784F
so part of my nikobus command but i am missing the 9 of the adres
and adding #N in front is clear

can you tell me what i am missing or where i am going wrong

Sorry, I’m on holiday and have limited internet access. The missing part is the three bits for the button. I do not have the values at hand right now, but if you experiment with different values you should find the correct ones. Note that I have all 8-button switches. For different types of switches the logic might differ. Also take into account that this is all observed behavior, so it may not be applicable in all circumstances.