watchforstock / evohome-client

Python client to access the Evohome web service
Apache License 2.0
88 stars 52 forks source link

Eula issue evohome client version 1 #53

Closed boe22 closed 5 years ago

boe22 commented 5 years ago

When I try to get the evohome temperatures using version 1, I get the following error: File "evohome.py", line 5, in <module> new_dict_list = list(client.temperatures(force_refresh=True)) File "/usr/local/lib/python2.7/dist-packages/evohomeclient/__init__.py", line 73, in temperatures self._populate_full_data(force_refresh) File "/usr/local/lib/python2.7/dist-packages/evohomeclient/__init__.py", line 33, in _populate_full_data userId = self.user_data['userInfo']['userID'] TypeError: list indices must be integers, not str

A bit debugging in evohomeclient/__init__.py shows that response.content on line 40 contains: [ { "code": "LatestEulaNotAccepted", "message": "Latest Eula is not accepted." } ]

Furthermore, response.content on line 67 (user_info) shows the following lines (removed others due to privacy): { "country": "NL", "isActivated": true, "deviceCount": 0, "tenantID": 5, "latestEulaAccepted": false } }

This all suggests that there should be a EULA accepted at Honeywell before this api can be used. However, within my Honeywell account I cannot find such a button or page.

Even more strange: evohome client version 2 works perfectly, but I would really like to use version 1 due to the increased accuracy.

Any clues on how to solve this issue?

zxdavb commented 5 years ago

All I can tell you is that : a) I have never seen the EULA message you describe above, b) I am (currently) still able to retrieve v1 temps with no issues.

zxdavb commented 5 years ago

A lot of the original work for this api was done here, and I see no mention of EULA there.

boe22 commented 5 years ago

Good to know that it is a rare event.

I Figured out a solution: a) Remove evohome from evohome account b) Remove evohome account c) Create a new account and connect to evohome again. In this second account I chose English as language, not sure if that is relevant.

The new account works as supposed.

Although also this second account mentions "latestEulaAccepted": false in the UserInfo. Weird...

nomis commented 5 years ago

This should still be handled because there's nothing worse than an intermittent exception that doesn't explain what went wrong.

nomis commented 5 years ago

I created a second account and shared the location with it from the first account.

The second account now gets just the EULA message on the full_data part of the process, but the V1 API may not support shared locations.