Domoticz RPC for NIBE Uplink
Moderator: leecollings
Re: Domoticz RPC for NIBE Uplink
sorry didnt have time to fix that script, should be quite easy (with my modification it works slave or master)
Maybe dirty solution would be run two script instances (one with modifed sourcecode). Or better to contact script autor to add support for slave devices...
Maybe dirty solution would be run two script instances (one with modifed sourcecode). Or better to contact script autor to add support for slave devices...
-
- Posts: 5
- Joined: Friday 19 October 2018 17:20
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Domoticz RPC for NIBE Uplink
...or I can just update/fix/further develop the script by myself... which I did.
It is now reading data for all Master's and Slave's. After all quite easy addition. The original script is well written, modular and well commented.
Need to test some more and finalize it thou.
What is the procedure to get it shared to others? Does script author "review" changes and update script in first post, or?
It is now reading data for all Master's and Slave's. After all quite easy addition. The original script is well written, modular and well commented.
Need to test some more and finalize it thou.
What is the procedure to get it shared to others? Does script author "review" changes and update script in first post, or?
Re: Domoticz RPC for NIBE Uplink
great
i think just post here updated script is fine for others
looks like original plugin autor isnt active...
i think just post here updated script is fine for others
looks like original plugin autor isnt active...
Re: Domoticz RPC for NIBE Uplink
Any chance to test your modifed script ?vwg4 wrote: ↑Monday 22 October 2018 13:37 ...or I can just update/fix/further develop the script by myself... which I did.
It is now reading data for all Master's and Slave's. After all quite easy addition. The original script is well written, modular and well commented.
Need to test some more and finalize it thou.
What is the procedure to get it shared to others? Does script author "review" changes and update script in first post, or?
-
- Posts: 5
- Joined: Friday 19 October 2018 17:20
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Domoticz RPC for NIBE Uplink
Sure.
But let me finalize it first. (Need to find time Window for that)
Lähetetty minun G8231 laitteesta Tapatalkilla
But let me finalize it first. (Need to find time Window for that)
Lähetetty minun G8231 laitteesta Tapatalkilla
Re: Domoticz RPC for NIBE Uplink
I got an email yesterday from Nibe saying "NIBE Uplink API will no longer support TLS 1.0 and 1.1."
That means this plugin will crash or burn, right?
That means this plugin will crash or burn, right?
Re: Domoticz RPC for NIBE Uplink
yea received same email...
who knows, we will have to wait for change an try to fix auth code
who knows, we will have to wait for change an try to fix auth code
-
- Posts: 11
- Joined: Tuesday 30 May 2017 15:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Domoticz RPC for NIBE Uplink
Here are some exampels for authentication in the new API. Anyone who knows how to fix?
Authentication Examples
Example: Authorization Code Grant
The Authorization Code Grant takes place in 4 steps as outlined below. Before starting to authenticate you need to have registered your application and received a client id and secret.
1. Redirect the user's browser to the OAuth2 authorization page.
Redirect the user's browser to the address outlined below. Make sure to exchange the [CLIENT_ID], [SCOPES] and [REDIRECT_URI] with the correct values for your application.
https://api.nibeuplink.com/oauth/author ... ate=[STATE]
2. The user authorizes your application.
The user will now be prompted with a login form (if not already logged in) and the question whether they would like to give your application access to their data.
3. The user is redirected to your application with authorization data.
When the user has authorized your application he/she will be redirected back to the redirect_uri you specified to the authorize endpoint with the data you need to gain access to the account. Always check that the state parameter returned is equal to the one supplied to the authorization endpoint.
[REDIRECT_URI]?code=[AUTHORIZATION_CODE]&state=[STATE]
4. Your application uses this authorization data to gain access to the account.
Using the data you received in the last step you can call the token endpoint and get an access token and a refresh token that can be used in the following communication.
POST /oauth/token HTTP/1.1
Host: api.nibeuplink.com
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
grant_type=authorization_code&client_id=[CLIENT_ID]&client_secret=[CLIENT_SECRET]&code=[AUTHORIZATION_CODE]&redirect_uri=[REDIRECT_URI]&scope=[SCOPES]
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: no-store
Pragma: no-cache
{
"access_token":[ACCESS_TOKEN],
"expires_in":300,
"refresh_token":[REFRESH_TOKEN],
"scope":[SCOPES],
"token_type":"bearer"
}
5. Authenticate the subsequent requests.
Once the access token has been retrieved it can be used immediately and until the expires_in seconds has passed to access resources in the NIBE Uplink API. To access token needs to be provided as a bearer token to the API endpoints.
GET /api/v1/systems HTTP/1.1
Host: api.nibeuplink.com
Authorization: Bearer [ACCESS_TOKEN]
Example: Refresh Token
Once the access token has been retrieved it can be used immediately and until the expires_in seconds has passed. After that the access token has to be renewed and this can be done using the refresh_token (only available in the Authorization Code Grant flow). This is done by calling the token endpoint with the refresh token.
POST /oauth/token HTTP/1.1
Host: api.nibeuplink.com
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
grant_type=refresh_token&client_id=[CLIENT_ID]&client_secret=[CLIENT_SECRET]&refresh_token=[REFRESH_TOKEN]
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: no-store
Pragma: no-cache
{
"access_token":[ACCESS_TOKEN],
"expires_in":300,
"refresh_token":[REFRESH_TOKEN],
}
Example: Authorization
To authorize your application with any of the API endpoints you need to provide the access token you get from the OAuth token endpoint as a bearer token in the Authorizaton HTTP header.
GET /api/v1/systems HTTP/1.1
Host: api.nibeuplink.com
Authorization: Bearer [ACCESS_TOKEN]
Authentication Examples
Example: Authorization Code Grant
The Authorization Code Grant takes place in 4 steps as outlined below. Before starting to authenticate you need to have registered your application and received a client id and secret.
1. Redirect the user's browser to the OAuth2 authorization page.
Redirect the user's browser to the address outlined below. Make sure to exchange the [CLIENT_ID], [SCOPES] and [REDIRECT_URI] with the correct values for your application.
https://api.nibeuplink.com/oauth/author ... ate=[STATE]
2. The user authorizes your application.
The user will now be prompted with a login form (if not already logged in) and the question whether they would like to give your application access to their data.
3. The user is redirected to your application with authorization data.
When the user has authorized your application he/she will be redirected back to the redirect_uri you specified to the authorize endpoint with the data you need to gain access to the account. Always check that the state parameter returned is equal to the one supplied to the authorization endpoint.
[REDIRECT_URI]?code=[AUTHORIZATION_CODE]&state=[STATE]
4. Your application uses this authorization data to gain access to the account.
Using the data you received in the last step you can call the token endpoint and get an access token and a refresh token that can be used in the following communication.
POST /oauth/token HTTP/1.1
Host: api.nibeuplink.com
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
grant_type=authorization_code&client_id=[CLIENT_ID]&client_secret=[CLIENT_SECRET]&code=[AUTHORIZATION_CODE]&redirect_uri=[REDIRECT_URI]&scope=[SCOPES]
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: no-store
Pragma: no-cache
{
"access_token":[ACCESS_TOKEN],
"expires_in":300,
"refresh_token":[REFRESH_TOKEN],
"scope":[SCOPES],
"token_type":"bearer"
}
5. Authenticate the subsequent requests.
Once the access token has been retrieved it can be used immediately and until the expires_in seconds has passed to access resources in the NIBE Uplink API. To access token needs to be provided as a bearer token to the API endpoints.
GET /api/v1/systems HTTP/1.1
Host: api.nibeuplink.com
Authorization: Bearer [ACCESS_TOKEN]
Example: Refresh Token
Once the access token has been retrieved it can be used immediately and until the expires_in seconds has passed. After that the access token has to be renewed and this can be done using the refresh_token (only available in the Authorization Code Grant flow). This is done by calling the token endpoint with the refresh token.
POST /oauth/token HTTP/1.1
Host: api.nibeuplink.com
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
grant_type=refresh_token&client_id=[CLIENT_ID]&client_secret=[CLIENT_SECRET]&refresh_token=[REFRESH_TOKEN]
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: no-store
Pragma: no-cache
{
"access_token":[ACCESS_TOKEN],
"expires_in":300,
"refresh_token":[REFRESH_TOKEN],
}
Example: Authorization
To authorize your application with any of the API endpoints you need to provide the access token you get from the OAuth token endpoint as a bearer token in the Authorizaton HTTP header.
GET /api/v1/systems HTTP/1.1
Host: api.nibeuplink.com
Authorization: Bearer [ACCESS_TOKEN]
-
- Posts: 1
- Joined: Saturday 17 October 2015 10:10
- Target OS: Windows
- Domoticz version:
- Contact:
Re: Domoticz RPC for NIBE Uplink
What's the status on this plugin? Does it still work or is it considered broken due to changes NIBE made?
-
- Posts: 3
- Joined: Thursday 29 December 2016 18:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Domoticz RPC for NIBE Uplink
Any one has a solution?? I want my heatpump back in my domoticz!
-
- Posts: 5
- Joined: Friday 19 October 2018 17:20
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Domoticz RPC for NIBE Uplink
Funny. Mine is still working fine. Better not restart
Lähetetty minun G8231 laitteesta Tapatalkilla
Lähetetty minun G8231 laitteesta Tapatalkilla
-
- Posts: 5
- Joined: Saturday 09 September 2017 22:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.9700
- Contact:
Re: Domoticz RPC for NIBE Uplink
Has anyone a solution for the new way of authentication?
I cannot get any information out of the system and the logfiles show the following error message:
"Status: (Error) nibeuplink.py: You need to run 'python /home/pi/domoticz/scripts/NibeUplink/nibeuplink.py' from a console to obtain a new Authorization Code"
I tried to run the script but without success. Any idea how to solve this?
I cannot get any information out of the system and the logfiles show the following error message:
"Status: (Error) nibeuplink.py: You need to run 'python /home/pi/domoticz/scripts/NibeUplink/nibeuplink.py' from a console to obtain a new Authorization Code"
I tried to run the script but without success. Any idea how to solve this?
-
- Posts: 4
- Joined: Monday 22 July 2019 10:35
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Domoticz RPC for NIBE Uplink
Hi. Can you share your solution to read all Master and Slave's data?vwg4 wrote: ↑Monday 22 October 2018 13:37 ...or I can just update/fix/further develop the script by myself... which I did.
It is now reading data for all Master's and Slave's. After all quite easy addition. The original script is well written, modular and well commented.
Need to test some more and finalize it thou.
What is the procedure to get it shared to others? Does script author "review" changes and update script in first post, or?
-
- Posts: 4
- Joined: Monday 22 July 2019 10:35
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Domoticz RPC for NIBE Uplink
Did anyone tryed to get new Authorization Code?
showquerystrin.000webhostapp is showing "Website is no longer availabe" The authors have deleted this site.
showquerystrin.000webhostapp is showing "Website is no longer availabe" The authors have deleted this site.
-
- Posts: 3
- Joined: Wednesday 11 September 2019 19:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Domoticz RPC for NIBE Uplink
I did make a simple adjustment by changing the call back url to the following:
redirect_uri = "https://www.marshflattsfarm.org.uk/nibe ... /index.php" # Don't alter this or anything else!
Based on the blog post of: https://www.marshflattsfarm.org.uk/word ... ge_id=3480 which did the trick for me and it now working for multiple hours.
Tempting to do a cleanup later as well, anybody else still working on this code?
redirect_uri = "https://www.marshflattsfarm.org.uk/nibe ... /index.php" # Don't alter this or anything else!
Based on the blog post of: https://www.marshflattsfarm.org.uk/word ... ge_id=3480 which did the trick for me and it now working for multiple hours.
Tempting to do a cleanup later as well, anybody else still working on this code?
-
- Posts: 3
- Joined: Wednesday 11 September 2019 19:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Domoticz RPC for NIBE Uplink
Sorry not fully sure what you mean with slave data, you mean getting the numbers from the nibe-uplink into the system for the logs and such?
So the counters and the values are represented. Or do you mean something else?
-
- Posts: 4
- Joined: Monday 22 July 2019 10:35
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Domoticz RPC for NIBE Uplink
I mean getting data from "slave unit" when you have split type pump.
Slave unit data you can read here:
https://www.nibeuplink.com/System/ID/St ... viceInfo/1
Nibeuplink.py can read only Master unit data from:
https://www.nibeuplink.com/System/ID/St ... viceInfo/0
-
- Posts: 5
- Joined: Friday 19 October 2018 17:20
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Domoticz RPC for NIBE Uplink
I can check if I have this still somewhere. My raspi died At spring, have not yet fixed. Probably will Need New auth method update...cezarysz wrote:Hi. Can you share your solution to read all Master and Slave's data?vwg4 wrote: ↑Monday 22 October 2018 13:37 ...or I can just update/fix/further develop the script by myself... which I did.
It is now reading data for all Master's and Slave's. After all quite easy addition. The original script is well written, modular and well commented.
Need to test some more and finalize it thou.
What is the procedure to get it shared to others? Does script author "review" changes and update script in first post, or?
Lähetetty minun G8231 laitteesta Tapatalkilla
-
- Posts: 3
- Joined: Wednesday 11 September 2019 19:03
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Domoticz RPC for NIBE Uplink
That would be great, especially when it not hard coded, so it can adapt to any solution. Otherwise I might need to add an option to give additional ID's for the sub systems. By adding questions to install script.
Who is online
Users browsing this forum: No registered users and 0 guests