Innogy SmartHome - "Unexcepted API error: Remote access not allowed"

Nice, thanks!

I’ve got the same problem now too. From one day to the other
"Remote access not allowed. Access is allowed only from the SHC device network."

I have ordered the mobile-subscription after it was deactivated, but that didn’t help either…

Any news on this, @oliver_kuhl ?

The innogy support can’t help.

I just payed for mobile access… :roll_eyes:
“solved” the problem and everything is working fine.

I payed for it 36 hours ago, access via browser / handyapp from external networks is working, but the innogy-binding isn’t :frowning:

I got the hint from the innogy developers that the IP address is stored in the access token. I’ll try to implement an automatic token refresh when the “Remote access not allowed” error occurs.

I changed the binding to refresh the tokens now. As I do not have the problem, I cannot test it. So please try it:
http://www.ollie.in/wp-content/uploads/2018/02/org.openhab.binding.innogysmarthome-2.3.0-SNAPSHOT-180209.jar

Thanks!

Hi,

I have since today the same problem. I installed (at least I tried) the Version 2.3.0 you provided with the link above.

When starting openhab the following error is logged:

2018-03-02 18:52:53.046 [ERROR] [org.openhab.binding.innogysmarthome ] - [binding.innogysmarthome] Cannot register Component

org.osgi.service.component.ComponentException: The component name 'binding.innogysmarthome' has already been registered by Bundle 230 (org.openhab.binding.innogysmarthome) as Component of Class org.openhab.binding.innogysmarthome.internal.InnogyHandlerFactory

	at org.apache.felix.scr.impl.ComponentRegistry.checkComponentName(ComponentRegistry.java:222) [42:org.apache.felix.scr:2.0.12]

	at org.apache.felix.scr.impl.BundleComponentActivator.loadDescriptor(BundleComponentActivator.java:448) [42:org.apache.felix.scr:2.0.12]

	at org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:315) [42:org.apache.felix.scr:2.0.12]

	at org.apache.felix.scr.impl.BundleComponentActivator.<init>(BundleComponentActivator.java:268) [42:org.apache.felix.scr:2.0.12]

	at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:388) [42:org.apache.felix.scr:2.0.12]

	at org.apache.felix.scr.impl.Activator.access$200(Activator.java:54) [42:org.apache.felix.scr:2.0.12]

	at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:265) [42:org.apache.felix.scr:2.0.12]

	at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:254) [42:org.apache.felix.scr:2.0.12]

	at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:227) [42:org.apache.felix.scr:2.0.12]

	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482) [?:?]

	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415) [?:?]

	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) [?:?]

	at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444) [?:?]

	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:903) [?:?]

	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]

	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [?:?]

	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:213) [?:?]

	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:120) [?:?]

	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:112) [?:?]

	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:156) [?:?]

	at org.eclipse.osgi.container.Module.publishEvent(Module.java:476) [?:?]

	at org.eclipse.osgi.container.Module.start(Module.java:467) [?:?]

	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) [?:?]

	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1253) [8:org.apache.felix.fileinstall:3.5.8]

	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1225) [8:org.apache.felix.fileinstall:3.5.8]

	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:512) [8:org.apache.felix.fileinstall:3.5.8]

	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361) [8:org.apache.felix.fileinstall:3.5.8]

	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312) [8:org.apache.felix.fileinstall:3.5.8]

A view lines later, there is still the error:

2018-03-02 18:52:54.245 [hingStatusInfoChangedEvent] - 'innogysmarthome:bridge:SMARTHOME05' changed from INITIALIZING to OFFLINE (COMMUNICATION_ERROR): Remote access not allowed. Access is allowed only from the SHC device network.

Looking at the karaf console, their is only one bundle listed

openhab> bundle:list|grep -i innogy
230 │ Active   │  80 │ 2.3.0.201802091047     │ innogy SmartHome Binding

Any ideas what to do?

Thanks
Jens

Mache Probleme lösen sich von selbst :wink:

The Problem is gone. I didn‘t do anything.
So I guess the problem was on the innogy side.

Thx
Jens

I had the same problem here as well and it simply disappeared after some undefined time. I have no clue.
Can anyone say if the “remote access not allowed” error is gone now?

This error is also gone. But not with the update I installed on Friday. As I wrote, it just disappeared today. So I am not sure if the problem with my installations was even triggerd by the same reason as the problem of the initial thread owner.

Ah okay. Please have an eye on this. If I did it correctly, the binding should now restart and load a new access-token, which then should work and allow the remote access.

