Page 1 of 1
Nibe heatpump API
Posted: Friday 07 October 2016 20:05
by alveman
Now there is a open API for Nibe heatpump. Is there anybody using it?
https://api.nibeuplink.com/ log in with your Uplink account.
Skickat från min iPad med Tapatalk
Re: Nibe heatpump API
Posted: Thursday 20 October 2016 14:40
by Zinken
Would really love to have this, but I have zero programming skills myself. Found a python script for netatmo
viewtopic.php?t=1817 that seems to do something similar. Maybe could help with a base to adjust to work with Nibe.
Would be willing to test though, can't afford to donate a Nibe heatpump to devs
Re: Nibe heatpump API
Posted: Friday 21 October 2016 8:23
by BakSeeDaa
alveman wrote:Now there is a open API for Nibe heatpump. Is there anybody using it?
That's great news! Thank You!
Zinken wrote:Would really love to have this, but I have zero programming skills myself. Found a python script for netatmo
viewtopic.php?t=1817 that seems to do something similar. Maybe could help with a base to adjust to work with Nibe.
Would be willing to test though, can't afford to donate a Nibe heatpump to devs
Thanks! I will have a look into this.
EDIT1: Trying to use the Netatmo scripts as a starting point. The Netatmo script uses a different authentication flow. "Client credentials" grant type. NIBE Uplink currently supports the "Authorization Code Grant" flow and the "Implicit Grant" flow.
EDIT2: The Authorization Code grant type is the most common OAuth2.0 flow. It implements 3-Legged OAuth and involves the user granting the client an authorization code, which can be exchanged for an Access Token. In our case, Domoticz need to access the Nibe Uplink API when the user is not present, without user intervention at all. This style of access is called offline, and web server applications can request offline access from a user. However the Nibe Uplink server hasn't yet granted me offline access even though I've requested it. It might be so that the Nibe Uplink API services doesn't support offline access. Unfortunately I'm stuck at the moment.
Re: Nibe heatpump API
Posted: Friday 21 October 2016 19:11
by alveman
Perhaps an unnecessary question, but it looks like that the program must be registered on the Uplink page. Have you done it?
Skickat från min iPhone med Tapatalk
Re: Nibe heatpump API
Posted: Friday 21 October 2016 20:13
by BakSeeDaa
alveman wrote:Perhaps an unnecessary question, but it looks like that the program must be registered on the Uplink page. Have you done it?
I've reached the stage of authorization code exchange, that is, I've successfully received an access token and a refresh token. I was expecting the response to include an authorization code...
Re: Nibe heatpump API
Posted: Saturday 22 October 2016 13:12
by BakSeeDaa
Parsing the json data, I've now been able to retrieve some data from my system. Example:
Code: Select all
Number of systems: 1
Name: XXXXXXXXXXXXXXX
Serial number: XXXXXXXXXXXXXXXXXXXXXX
System ID: XXXXXXXXXXXXX
Title: Heating
Parameter
Name: 43005
Designation:
Title: degree minutes
Parameter ID: 43005
Display Value: -69DM
Unit: DM
Raw Value: -695
Title: Ventilation
Parameter
Name: fan_speed
Designation:
Title: fan speed
Parameter ID: 10001
Display Value: 59%
Unit: %
Raw Value: 59
Parameter
Name: 40025
Designation: BT20
Title: exhaust air
Parameter ID: 40025
Display Value: 20.5°C
Unit: °C
Raw Value: 205
Parameter
Name: 40026
Designation: BT21
Title: extract air
Parameter ID: 40026
Display Value: -0.1°C
Unit: °C
Raw Value: -1
Title: Compressor
Parameter
Name: 43416
Designation: EB100-EP14
Title: number of starts:
Parameter ID: 43416
Display Value: 7806
Unit:
Raw Value: 7806
Parameter
Name: 43420
Designation: EB100-EP14
Title: total operating time:
Parameter ID: 43420
Display Value: 9351h
Unit: h
Raw Value: 9351
Parameter
Name: 43424
Designation: EB100-EP14
Title: - of which hot water:
Parameter ID: 43424
Display Value: 1891h
Unit: h
Raw Value: 1891
Parameter
Name: 43136
Designation:
Title: current compr. frequency
Parameter ID: 43136
Display Value: 27Hz
Unit: Hz
Raw Value: 276
Title: Heating Medium Pump
Parameter
Name: 40047
Designation: 1 rad EB100-BT61
Title: supply temp.
Parameter ID: 40047
Display Value: 26.7°C
Unit: °C
Raw Value: 267
Parameter
Name: 40048
Designation: 1 rad EB100-BT62
Title: return temp.
Parameter ID: 40048
Display Value: 25.0°C
Unit: °C
Raw Value: 250
Parameter
Name: 43181
Designation:
Title: pump speed heating medium
Parameter ID: 43181
Display Value: 1%
Unit: %
Raw Value: 1
I believe we can do something nice out of this. We need a different authentication flow that doesn't require user intervention though. I will have to talk to Nibe about that to see if it can be solved.
Re: Nibe heatpump API
Posted: Saturday 22 October 2016 14:31
by Zinken
Great stuff, really excited to see progress. As I said before, I can't contribute much but if testers are needed I would gladly help.
Sent from my MI 5 using Tapatalk 2
Re: Nibe heatpump API
Posted: Wednesday 26 October 2016 13:03
by BakSeeDaa
Hi there!
I'd just like to inform You that there has been some progress in my project. I took a few days off from my job and learned to program in python language and starting up this project.
I can now use a script to authorize with the Nibe Uplink OAuth2 server and receive data about my Nibe heating pump. It's quite cool actually. Currently and for testing purposes I'm just querying for the Ventilation Fan Speed every 5 minutes and storing the value in a Domoticz percentage device. I will develop the script further a bit before I create a new thread here dedicated for the project.
Untitled.png
Cheers!
Re: Nibe heatpump API
Posted: Monday 31 October 2016 17:56
by BakSeeDaa
Ready for Beta Testing. I will contact @zinken.
Re: Nibe heatpump API
Posted: Monday 31 October 2016 21:41
by BakSeeDaa
Meanwhile... here is a short glimpse of what will come.
Untitled.png
For my system, a single heat pump Nibe F750, I can choose between 50 different resources to add as devices in Domoticz. I think that the newest stable version also will offer more suitable device types. For example, I'm currently storing "Compressor Starts" in a text device. I will check out the "custom type" after upgrading Domoticz.
Updating the devices is done by a cron job and a python script. That is, it will not lock up or delay the Domoticz eventsystem while waiting for external servers to respond.
Re: Nibe heatpump API
Posted: Tuesday 01 November 2016 9:24
by device33
I love this thread.
I recently got my Nibe 750 aswell and like to implement it to my domoticz installation.
@BakSeeDaa Can you include me in testing?
Re: Nibe heatpump API
Posted: Tuesday 01 November 2016 10:24
by BakSeeDaa
I don't wish to hijack this thread, (I guess I already kind of did just that) I've now created a new project thread at
viewtopic.php?t=13996