LarsMichelsen / pmatic

Python API for Homematic. Easy to use.
https://larsmichelsen.github.io/pmatic/
GNU General Public License v2.0
34 stars 23 forks source link

JSONRPCError: missing argument (paramsetKey) Code: 402 #27

Open miansch opened 5 years ago

miansch commented 5 years ago

Hello, I have a raspberry PI with pivCCU. When I try to use pmatic on the raspberry to communicate with the ccu, I always get an error, when I want to read device-specific values. When I write this:

import pmatic ccu = pmatic.CCU(address="10.0.0.16", credentials=("Admin", "")) devices = ccu.devices.query(device_type=["HM-CC-RT-DN"]) for device in devices: print(device.name)

then I get:

HM-CC-RT-DN OEQ1706899

That's good since I have connected exactly this thermostate with my CCU. So there is a communication with it, But when I try to read the temperature, like: import pmatic ccu = pmatic.CCU(address="10.0.0.16", credentials=("Admin", "")) devices = ccu.devices.query(device_type=["HM-CC-RT-DN"]) for device in devices: print(device.temperature)

then I always get this error:

Traceback (most recent call last): File "pmatic_example.py", line 9, in print(device.temperature) File "/usr/local/lib/python2.7/dist-packages/pmatic/entities.py", line 1183, in temperature return self.channels[4].values["ACTUAL_TEMPERATURE"] File "/usr/local/lib/python2.7/dist-packages/pmatic/entities.py", line 216, in values self._init_value_specs() File "/usr/local/lib/python2.7/dist-packages/pmatic/entities.py", line 235, in _init_value_specs address=self.address, paramsetType="VALUES"): File "/usr/local/lib/python2.7/dist-packages/pmatic/api.py", line 190, in lowlevel_call return self._call(method_name_int, kwargs) File "/usr/local/lib/python2.7/dist-packages/pmatic/api.py", line 470, in _call return self._do_call(method_name_int, kwargs) File "/usr/local/lib/python2.7/dist-packages/pmatic/api.py", line 520, in _do_call return self._parse_api_response(method_name_int, kwargs, response_txt) File "/usr/local/lib/python2.7/dist-packages/pmatic/api.py", line 160, in _parse_api_response kwargs)) pmatic.exceptions.PMException: [interface_get_paramset_description] JSONRPCError: missing argument (paramsetKey) (Code: 402, Request: {'interface': u'BidCos-RF', 'paramsetType': u'VALUES', u'_sessionid': u'prCQ39hNOl', 'address': u'OEQ1706899:4'})

I have less experience with python, so maybe it's just a small issue. Do I have to install any additional software? Anyone an idea?