Looking for Wisdom on OH 2.4 to 3.0.2 w/Hue Emulation and Alexa

Hello Everyone.

In the process of moving from openHAB 2.4 to openHAB 3.0.2.

My primary use has been to control a number of insteon switches and dimmers.

To help mitigate downtime I purchased a second B3+ and have installed openHAB 3.0.2

Installed INSTEON, Hue Emulation, NGINX and Astro add-ons.

Setup THINGS and ITEMS and “Grouped” some ITEMS in the UI.

Can turn lights on and off from the UI.

At this point I believe I am ready to set up Hue Emulation w/ Alexa.

Is it required to delete all of my discovered devices in the Alexa app?

I am hesitant to proceed due to worries that I might not get it working and may be unable able to rediscover the devices.

Any guidance would be most appreciated.

I constantly set up new versions (never upgrade). My things/items are in text files and Alexa just carried on…

The only thing I have to do is re-authenticate.

If your starting fresh with ui items though and different id’s (ItemName) then maybe

Hi and sorry for the delayed reply.

I was sort of a set-it-and-forget-it on my initial install.

What are you referring to? I am not using the openhab cloud.

Going from 2.4 to 3.0.2 there seems to be some significant changes. The Insteon PLM binding has been replaced and file structure seems to be different for it items.

It would be great to not have to redo the Alexa rediscovery.

Any pointers would be most appreciated.

Having openHAB w/ Alexa controlling the lights has been very helpful for my wife who has suffered a head trauma.

Make sure you have read the documentation around setting up nginx to get the Alexa pairing process to work as this is now required for OH 3.

I’d suggest not deleting any existing devices and just expose one device to confirm that it works. If your devices are named the same as your 2.4 setup you will end up with a duplicate. You might have to disable the 2.4 duplicate (in the Alexa app) to prevent Alexa complaining about there being multiple devices.

Hello Mike

I must have gotten hit twice with the stupid stick this morning.

For some reason this seemed much easier the first time around.

I believe I have NGIX configured correctly, can you verify?

server {
  listen 80;

server_name                                 IP OF Pi;

  location / {
    proxy_pass                              http://localhost:8080/;
    proxy_set_header Host                   $http_host;
    proxy_set_header X-Real-IP              $remote_addr;
    proxy_set_header X-Forwarded-For        $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto      $scheme;
  }

  location /api {
    proxy_pass http://localhost:8080/api/;
    }
}

What is my next step?

Power down the Pi running 2.4
detach the PLM
attach PLM to Pi running 3.0,
reboot Pi running 3.0

How do I associate the Pi running 3.0 to Alexa?

How do I do this?

Yes they are named the same.

Sorry for all of the remedial level questions.

Still looking for some assistance with this.

Have read so many post that I am more confused now then when I started.

“Renamed” (converted to capital letters) all my things (dimmers & switches) in OH3. In the Alexa app using OH2 all things were all lower case.

Without deleting any devices from Alexa I attempted to DISCOVER the devices using the new Pi running OH3.

Alexa did not find anything.

Not sure if I need to delete an item or all items from Alexa first before trying to do a test DISCOVER.

Was trying to accomplish what @MikeJMajor suggested but have not been successful.

Looking at the /api/status page (see below) wondering…

…why there are 0 published lights but seems to consider them as sensors.

…why UpnP discovery test service not registered

…why when I click on http://192.168.xxx.xxx:80/api/testuser/sensors that the only thing I see is the following: (in and out of pairing mode)

[{"error":{"address":"testuser/sensors","description":"Not Authorized","type":1}}]```

Below is the API STATUS page output.



Self test

To access any links you need be in pairing mode!

Pairing mode: On (V1) Enable | Enable with bridge V1 emulation

0 published lights (see http://192.168.xxx.xxx:80/api/testuser/lights)
14 published sensors (see http://192.168.xxx.xxx:80/api/testuser/sensors)
UPnP discovery test

service not registered

serial no	name
xx:xx:xx:xx:	openHAB Hue Emulation (192.168.xxx.xxx)
Reachability test

URL	Responds?	Ours?
http://192.168.xxx.xxx:80/description.xml	yes	yes
http://192.168.xxx.xxx/description.xml	yes	yes
Users

03d9623a-6ab2-....

Have you added the relevant tags to your lights?

@MikeJMajor in /etc/openhab/items/insteon.items I have things like the following:

Switch garagedoorlight "Garage Door Light" { channel="insteon:device:1xxxxxxxx:xxxxxxE:switch" }

FYI: Status: OFFLINE I plugged the PLM back into the Pi running 2.4

 

Screen Shot 2021-05-12 at 3.01.47 PM

 

Your item doesn’t appear to have any tags.

E.g. from the Hue Emulation documentation:

Switch TestSwitch "Kitchen Switch" [ "Switchable" ] {channel="..."}

OKAY. Don’t know how I missed that.

Added [ “Switchable” ] and [ “Lighting” ] to /etc/openhab/items/insteon.items

Now I have items like:

Switch garagedoorlight "Garage Door Light" [ "Switchable" ] { channel="insteon:device:1xxxxxxxxxxxx:xxxxxxxxE:switch" }

Anything else I need to check or change?

From the API STATUS page clicking either of the following two links

13 published lights (see http://192.xxx.xxx.xxx:80/api/testuser/lights)
14 published sensors (see http://192.xxx.xxx.xxx:80/api/testuser/sensors)

produce the same following results.

[{"error":{"address":"testuser/lights","description":"Not Authorized","type":1}}]

Should I not be seeing a list of the switches and dimmers???

Did you enable pairing mode before accessing the status page?

From the API status page check the list of users at the bottom, if it doesn’t include testuser then you need to enable pairing and try again.

@MikeJMajor Had been using the following to enable but apparently that did not work.

To access any links you need be in pairing mode!

Pairing mode: Off (V2) Enable | Enable with bridge V1 emulation

Went to the UI and enabled: Device Pairing, Add Unknown User-keys, Temporarily Emulate V1 and clicked SAVE.

Clicking on published lights now produces the following results.

(excerpt)

"05":{"state":{"bri":1,"ct":500,"on":false,"reachable":true,"mode":"homeautomation","alert":"none"},"type":"Color temperature light","modelid":"LTW001","uniqueid":"XX:XX:XX:XX:XX:XX:XX:XX-05","manufacturername":"Philips","swversion":"66012040","friendsOfHue":true,"colorGamut":"2200K-6500K","hascolor":false,"name":"Garage Door Light","config":{"archetype":"classicbulb","function":"functional","direction":"omnidirectional"},"capabilities":{"certified":true,"streaming":{"renderer":false,"proxy":false},"control":{}}},

Does that look correct?

Should I attempt to discover, before deleting, via Alexa.amazon.com now?

@MikeJMajor Success. Before heading off to work I gave it another try with Alexa.amazon.com and was able to discover all of the devices. :grinning:

BIG THANKS for your assistance.

another related question how to I discover a GROUP of switches/lights?

And if I run DISCOVERY again will it make duplicates or just add the new items?

I read the following:

It is important to note that you are exposing Items not Things or Channels. 
Only Color, Dimmer, Rollershutter, Switch and Group type Items are supported. 
Group type items require the "Huelight" tag to be exposed as devices instead of Groups.

Not sure what to change or where. See screenshot.

Running discovery again should just find new items.

I have never used groups with the Hue Emulation, so I can’t help with that.