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

Alexa will not discover HABridge #1184

Closed
Mooose1 opened this issue Mar 7, 2020 · 26 comments · Fixed by #1266
Closed

Alexa will not discover HABridge #1184

Mooose1 opened this issue Mar 7, 2020 · 26 comments · Fixed by #1266
Assignees
Labels
Milestone

Comments

@Mooose1
Copy link

Mooose1 commented Mar 7, 2020

I have a new setup, HomeGenie and HA-Bridge on a RaspPI-3. I have 2 lights configured on HG and the Bridge and they control the lights manually. I have an Amazon Echo Dot ver 3 and an Echo Show. I cannot get Alexa to discover the new devices. I do not have an older version to test if that is my problem. Any suggestions?

@bwssytems
Copy link
Owner

Please turn on trace upnp in the control tab and post your log after a discovery. Have you looked at the wiki on this? https://github.com/bwssytems/ha-bridge/wiki/Trouble-Shooting#q-echo-does-not-discover-my-ha-bridge

@Mooose1
Copy link
Author

Mooose1 commented Mar 8, 2020

I enabled Trace upnp, it is configure on the router and I am using port 80. Attached are 2 logs. IGMP snooping is not enabled.
HABridge5.docx
HABridge6.docx

@bwssytems
Copy link
Owner

I cant read your files as they are cut out. Could you just send a text file of the syslog messages so I can see the whole message please. Also, please identify the ip address of your Alexa

@Mooose1
Copy link
Author

Mooose1 commented Mar 10, 2020

Alexa dot is 192.168.0.136

HABridge6.txt
HABridge5.txt

@bwssytems
Copy link
Owner

Those files are empty. You need to go to the syslog file in /var/log and take the relevant snippit in a text editor not ms word

@Mooose1
Copy link
Author

Mooose1 commented Mar 10, 2020

