[SOLVED] [innogy] Unexcepted API error: Unknown error: [...] code=5002 [...] The communication with the device(SHC) failed

Hi there,

since yesterday I get the following error message:

2020-02-15 21:43:34.376 [WARN ] [internal.handler.InnogyBridgeHandler] - Unexcepted API error: 
Unknown error: ErrorResponse [code=5002, description=Communication with the SHC failed, 
messages=[The communication with the device(SHC) failed.]]
org.openhab.binding.innogysmarthome.internal.client.exception.ApiException: Unknown error: 
ErrorResponse [code=5002, description=Communication with the SHC failed, messages=[The 
communication with the device(SHC)
 failed.]]
    at org.openhab.binding.innogysmarthome.internal.client.InnogyClient.handleResponseErrors(InnogyClient.java:262) ~[?:?]
    at org.openhab.binding.innogysmarthome.internal.client.InnogyClient.request(InnogyClient.java:189) ~[?:?]
    at org.openhab.binding.innogysmarthome.internal.client.InnogyClient.executeGet(InnogyClient.java:140) ~[?:?]
    at org.openhab.binding.innogysmarthome.internal.client.InnogyClient.executeGetList(InnogyClient.java:156) ~[?:?]
    at org.openhab.binding.innogysmarthome.internal.client.InnogyClient.getCapabilities(InnogyClient.java:640) ~[?:?]
    at org.openhab.binding.innogysmarthome.internal.client.InnogyClient.getFullDevices(InnogyClient.java:408) ~[?:?]
    at org.openhab.binding.innogysmarthome.internal.manager.DeviceStructureManager.refreshDevices(DeviceStructureManager.java:85) ~[?:?]
    at org.openhab.binding.innogysmarthome.internal.handler.InnogyBridgeHandler.startClient(InnogyBridgeHandler.java:236) ~[?:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_232]
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_232]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_232]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_232]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_232]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_232]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]

It seems that OH is connecting to SHC sometimes and as soon as OH triggers a command the exception occurs.

What have I done so far:

  • Restarted SHC (v2)

  • Resetted SHC

  • retrieved new Authcode

     2020-02-15 21:46:02.560 [INFO ] [oauth2client.internal.OAuthConnector] - grant type authorization_code to URL https://api.services-smarthome.de/AUTH/token success
    

Used bindings:

  • the official version of openHAB 2.5.1
  • 3.0.0-SNAPSHOT from 23.12.2019 19:30

The last update on SHC to 2.0.9.88 I have done last week and after that the binding worked as expected.

Is there someone else who has the same problem?

Martin

Same here. Problem started yesterday at 16:32. It recovered in between and then stopped working again.
I tried the same action with same result.
My SHC is V2 with Version 1.1.12.269.

Try installing the 2.5.2 snapshot instead of the 3.0.0.
https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/addons/bundles/org.openhab.binding.innogysmarthome/

Help me out: I know how to copy the snapshot file but how can I disable the official 2.5.1?

Juergen

Uninstall it via PaperUI then add the jar file and restart OH.

After activating Snapshot 2.5.2 and some stop/starts of openhab it is working again :open_mouth:
Lets see.
Thank you for the help with the binding :slight_smile:

Juergen

Glad to hear it’s working. :+1:

FYI do not use 3.0 snapshots on OH 2.5 versions.

Please click the square box on the post that porvided the solution to mark topic as solved and help other find a quick solution.

Thanks.

1 Like

Well, I was not on the 3.0 snapshot and I did not open the thread. So I do not want to resolve his thread until we have his feedback.
I leave some time for Martin T to respond but I keep an eye on the thread and make sure it is marked resolved

Juergen

1 Like

Using the recommended snapshot version and restarting OH two times solved the problem :+1:

But in my defense, from @hilbrand’s 3.0 release notes:

innogy Beta with fixes on 2.5 release
Version of binding name (23/12/2019 19:30)
Note: The jar has version 3.0.0-SNAPSHOT. But it should work with openHAB 2.4 and 2.5

Thanks for your help!

Unfortunately, I have to take back the solution flag. After some successfull tests and some minutes later, the error came back. :sob:

Any ideas?

@MartinT: Did you stop OH and clean the cache?

Make sure there is no other binding version installed except the one in the addons file then clean the cache and give OH a few restarts. Also watch the logs as OH starts up to see if there are any clues.

Mine ist still fine. Innogy Snapshot 2.5.2. Innogy software is now 8.16-1.1.13.295.
I am receiving values and can send commands.
But something must have changed on the innogy side as it was was running without any issues for quite a while. Can also be changes at their data center.

Juergen

Yes, I did. Several times. There is nothing suspicious in the log. Strange. I think something must have happend on the Innogy side, too.

I have the same problem since yesterday(

And the probelm started to appear here again.
Sometimes communication recovers for an hour and then is lost again.

Juergen

it seems to work fine again for approx 3 hours

Same Issue here - Connection sometimes seems to work, but in the moment you send an command, it stops working…

I don’t know, if it’s related to this issue, but when the connection is working with openhab … same time innogy app doesn’t work …

I can send commands again as usual

It is changing every no and then. Was working until 17:24. Currently there is no connection possible.

Interesting.

  • Innogy Interface was offline since 17:24, bridge was reported as offline
  • enabled trace on innogy binding but no messages were reported
  • opened PaperUI
  • innogy bridge was reported offline
  • selected innogy modified WebSocket Idle Timeout in Seconds from 900 to 800
  • communication started right after that

2020-02-17 18:55:21.433 [DEBUG] [internal.handler.InnogyBridgeHandler] - Disposing innogy SmartHome bridge handler ‘SMARTHOME09’
2020-02-17 18:55:21.515 [TRACE] [gysmarthome.internal.InnogyWebSocket] - Stopping websocket ignored - was not running.
2020-02-17 18:55:21.517 [DEBUG] [internal.handler.InnogyBridgeHandler] - innogy SmartHome bridge handler shut down.
2020-02-17 18:55:21.536 [DEBUG] [internal.handler.InnogyBridgeHandler] - Initializing innogy SmartHome BridgeHandler…
2020-02-17 18:55:21.540 [DEBUG] [internal.handler.InnogyBridgeHandler] - Scheduling reinitialize in 0 seconds.
2020-02-17 18:55:21.542 [DEBUG] [internal.handler.InnogyBridgeHandler] - Initializing innogy SmartHome client…
2020-02-17 18:55:21.543 [DEBUG] [arthome.internal.client.InnogyClient] - Get innogy SmartHome status…
2020-02-17 18:55:22.076 [DEBUG] [arthome.internal.client.InnogyClient] - Statuscode is OK: [https://api.services-smarthome.de/API/1.1/status]
2020-02-17 18:55:22.079 [DEBUG] [arthome.internal.client.InnogyClient] - innogy SmartHome Status loaded. Configuration version is 1837.
2020-02-17 18:55:22.080 [DEBUG] [arthome.internal.client.InnogyClient] - Loading locations…

:open_mouth: