[SOLVED] "Stateless" switch with hue binding and alexa on 2.4

exec
binding
alexa
Tags: #<Tag:0x00007fe066229248> #<Tag:0x00007fe0662290e0> #<Tag:0x00007fe066228f78>

(Thorsten) #1

Hi,

I have upgraded from 2.3 to 2.4 and after some troubles managed to get the Hue binding to work with Alexa again (using „Lighting“ instead of „Switchable“ - Switchable simply did not work at all).
I am using cheap 433 MHz switches that I switch on and off using a script launched by the old 1.x exec binding OR a 433MHz remote.
The switches do not provide any information on their ON/OFF State.

What changed since the upgrade/reconfiguration is that I cannot switch an item that has been switched „externally“ before (i.e. Using a 433MHz remote completely separately from OpenHab)

So turning on and off using Openhab and Alexa works fine, as long as I do not use the remote (which I sometimes need to do).
When an item is actually on but Openhab thinks it is off, it doesn‘t launch the off script when I tell Alexa to turn it off. I need to tell Alexa to turn on „again“ and then I can turn it off. (Or vice versa)
This has changed from previous behaviour, where it just fired the script regardless of Openhab state.

Is this a known phenomenon? Maybe intentional?
May this be due to the new Hue binding, due to the change to „Lighting“ or is it changed behaviour in OpenHab?
Is there any idea for a workaround? Maybe a simple rule?

Thanks for any hint!

Regards, Thorsten


(Vincent Regaud) #2

That’s normal


(Thorsten) #3

Well, it wasn‘t before. The exec binding fired my script regardless of state.


(Thorsten) #4

I now tried to find a workaround by using rules. Unfortunately there seems to be no event to catch, at least there is none in the event log and also trial and error didn’t help.
I then tried to update the state to NULL using a rule, but it didn’t work either. The state changed to NULL but there was no switching.
So I still have no clue how to turn off a light using a single Alexa command when that light is actually on but Openhab thinks it’'s off.
:frowning:


(Reinhard Eidelsburger) #5

Hi,

I have the same problem after updating vom openHAB 2.3 to 2.4.
Is there any workaround or solution for the problem?

I have also made some tests with rules and the event is also not fired in my installation.

My scenario:

  • Activate one light with a physical device (KNX)
  • Activate a second light with a physical device (KNX)
  • Deactivate both devices with an Alexa-command + a rule (this work in 2.3 und doesn’t work in 2.4)

Thanks,
Reinhard


(Mike Major) #6

The solution is to use the 2.5 SNAPSHOT version of the binding which has resolved this issue. You should be able to add the jar file to the addons folder without having to upgrade the rest of OH.


Alexa cannot find any devices anymore with the HueEmulation Service
(Reinhard Eidelsburger) #7

Hi Mike,

where can I download the 2.5 SNAPSHOT? Sorry, I didn’t find the link :frowning:

Best regards,
Reinhard


(Mike Major) #8

org.openhab.io.hueemulation-2.5.0-SNAPSHOT.jar


(Thorsten) #9

Thanks a lot, this worked like a charm!
Uninstalled the 2.4 binding, put the Snapshot version in the addons folder, checked config with PaperUI and now I can turn off/on as I like!


(Reinhard Eidelsburger) #10

Works also for me in openHAB 2.4. Thank you!