This problem still exists for me. Sometimes it works, but when my IP changes it stops working. Sometimes it starts working again after a couple of hours. In this example it tried from 5 am to connect but it didn’t suceed until 1:30 pm

2018-03-06 05:04:27.221 [INFO ] [marthome.handler.InnogyBridgeHandler] - Initializing innogy SmartHome client…
2018-03-06 05:04:27.268 [ERROR] [marthome.handler.InnogyBridgeHandler] - Error initializing innogy SmartHome client.

SmartHome client. 2018-03-06 13:33:59.446 [INFO ] [marthome.handler.InnogyBridgeHandler] - Initializing innogy SmartHome client... 2018-03-06 13:34:00.563 [INFO ] [marthome.handler.InnogyBridgeHandler] - Starting innogy websocket. 2018-03-06 13:34:00.788 [INFO ] [gysmarthome.internal.InnogyWebSocket] - Connected to innogy WebSocket. 2018-03-06 13:34:05.337 [INFO ] [ernal.manager.DeviceStructureManager] - Devices loaded. Device structure manager ready.

Can you please enable debug logging for some more details and send me the logs again, when the error occurs? Thx!

Although I’ve added this line to my logging cfg “log4j.logger.org.openhab.binding.innogysmarthome = DEBUG” I don’t get any more than these lines:

2018-03-09 17:15:32.809 [INFO ] [marthome.handler.InnogyBridgeHandler] - Initializing innogy SmartHome client...
2018-03-09 17:15:33.166 [INFO ] [marthome.handler.InnogyBridgeHandler] - Initializing innogy SmartHome client...
2018-03-09 17:15:33.220 [ERROR] [marthome.handler.InnogyBridgeHandler] - Error initializing innogy SmartHome client.
2018-03-09 17:15:33.420 [ERROR] [marthome.handler.InnogyBridgeHandler] - Error initializing innogy SmartHome client.

Any ideas?

Which OH version do you use? Since 2.2 the syntax changed:

log4j2.logger.org_openhab_binding_innogysmarthome.level = DEBUG
log4j2.logger.org_openhab_binding_innogysmarthome.name = org.openhab.binding.innogysmarthome

Thanks a lot. That’s the output:

