I have a strange behaviour with the new binding. Every time the binding refresh data the room things (I have two) goes offline and then online again. Datas are refreshed correctly and only these two things shows this error.
2022-05-17 19:38:33.047 [hingStatusInfoChangedEvent] - Thing ‘netatmo:room:xxxxxxx:xxxxxx:xxxxxxx’ changed from ONLINE to OFFLINE: Thing is not reachable
2022-05-17 19:38:33.051 [hingStatusInfoChangedEvent] - Thing ‘netatmo:room:yyyyyyy:yyyyyy:yyyyyyy’ changed from ONLINE to OFFLINE: Thing is not reachable
2022-05-17 19:38:33.381 [hingStatusInfoChangedEvent] - Thing ‘netatmo:room:xxxxxxx:xxxxxx:xxxxxxx’ changed from OFFLINE: Thing is not reachable to ONLINE
2022-05-17 19:38:33.410 [hingStatusInfoChangedEvent] - Thing ‘netatmo:room:yyyyyyy:yyyyyy:yyyyyyy’ changed from OFFLINE: Thing is not reachable to ONLINE
This is certainly a bug.
I have no room in my setup to reproduce the bug.
I assume @glhopital will have a look and provide a fix when he has free time.
I cannot add a bridge (Netatmo Account). I created an app and entered the credentials (ClientID, Client Secret, UserID and pwd), but I get the following in the log:
2022-05-18 19:43:16.766 [DEBUG] [mo.internal.handler.ApiBridgeHandler] - Initializing Netatmo API bridge handler.
2022-05-18 19:43:16.767 [DEBUG] [mo.internal.handler.ApiBridgeHandler] - Connecting to Netatmo API.
2022-05-18 19:43:16.768 [TRACE] [mo.internal.handler.ApiBridgeHandler] - executeUri POST https://api.netatmo.com/oauth2/token
2022-05-18 19:43:17.328 [TRACE] [mo.internal.handler.ApiBridgeHandler] - executeUri returned : code [400 Bad Request] body {"error":"invalid_grant"}
I guess without the webhook, a direct connection from the netatmo server to the OpenHAB server is not required.
Therefore my next question:
Which URL is used for the webhook, because I can add a config to the nginx proxy and allow unauthenticated access on a specific URL to allow the webhook connect to my instance. https://my.public.url:9443/ ???
And yes, I’m sure about the id/secret/username/password.
But I have already one app defined in the “My Apps” section, which I use for the webhook (Netatmo Doorbell) over the “httpListener” Binding:
Then I defined a second app for the Netatmo binding (same username/pwd, different id/secret).
Then I created a new Thing in OH from the Netatmo binding (Netatmo Account) where I use these credentials.
Added:
Just saw the latest version of the docs on Netatmo - Bindings | openHAB I’m guessing the authorization process is about to be changed in M6? No more user/pass. So I guess I’ll wait a bit.
I’ve just installed v3.3.0.M5 of the Netatmo binding and I cannot get it to start. After the command to start in openhab-console the binding is always waiting and an error is logged:
299 x Waiting x 80 x 3.3.0.M5 x org.openhab.binding.netatmo
2022-06-01 18:39:41.229 [WARN ] [ore.thing.internal.ThingRegistryImpl] - bundle org.openhab.core.thing:3.2.0 (212)[org.openhab.core.thing.internal.ThingRegistryImpl(247)] : Could not get service from ref {org.openhab.core.thing.binding.ThingHandlerFactory}={backgroundDiscovery=true, service.id=1994, service.bundleid=299, service.scope=bundle, service.pid=binding.netatmo, component.name=org.openhab.binding.netatmo.internal.NetatmoHandlerFactory, component.id=402}
2022-06-01 18:39:41.230 [WARN ] [ore.thing.internal.ThingRegistryImpl] - bundle org.openhab.core.thing:3.2.0 (212)[org.openhab.core.thing.internal.ThingRegistryImpl(247)] : DependencyManager : invokeBindMethod : Service not available from service registry for ServiceReference {org.openhab.core.thing.binding.ThingHandlerFactory}={backgroundDiscovery=true, service.id=1994, service.bundleid=299, service.scope=bundle, service.pid=binding.netatmo, component.name=org.openhab.binding.netatmo.internal.NetatmoHandlerFactory, component.id=402} for reference ThingHandlerFactory
I used the following command to install the binding:
5. Go to the authorization page of your server. http://<your openHAB address>:8080/netatmo/connect/<_CLIENT_ID_>. Your newly added bridge should be listed there (no need for you to expose your openHAB server outside your local network for this).
When I enter the Client ID and the IP of my OH server, it page doesn’t exist.
Sorry
Requested content not found.
I guess its not an issue that I use a different port - 8192 instead 8080.
I have not tested recently as it works perfectly in my case.
You should see at binding startup a log entry of this kind: Registered Netatmo servlet at xxxxxxx
It should help you to understand what is the path to use to access the special page.