IKEA Buttons with CONBEE (deCONZ) ON OFF doesnt work

Hey there,

I am using a CONBEE2 and 2 Ikea devices.

  1. Ikea remote control for the kitchen light
  2. the device which is connected to all lights and the remote control

I added both devices with my conbee.
I also configured both, so the remote control is working with the lights over my gateway.

My Problem is, that I can’t switch to on and off with Openhab.
Both devices are correctly discovered in Openhab.

I am only able to set the dimmer for the kitchen light
so the workaround would be setting dimmer to 0 = off and 100 = on
but that’s not the correct way I think…

I tried the remote control which is linked to the lights with normale commands ON/OFF (switch) and as Setpoint which also doesn’t work for the remote control (but works when I directly communicate to the second device) the same effect…

  1. the item (button event) are also receiving the commands ON-OFF and 0, 1, 2, 3… but nothing happen
    I think that’s because the button event can only trigger in a rule ->Button Event on Tradfri remote not working with new deconz binding
    in this topic, the on-off seems to work and can be triggered with the trigger channel

  2. the “button” can’t handle a switch, any ideas on how to use it?

2020-10-25 01:12:44.314 [WARN ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at ‘items/Fernbedienung’ with an invalid status value ‘OFF’.
2020-10-25 01:12:46.235 [WARN ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at ‘items/Fernbedienung’ with an invalid status value ‘ON’.

I tried the button and button trigger.
I created the .item as Number, Switch, Dimmer

  1. which basically works… but I am not sure if there is a difference between ON-OFF and 0-100 (safety…) I don’t know how the IKEA driver handles this

when I don’t find a solution… well then I must buy the IKEA gateway and use the binding for it :smiley:

BUT when I manually turn on / off the lights via the remote control I can see which items are used.

2020-10-25 01:43:57.979 [vent.ChannelTriggeredEvent] - deconz:switch:homeserver:14b457fffe77df1e011000:buttonevent triggered 1002
2020-10-25 01:43:58.020 [vent.ItemStateChangedEvent] - Date changed from 2020-10-25T01:43:40.646+0200 to 2020-10-25T01:43:57.970+0200
2020-10-25 01:43:58.024 [vent.ItemStateChangedEvent] - Ikea changed from 0 to 100

so on and off doesn’t exist or my items are wrong…
but for what is the channel “button”…

I hope someone can explain :slight_smile:

well I can see, that my item which is linked to the “Button” receiving some numbers

ON / OFF via remote -> triggers 1002
Dim to 1 via remote -> triggers 3001
Dim to 62 via remote -> triggers 3003

i tried to trigger it with Setpoint and the Values but nothing happend.
I also tried it in a little rule

rule “IKEA”
when
Item Event changed
then
logInfo(“Thermostat.rules”, “einschalten”)
Even.sendCommand(1002)
end

but… also didnt work… hmm maybe i am just to stupid to understand how to trigger those numbers for on off :slight_smile:

i think i found a solution…

the thing shows up as a dimmer and :brightness
well… i tried something like this

Switch Ikea “Helligkeit Küchenbeleuchtung” {channel=“deconz:dimmablelight:homeserver:d0cf5efffeda756e01:switch”}

and i dont know why, the lamps are reaction on this switch and openhab is receiving the state ON and OFF
I am not sure if this is a great solution… it seems like try and error and lucky that it workes why it should not work… am i right ?

As the channel identifies itself as a Dimmer type, is there some reason you chose not to link it to a Dimmer type Item? It’s not going to work very well otherwise.

well, that’s my main problem as u can see before.
It’s just a workaround that randomly works.

I know that it is a dimmer and also detected.

My problem is that I cant turn on and off with the remote control item.
So the workaround would be setting the brightness to 0 for OFF and 100 for ON
This seems me not ver safe, cause I don’t know if the ikea device is “OFF” when i set it to 0 or is there still current left…
So my main goal was to get an ON and OFF control which basically should work over the Button Item.

Cause all of my trys were not working, this was my workaround to try and error with the dimmer item…

i am open for ideas how to get the button to work…i found out, that the button doesnt work like ON OFF hes sending some remote codes as u can read above.
I was able to send this commands but the unfornutately the button doesnt react do this…

If you set stuff up incorrectly, it’s not going to work very well.
Let’s use our heads and sort out one part at a time.
You shouldn’t be fiddling with a dimmer to try and make it match a remote control. Let’s set the dimmer up properly.

The deconz binding offers you a Dimmer type channel.
Link that to a Dimmer type Item only.
Perhaps you have not realized that Dimmer types in openHAB support ON/OFF commands as well as 75% etc.

Put that Item on your UI with a slider, and also separately put it on your UI with a switch. Demonstrate to yourself that you can do on/off and dimming controls.
Then leave it alone, and we’ll turn attention to your remote.

Yes, the button could be used for anything - sound system volume, opening gates. It’s up to you to decide what different clicks represent, and so how and what they should affect in openHAB. There is no particular meaning built in.
We’ll probably end up doing that with rules.

Okay, I didnt know that a dimmer can handel ON OFF too.

So that changes the situation a bit.
I created now 2 items.

  1. for dimmer
  2. (still dimmer) as switch on my sitemap

This works great, also with Alexa Voice Control.

When i understand it right, i cant control the Remote Control channels.
I can just react on the values with a rule.
So when the buttonevent 1002 is triggerd then do “XXX” like this ?

But anyways the first solution works for me when i control the dimmer as Setpoint and Switch from the Sitemap.

Only one interpretation error still present.
The switch item expects ON/OFF the sitemap will display ERROR… i think its because he expect percentage
Is there a workaround ?
grafik

Nope. I meant to create one Item of Dimmer type and link it to your dimmer channel.
You may show the same Item on a sitemap in a number of different ways at the same time, including showing a Dimmer type Item as a Switch widget.

As I said, lets get the dimmer right before messing with remote.

Okay lets do it :slight_smile:
yep, I deleted all and created just one Item for the dimmer.
I displayed it as a switch and as a setpoint on my sitemap.

.item
Dimmer IkeaKuechenbeleuchtung “Küchenbeleuchtung” (IKEA) [“Lighting”] {channel=“deconz:dimmablelight:homeserver:d0cf5efffeda756e01:brightness”}

sitemap
Switch icon=light item=IkeaKuechenbeleuchtung
Setpoint icon=light item=IkeaKuechenbeleuchtung minValue=0 maxValue=100 step=25

It’s doing well, I can dim and turn it on and off
only the switch slider is not doing very well, he’s randomly switching to on and off … sometimes at 50% at 100% to ON

Greetings

I don’t know what that means really.
The switch widget should really show ON for any value 1-100, and OFF for 0.
Maybe your UI does not update very well.

yep its cause the ui doesnt update well.
But it works fine

If you look in your openhab.log at the time your sitemap file loads, there may be a clue as to a reason for that.

Alright, so your remote then.

The important stuff you posted up front, that’s good -
ikea
I have no idea how your remote works, but we can find out.

There is an event (trigger) channel. You can’t link that to an Item directly, as it a passing event in an instant, not a static state. But you can use it to trigger rules.

// a skeleton rule to examine behaviour
rule “IKEA events”
when
       Channel "deconz:switch:homeserver:14b457fffe77df1e011000:buttonevent" triggered
then
      // receievedEvent is an implicit variable with the code in
   logInfo(“ikea test”, “IKEA button event” + receivedEvent.getEvent())
end

You’d be expecting your codes like 1002 etc, and you can work out what poking makes what code, so later on you can choose what you’d like to happen.

There is also a regular Number channel, which you can (and have) linked to an Item. I don’t know how that works - does it post a code for last button pressed? Does it change when the button is un-pressed? What happens if you press the same button twice? You can work that out from your events.logs. It might be less useful than the event/trigger channel.

the openhab.log seems to be good, today the sitemap is working well again… dunno changed nothing… maybe Browser problems… (chrome)

so the button event is just a trigger channel as I expected can be only used in a rule to react to the events.
I found out, by pressing the buttons which event gets triggered via the events.logs

but actually, I don’t have a useful usage for this at the moment.
That the dimmer can be used for ON and OFF fixed nearly everything actually :upside_down_face:

also i dont need to control the :button because of the dimmer item who can handel on/off too… :slight_smile:

Hello,

Just to add an information :

I have a Tradfri Outlet AND 5 Lights bulb (no color).

I tried your solution, but when I touch the “On/off” button on my smartphone, the lights AND the outlet turns OFF or ON ^^’

My sitemap seems to be correct :

    Frame label="Salle à manger" {
        Slider item=gSAMlight label="Salle à manger [%d %%]"
        Switch item=gSAMlight label="On/Off" icon=light
        Setpoint item=gSAMlight minValue=0 maxValue=100 step=25 icon=light
        Switch item=OutletSAM label="Prise" icon="poweroutlet"