Try this...
03-08-2020 10:24:18.252
INFO
HomeGenie Home created.
com.bwssystems.HABridge.plugins.homegenie.HomeGenieHome
03-08-2020 10:24:18.260
INFO
HABridge device management service started....
com.bwssystems.HABridge.devicemanagmeent.DeviceResource
03-08-2020 10:24:18.273
INFO
Hue emulator service started....
com.bwssystems.HABridge.hue.HueMulator
03-08-2020 10:24:18.283
INFO
Traceupnp: upnp config address: 192.168.0.58 -useIface: false on web server: 0.0.0.0:80
com.bwssystems.HABridge.HABridge
03-08-2020 10:24:18.284
INFO
Description xml service started....
com.bwssystems.HABridge.upnp.UpnpSettingsResource
03-08-2020 10:24:18.288
INFO
UPNP Discovery Listener starting....
com.bwssystems.HABridge.upnp.UpnpListener
03-08-2020 10:24:18.290
INFO
Traceupnp: Interface: wlan0 valid usable IP address: /192.168.0.58
com.bwssystems.HABridge.upnp.UpnpListener
03-08-2020 10:24:18.290
INFO
Traceupnp: Adding wlan0 to our upnp join interface set.
com.bwssystems.HABridge.upnp.UpnpListener
03-08-2020 10:24:18.291
INFO
Traceupnp: Interface: lo valid usable IP address: /127.0.0.1
com.bwssystems.HABridge.upnp.UpnpListener
03-08-2020 10:24:18.292
INFO
Traceupnp: Adding lo to our upnp join interface set.
com.bwssystems.HABridge.upnp.UpnpListener
03-08-2020 10:24:18.292
INFO
Create and run mDNS service.
com.bwssystems.HABridge.upnp.UpnpListener
03-08-2020 10:24:18.302
INFO
UPNP Discovery Listener running and ready....
com.bwssystems.HABridge.upnp.UpnpListener
03-08-2020 10:24:18.878
INFO
Traceupnp: request of description.xml from: 192.168.0.136:80 filled in with address: 192.168.0.58:80
com.bwssystems.HABridge.upnp.UpnpSettingsResource
03-08-2020 10:24:38.972
INFO
Traceupnp: sendUpnpNotify notifyTemplate1
com.bwssystems.HABridge.upnp.UpnpListener
03-08-2020 10:24:39.623
INFO
Traceupnp: sendUpnpNotify notifyTemplate2
com.bwssystems.HABridge.upnp.UpnpListener
03-08-2020 10:24:40.275
INFO
Traceupnp: sendUpnpNotify notifyTemplate3
com.bwssystems.HABridge.upnp.UpnpListener
03-08-2020 10:24:42.330
INFO
The requested route [/api//lights/100/state] has not been mapped in Spark for Accept: [application/json, text/plain, /]
spark.http.matching.MatcherFilter
03-08-2020 10:24:42.388
INFO
Traceupnp: hue api user create requested for device type: test_ha_bridge#192.168.0.136 and username: 359feaa5553547d3b4ab541dd60b9612
com.bwssystems.HABridge.hue.HueMulator
03-08-2020 10:24:48.391
INFO
Tracestate: hue state change requested: 359feaa5553547d3b4ab541dd60b9612 from 192.168.0.136 body: {"on":true}
com.bwssystems.HABridge.hue.HueMulator
03-08-2020 10:24:48.422
INFO
Tracestate: Calling on-off as requested: true
com.bwssystems.HABridge.hue.HueMulator
03-08-2020 10:24:48.423
INFO
Tracestate: Decode Json for url items: [{"item":"http:https://192.168.0.58:8080/api/HomeAutomation.X10/A1/Control.On","type":"httpDevice","contentType":"text/html","httpVerb":"GET"}]
com.bwssystems.HABridge.hue.HueMulator
03-08-2020 10:24:48.425
INFO
Tracestate: Calling Home device handler for type : httpDevice
com.bwssystems.HABridge.hue.HueMulator
03-08-2020 10:24:51.702
INFO
Tracestate: hue state change requested: 359feaa5553547d3b4ab541dd60b9612 from 192.168.0.136 body: {"on":false}
com.bwssystems.HABridge.hue.HueMulator
03-08-2020 10:24:51.705
INFO
Tracestate: Calling on-off as requested: false
com.bwssystems.HABridge.hue.HueMulator
03-08-2020 10:24:51.705
INFO
Tracestate: Decode Json for url items: [{"item":"http:https://192.168.0.58:8080/api/HomeAutomation.X10/A1/Control.Off","type":"httpDevice","contentType":"text/html","httpVerb":"GET"}]
com.bwssystems.HABridge.hue.HueMulator
03-08-2020 10:24:51.707
INFO
Tracestate: Calling Home device handler for type : httpDevice
com.bwssystems.HABridge.hue.HueMulator

@Mooose1
Copy link
Author

Mooose1 commented Mar 11, 2020

Please let me know if this works. I hit the link button twice during discovery.
HABridge8.txt

@szmyko
Copy link

szmyko commented Mar 14, 2020

Problem disappeared after adding "return" command in AddressUtil.java for this line:
getOutboundAddress(new InetSocketAddress(remoteAddress, remotePort));
-->
return getOutboundAddress(new InetSocketAddress(remoteAddress, remotePort));

@Mooose1
Copy link
Author

Mooose1 commented Mar 14, 2020

Can you give me some guidance how to correct this issue?

@szmyko
Copy link

szmyko commented Mar 14, 2020

Fixed ha-bridge.jar:
ha-bridge.zip

@fauna5
Copy link

fauna5 commented Mar 14, 2020

I just had to update to this version from v5.3.0 to get Alexa gen 1 discovering devices again. Thanks for the fix 👍

@Nachtfalke49
Copy link

With Echo Dot 2 and 3 it does not work with the new ha-bridge.jar.

@bwssytems bwssytems self-assigned this Mar 15, 2020
@PPenglis
Copy link

Mar 18 22:25:50 hobbs java[692]: 2020-03-18 22:25:50,662 [qtp11501746-14] INFO com.bwssystems.HABridge.hue.HueMulator - Traceupnp: hue api user create requested: {"devicetype": "Echo"} from address: 192.168.0.112
Mar 18 22:25:50 hobbs java[692]: 2020-03-18 22:25:50,667 [qtp11501746-14] INFO com.bwssystems.HABridge.hue.HueMulator - Traceupnp: hue api user create requested for device type: Echo#192.168.0.112 and username: dedd81ce9d6b462e9be5610ef8fbb9ea
Mar 18 22:25:50 hobbs java[692]: 2020-03-18 22:25:50,722 [qtp11501746-15] INFO com.bwssystems.HABridge.hue.HueMulator - Traceupnp: hue lights list requested by user: dedd81ce9d6b462e9be5610ef8fbb9ea from address: 192.168.0.112
Mar 18 22:25:50 hobbs java[692]: 2020-03-18 22:25:50,750 [qtp11501746-15] ERROR spark.http.matching.GeneralError -
Mar 18 22:25:50 hobbs java[692]: java.lang.NullPointerException: null
Mar 18 22:25:50 hobbs java[692]: #011at com.bwssystems.HABridge.plugins.hue.HueHome.getHueDeviceInfo(HueHome.java:88)
Mar 18 22:25:50 hobbs java[692]: #011at com.bwssystems.HABridge.hue.HueMulator.lightsListHandler(HueMulator.java:930)
Mar 18 22:25:50 hobbs java[692]: #011at com.bwssystems.HABridge.hue.HueMulator.lambda$setupServer$23(HueMulator.java:304)
Mar 18 22:25:50 hobbs java[692]: #011at spark.ResponseTransformerRouteImpl$1.handle(ResponseTransformerRouteImpl.java:47)
Mar 18 22:25:50 hobbs java[692]: #011at spark.http.matching.Routes.execute(Routes.java:61)
Mar 18 22:25:50 hobbs java[692]: #011at spark.http.matching.MatcherFilter.doFilter(MatcherFilter.java:130)
Mar 18 22:25:50 hobbs java[692]: #011at spark.embeddedserver.jetty.JettyHandler.doHandle(JettyHandler.java:50)
Mar 18 22:25:50 hobbs java[692]: #011at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1568)
Mar 18 22:25:50 hobbs java[692]: #011at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
Mar 18 22:25:50 hobbs java[692]: #011at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
Mar 18 22:25:50 hobbs java[692]: #011at org.eclipse.jetty.server.Server.handle(Server.java:530)
Mar 18 22:25:50 hobbs java[692]: #011at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347)
Mar 18 22:25:50 hobbs java[692]: #011at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256)
Mar 18 22:25:50 hobbs java[692]: #011at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
Mar 18 22:25:50 hobbs java[692]: #011at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
Mar 18 22:25:50 hobbs java[692]: #011at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
Mar 18 22:25:50 hobbs java[692]: #011at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
Mar 18 22:25:50 hobbs java[692]: #011at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
Mar 18 22:25:50 hobbs java[692]: #011at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
Mar 18 22:25:50 hobbs java[692]: #011at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382)
Mar 18 22:25:50 hobbs java[692]: #011at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)
Mar 18 22:25:50 hobbs java[692]: #011at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)
Mar 18 22:25:50 hobbs java[692]: #011at java.base/java.lang.Thread.run(Thread.java:834)

@PPenglis
Copy link

Sorry i thought I posted the reply:
I did some debugging and realised the crashed line was that the habridge couldn't find the Hub info.
The name for the hub has to match exactly what the hub is called along with the IP address and mine differed slightly.
Fixing this i now have a functioning system with Alex Echo Plus 2 connecting.

@Mooose1
Copy link
Author

Mooose1 commented Mar 20, 2020

gooterz, can you elaborate a little? Where did you find the names not matching? And, which port are you using, 80 or 81?

@heikoh81
Copy link

heikoh81 commented Mar 20, 2020

Same problem here, with HABridge 5.2.0, 5.3.0, 5.3.0a (tried all versions).
Problem started yesterday, Echo not working properly any more.
On Web-Interface, noticed the double amount of devices, so started deleting and rediscovering.
Yesterday, it worked after several tries, now it it not working any more.
After pluggin in my Echo Flex that normally is not used, it started discovering again, but not all my 136 devices.

Also tried to enable Belkin Emulation on one of my Tasmota Plugs -> instant discovery.

They probably changed something AGAIN, and now discovery fails AGAIN.

I have 3 Echo Dot 2nd Gen, 1 Echo Show 1st Gen, 3 Echo 2nd Gen, 1 Echo Flex.

@PPenglis
Copy link

Mooose1,
In the hue app you can go into settings and switch devices. You should see one for the ha bridge and one for the real hue hub. For me that name had to match the one in the ha bridge, in the bridge settings for the hue bridge.

@Mooose1
Copy link
Author

Mooose1 commented Mar 23, 2020

I do not have a hue hub. Should I? :-)

