prasad-edlabadka / homebridge-tuya-ir

Allows homebridge to control Tuya Smart IR based devices
Apache License 2.0
50 stars 22 forks source link

No permissions Error #11

Closed biocross closed 2 years ago

biocross commented 2 years ago

Hello, first of all, thank you for your work on this plugin.

I'm trying to add my IR blaster to control my AC using the plugin.

My config looks like this:

{
            "name": "TuyaIR",
            "client_id": "XX",
            "secret": "XX",
            "region": "us",
            "deviceId": "XX",
            "devices": [
                "XX"
            ],
            "platform": "TuyaIR"
        }

When I run the plugin and actually try to control my AC, I get the following errors:

[25/07/2021, 10:43:04] [TuyaIR] Failed to change AC temperature due to error No permissions. This project is not authorized to call this API.
[25/07/2021, 10:43:09] [TuyaIR] Failed to change AC status due to error No permissions. This project is not authorized to call this API.
[25/07/2021, 10:43:11] [TuyaIR] Failed to change AC status due to error No permissions. This project is not authorized to call this API.
[25/07/2021, 10:43:13] [TuyaIR] Failed to change AC status due to error Failed to invoke API
[25/07/2021, 10:43:13] [TuyaIR] API call failed.
[25/07/2021, 10:43:13] [TuyaIR] Error: getaddrinfo EAI_AGAIN openapi.tuyaus.com
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:69:26) {
  errno: -3001,
  code: 'EAI_AGAIN',
  syscall: 'getaddrinfo',
  hostname: 'openapi.tuyaus.com'
}
[25/07/2021, 10:43:15] [TuyaIR] Failed to change AC status due to error No permissions. This project is not authorized to call this API.
[25/07/2021, 10:43:18] [TuyaIR] Failed to change AC fan due to error No permissions. This project is not authorized to call this API.
[25/07/2021, 10:43:28] [TuyaIR] Failed to change AC status due to error Failed to invoke API
[25/07/2021, 10:43:28] [TuyaIR] API call failed.
[25/07/2021, 10:43:28] [TuyaIR] Error: getaddrinfo EAI_AGAIN openapi.tuyaus.com
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:69:26) {
  errno: -3001,
  code: 'EAI_AGAIN',
  syscall: 'getaddrinfo',
  hostname: 'openapi.tuyaus.com'
}

Any ideas what can I check to potentially fix these?

biocross commented 2 years ago

Nevermind, it worked after adding the IR permission to my Tuya project again. Thank you!