Domoticz RPC for NIBE Uplink

For heating/cooling related questions in Domoticz

Moderator: leecollings

Leonard
Posts: 6
Joined: Friday 11 November 2016 22:51
Target OS: Raspberry Pi / ODroid
Domoticz version: 5877
Location: Sweden
Contact:

Re: Domoticz RPC for NIBE Uplink

Post by Leonard »

Yeah, I can see the values are the same now. Thing is Nibe don't display when the numbers were updated as Domoticz do. Nibe also had some maintenance when I wrote the first post, it is fine now though.

Another question; Does any of you guys know what benefit a premium account could bring from a Domoticz perspective?

Once again, awesome work!
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: Domoticz RPC for NIBE Uplink

Post by BakSeeDaa »

Thank You "A" for supporting this project by your generous donation. :) :) :)
Leonard
Posts: 6
Joined: Friday 11 November 2016 22:51
Target OS: Raspberry Pi / ODroid
Domoticz version: 5877
Location: Sweden
Contact:

Re: Domoticz RPC for NIBE Uplink

Post by Leonard »

New issue;
Since my 1255 uses Smart Price Adaption I get the current cost for electricity, I thought it could be interesting to also have that data in Domoticz. I ran:

Code: Select all

python /home/pi/domoticz/scripts/NibeUplink/nibeuplink.pyc --redefine -v
to add the feature. When I did it I get the following response:
Found a new Nibe Uplink resource: 'Nibe F1255 Price Of Electricity Se3'
Shall I enable it and create a Domoticz Virtual Device for it? : Y/N [N]:y
Unknown Domoticz type: 'öre/kWh'
Updated the config file at /home/pi/domoticz/scripts/NibeUplink/config.json
When I check config.json it looks like this:
{
"domoticzIdx":0,
"domoticzSensorType":0,
"enabled":false,
"nibeCategoryName":"smart price adaption",
"nibeDesignation":"SE3",
"nibeParameterId":10069,
"nibeSystemId":21490,
"nibeTitle":"price of electricity",
"valueFactor":0.001
}
Any ideas?
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: Domoticz RPC for NIBE Uplink

Post by BakSeeDaa »

Leonard wrote:New issue;
Since my 1255 uses Smart Price Adaption I get the current cost for electricity, I thought it could be interesting to also have that data in Domoticz. I ran:
......
I've added support for "Smart Price Adaption" in version 1.0.3. Please download the latest version and redefine that device again. I haven't been able to test it here but I believe it will work and after some time you should have a nice graph covering the Nordpool Spot energy price. Please let me know if it works. Thanks!
Leonard
Posts: 6
Joined: Friday 11 November 2016 22:51
Target OS: Raspberry Pi / ODroid
Domoticz version: 5877
Location: Sweden
Contact:

Re: Domoticz RPC for NIBE Uplink

Post by Leonard »

Works fantastic as always.

Great work!
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: Domoticz RPC for NIBE Uplink

Post by BakSeeDaa »

Leonard wrote:Works fantastic as always.

Great work!
I'm glad to hear that! :D
Ludde
Posts: 4
Joined: Tuesday 06 December 2016 11:22
Target OS: Linux
Domoticz version:
Contact:

Re: Domoticz RPC for NIBE Uplink

Post by Ludde »

Hi!

First off, awesome idea to make this!

Got a small problem thou, the search paths seem to be "hard coded" in the script and to the user pi. (ie. /home/pi/domoticz/scripts/...) Since I am using an install on an ubuntu dist I have a username other than pi (/home/_myusername_/domoticz/scripts...). Is there anyway I can install this? Got a error message when I run the file. Can you update the script with removed paths? If it's ran in the same directory the search paths in the python file may not be necessary, right?

Thanks again for a great contribution!
Ludde
-------
BR / Ludde
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: Domoticz RPC for NIBE Uplink

Post by BakSeeDaa »

Ludde wrote:Hi!

First off, awesome idea to make this!

Got a small problem thou, the search paths seem to be "hard coded" in the script and to the user pi. (ie. /home/pi/domoticz/scripts/...) Since I am using an install on an ubuntu dist I have a username other than pi (/home/_myusername_/domoticz/scripts...). Is there anyway I can install this? Got a error message when I run the file. Can you update the script with removed paths? If it's ran in the same directory the search paths in the python file may not be necessary, right?