@Mooose1
Copy link
Author

Mooose1 commented Mar 25, 2020

I now have a gen 1 echo. I reinstalled the ha-bridge.jar file version 5.3.0 and Alexa still will not discover any new devices.

@bwssytems
Copy link
Owner

@szmyko I have fixed the AddressUtils.getOutboundAddress issue in the dev branch

@Mooose1
Copy link
Author

Mooose1 commented Mar 26, 2020

So, I just have to reinstall Ha-bridge for the fix?

@bwssytems
Copy link
Owner

For all: The new Release Candidate is out for testing.... https://github.com/bwssytems/ha-bridge/releases/tag/v5.3.1RC1

Please post your issues or successes at #1192

@slottedpig
Copy link

Has anyone had any success with this, using the RC5 .jar or 5.2.1 or any version in between i cant find any new devices.

bwssytems added a commit that referenced this issue Dec 14, 2020
Dev branch 5.3.x to create v5.4.0

#1044 Alexa app, error "Device doesn't support requested value" bug question
#1118 Device status update in Alexa App is not working correctly for ha-bridge devices bug duplicate question
#1126 Can't get XY ColorData into URL enhancement question
#1127 Can't get separate hue, saturation and brightness enhancement question
#1128 Wrong color calucation in HS mode bug question
#1131 Changing color temperatur is not working correctly bug question
#1132 Conversion from CIE to RGB incorrect bug question
#1139 Device ID creation fails bug question
#1150 Home Assistant gets null exception during initialization bug question
#1170 Alexa not sending the correct color codes duplicate
#1171 Please add option: If bright request present with on, only send dim enhancement
#1184 Alexa will not discover HABridge question
#1191 When "Use UPNP Address Interface Only" is selected, echo cannot find ha-bridge bug
#1210 [Enahnacement] Have link button timeout be configurable enhancement
#1215 Alexa unable to discover recently added devices to ha-bridge duplicate question
#1227 Feature request: ${intensity.previous} value passing control enhancement
#1239 HA-Bridge has suddenly given up itself - Exception in thread "main" java.lang.NullPointerException bug question
#1243 Alexa device discovery now broke question
#1253 HABridge hue ColorDecode 0 0 0 bug question
#1256 Homeassistant devices not appearing bug question
@chrischn82
Copy link