2018-03-11 15:34:08.042 [DEBUG] [marthome.handler.InnogyBridgeHandler] - Initializing innogy SmartHome BridgeHandler...
2018-03-11 15:34:08.042 [DEBUG] [marthome.handler.InnogyBridgeHandler] - innogy config: Config [clientId=24635748, clientSecret=no secret, redirectUrl=https://www.ollie.in/innogy-smarthome-token/, authCode=, accessToken=eyJ0eXAiOi...-__V-gQmHw, refreshToken=47b18...d9bda]
2018-03-11 15:34:08.042 [INFO ] [marthome.handler.InnogyBridgeHandler] - Initializing innogy SmartHome client...
2018-03-11 15:34:08.042 [DEBUG] [arthome.internal.client.InnogyClient] - Initializing innogy SmartHome Session...
2018-03-11 15:34:08.374 [DEBUG] [arthome.internal.client.InnogyClient] - [1] Statuscode is NOT OK: 403
2018-03-11 15:34:08.374 [DEBUG] [arthome.internal.client.InnogyClient] - Remote access not allowed. Access is allowed only from the SHC device network.
2018-03-11 15:34:08.374 [DEBUG] [marthome.handler.InnogyBridgeHandler] - Remote access not allowed. Dropping access token and reinitializing binding...
2018-03-11 15:34:08.374 [DEBUG] [marthome.handler.InnogyBridgeHandler] - Scheduling reinitialize in 0 seconds.
2018-03-11 15:34:08.374 [DEBUG] [marthome.handler.InnogyBridgeHandler] - Unexcepted API error: Remote access not allowed. Access is allowed only from the SHC device network.
2018-03-11 15:34:08.374 [DEBUG] [marthome.handler.InnogyBridgeHandler] - Initializing innogy SmartHome BridgeHandler...
2018-03-11 15:34:08.374 [DEBUG] [marthome.handler.InnogyBridgeHandler] - Disposing innogy SmartHome bridge handler 'SMARTHOME10'
2018-03-11 15:34:08.374 [DEBUG] [marthome.handler.InnogyBridgeHandler] - innogy config: Config [clientId=24635748, clientSecret=no secret, redirectUrl=https://www.ollie.in/innogy-smarthome-token/, authCode=, accessToken=eyJ0eXAiOi...-__V-gQmHw, refreshToken=47b18...d9bda]
2018-03-11 15:34:08.374 [DEBUG] [arthome.internal.client.InnogyClient] - Uninitializing innogy SmartHome Session...
2018-03-11 15:34:08.374 [INFO ] [marthome.handler.InnogyBridgeHandler] - Initializing innogy SmartHome client...
2018-03-11 15:34:08.374 [DEBUG] [arthome.internal.client.InnogyClient] - Initializing innogy SmartHome Session...
2018-03-11 15:34:08.411 [DEBUG] [arthome.internal.client.InnogyClient] - [2] Statuscode is NOT OK: 404
2018-03-11 15:34:08.411 [DEBUG] [arthome.internal.client.InnogyClient] - Session not found: ErrorResponse [code=2012, description=Session not found, messages=[Session not found: e76ce0b5232b46bb8bd004c78babf7dc]]
2018-03-11 15:34:08.411 [DEBUG] [marthome.handler.InnogyBridgeHandler] - innogy SmartHome bridge handler shut down.
2018-03-11 15:34:08.411 [DEBUG] [marthome.handler.InnogyBridgeHandler] - Scheduling reinitialize in 120 seconds.
2018-03-11 15:34:08.411 [ERROR] [marthome.handler.InnogyBridgeHandler] - Error initializing innogy SmartHome client.
2018-03-11 15:34:08.543 [DEBUG] [arthome.internal.client.InnogyClient] - [1] Statuscode is NOT OK: 403
2018-03-11 15:34:08.543 [DEBUG] [arthome.internal.client.InnogyClient] - Remote access not allowed. Access is allowed only from the SHC device network.
2018-03-11 15:34:08.558 [DEBUG] [marthome.handler.InnogyBridgeHandler] - Remote access not allowed. Dropping access token and reinitializing binding...
2018-03-11 15:34:08.558 [DEBUG] [marthome.handler.InnogyBridgeHandler] - Scheduling reinitialize in 0 seconds - ignored: already triggered in 119 seconds.
2018-03-11 15:34:08.558 [DEBUG] [marthome.handler.InnogyBridgeHandler] - Unexcepted API error: Remote access not allowed. Access is allowed only from the SHC device network.
2018-03-11 15:34:08.558 [DEBUG] [marthome.handler.InnogyBridgeHandler] - Disposing innogy SmartHome bridge handler 'SMARTHOME10'
2018-03-11 15:34:08.558 [DEBUG] [marthome.handler.InnogyBridgeHandler] - innogy SmartHome bridge handler shut down.
2018-03-11 15:34:08.558 [DEBUG] [marthome.handler.InnogyBridgeHandler] - Scheduling reinitialize in 120 seconds.
2018-03-11 15:34:08.558 [ERROR] [marthome.handler.InnogyBridgeHandler] - Error initializing innogy SmartHome client.
2018-03-11 15:36:08.565 [DEBUG] [marthome.handler.InnogyBridgeHandler] - Initializing innogy SmartHome BridgeHandler...
2018-03-11 15:36:08.566 [DEBUG] [marthome.handler.InnogyBridgeHandler] - innogy config: Config [clientId=24635748, clientSecret=no secret, redirectUrl=https://www.ollie.in/innogy-smarthome-token/, authCode=, accessToken=eyJ0eXAiOi...-__V-gQmHw, refreshToken=47b18...d9bda]
2018-03-11 15:36:08.567 [INFO ] [marthome.handler.InnogyBridgeHandler] - Initializing innogy SmartHome client...
2018-03-11 15:36:08.567 [DEBUG] [arthome.internal.client.InnogyClient] - Initializing innogy SmartHome Session...
2018-03-11 15:36:08.818 [DEBUG] [arthome.internal.client.InnogyClient] - [1] Statuscode is NOT OK: 403
2018-03-11 15:36:08.818 [DEBUG] [arthome.internal.client.InnogyClient] - Remote access not allowed. Access is allowed only from the SHC device network.
2018-03-11 15:36:08.818 [DEBUG] [marthome.handler.InnogyBridgeHandler] - Remote access not allowed. Dropping access token and reinitializing binding...
2018-03-11 15:36:08.818 [DEBUG] [marthome.handler.InnogyBridgeHandler] - Scheduling reinitialize in 0 seconds.
2018-03-11 15:36:08.818 [DEBUG] [marthome.handler.InnogyBridgeHandler] - Unexcepted API error: Remote access not allowed. Access is allowed only from the SHC device network.
2018-03-11 15:36:08.818 [DEBUG] [marthome.handler.InnogyBridgeHandler] - Initializing innogy SmartHome BridgeHandler...
2018-03-11 15:36:08.818 [DEBUG] [marthome.handler.InnogyBridgeHandler] - innogy config: Config [clientId=24635748, clientSecret=no secret, redirectUrl=https://www.ollie.in/innogy-smarthome-token/, authCode=, accessToken=eyJ0eXAiOi...-__V-gQmHw, refreshToken=47b18...d9bda]
2018-03-11 15:36:08.818 [DEBUG] [marthome.handler.InnogyBridgeHandler] - Disposing innogy SmartHome bridge handler 'SMARTHOME10'
2018-03-11 15:36:08.818 [DEBUG] [arthome.internal.client.InnogyClient] - Uninitializing innogy SmartHome Session...
2018-03-11 15:36:08.818 [INFO ] [marthome.handler.InnogyBridgeHandler] - Initializing innogy SmartHome client...
2018-03-11 15:36:08.818 [DEBUG] [arthome.internal.client.InnogyClient] - Initializing innogy SmartHome Session...
2018-03-11 15:36:08.872 [DEBUG] [arthome.internal.client.InnogyClient] - [2] Statuscode is NOT OK: 404
2018-03-11 15:36:08.872 [DEBUG] [arthome.internal.client.InnogyClient] - Session not found: ErrorResponse [code=2012, description=Session not found, messages=[Session not found: e76ce0b5232b46bb8bd004c78babf7dc]]
2018-03-11 15:36:08.872 [DEBUG] [marthome.handler.InnogyBridgeHandler] - innogy SmartHome bridge handler shut down.
2018-03-11 15:36:08.872 [DEBUG] [marthome.handler.InnogyBridgeHandler] - Scheduling reinitialize in 120 seconds.
2018-03-11 15:36:08.872 [ERROR] [marthome.handler.InnogyBridgeHandler] - Error initializing innogy SmartHome client.
2018-03-11 15:36:09.088 [DEBUG] [arthome.internal.client.InnogyClient] - [1] Statuscode is NOT OK: 403
2018-03-11 15:36:09.104 [DEBUG] [arthome.internal.client.InnogyClient] - Remote access not allowed. Access is allowed only from the SHC device network.
2018-03-11 15:36:09.104 [DEBUG] [marthome.handler.InnogyBridgeHandler] - Remote access not allowed. Dropping access token and reinitializing binding...
2018-03-11 15:36:09.104 [DEBUG] [marthome.handler.InnogyBridgeHandler] - Scheduling reinitialize in 0 seconds - ignored: already triggered in 119 seconds.
2018-03-11 15:36:09.104 [DEBUG] [marthome.handler.InnogyBridgeHandler] - Unexcepted API error: Remote access not allowed. Access is allowed only from the SHC device network.
2018-03-11 15:36:09.104 [DEBUG] [marthome.handler.InnogyBridgeHandler] - Disposing innogy SmartHome bridge handler 'SMARTHOME10'
2018-03-11 15:36:09.104 [DEBUG] [marthome.handler.InnogyBridgeHandler] - innogy SmartHome bridge handler shut down.
2018-03-11 15:36:09.104 [DEBUG] [marthome.handler.InnogyBridgeHandler] - Scheduling reinitialize in 120 seconds.
2018-03-11 15:36:09.104 [ERROR] [marthome.handler.InnogyBridgeHandler] - Error initializing innogy SmartHome client.

Thanks for the logs, @sayhelloto. I’ll talk to the developers again as this definetely means that it does not work. :frowning:

But wait - it seems you have the same accesstoken every time again. Maybe I missed something. I’ll dig into it again and get back to you - hopefully I can make it this weekend.

1 Like

hi oliver, for me the getting of authtoken doesn’t work at all… when i click on the link in openhab paperui, it takes me to the login screen but nothing happens there. i enter my user/pass but instead of being redirected to you’re page, i’m being presented with a login form again…

is this link working for you? https://api.services-smarthome.de/AUTH/authorize?response_type=code&client_id=24635750&redirect_uri=https%3A%2F%2Fwww.ollie.in%2Fstart-smarthome-token%2F&scope&lang=de-DE

I’m getting as a response: Wrong provider. Please use the correct client to login.

Hi,

here comes a new version:
http://www.ollie.in/wp-content/uploads/2018/03/org.openhab.binding.innogysmarthome-2.3.0-SNAPSHOT-180323.jar

@sayhelloto: this should hopefully now create new tokens and solve the “unexpected api error”. Please test!

@suntribe: What brand do you use? Please try the URLs from here, as there is a version with wrong URLs.

Regarding auth-URLs, the new version above already has newer URLs included, which are not yet active in the innogy backend and will be changed there soon. So please use the URLs from the README.md.