[Hue Emulation] Items with Switchable tag are not discovered

I upgraded to snapshot 1445 last night in order to test the recent updates in hue emulation, but only Items tagged with Lighting are showing up. Anything tagged with Switchable is gone. Also, groups tagged with either are not discovered. I created an issue, but thought I’d check here too, just to make sure it’s not just me!

Groups items are not supported. They would if done correctly be exposed as hue groups as well.

You can configure which tags are being used for white lights, coloured lights and switchables. Just have a look at the configuration page of the service.

Hello, David! I was hoping you’d spot this. I had over 100 items discovered before the upgrade, and 39 after. None with Switchable were discovered. Found a ColorLighting though!

Do you mean are no longer supported? These Items were previously working. Edit: I read your comment in GH… so this was a breaking change :slightly_frowning_face:. If this is going into 2.4, then it should definitely be included in the release notes. I’ll need to rig up some items to temporarily replace the groups then.

You don’t have to use group items in OH, and if you do, you do it on purpose. The same with the HUE API. It distinguishes between lights and groups. Groups were just never implemented.

But switches really should work. They are exposed as Osram Plugs.

Also important is the item type. It needs to be a switch item and the tag needs to be “Switchable” (case sensitive).

I’m using the same .items files that were working with snapshot 1415. Can you confirm Switchable is working for you? In the testing I’ve done so far, I can’t get any items that are tagged as [“Switchable”] (or [ “Switchable” ]) discovered. I do see XML data for them at api/51OAUlu52SfkuXfmB7esYVn25Rk9YOEoIxXfSqGB/lights/:

on false
reachable true
type “On/Off plug-in unit”
modelid “Plug 01”
uniqueid “95357e6f-00a8-424c-8c38-ce40cf689716-40”
manufacturername “OSRAM”
swversion “66012040”
friendsOfHue true
hascolor false
name “Z-Wave Debugging”

I’m not clear on what you are saying about groups. They worked before #4216, and I need them to work. For example, I have sets of dimmer items in groups that I use to control lighting in a room. In the UIs, in automation, and when using Alexa, it is this one group Item that is being modified to adjust the lights. Here is an example of a group that controls all of my outside lights that I often use Alexa to turn off, and is not being discovered…

Group:Dimmer:MAX    gOutsideLight    "Outside Light [%d%%]"    <slider>    (gOutside,gOutside_Action,gLight)    ["Lighting"]

Yes switchables are working for me and for you also apparently. If the xml lists them, they have been recognised.
What exactly is your target device? Not every device understands Osram plugs of course, Alexa does.

The world sometimes feels strange, sure. But group items worked because of a bug, that bug is fixed. So it is not even a breaking change because the hue emulation never promised to support groups. That is what I’m trying to say.

And it is probably another day of coding to properly support groups, I do not have spare time at the moment :confused:

Grepping my items files for Switchable returns 39 instances, but none of them show up after discovery. I can clear everything and the Items with Lighting come back, but no Switchable. I have Echo Dots interacting with the Hue emulator.

I think of it differently… since it is existing functionality that is being removed, it will be a breaking change for anyone who is using groups with hueemulation. Personally, it is a show stopper for me, at least in my production setup, so I’ve put in an earlier hueemulation jar, and got my groups and switches back.

I’m sure your hands are full with MQTT… hopefully someone can pick this up before 2.4. Anyhow, thank you for the time you’ve put into this… it is very much appreciated! I can’t wait to be past this one.

@David_Graeff Thanks for all the work here! Nice to see progress here and I havent looked at the work on MQTT but assume you are owed a thanks there as well!

@5iver. Did the latest commit (PR 4324) solve the issue for you. Still no luck for me. I hate to give up and fall back to a prior release! I could move to Germany :smiley: - but what doesn’t work better in Germany?

Groups work with this latest commit:

As my Alexas find and control switchable items exposed as Osram plugs, I consider the OP of this topic to be solved as well. I have added a troubleshoot section to the readme though, for everyone to verify that at least the emulation does a correct job.

Cheers, David

@David_Graeff Giving it a shot.

Some sucess to report - lights are discovered now. No switchable items discovered (only tagged as Switchable) . Hue color bulb discovered as white non color.

Example /api/testuser/lights?debug=true output

Kitchen Desk Lamp Color: Extended color light
on: true, brightness: 254, hue: 8373, sat: 142, xy: {0.0 0.0 }, ct: 500, alert: none, effect: none, colormode: hs, reachable: true

Frontdoor Outside Light: On/Off plug-in unit
on: true, reachable: true

Perform the discovery multiple times from different Alexa’s and also from the web application at alexa.amazon.com.

Osram plugs are not recognized by all echo variants.

There was one hot fix that was applied just yesterday, hopefully that is in your current build as well already. But shouldn’t influence the actual search only switching the devices.

Can switch tags between Lighting and Switchable and moment its Lighting its discovered and then not after moved to Switchable. Repeated it a number of times. I havent looked at the code here closely but in looking at OSRAM - they are distinctly identified differently by country:

DE/FR/IT: Osram Smart Plug
US/CA: Sylvania Smart Plug

Can you point me to the Alexa doc that has the method for announcing a device and maybe I can be useful to either fork and write some code finally or at least understand why it is a moot point :wink:

That would explain why it doesn’t work for US guys, but for me as a German. Most people in forums say that not even coloured bulbs are recognised without a skill. I was fairly surprised that it actually worked for me.

This is the wet dream of every hue emulation developer :slight_smile: There are no such docs, this is purely reverse engineered, try and error.

I just upgraded to the 2.4 release version. Now my house “stopped working” - at least the Alexa control which we extensively use. I have a lot of Alexa devices (switchable on/off devices) used directly or in routines, those are now no longer recognized by Alexa. I can see them listed as OSRAM “On/Off plug” V1.04.12 in the Hue emulation /api/…/lights api.
I see that Alexa will recognize my items if I change them from switchable to lightning, which I guess will be my temporary solution.
And yeah, I’m on a US Amazon account. I know I’m repeating the issue at hand here, but given I’m on the 2.4 release version, I find it to be a pretty serious bug/limitation.

Is this issue tracked somewhere?

There is no solution yet. Someone with a real hue bridge need to find a wall plug that works in the US and is recognised by Alexa.

But it used to work well? What about the 2.3 version?