I’m trying to connect my Netatmo devices to a fresh installation of openHAB 4.2.3. Unfortunately I have problems with the process of authorizing the netatmo account bridge.
I followed the steps according to the documentation of the binding:
I added an app in the developer portal of netatmo. The app status is “activated”. From the developer portal I get the client id and client secret.
I added a “Netatmo account” thing in the web UI of openHab and entered the client id and client secret.
As soon as I added this thing the following line is appended to the openHAB log:
The thing has a configuration error like it is described in the documentation.
I opened the page http://localhost:8080/netatmo/connect/ and clicked on the green “Authorize Thing” button. The Netatmo authentication page opened (https://auth.netatmo.com/…) where I was already logged in. On that page I clicked the “Yes, I accept” button.
The browser returned to the previous page which looks exactly like before. The URL got expanded with a state and code value
The thing still is offline with the configuration error. In the logfile I find the following line:
2024-12-12 18:41:04.531 [WARN ] [etatmo.internal.servlet.GrantServlet] - Registering servlet failed:ServletModel{id=ServletModel-42,name='org.openhab.binding.netatmo.internal.servlet.GrantServlet',alias='/netatmo/connect/<clientID>',urlPatterns=[/netatmo/connect/<clientID>/*],servlet=org.openhab.binding.netatmo.internal.servlet.GrantServlet@3d1dcf17,contexts=[{HS,OCM-39,default,/}]} can't be registered. Context / already contains servlet mapping for alias /netatmo/connect/<clientID>: ServletModel{id=ServletModel-41,name='org.openhab.binding.netatmo.internal.servlet.GrantServlet',alias='/netatmo/connect/<clientID>',urlPatterns=[/netatmo/connect/<clientID>/*],servlet=org.openhab.binding.netatmo.internal.servlet.GrantServlet@36b9317e,contexts=[{HS,OCM-39,default,/}]}
What am I missing or doing wrong?
I encountered the same behaviour using openHAB 4.3M5.
I did some additional tests, unfortunately without any luck.
I read in another topic about the netatmo add-in that in version 4.1.0 several changes were made and that this version worked for someone else. So I installed 4.1.0 but I still get the exact same behaviour.
I have an old version of openHAB 3.4.3 running on a Raspberry Pi. In that version I have another netatmo app configured and it is working flawlessly. When I try to authorize this app with the new version of openHAB I also get the same error.
I exported the netatmo account thing from the old version using the API explorer and get /things/{thingUID}. When I import it into the new version, a thing is generated. However the authorization page does not exist (“Sorry Requested content not found.”).
Hallo Martin,
have you solved your problem?
I had exact the same problem after my migration from a direct install on debian on 4.3.2 to a docker container install 4.3.2 on an other server and also now after my upgrade to 4.3.3 of the docker container last night.
All other things are working well.
I have recreated several times the netatmo app and the netatmo account bridge thing in openhab, the auth web page with the green authorize button followed with the netatmo web page and the yes-button - everything looks like to work but in the logs there is the warning. I also restarted Openhab several times
2025-03-13 05:52:57.951 [WARN ] [etatmo.internal.servlet.GrantServlet] - Registering servlet failed:ServletModel{id=ServletModel-50,name='org.openhab.binding.netatmo.internal.servlet.GrantServlet',alias='/netatmo/connect/<clientID>',urlPatterns=[/netatmo/connect/ <clientID>/*],servlet=org.openhab.binding.netatmo.internal.servlet.GrantServlet@557b3b7d,contexts=[{HS,OCM-47,default,/}]} can't be registered. Context / already contains servlet mapping for alias /netatmo/connect/<clientID>: ServletModel{id=ServletModel-49,name='org.openhab.binding.netatmo.internal.servlet.GrantServlet',alias='/netatmo/connect/<clientID>',urlPatterns=[/netatmo/connect/<clientID>/*],servlet=org.openhab.binding.netatmo.internal.servlet.GrantServlet@74cdc222,contexts=[{HS,OCM-47,default,/}]}
As i see on this website
after the auth on the netatmo page when i come back the crate around the “authorize thing” button became not green …
but the StorageHandler.For.OAuthClientService.json is created with 4 netatmo account settings …
Can i maybe put the access and refresh tokens by hand into any file?