Page 2 of 9

Re: Domoticz RPC for NIBE Uplink

Posted: Sunday 13 November 2016 11:55
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!

Re: Domoticz RPC for NIBE Uplink

Posted: Tuesday 22 November 2016 15:51
by BakSeeDaa
Thank You "A" for supporting this project by your generous donation. :) :) :)

Re: Domoticz RPC for NIBE Uplink

Posted: Saturday 26 November 2016 16:46
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?

Re: Domoticz RPC for NIBE Uplink

Posted: Saturday 26 November 2016 17:14
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!

Re: Domoticz RPC for NIBE Uplink

Posted: Saturday 26 November 2016 18:16
by Leonard
Works fantastic as always.

Great work!

Re: Domoticz RPC for NIBE Uplink

Posted: Saturday 26 November 2016 18:34
by BakSeeDaa
Leonard wrote:Works fantastic as always.

Great work!
I'm glad to hear that! :D

Re: Domoticz RPC for NIBE Uplink

Posted: Tuesday 06 December 2016 11:30
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

Re: Domoticz RPC for NIBE Uplink

Posted: Wednesday 07 December 2016 22:39
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.

Re: Domoticz RPC for NIBE Uplink

Posted: Monday 12 December 2016 9:42
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!

Re: Domoticz RPC for NIBE Uplink

Posted: Monday 12 December 2016 17:03
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.

Re: Domoticz RPC for NIBE Uplink

Posted: Monday 12 December 2016 17:08
by BakSeeDaa
Ludde wrote: ImportError: No module named requests
Did you install the requests module as described in initial post?

Re: Domoticz RPC for NIBE Uplink

Posted: Monday 12 December 2016 21:50
by Ludde
Yepp, I believe so, installed python-pip and the update.

Thanks

Re: Domoticz RPC for NIBE Uplink

Posted: Monday 12 December 2016 21:53
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

Re: Domoticz RPC for NIBE Uplink

Posted: Tuesday 13 December 2016 22:25
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!!!

Re: Domoticz RPC for NIBE Uplink

Posted: Friday 23 December 2016 20:35
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'
[~] #

Re: Domoticz RPC for NIBE Uplink

Posted: Friday 23 December 2016 23:20
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.

Re: Domoticz RPC for NIBE Uplink

Posted: Saturday 24 December 2016 5:12
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!

Re: Domoticz RPC for NIBE Uplink

Posted: Saturday 24 December 2016 8:48
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!

Re: Domoticz RPC for NIBE Uplink

Posted: Saturday 24 December 2016 11:31
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.

Re: Domoticz RPC for NIBE Uplink

Posted: Tuesday 27 December 2016 20:38
by maol
This solution looks great! How can I get access to it?