chrischn82 commented Aug 13, 2021

i´m firm with this problem, too.
These days my echo dot 2 won´t discover my habridge devices.
I figured out that the real hue bridge devices uniqueid-design differ from the habridge.
example:
Phillips Hue Bridge Device:
"12":{ "state":{"on":true,"alert":"select","mode":"homeautomation","reachable":true}, "swupdate":{"state":"notupdatable","lastinstall":"2021-07-17T18:14:15"}, "type":"On/Off plug-in unit", "name":"Computer", "modelid":"Plug 01", "manufacturername":"OSRAM", "productname":"On/Off plug", "capabilities":{"certified":false,"control":{}, "streaming":{"renderer":false,"proxy":false}}, "config":{"archetype":"plug","function":"functional","direction":"omnidirectional"}, **"uniqueid":"7c:b0:3e:aa:0a:0a:b6:71-03",** "swversion":"V1.05.09"},

HA Bridge Device:
{"id":"100", **"uniqueid":"f8:99:13:9d:f5:e1:05-05",** "name":"pisse","mapId":"12345", "mapType":"httpDevice", "deviceType":"switch", "inactive":false, "noState":false, "offState":false, "description":"pissgeraet", "comments":"", "deviceState":{"on":false,"bri":0,"alert":"none","reachable":true}, "onFirstDim":false, "onWhenDimPresent":false, "lockDeviceId":false, "dimNoOn":false, "dimOnColor":false},

the REAL devices have 1 hex-Block more ( instead 7+1, the have 8+1 )

I just added one block in the device.db and voila !! First time "alexa, find that fuckin devices!" .... "I found 136 new devices, just say turn on self-destruction"
....

maybe that helps someone else, too ...

better would be to edit the part wich creates the unique-id´s.
But i didnt find in the jar-archive

@kepps2113
Copy link

I just added one block in the device.db and voila !!

THANK YOU! This solved my issue as well. I was updating to a new raspberry pi and decided to do a clean install, but used the old DB backup. I couldn't get anything to work until I found your comment.

@hradec
Copy link

hradec commented Sep 23, 2023

"Fudge" me!! That fixed it for me too!! Thank you so much!

I'm using the latest and greatest version of ha-bridge, changing the unique id of my first added device (100 as well) from f8:99:13:9d:f5:e1:05-05 to f8:99:13:9d:f5:e1:05:01-05 in devices.db file made alexa finally found the device.

On the latest alexa app version, I added it by selecting device + button->Philips hue->"NO"->Philips Hue V1 bridge->Discover Devices

Without the extra :01 in the device, It wouldn't detect anything!

Thanks a lot!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.