Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't connect with alexa (local connection needed) #374

Closed
andrelung opened this issue Dec 25, 2022 · 7 comments
Closed

Can't connect with alexa (local connection needed) #374

andrelung opened this issue Dec 25, 2022 · 7 comments
Labels
bug Something isn't working stale

Comments

@andrelung
Copy link

Describe the bug
I can't link hass-emulated-hue to alexa. It somehow gets detected, but the link is not established.

Steps to Reproduce

  1. Install Emulated HUE (dev) as add-on
  2. Verify "master" tag is selected
  3. Let alexa search for devices (either via voice or via app)
  4. See first request to enable link mode
  5. Click on "Enable link mode" which looks succesfull
  6. See second request to enable link mode
  7. ...repeat 4 times in total...
  8. Receive a message that alexa was not able to find new devices (attached as screenshot in german)

IMG_B66E84D3101A-1

Expected behavior
Alexa is able to find all exposed devices.

Logs
Config-Endpoint: http://192.168.178.15/api/config

{
  "datastoreversion": "113",
  "swversion": "1953188020",
  "apiversion": "1.48.0",
  "modelid": "BSB002",
  "factorynew": false,
  "replacesbridgeid": null,
  "starterkitid": "",
  "name": "Hass Emulated Hue",
  "mac": "b8:27:eb:70:2e:ef",
  "bridgeid": "B827EBFFFE702EEF"
}

Logs: https://myhome.duckdns.org/hassio/addon/7c966942_emulated_hue_dev/logs

2022-12-25 15:42:32,176 DEBUG emulated_hue.apiv1 -- [192.168.178.51] GET /description.xml
2022-12-25 15:42:32,207 DEBUG emulated_hue.apiv1 -- [192.168.178.51] POST /api
2022-12-25 15:42:32,209 DEBUG emulated_hue.apiv1 -- {"devicetype": "Echo"}
2022-12-25 15:42:32,210 INFO  emulated_hue.controllers.config -- Link request detected - Use the Homeassistant frontend to confirm this link request.
2022-12-25 15:42:32,274 DEBUG emulated_hue.apiv1 -- [192.168.178.51] POST /api
2022-12-25 15:42:32,276 DEBUG emulated_hue.apiv1 -- {"devicetype": "Echo"}
2022-12-25 15:42:36,647 DEBUG emulated_hue.apiv1 -- [192.168.178.82] GET /link/LrhxJUhQARXSLFDjKQ3UUtPr6gjzJNRG
2022-12-25 15:42:36,648 INFO  emulated_hue.controllers.config -- Link mode is enabled for the next 5 minutes.
2022-12-25 15:42:37,311 DEBUG emulated_hue.apiv1 -- [192.168.178.51] POST /api
2022-12-25 15:42:37,313 DEBUG emulated_hue.apiv1 -- {"devicetype": "Echo"}
2022-12-25 15:42:37,314 INFO  emulated_hue.apiv1 -- Client Echo registered
2022-12-25 15:42:37,315 INFO  emulated_hue.controllers.config -- Link mode is disabled.
2022-12-25 15:42:37,336 DEBUG emulated_hue.apiv1 -- [192.168.178.51] GET /api/gxX-FQyVzurlxoLhMbJADzQMGqFS7HosWrYz8iqg/lights
2022-12-25 15:42:42,372 DEBUG emulated_hue.apiv1 -- [192.168.178.51] POST /api
2022-12-25 15:42:42,375 DEBUG emulated_hue.apiv1 -- {"devicetype": "Echo"}
2022-12-25 15:42:42,376 INFO  emulated_hue.controllers.config -- Link request detected - Use the Homeassistant frontend to confirm this link request.
2022-12-25 15:42:47,431 DEBUG emulated_hue.apiv1 -- [192.168.178.51] POST /api
2022-12-25 15:42:47,434 DEBUG emulated_hue.apiv1 -- {"devicetype": "Echo"}
2022-12-25 15:42:47,667 DEBUG emulated_hue.apiv1 -- [192.168.178.82] GET /link/RzcOWQ6ahivCXiSqJdOwgmfxIjabq2Rx
2022-12-25 15:42:47,669 INFO  emulated_hue.controllers.config -- Link mode is enabled for the next 5 minutes.
2022-12-25 15:42:52,461 DEBUG emulated_hue.apiv1 -- [192.168.178.51] POST /api
2022-12-25 15:42:52,463 DEBUG emulated_hue.apiv1 -- {"devicetype": "Echo"}
2022-12-25 15:42:52,464 INFO  emulated_hue.apiv1 -- Client Echo registered
2022-12-25 15:42:52,465 INFO  emulated_hue.controllers.config -- Link mode is disabled.
2022-12-25 15:42:52,486 DEBUG emulated_hue.apiv1 -- [192.168.178.51] GET /api/gxX-FQyVzurlxoLhMbJADzQMGqFS7HosWrYz8iqg/lights
2022-12-25 15:42:57,514 DEBUG emulated_hue.apiv1 -- [192.168.178.51] POST /api
2022-12-25 15:42:57,517 DEBUG emulated_hue.apiv1 -- {"devicetype": "Echo"}
2022-12-25 15:42:57,518 INFO  emulated_hue.controllers.config -- Link request detected - Use the Homeassistant frontend to confirm this link request.
2022-12-25 15:42:58,869 DEBUG emulated_hue.apiv1 -- [192.168.178.82] GET /link/fxhp1mKnpvPg404Q5FJOUrK-zLm23z0F
2022-12-25 15:42:58,870 INFO  emulated_hue.controllers.config -- Link mode is enabled for the next 5 minutes.
2022-12-25 15:43:02,578 DEBUG emulated_hue.apiv1 -- [192.168.178.51] POST /api
2022-12-25 15:43:02,581 DEBUG emulated_hue.apiv1 -- {"devicetype": "Echo"}
2022-12-25 15:43:02,582 INFO  emulated_hue.apiv1 -- Client Echo registered
2022-12-25 15:43:02,583 INFO  emulated_hue.controllers.config -- Link mode is disabled.
2022-12-25 15:43:02,605 DEBUG emulated_hue.apiv1 -- [192.168.178.51] GET /api/gxX-FQyVzurlxoLhMbJADzQMGqFS7HosWrYz8iqg/lights
2022-12-25 15:43:07,635 DEBUG emulated_hue.apiv1 -- [192.168.178.51] POST /api
2022-12-25 15:43:07,637 DEBUG emulated_hue.apiv1 -- {"devicetype": "Echo"}
2022-12-25 15:43:07,639 INFO  emulated_hue.controllers.config -- Link request detected - Use the Homeassistant frontend to confirm this link request.
2022-12-25 15:43:09,187 DEBUG emulated_hue.apiv1 -- [192.168.178.82] GET /link/FBgWE3abjYcbieHbzg1Fix-xONKA1n0p
2022-12-25 15:43:09,188 INFO  emulated_hue.controllers.config -- Link mode is enabled for the next 5 minutes.
2022-12-25 15:47:36,649 INFO  emulated_hue.controllers.config -- Link mode is disabled.
2022-12-25 15:47:47,670 INFO  emulated_hue.controllers.config -- Link mode is disabled.
2022-12-25 15:47:58,871 INFO  emulated_hue.controllers.config -- Link mode is disabled.
2022-12-25 15:48:09,190 INFO  emulated_hue.controllers.config -- Link mode is disabled.
2022-12-25 15:49:48,956 DEBUG emulated_hue.apiv1 -- [192.168.178.51] GET /api/nouser/lights/1
2022-12-25 15:49:48,957 DEBUG emulated_hue.apiv1 -- [192.168.178.51] Invalid username (api key)

