Dash Button and Intertechno

Hi all,
I´d like to turn on/off a lamp with an intertechno switch and an amazon dash Button…

I set up a rule like this one:

rule "DashButton_Somat"
when
Channel "amazondashbutton:dashbutton:ac-63-be-0a-8b-38:press" triggered
then
if (Schrank_Kueche1.state=="OFF") {
Schrank_Kueche1.sendCommand(ON)
} else {
Schrank_Kueche1.sendCommand(OFF)
}
end

The problem like always with intertechno is, that openhab doesn´t know if intertechno is ON or OFF.
How can it manage to turn the lights on or off with an amazon dash button?

There is no way to make this work if OH doesn’t know if the intertechno light is actually ON or OFF. It can only operate on the states that it knows as your rule is currently written. You either need to find some way to determine the true state of the light (lux sensor perhaps) or live with OH occasionally getting out of sync.

it´s not that getting out of sync. I´d like to have a rule which switches on and off …the one i posted only switches off

That is exactly what that rule you posted does. If Schrank_Kueche1 is in the OFF state it will send it the ON command.

If it is only turning the light OFF it is because the Schrank_Kueche1 Item is never becoming OFF.

and how can i manage that the rule is executed like pressing a button - sending on and off?

I don’t understand the question. Are you saying the rule triggers twice when you press the dash button once?

Beyond that, it already does work that way. When you press the dash button it toggles Schrank_Kueche1 (i.e. if it was ON it sends it an OFF command, if it was OFF it sends it an ON command).

that´s what it should do but it always sends OFF not ON.
I wanted it to behave like a switch - not checking if the state of Schrank_Kueche is on or off.

Then like I said before, “If it is only turning the light OFF it is because the Schrank_Kueche1 Item is never becoming OFF.” There is something else wrong. The Rule as written is correct. You have some other problem. You need to figure out why Schrank_Kueche1 is always in the ON state.

Either the Rule is being triggered twice when the Dash button is pressed, or the binding is setting the Item back to ON after it receives the OFF command or something else is going on.

Look at events.log and watch the Channel and Schrank_Kueche1 changing state.

Add logging to the Rule to see when it triggers.

Now tried it with hue. Intertechno doesn´t have a channel telling openhab if it´s on or off…but same here…i have no solution anymore.

2018-04-10 18:16:51.963 [vent.ChannelTriggeredEvent] - amazondashbutton:dashbutton:57c36508:press triggered 
2018-04-10 18:16:51.985 [ome.event.ItemCommandEvent] - Item 'Lampe_Balkon_Dimmer' received command ON
2018-04-10 18:17:04.273 [vent.ChannelTriggeredEvent] - amazondashbutton:dashbutton:57c36508:press triggered 
2018-04-10 18:17:04.297 [ome.event.ItemCommandEvent] - Item 'Lampe_Balkon_Dimmer' received command ON
2018-04-10 18:17:34.372 [vent.ChannelTriggeredEvent] - amazondashbutton:dashbutton:57c36508:press triggered 
2018-04-10 18:17:34.394 [ome.event.ItemCommandEvent] - Item 'Lampe_Balkon_Dimmer' received command ON
2018-04-10 18:17:55.162 [vent.ChannelTriggeredEvent] - amazondashbutton:dashbutton:57c36508:press triggered 
2018-04-10 18:17:55.183 [ome.event.ItemCommandEvent] - Item 'Lampe_Balkon_Dimmer' received command ON
2018-04-10 18:18:04.382 [vent.ChannelTriggeredEvent] - amazondashbutton:dashbutton:57c36508:press triggered 
2018-04-10 18:18:04.410 [ome.event.ItemCommandEvent] - Item 'Lampe_Balkon_Dimmer' received command ON
2018-04-10 18:18:20.203 [vent.ChannelTriggeredEvent] - amazondashbutton:dashbutton:57c36508:press triggered 
2018-04-10 18:18:20.225 [ome.event.ItemCommandEvent] - Item 'Lampe_Balkon_Dimmer' received command ON
2018-04-10 18:18:26.263 [vent.ChannelTriggeredEvent] - amazondashbutton:dashbutton:57c36508:press triggered 
2018-04-10 18:18:26.287 [ome.event.ItemCommandEvent] - Item 'Lampe_Balkon_Dimmer' received command ON
2018-04-10 18:18:34.362 [vent.ChannelTriggeredEvent] - amazondashbutton:dashbutton:57c36508:press triggered 
2018-04-10 18:18:34.387 [ome.event.ItemCommandEvent] - Item 'Lampe_Balkon_Dimmer' received command ON
2018-04-10 18:18:40.842 [vent.ChannelTriggeredEvent] - amazondashbutton:dashbutton:57c36508:press triggered 
2018-04-10 18:18:40.866 [ome.event.ItemCommandEvent] - Item 'Lampe_Balkon_Dimmer' received command ON

Switch Lampe_Balkon_Switch "Lampe Balkon" {channel="hue:0220:00178823b47e:6:color"}
Dimmer Lampe_Balkon_Dimmer "Lampe Balkon" {channel="hue:0220:00178823b47e:6:color"}
Color Lampe_Balkon_Color  "Lampe Balkon" {channel="hue:0220:00178823b47e:6:color"}

rule "Dash button pressed"
when
    Channel "amazondashbutton:dashbutton:57c36508:press" triggered
then
    if (Lampe_Balkon_Dimmer.state == ON) {
        Lampe_Balkon_Dimmer.sendCommand(OFF)
        } else {
        Lampe_Balkon_Dimmer.sendCommand(ON)
        }
end

Continuing the discussion from Dash Button and Intertechno:

Can this log entry be ignored?

2018-10-30 00:27:24.137 [WARN ] [echno.internal.CULIntertechnoBinding] - The address parameter is deprecated! Please use just commandOn and commandOff.

2018-10-30 00:27:24.140 [WARN ] [echno.internal.CULIntertechnoBinding] - type=raw;commandOn=000000000FFF;commandOff=000000000FF0