Thanks again for a great contribution!
Ludde
Ludde, Let me have a look at that.
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: Domoticz RPC for NIBE Uplink

Post by BakSeeDaa »

Ludde wrote:Hi!

First off, awesome idea to make this!

Got a small problem thou, the search paths seem to be "hard coded" in the script and to the user pi. (ie. /home/pi/domoticz/scripts/...) Since I am using an install on an ubuntu dist I have a username other than pi (/home/_myusername_/domoticz/scripts...). Is there anyway I can install this? Got a error message when I run the file. Can you update the script with removed paths? If it's ran in the same directory the search paths in the python file may not be necessary, right?

Thanks again for a great contribution!
Ludde
There should be no "hard coded" paths or usernames in the script. Can you quote the exact command that you are issuing together with the error message that you receive? Thanks!
Ludde
Posts: 4
Joined: Tuesday 06 December 2016 11:22
Target OS: Linux
Domoticz version:
Contact:

Re: Domoticz RPC for NIBE Uplink

Post by Ludde »

BakSeeDaa wrote:
There should be no "hard coded" paths or usernames in the script. Can you quote the exact command that you are issuing together with the error message that you receive? Thanks!
Hello,

/domoticz/scripts/NibeUplink$ python /home/ludvig/domoticz/scripts/NibeUplink/nibeuplink2.pyc
Traceback (most recent call last):
File "/home/pi/domoticz/scripts/NibeUplink/nibeuplink.py", line 13, in <module>
ImportError: No module named requests

When looking inside the file with a text editor I can see a reference to: home/pi/domoticz/scripts/NibeUplink/nibeuplink.pyt

Thank you for your help! Really want to have my VP in Domoticz.
-------
BR / Ludde
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: Domoticz RPC for NIBE Uplink

Post by BakSeeDaa »

Ludde wrote: ImportError: No module named requests
Did you install the requests module as described in initial post?
Ludde
Posts: 4
Joined: Tuesday 06 December 2016 11:22
Target OS: Linux
Domoticz version:
Contact:

Re: Domoticz RPC for NIBE Uplink

Post by Ludde »

Yepp, I believe so, installed python-pip and the update.

Thanks
-------
BR / Ludde
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: Domoticz RPC for NIBE Uplink

Post by BakSeeDaa »

Ludde wrote:Yepp, I believe so, installed python-pip and the update.

Thanks
What is the result if you run

Code: Select all

pip install requests
Ludde
Posts: 4
Joined: Tuesday 06 December 2016 11:22
Target OS: Linux
Domoticz version:
Contact:

Re: Domoticz RPC for NIBE Uplink

Post by Ludde »

That solved it nicely!! Now it's working fine!

This is the output:
Collecting requests
Downloading requests-2.12.3-py2.py3-none-any.whl (575kB)
100% |████████████████████████████████| 583kB 789kB/s
Installing collected packages: requests
Successfully installed requests-2.12.3
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Did not have to do the actual update, worked anyway.

Thanks!!!
-------
BR / Ludde
MrBastard
Posts: 2
Joined: Friday 23 December 2016 20:28
Target OS: -
Domoticz version:
Contact:

Re: Domoticz RPC for NIBE Uplink

Post by MrBastard »

Hi, thanks for a nice script - for me it worked one time - direct after installation - but it did not continue to supply data to my domoticz.
I'm running a Qnap 4.3.1 with python 2.7.12 running Domoticz V3.5985

Running the script: python /domoticz/scripts/NibeUplink/nibeuplink.pyc -v generates this:
The thing that i can see is the "/home/pi/domoticz/scripts/NibeUplink/nibeuplink.py" doesnt exist.
I have the files at: /share/CACHEDEV1_DATA/.qpkg/domoticz/scripts/NibeUplink/nibeuplink.pyc
Any thoughts?

Code: Select all

Domoticz RPC for NIBE Uplink Version 1.0.3 running on TTY console...
Number of systems: 1

Product Name: NIBE F1255
Serial number: 06540016046003
System ID: 25798
Has alarmed: False