Hardware Info:

  • Architecture (Ex: x86, ARM): ARM (Raspberry Pi 3)
  • Addon version (Ex: stable or dev): dev
    • Value of "tag_commit_or_branch" if using dev: master
  • OS (Ex: Windows 10, Ubuntu Buster):
    -- Home Assistant 2022.12.8
    -- Supervisor 2022.11.2
    -- Operating System 9.4
    -- Frontend 20221213.1 - latest
  • Hardware (Ex: PC, Raspberry Pi 1/2/3/Zero): Raspberry Pi 3

Additional context
I need the local connection between Home Assistant and Alexa, since we are not supplied with a public IP (provider is e.on westnetz). This solution seems optimal, but I can't get it working. Any help is highly appreciated. I've got some technical knowledge so please let me know if I can help somehow.

@andrelung andrelung added the bug Something isn't working label Dec 25, 2022
@Poaser
Copy link

Poaser commented Dec 28, 2022

hey andre, did u fix your problem ?
got the same problem, cant even use the emulated hue in alexa

and the official hue app doenst work - so i cant connect the hue lamps with the emulated bridge and activate the amazon skill

@PokoLoko2014
Copy link

PokoLoko2014 commented Dec 29, 2022

My problem is that in the original Philips Hue app the bridge is found but a firmware update is supposed to be made, which does not work.

I have another app Hue Essentials, there the emulated bridge can be inserted without any problems (no updates necessary) I can also switch lamps on and off but I cannot connect the whole thing with Alexa because there is no Alexa Skill for this app.

The question is how do I bypass the firmware update in the Hue app?

@Poaser
Copy link

Poaser commented Dec 30, 2022

You can try the dev addon - but it gets stuck on timezone creation for me .
or you can try to add : tag_commit_or_branch: master

also get this error : http://homeassistant.local:8123/api/config - 401: Unauthorized

@andrelung
Copy link
Author

@Poaser no, still not working. I kinda gave up
@PokoLoko2014 look at #257

@Poaser
Copy link

Poaser commented Jan 1, 2023

@andrelung ok thanks, i use diyhue now and this works as expected

@cdjm
Copy link

cdjm commented Feb 12, 2023

@andrelung
My problem was that Alexa had an old API user saved and tried to connect using invalid credentials.

I managed to get this working by unplugging all Alexa devices and my original hue bridge.
Then I added the API user manually to the emulated_hue.json file like this:

"1b8c590cfd6611ec9926001e0642d5a2": { "clientkey": null, "create date": "2022-07-01T17:14:21", "last use date": "2023-02-12T23:53:16", "name": "Echo", "username": "1b8c590cfd6611ec9926001e0642d5a2" },

Then let alexa search for devices again and it connects fine.
After that you can replug your other devices.

Hope this helps others getting into the same situation.

@github-actions
Copy link
Contributor

This issue has been marked as stale due to no activity and will be closed in 7 days.

@github-actions github-actions bot added the stale label Apr 14, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

4 participants