Physical Push Button Controlling a Device

Hi All,

I am new to openHAB, I have been playing with it for a few months, I am able to control the lights, blinds, sensors, no problem on the mobile app, now my wife still wants physical buttons to switch on and off the lights, open / close blinds.
I started to experiment with Wago 750-352, I have some DI and some DO, I can read the DI and change the state of the DO, but what I just cant get my head around is how to configure a push button so that the same button switches on the light by pressing it, and by pressing it again the light turns off, in the app it should still be a switch witch changes state, can somebody point me in the right direction?

Thanks,
Bram

Hi,

OH does not use toggle for switching, it specifically requires ON and OFF telegrams from your physical device. You should create a rule that triggers on your “ON” command (push button pressed) and changes the current state of your actuator.
Take a look at this.

BR,
George

Thanks George,

This a bit of a bummer, I have somewhat 40 push buttons throughout the house, do I create a rule for each push button? and what if I want to use one of the buttons to dim (up or down) a light by pressing it for a longer period?
I never gave this much thought when I bought the hardware, I assumed this was a basic functionality.
But on the bright side, now I have to learn the inner workings of OH :slight_smile:. Things that work straight away are boring :laughing:
Are there examples available that do what I want to do?

Best regards,
Bram

Dear Bram,

The learning curve is quite steep if you understand the basics! Take a look at the concepts in the wiki!

You don’t need to create a rule for each button! You can group your items and trigger the rule when one of the members changes the status!

If you want to use long/short press, you can always use timers inside the rules!

BR,
George

Hi!
I’m using physical buttons to control my lights, of course I can also use Openhab to control them.

I’m using these:

With a push back / toggle spring. (Toggle button). I have then attached a Fibaro Dimmer2 behind the socket.

It works like this:

  1. Single click the left most button will turn the light on or off
  2. Double click the left most button will turn the light on to 100%
  3. Push and hold the leftmost button will dim the light up
  4. Push and hold again will dim the light down
  5. Pushing the right most button, will change the current scene. I have attached it to the S2 on the fibaro 2,
    and when i push it I turn all the lights in the house off, as well as turning off the tv and stopping any music playing.
    (This is for the push button which is located close to the front door.

In terms of WAF, it works, she liked the old Push/Turn dimmers better, but it’s ok at least.

Regards, S

@Seaside
The Wago product is a PLC, he has to deal with all the statuses outside the fieldbus. Z-wave, KNX and others are different!
BR,
George

@george.erhan
You are right, did read carefully :blush:
Anyways, if you consider switching to and or using z-wave / knx / similar you will find out that it’s possible to use
the physical switches along side openhab to control the lights.
I don’t have any input on Wago I’m afraid.

Regards, S

@Seaside

the thought crossed my mind, but I went for the less expensive option, I now have 80 DI and 40 DO on the wago, to replace that with z-wave hardware would cost a lot, but still if I cant get it to work it would be a solution to switch to z-wave or something like it

@george.erhan

It would be good for me to understand OH better as I have some unique hardware I want to couple to the system, but that is for a later stage, I am reading the Wiki, but it is kinda hard to grasp the whole concept

Best regards,
Bram