[Netatmo] Modification of the tokenRefresh handling process (#14548)
* Modification of the tokenRefresh handling process * Storing refreshToken in userdata/netatmo --------- Signed-off-by: clinique <gael@lhopital.org>
This commit is contained in:
@@ -50,9 +50,6 @@ The Account bridge has the following configuration elements:
|
||||
| webHookUrl | String | No | Protocol, public IP and port to access openHAB server from Internet |
|
||||
| webHookPostfix | String | No | String appended to the generated webhook address (should start with "/") |
|
||||
| reconnectInterval | Number | No | The reconnection interval to Netatmo API (in s) |
|
||||
| refreshToken | String | Yes* | The refresh token provided by Netatmo API after the granting process. Can be saved in case of file based configuration |
|
||||
|
||||
(*) Strictly said this parameter is not mandatory at first run, until you grant your binding on Netatmo Connect. Once present, you'll not have to grant again.
|
||||
|
||||
**Supported channels for the Account bridge thing:**
|
||||
|
||||
@@ -69,7 +66,6 @@ The Account bridge has the following configuration elements:
|
||||
1. 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).
|
||||
1. Press the _"Authorize Thing"_ button. This will take you either to the login page of Netatmo Connect or directly to the authorization screen. Login and/or authorize the application. You will be returned and the entry should go green.
|
||||
1. The bridge configuration will be updated with a refresh token and go _ONLINE_. The refresh token is used to re-authorize the bridge with Netatmo Connect Web API whenever required. So you can consult this token by opening the Thing page in MainUI, this is the value of the advanced parameter named “Refresh Token”.
|
||||
1. If you're using file based .things config file, copy the provided refresh token in the **refreshToken** parameter of your thing definition (example below).
|
||||
|
||||
Now that you have got your bridge _ONLINE_ you can now start a scan with the binding to auto discover your things.
|
||||
|
||||
@@ -666,7 +662,7 @@ All these channels are read only.
|
||||
### things/netatmo.things
|
||||
|
||||
```java
|
||||
Bridge netatmo:account:myaccount "Netatmo Account" [clientId="xxxxx", clientSecret="yyyy", refreshToken="zzzzz"] {
|
||||
Bridge netatmo:account:myaccount "Netatmo Account" [clientId="xxxxx", clientSecret="yyyy"] {
|
||||
Bridge weather-station inside "Inside Weather Station" [id="70:ee:aa:aa:aa:aa"] {
|
||||
outdoor outside "Outside Module" [id="02:00:00:aa:aa:aa"] {
|
||||
Channels:
|
||||
|
||||
Reference in New Issue
Block a user