spants / hive2mqtt

Python code to pull data from Hive Active Home and publish to MQTT
GNU General Public License v3.0
3 stars 0 forks source link

Error with hubmac not defind. #1

Closed mattman73 closed 9 years ago

mattman73 commented 9 years ago

Hi I have install your python script and I'm getting this error. I have a hive one system installed and I'm using moquitto on Fedora 21. Traceback (most recent call last): File "hive2mqtt.py", line 157, in url = 'https://api.hivehome.com/v5/users/%s/widgets/climate/%s/controls/schedule' %(username, hubmac) NameError: name 'hubmac' is not defined

spants commented 9 years ago

ah - a Hive one system.. I have just pushed a change, can you see if it works?. If you can also post a list of devices found it would help.

mattman73 commented 9 years ago

ok pull the latest build but I'm now getting this error.

Traceback (most recent call last): File "hive2mqtt.py", line 184, in temp = json.loads(body) File "/usr/lib64/python2.7/json/init.py", line 338, in loads return _default_decoder.decode(s) File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) TypeError: expected string or buffer

text output. http://paste.fedoraproject.org/285589/12063144/

Thanks Matt

spants commented 9 years ago

Hi Matt Do you have the dual controller with Hotwater or just heating? I think I need to do an additional check here - thanks for the feedback! Tony

spants commented 9 years ago

Can you try the latest - it will still fail for you but please send the output so that I can put a check in my code - thanks !

mattman73 commented 9 years ago

Hi Tony Yes I have single channel so yes heating only. New error output. File "hive2mqtt.py", line 189, in temp = json.loads(body) File "/usr/lib64/python2.7/json/init.py", line 338, in loads return _default_decoder.decode(s) File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) TypeError: expected string or buffer

http://paste.fedoraproject.org/285621/63250821

Matt

spants commented 9 years ago

v1.2 fixes support for single channel and Hive v1 systems