CoolKit-Technologies / ha-addon

Apache License 2.0
261 stars 119 forks source link

Error reported every time turning on/off switch. 每次打开/关闭开关都会报error #26

Closed mazstars closed 3 years ago

mazstars commented 3 years ago

Hi, I am using homeassistant to control my SA-025 (2 channels), and every time I click the switch in HA, it takes seconds to take action. At the same time, some errors pop out in the log of addon. I am using cloud mode because it seems this switch does not support LAN mode. But in the log it still tries to control the device locally, and try cloud mode after LAN mode timeout? The error is pasted below.

我在用homeassistant控制SA-025 (2通道),每次在HA中点开关之后,要等几秒钟才能起作用。并且在addon的log里会报很多error。 我在用cloud模式,因为这个开关好像不支持LAN模式。但从log中看好像每次开关还是先去尝试LAN控制,等timeout之后才回去尝试cloud模式? error已经贴在下面。

HA emit call_service event { domain: 'switch', service: 'turn_on', service_data: { entity_id: 'switch.100124d668_2' } } HA emit call_service event { domain: 'persistent_notification', service: 'dismiss', service_data: { notification_id: 'config_entry_discovery' } } 控制局域网多通道设备出错 { iv: 'YWJjZGVmMTYzMDMzMzkyNQ==', deviceid: '100124d668', selfApikey: 'cdd0cab7-2c9e-405d-b13e-7cdb6e96f318', encrypt: true, sequence: '1630333925977', data: 'YMofpAYM45agzdlFaUaw82g02lPtKniceFuFLH2JAzSBjI9RSVRvaIHYzJYYhyoI' } (node:21) UnhandledPromiseRejectionWarning: Error: getaddrinfo EAI_AGAIN ewelink_100124d668.local at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:69:26) (node:21) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 29) receive CK-WS msg: type--> message receive CK-WS msg: {"error":0,"deviceid":"100124d668","apikey":"cdd0cab7-2c9e-405d-b13e-7cdb6e96f318","sequence":"1630333935991"} Found Lan Multi-Switch getDataSync: disabled.json -> 100124d668 no data Found Lan Multi-Switch getDataSync: disabled.json -> 100124d668 no data Found Lan Multi-Switch getDataSync: disabled.json -> 100124d668 no data Found Lan Multi-Switch getDataSync: disabled.json -> 100124d668 no data Found Lan Multi-Switch getDataSync: disabled.json -> 100124d668 no data Found Lan Multi-Switch getDataSync: disabled.json -> 100124d668 no data

mazstars commented 3 years ago

BTW, ewelink app works fine. Switches take action instantly.

ZJia1231 commented 3 years ago

it looks like a DNS issue, is there any DNS server running in your network?