Nikobus v2

In that order or first uninstall the binding and then copy the jar?

Maybe better to uninstall first, but at the end I guess it does not matter that much - if you see something fishy, just restart OH.

Hi crnjan

The “Reverse Direction” option seems to work fine. I have not been able to test it extensively yet, a quick test gave the desired result.

Great! So rollershutters (icon) is animating into correct direction too? If all good, I will create a PR so this will get part of official distro …

Yes,
Icon is animating into correct direction. Tested all six of them and all seem to work well.
Thank you for this solution! :clap:

Hi, i did some more tests but it seems that i’m lacking YAML programming skils.
I’ve created my Dimmer control based on your “Toggle” code for my push buttons. 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:
image
when burning it shows the value 100 and the icon is “lightbulb_fill” when ik “Toggle” it turns off and the icon changes. The feedback led is reacting as expected and always working fine.
I noticed that when ik click on “Toggle” i am able to see the percentages change. 0 - 15 - 36 - 56 - 100 and back. Or slightly other values. So he seems to read them correctly.
This is because the dimmers are set to gradually start or stop.
I now want to implement a slider but because i am lacking programming skills and have been tearing my hear out after a couple of hours Googling, copy/pasting and so on i’ll decided to come back to you :wink:
I searched for F7 slider and found this Range Slider | Framework7 Documentation and this one is looking realy nice image
i also found this post Dimmer widget oh3 and UI design - Add-ons / UIs - openHAB Community and tried to re-use that YAML code without any success.
This one is looking realy nice and could be combining your “Toggle” switch with a slider.

There is nothing special, simplest case would be something like

- component: oh-slider
  config:
    item: gGF_Living_Light_Table_Brightness

where gGF_Living_Light_Table_Brightness is linked to respective dimmer module’s output channel

When you setup an item and set its type as Dimmer, OH also knows to use slider in order to control it and there is nothing you need to do (additionally) - it just works. Would recommend you build up the semantic model

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 …