Traceback (most recent call last):
  File "/home/pi/domoticz/scripts/NibeUplink/nibeuplink.py", line 785, in <module>
  File "/home/pi/domoticz/scripts/NibeUplink/nibeuplink.py", line 781, in main
  File "/home/pi/domoticz/scripts/NibeUplink/nibeuplink.py", line 710, in list_systems
  File "/home/pi/domoticz/scripts/NibeUplink/nibeuplink.py", line 469, in updateDomoDevice
KeyError: 'result'
[~] #
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: Domoticz RPC for NIBE Uplink

Post by BakSeeDaa »

MrBastard wrote:Hi, thanks for a nice script - for me it worked one time - direct after installation - but it did not continue to supply data to my domoticz.
I'm running a Qnap 4.3.1 with python 2.7.12 running Domoticz V3.5985

Running the script: python /domoticz/scripts/NibeUplink/nibeuplink.pyc -v generates this:
The thing that i can see is the "/home/pi/domoticz/scripts/NibeUplink/nibeuplink.py" doesnt exist.
I have the files at: /share/CACHEDEV1_DATA/.qpkg/domoticz/scripts/NibeUplink/nibeuplink.pyc
Any thoughts?

Code: Select all

Domoticz RPC for NIBE Uplink Version 1.0.3 running on TTY console...
Number of systems: 1

Product Name: NIBE F1255
Serial number: 06540016046003
System ID: 25798
Has alarmed: False

Traceback (most recent call last):
  File "/home/pi/domoticz/scripts/NibeUplink/nibeuplink.py", line 785, in <module>
  File "/home/pi/domoticz/scripts/NibeUplink/nibeuplink.py", line 781, in main
  File "/home/pi/domoticz/scripts/NibeUplink/nibeuplink.py", line 710, in list_systems
  File "/home/pi/domoticz/scripts/NibeUplink/nibeuplink.py", line 469, in updateDomoDevice
KeyError: 'result'
[~] #
Hi there! I'm not sure what's going on in this case but I will try to add some better debugging info. It looks like the script was unable to list a specific domoticz device. If You have the time, you can check the file config.json and check the field "domoticzIdx". It should contain valid domoticz id:s. Did You by any chance manually delete some devices in Domoticz after setting up Domoticz RPC for NIBE Uplink? I will have a better look at the code very soon.
MrBastard
Posts: 2
Joined: Friday 23 December 2016 20:28
Target OS: -
Domoticz version:
Contact:

Re: Domoticz RPC for NIBE Uplink

Post by MrBastard »

BakSeeDaa wrote: Hi there! I'm not sure what's going on in this case but I will try to add some better debugging info. It looks like the script was unable to list a specific domoticz device. If You have the time, you can check the file config.json and check the field "domoticzIdx". It should contain valid domoticz id:s. Did You by any chance manually delete some devices in Domoticz after setting up Domoticz RPC for NIBE Uplink? I will have a better look at the code very soon.
Thank you for your quick return - However - last night i did remove the config.json file and redid a new one and got everything up and running.
I dont recall, but it might be as you said - i only removed them in domoticz and not using the script and therefore generating this problem.

And as we say here, GOD JUL!
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: Domoticz RPC for NIBE Uplink

Post by BakSeeDaa »

MrBastard wrote:Thank you for your quick return - However - last night i did remove the config.json file and redid a new one and got everything up and running.
I dont recall, but it might be as you said - i only removed them in domoticz and not using the script and therefore generating this problem.

And as we say here, GOD JUL!
Hi! I'm happy to hear that everything works fine now. Wishing You a merry Christmas!
BakSeeDaa
Posts: 485
Joined: Thursday 17 September 2015 10:13
Target OS: Raspberry Pi / ODroid
Domoticz version:

Re: Domoticz RPC for NIBE Uplink

Post by BakSeeDaa »

Version 1.0.4 (The Christmas version) Released 2016-12-24
  • Added additional error checking to be sure that Domoticz has responded with accurate device data upon request.
Merry Christmas by the way.
maol
Posts: 5
Joined: Tuesday 27 December 2016 20:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Domoticz RPC for NIBE Uplink

Post by maol »

This solution looks great! How can I get access to it?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest