I’ve got mine working. Reinstall the version that can log in, get logged in and then install the latest - it remembers that you are logged on.
3.2.10 also fixed the login.
Great. I was waiting over the weekend so used the workaround with 3.2.9.
Where can I get this build (3.2.10)?
If you’re on openHAB 3.2.0 or later, you can add “https://download.smarthomej.org/addons.json” in the “JSON 3rd Party Addon Service” section in the settings page of the UI.
Once that is saved, go to the bindings page and you’ll see a new section with the 3rd Party Addons. You’re looking for the SmartHome/J variant of the Amazon Echo Control Binding.
Be sure to uninstall the regular one before you install this one!
Nice. I was able to install it but can’t sign in to amazon. I got this error
HTTP ERROR 500 java.lang.NullPointerException
URI: /amazonechocontrol/adef560844/ap/signin
STATUS: 500
MESSAGE: java.lang.NullPointerException
SERVLET: org.ops4j.pax.web.service.spi.model.ServletModel-47
CAUSED BY: java.lang.NullPointerException
Caused by:
java.lang.NullPointerException
at org.smarthomej.binding.amazonechocontrol.internal.smarthome.HandlerColorController.getStateDescription(HandlerColorController.java:169)
at org.smarthomej.binding.amazonechocontrol.internal.handler.SmartHomeDeviceHandler.setDeviceAndUpdateThingState(SmartHomeDeviceHandler.java:146)
at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.lambda$19(AccountHandler.java:862)
at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:807)
at java.base/java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:425)
at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.updateSmartHomeDeviceList(AccountHandler.java:862)
at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.setConnection(AccountHandler.java:425)
at org.smarthomej.binding.amazonechocontrol.internal.AccountServlet.handleProxyRequest(AccountServlet.java:639)
at org.smarthomej.binding.amazonechocontrol.internal.AccountServlet.doVerb(AccountServlet.java:233)
at org.smarthomej.binding.amazonechocontrol.internal.AccountServlet.doPost(AccountServlet.java:128)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550)
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:294)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:82)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
at org.eclipse.jetty.server.Server.handle(Server.java:516)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:386)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)
at java.base/java.lang.Thread.run(Thread.java:829)
Powered by Jetty:// 9.4.43.v20210629
Maybe I need Samrthome/J Commons? If so, I can’t get it via openhab third party addons.
It’s automatically installed. That is a very strange error. Can you please restart openHAB and check that you only have one binding installed? On the karaf console: list -s | grep -i amazonechocontrol
should only list one bundle.
Thank you! I was not aware this even existed.
I’m curious what @J-N-K improved on these? I do have 3 bindings that bounce offline/online (HUE, Onkyo & HP Printer), wonder if HTTP binding below would fix that?
- HTTP
Best, Jay
No, each binding is responsible on its own for thing status.
3,2,10 is the only one installed. I did a restart and still have the same error. I use OTP on amazon.ca
The thing amazon account shows
Status: OFFLINE
CONFIGURATION_PENDING
Wait for login
But all echo devices shows online and are working. eveything looks good in openhab:8080/amazonechocontrol but if I logout and login, this is where the error occurs.
In the console log there is these errors
20:30:57.685 [ERROR] [ntrol.internal.handler.AccountHandler] - check login fails with unexpected error
java.lang.NullPointerException: null
at org.smarthomej.binding.amazonechocontrol.internal.smarthome.HandlerColorController.getStateDescription(HandlerColorController.java:169) ~[?:?]
at org.smarthomej.binding.amazonechocontrol.internal.handler.SmartHomeDeviceHandler.setDeviceAndUpdateThingState(SmartHomeDeviceHandler.java:146) ~[?:?]
at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.lambda$19(AccountHandler.java:862) ~[?:?]
at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:807) ~[?:?]
at java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:425) ~[?:?]
at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.updateSmartHomeDeviceList(AccountHandler.java:862) ~[?:?]
at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.setConnection(AccountHandler.java:425) ~[?:?]
at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.checkLogin(AccountHandler.java:393) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
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:829) [?:?]
20:30:59.805 [ERROR] [ntrol.internal.handler.AccountHandler] - refresh data fails with unexpected error
java.lang.NullPointerException: null
at org.smarthomej.binding.amazonechocontrol.internal.smarthome.HandlerColorController.getStateDescription(HandlerColorController.java:169) ~[?:?]
at org.smarthomej.binding.amazonechocontrol.internal.handler.SmartHomeDeviceHandler.setDeviceAndUpdateThingState(SmartHomeDeviceHandler.java:146) ~[?:?]
at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.lambda$19(AccountHandler.java:862) ~[?:?]
at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:807) ~[?:?]
at java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:425) ~[?:?]
at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.updateSmartHomeDeviceList(AccountHandler.java:862) ~[?:?]
at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.refreshData(AccountHandler.java:522) ~[?:?]
at org.smarthomej.binding.amazonechocontrol.internal.handler.AccountHandler.checkData(AccountHandler.java:472) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
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:829) [?:?]
Can you try disabling the SmartHome device(s) that use a color channel?
Did you mean Smarthome items coming from Alexa or items from openhab? Because I do not have any devices linked with Alexa.
Can you double check that there is no thing of type smartHomeDevice
? This code should never execute if no smarthomedevice is added. I‘ll check the code for a bug, though.
No there is not. I never used this feature.
I’m sorry, but this is next to impossible. The only way this code can be called is when a SmartHomeDeviceHandler
has been added to the bridge. This only happens when a thing of type smartHomeDevice
or smartHomeDeviceGroup
is initialized. I did check in the code and with both my production and my development instance that this is the case, so there MUST be a device of that type somewhere.
If you go to the REST API explorer, select “things”, then “GET /things”, “Try it out”, “Execute” and search the result, is there any trace of a smartHomeDevice
?
I did the REST API explorer trick and you were right. I had this thing called something like glassbreak feature and some other things with, as you said, color properties. I deleted all. I logged out of amazoneechcontrol and logged in again without error. I also did notice these smarthomedevices were under another account id. They shouldn’t had been there.
Thanks for your help.