Hue binding exceptions in OH3RC2

I have a problem using the HUE Emulation Binding on RC2

There seems something wrong with validating the Bridge-ID.
I left the Unique Bridge Id empty and restarted openhab. The new generated Bridge ID was:
“22:8B:26:97:C2:BD:D0:51” and the serialNumber is than: “22:8B:26:97:”.
I am not sure if the last ‘:’ is correct. In my log I can find the following stacktrace:

11:22:23.749 [ERROR] [ry.upnp.internal.UpnpDiscoveryService] - Participant 'org.openhab.binding.hue.internal.discovery.HueBridgeDiscoveryParticipant' threw an exception
        java.lang.IllegalArgumentException: ID segment '22:8B:26:97:' contains invalid characters. Each segment of the ID must match the pattern [\w-]*.
        at org.openhab.core.common.AbstractUID.validateSegment(AbstractUID.java:98) ~[bundleFile:?]
        at org.openhab.core.common.AbstractUID.<init>(AbstractUID.java:76) ~[bundleFile:?]
    at org.openhab.core.common.AbstractUID.<init>(AbstractUID.java:59) ~[bundleFile:?]
        at org.openhab.core.thing.UID.<init>(UID.java:57) ~[bundleFile:?]
            at org.openhab.core.thing.ThingUID.<init>(ThingUID.java:47) ~[bundleFile:?]
                at org.openhab.binding.hue.internal.discovery.HueBridgeDiscoveryParticipant.getThingUID(HueBridgeDiscoveryParticipant.java:80) ~[?:?]
                at org.openhab.binding.hue.internal.discovery.HueBridgeDiscoveryParticipant.createResult(HueBridgeDiscoveryParticipant.java:54) ~[?:?]
                at org.openhab.core.config.discovery.upnp.internal.UpnpDiscoveryService.remoteDeviceAdded(UpnpDiscoveryService.java:158) [bundleFile:?]
                at org.jupnp.registry.RemoteItems$1.run(RemoteItems.java:114) [bundleFile:?]
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
                at java.lang.Thread.run(Thread.java:834) [?:?]

I tried different manually values to get a valid id. but no chance.

BTW: It is not possible for me to find any item after scanning hue Items on alexa. But I am not sure, if this error is the reason, that it does not work.


description.xml

<root xmlns="urn:schemas-upnp-org:device-1-0">
    <specVersion>
        <major>1</major>
        <minor>0</minor>
    </specVersion>
    <URLBase>http://192.168.184.56:80/</URLBase>
    <device>
        <deviceType>urn:schemas-upnp-org:device:Basic:1</deviceType>
        <friendlyName>openHAB Hue Emulation (192.168.184.56)</friendlyName>
        <manufacturer>Royal Philips Electronics</manufacturer>
        <manufacturerURL>http://www.openhab.org</manufacturerURL>
        <modelDescription>Philips hue Personal Wireless Lighting</modelDescription>
        <modelName>Philips hue bridge 2015</modelName>
        <modelNumber>BSB002</modelNumber>
        <modelURL>http://www.meethue.com</modelURL>
        <serialNumber>22:8B:26:97:</serialNumber>
        <UDN>uuid:22:8B:26:97:C2:BD:D0:51</UDN>
        <gatewayName>openHAB</gatewayName>
        <presentationURL>index.html</presentationURL>
        <iconList>
            <icon>
                <mimetype>image/png</mimetype>
                <height>48</height>
                <width>48</width>
                <depth>24</depth>
                <url>hue_logo_0.png</url>
            </icon>
            <icon>
                <mimetype>image/png</mimetype>
                <height>120</height>
                <width>120</width>
                <depth>24</depth>
                <url>hue_logo_3.png</url>
            </icon>
        </iconList>
    </device>
</root>

That exception is coming from the Hue binding, so you are using both the Hue Emulator and the Hue binding?

IIRC the emulator is not supported any longer (might be wrong there).

Either way this is not specific to OH3RC hence I moved your post.

The change in the format of the serial number from the Hue Emulator is specific to OH 3.0 since it looks like my change in fixing up Alexa discovery has caused that.

That exception is coming from the Hue binding, so you are using both the Hue Emulator and the Hue binding?

Yes. I am using both bindings. The error comes up every time, I make a scan using alexa and directly on startup.

Same configuration worked on openhab 2.5. So I suspected, it is a OH 3 specific issue.

I’ve opened an issue for this

@mstormi
If the emulator is not supported any longer, Is there any alternative way, which should be used to be able to send commands to openhab using alexa?

the Alexa skill, of course

Hi,

If the Alexa skill is the solution, then I have to connect my OpenHAB smart home to a cloud service like myopenHAB - right?
That would be disappointing for me, as I try to use as little cloud services as possible (I know that Alexa itself is cloud based).

After moving to OH3 (fresh install) and Hue Emulation (neither 3.0 nor 3.1.jar from above) Alexa does not find my items, I believe it’s missing the “tags” like “switchable”, but I don’t know where/how to write those in the new UI. Into the “add metadata” field maybe! But which namespace/format to choose?
Thanks for advice and sorry for dropping a questions “after the solution”.

Greetings Eckart

Thank you very much.
Now I that I know how, I will tag my Items and then I will try to discover them in Alexa.
Hopefully this will work!

Thanks for your help and sorry I didn’t find that thread myself.

Eckart

Hi,

I am getting the (almost?) same error message in the log approximately every 2mins:

2021-01-17 18:48:42.998 [ERROR] [y.upnp.internal.UpnpDiscoveryService] - Participant ‘org.openhab.binding.hue.internal.discovery.HueBridgeDiscoveryParticipant’ threw an exception
java.lang.IllegalArgumentException: ID segment ‘8d:5b:66:09:’ contains invalid characters. Each segment of the ID must match the pattern [\w-]*.
at org.openhab.core.common.AbstractUID.validateSegment(AbstractUID.java:98) ~[bundleFile:?]
at org.openhab.core.common.AbstractUID.(AbstractUID.java:76) ~[bundleFile:?]
at org.openhab.core.common.AbstractUID.(AbstractUID.java:59) ~[bundleFile:?]
at org.openhab.core.thing.UID.(UID.java:57) ~[bundleFile:?]
at org.openhab.core.thing.ThingUID.(ThingUID.java:47) ~[bundleFile:?]
at org.openhab.binding.hue.internal.discovery.HueBridgeDiscoveryParticipant.getThingUID(HueBridgeDiscoveryParticipant.java:88) ~[?:?]
at org.openhab.binding.hue.internal.discovery.HueBridgeDiscoveryParticipant.createResult(HueBridgeDiscoveryParticipant.java:54) ~[?:?]
at org.openhab.core.config.discovery.upnp.internal.UpnpDiscoveryService.remoteDeviceAdded(UpnpDiscoveryService.java:158) [bundleFile:?]
at org.jupnp.registry.RemoteItems$1.run(RemoteItems.java:114) [bundleFile:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]

I did not (on purpose) installed Hueemulation. Just Hue 3.1.0.Snapshot

I am on Snapshot 3.1 . I am not sure what to do, to get rid of this error. Deinstall something? Reinstall the hue Binding?

Best regards
Stefan

Ok, I found the huemulation stuff under miscellaneous add-ons.
Did not remember that I installed it. Just uninstalled it (BTW: what is it for?) and the error disappeared.

Best regards
Stefan