Amazon Alexa not detecting Hue devices via Hubitat skill

Hello,

I've been a Hubitat C-7 for 3 years to control my 100+ Hue bulbs via two Hue hubs.

The database on my C-7 recently became corrupted and I had no backup so I had to reset and start again.

I've installed platform version 2.3.6.144 and re-added my two Hue Hubs via two separate Hue Bridge Integrations. I have discovered all of the bulbs and groups from each Hue Hub and they appear in the Hue Bridge Integration app, however I have two issues:

  1. The bulbs and groups from only one of the Hue Hubs appear in the Hubitat devies list, not bulbs and groups from the second Hue Hub

  2. The Alex app is failing to discover the device. I have removed the Amazon Echo Skill from the Hubitat, then from my iPhone/iPad opened the Alexa app, then added the Hubitat Skill, signed in to my Hubitat account, selected my Hubitat Hub name, Selected All Devices, pressed Authorize, Account linking in progress - unable to link the skill at this time.
    I've tried numerous times, sometimes it is successful but then fails to detect any devices.

My Hubitat iOS app is able to control my devices when disconnected from my wifi so I assume I'm connected to the Hubitat Cloud.

I've tried rebooting the hub, removing the skills, removing the Hue Bridge Integration App, updating the Hub, removing the skill from the Alex app and now I'm out of ideas.

All help gratefully received.

Note that the Diagnostic Tool offers the ability to download backups if you can't access the regular hub interface. Of course, if you've disabled backups or deleted them, that won't help. :slight_smile:

This is odd--I assume they are selected as devices to add in their respective Hue Bridge Integration app? Any errors in Logs related to this, especially around the time you navigate away from the device selection page in the app or hit Done? Any filters/search terms in your Devices list that might just prevent you from seeing the devices? One way to rule that out: if you go to the App Status page for the problematic integration, are there any entries listed under the "Child Devices" heading?

If they are on Hubitat but not successfully adding to Alexa via Hubitat, make sure that the Exclude Hubitat-integrated Hue devices option is not enabled in the Echo Skill app in Hubitat.

I hadn't checked the logs, but yes, here are the errors which look related:

app:142023-10-15 09:37:39.538 PMerrorjava.lang.IllegalArgumentException: A device with the same device network ID exists, Please use a different DNI on line 568 (method updated)

app:182023-10-15 09:31:32.975 PMerrorError making Call to Alexa message gateway: {"header":{"namespace":"System","name":"Exception","messageId":"9967fc07-0494-4082-b244-c793b4bfaf4d"},"payload":{"code":"INVALID_ACCESS_TOKEN_EXCEPTION","description":"Access token is not valid."}}

app:182023-10-15 09:31:30.634 PMerrorError making Call to refresh Token: [error_description:The request is missing a required parameter : refresh_token, error:invalid_request]

2023-06-21 09:29:41.005 AMerrorError making Call to Alexa message gateway: {"header":{"namespace":"System","name":"Exception","messageId":"9f1ef8ae-683c-4b2d-b812-9477baee5c4a"},"payload":{"code":"INVALID_REQUEST_EXCEPTION","description":"com.amazon.iota.container.exception.NoCorrelationSessionFound: No active session found for correlation token : SUdTVEs6AAE6AAg6eyJpZCI6IjU1MDAwYWYyLWY2NTEtNDAxNy04MDYzLTVkZjhhNzZkNWI3NSIsInVyaSI6Imh0dHBzOi8vZC1hY3JzLWV1LXAtNWMyLTc2ZDUwMGM5LmV1LXdlc3QtMS5hbWF6b24uY29tOjk0NDQiLCJzZXNzaW9uSWQiOiIxNTMyMmM2ZC0yMzI1LTQ1NDgtYmU3MC0wYzliOGY2MDA3MTcifQ=="}}

This doesn't look right, the bulbs are not showing under "Previously added Hue Lights"

This is the problem. It can't create the devices. This really shouldn't happen since they are prefixed with the app ID (plus the device ID from Hue), which should basically make them unique on your hub, yet that is what it's complaining about.

I'd start by finding any devices with a DNI that match your app ID, e.g., 123/45, where 123 is the app ID of your Hue integration (visible in the URL). If they aren't in use by anything (check the device detail page!), try removing them and trying the app again. Or if the app hasn't worked for you at all so far, you could remove it and create a new one (will get you a new app ID, at least).

Go into the Amazon Echo Skill app from with the HE apps list.
Make sure this setting is disabled:
image

Thank you for all of the suggestions and ideas.

After a lot of trial and error (and tediously removing bulbs from the Alex app), I've finally resolved my main issues and now have all 128 bulbs across two Hue hubs connected to my Hubitat and to Alexa.

I think the main issue that I stumbled across what that I was logged into my Alexa app using a different Amazon account which was confusing things. All my fault!

I'm now having a different issue capturing Hue scenes for one of my rooms. I can capture scenes from other rooms on both hubs with no problem, but when I try and capture a scene in the Bedroom in exactly the same way as I do for other room/scene combinations I press the Captue Scene button, get a spinning wheel in top right next to my home name and then 'Not Captured' in red at the top of the page.

I've checked the log and have many of these messages which appear to correspond with the capture attempt:

2023-10-18 06:55:36.187 PMerrororg.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'null' with class 'null' to class 'float'. Try 'java.lang.Float' instead on line 1014 (method appButtonHandler)

A screenshot of the log would be better. Need to see if it is an app or driver throwing that error, and then you need to click on the red error text if its a device to open the device and see what driver/type it is using.

The following screenshot is the log from the time I attempted to clicked 'Capture Scene' on my 'Relax in Bedroom' scene. It is very odd as I can capture scenes in other rooms with no problem.

This second screenshot shows another error in my log from earlier in case this is relevant.

Thanks in advance!

You are probably missing some attribute for that device. Run a "Set Color Temperature" and a "Set Color" on it in any order with any (valid) value, which should populate everything Groups and Scenes cares about. Then set it to what you really want (preferably via Hubitat--you'll run into polling at best and lack of color conversion at worst) and try capturing again.

Thank you, that sorted it