CharlesBlonde / libpurecoollink

Dyson Pure Cool link python library
http://libpurecoollink.readthedocs.io
Other
205 stars 54 forks source link

Can't find device in account #23

Open bryanshihpeng opened 5 years ago

bryanshihpeng commented 5 years ago

Hi, Thanks for your API. I Can't find my TP04 in my account which is already registered. what can i do? Thanks for your help!

GeneralD commented 5 years ago

modify dyson.py v1 -> v2

def devices(self):
        """Return all devices linked to the account."""
        if self._logged:
            device_response = requests.get(
                "https://{0}/v2/provisioningservice/manifest".format(
                    DYSON_API_URL), verify=False, auth=self._auth)

and dyson_device.py because 'Active' is not found in the response now

    def on_connect(client, userdata, flags, return_code):
        ...
#         self._active = json_body['Active']
        self._active = True

But in my case, program freezes after connect() or auto_connect().

etheralm commented 5 years ago

the current version of this library doesn't support those devices and I'm afraid that those changes aren't enough to get them working. but I already submitted a pr add support for them here: https://github.com/CharlesBlonde/libpurecoollink/pull/15