Nikobus v2

Yes I know, and I also tried that and it works perfectly but then i had no feedback LEDS. And when someone uses a real push on the wall , the feedback LEDS are out of control.
i’ll look further into the sematic model you proposed and see if i can find some kind of a solution for this.
Thanks!

Semantic model won’t help you in this regard. If you want your LEDs to be in sync, then you cannot link to dimmer’s output channel, as already explained, since this communicates directly with the module, so your buttons (and LEDs) have no idea what is going on.

Simulated button press (when you send the ON command to it) is behaving exactly the same as if you would briefly tap a physical Nikobus push button. So you can turn your lights on and off but cannot dim them. If you want to be able to do so too, you will need to write a rule that will send ON commands in i.e. 100ms intervals while you keep pushing the button on UI.

I had to schange the Type of my item that is linked to my Nikobus push button to Switch . Leave actioncommand: ON but change .state== ‘100’ in order to swith my dimmable light on and off using the “Toggle” button of your code. this looks like this:

Not 100% sure if I know what you mean, can you share the modified yaml for reference?

- component: f7-card
  config:
    title: Inkomhal Uplighter
  slots:
    default:
      - component: f7-card-content
        slots:
          default:
            - component: f7-row
              config:
                class:
                  - justify-content-center
                  - align-items-center
                  - padding-bottom
              slots:
                default:
                  - component: f7-icon
                    config:
                      f7: "=items.D01_O01_Verlichting_Inkomhal_Uplighter.state === '100' ? 'lightbulb_fill' : 'lightbulb'"
                      class:
                        - padding-right-half
                  - component: Label
                    config:
                      text: =items.D01_O01_Verlichting_Inkomhal_Uplighter.state
            - component: oh-button
              config:
                outline: true
                text: Toggle
                action: command
                actionCommand: ON
                actionItem: Verlichting_Inkomhal_Uplighter

I guess this will work better:

f7: "=items.D01_O01_Verlichting_Inkomhal_Uplighter.state > 0 ? 'lightbulb_fill' : 'lightbulb'"

Please note - if you are going down the road with simulated button presses - you cannot use slider anymore to control the brightness - because you are using push button to control your brightness - and push button (either physical or simulated) have no idea what is going on within the dimmer module - push buttons only sends “I’m pushed” messages every ~100ms on the bus while being pressed, that is all. Button has no idea what is the result of it being pressed. It might even turn 100 lights on for that matter. Bottom point - you cannot say - light to 40% using a button. Therefore you will need a rule that will do the same as the physical button - while you keep the i.e. Toggle button pressed, it will be sending ON commands every ~100ms.

Thx for the changed code!
i’ll dive into rules and see how far i get!

Another thing that crossed my mind. Is it possible to hide or show something in a card?
For example, with the same code, when the Toggle button is pressed. Show 4 more buttons?
And when the Toggle button is pressed again (light out) hide the 4 buttons.

Pretty sure you can, maybe following this idea - controlling visibility using i.e.

items.D01_O01_Verlichting_Inkomhal_Uplighter.state > 0

shuld do the trick …

@wimu - thx for confirming, PR was merged so you should be able to use this feature in next snapshots/releases as part of official distro.

Thx crnjan
Any idea how often a snapshot will be released?

Latest snapshot builds are available here - openHAB3-Distribution [Jenkins] and since last one was build

#2186 (Feb 5, 2021 5:14:55 PM)

it’s probably already in.

I’m not sure. Tried a quick install of the snapshot.zip and deleted your .jar file. After that the reverse direction was gone.

Probably because I installed milestone M1 instead of the snapshot before? When will milestone M2 be released?

It should be in, see #11 here. Milestones are released monthly AFAIK (but not 100% sure). It should not matter if you had M1 installed before or not. Please don’t forget to install the (official) binding after you remove it from addon folder.

At the end, you can use jar you have until M2 if you want, too.

After some changings made on my server (changing servername, ip-adress etc) i’ve got trouble getting openhab online well.

What could be the problem?

Hard to say without logs … maybe double check connection to Nikobus PC Link …

Solved my ERROR: COMM problem. However the PC-Link says ONLINE the Com-port setting was changed.

I’ve got a PC-Link and a PC-Logic in my Nikobus installation. When I connect my OH3-server to the PC-Logic the PC-Link bridge works like it’s connected to the PC-Link (Works on Logic with Link address).

When I connect a second (Snapshot/Milestone) OH3-server to either the PC-Link or PC-Logic port I get the port ERROR: COMM described above. Is my conclusion right that two OH3-servers can’t bridge to the same address?

Is there someone who has two servers linked to a Nikobus installation? Eg with two PC-Link controllers?

Hi

I’m trying to program Nikobus buttons to change my Nikobus lights, but not by Nikobus, but by openhab. I have no clue of what I’m doing wrong, so… . When I test the rule through the OH interface, it works, but when I press the physical button, It does not.

The push button is online.

Test On

triggers:
  - id: "1"
    configuration:
      itemName: NikobusPushButton1522DE5BP231C5_ButtonEvent
      state: ON
      previousState: OFF
    type: core.ItemStateChangeTrigger
conditions:
  - inputs: {}
    id: "3"
    configuration:
      itemName: light_Eethoek_Centraal
      state: OFF
      operator: =
    type: core.ItemStateCondition
actions:
  - inputs: {}
    id: "2"
    configuration:
      itemName: light_Eethoek_Centraal
      command: ON
    type: core.ItemCommandAction

Test Off

triggers:
  - id: "1"
    configuration:
      itemName: NikobusPushButton1522DE5BP231C5_ButtonEvent
      state: OFF
      previousState: ON
    type: core.ItemStateChangeTrigger
conditions:
  - inputs: {}
    id: "3"
    configuration:
      itemName: light_Eethoek_Centraal
      state: ON
      operator: =
    type: core.ItemStateCondition
actions:
  - inputs: {}
    id: "2"
    configuration:
      itemName: light_Eethoek_Centraal
      command: OFF
    type: core.ItemCommandAction


Hey! Not 100% sure what are you trying to accomplish … Please note Nikobus push button does not have a state (on/off) but can trigger commands, see here for details. Please provide more details in order to provide better feedback …

Hey thanks for the reply. I indeed missed the part where it says the buttons don’t have a state and I have to use the filter trigger. From “Beside receiving a status update (ON) when a physical Nikobus push button is pressed” in the documentation I thought there indeed was an on/off state. My mistake.

Hi @crnjan

Apparently there is no way to message you personally through this forum, but I just wanted to let you know that I’m very grateful for the nikobus-code/addon for openhab. It’s magic to see that I can connect my nikobus via openhab to mqtt to my sonoffs to control my garden lights. And you (and of course the other openhab-crew) made that my installation can do things beyond my imagination.

So thank you. Also for the good pointers on my badly asked questions :slight_smile:

If I can ever buy you a coffee, let me know.

For the other readers, sorry for hijacking this thread but I didn’t find another way to say thanks :pray:

1 Like

Hi @crnjan

I agree on Bruno’s message

So +1 coffee on my bill :+1:

2 Likes