skunkiechris Posted May 17, 2023 Share Posted May 17, 2023 (edited) I had the Kasa node server running perfectly on polisy (PG3). Since upgrading: New nodes are not appearing within Kasa Some old nodes are appearing offline and/or have incomplete information and/or are showing an old IP address I have removed and reinstalled the nodeserver, at which point only the controller is populated in eisy, not child nodes, and in PG3 there are no child nodes populated either after restoring a backup of PG3 and eisy to the state they were at when it was migrated, back to the original - some nodes are offline, some have incomplete info, etc. The log shows various errors, such as: 2023-05-17 13:39:55,488 Command udi_interface.interface ERROR interface:_handleInput: _parseInput: failed 9c53229e0811.runCmd(DON) Communication error on system:set_relay_state Traceback (most recent call last): File "/usr/local/lib/python3.9/asyncio/streams.py", line 52, in open_connection transport, _ = await loop.create_connection( File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1050, in create_connection sock = await self._connect_sock( File "/usr/local/lib/python3.9/asyncio/base_events.py", line 961, in _connect_sock await self.sock_connect(sock, address) File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 500, in sock_connect return await fut asyncio.exceptions.CancelledError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.9/asyncio/tasks.py", line 490, in wait_for return fut.result() asyncio.exceptions.CancelledError The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/var/polyglot/pg3/ns/0021b9026524_12/.local/lib/python3.9/site-packages/kasa/protocol.py", line 131, in _query await self._connect(timeout) File "/var/polyglot/pg3/ns/0021b9026524_12/.local/lib/python3.9/site-packages/kasa/protocol.py", line 81, in _connect self.reader, self.writer = await asyncio.wait_for(task, timeout=timeout) File "/usr/local/lib/python3.9/asyncio/tasks.py", line 492, in wait_for raise exceptions.TimeoutError() from exc asyncio.exceptions.TimeoutError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/var/polyglot/pg3/ns/0021b9026524_12/.local/lib/python3.9/site-packages/kasa/smartdevice.py", line 251, in _query_helper response = await self.protocol.query(request=request) File "/var/polyglot/pg3/ns/0021b9026524_12/.local/lib/python3.9/site-packages/kasa/protocol.py", line 73, in query return await self._query(request, retry_count, timeout) File "/var/polyglot/pg3/ns/0021b9026524_12/.local/lib/python3.9/site-packages/kasa/protocol.py", line 148, in _query raise SmartDeviceException( kasa.exceptions.SmartDeviceException: Unable to connect to the device: 10.214.126.99: The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/var/polyglot/pg3/ns/0021b9026524_12/.local/lib/python3.9/site-packages/udi_interface/interface.py", line 889, in _handleInput self.nodes_internal[item['address']].runCmd(item) File "/var/polyglot/pg3/ns/0021b9026524_12/.local/lib/python3.9/site-packages/udi_interface/node.py", line 166, in runCmd fun(self, command) File "/var/polyglot/pg3/ns/0021b9026524_12/nodes/SmartPlugNode.py", line 40, in cmd_set_on super().cmd_set_on(command) File "/var/polyglot/pg3/ns/0021b9026524_12/nodes/SmartDeviceNode.py", line 334, in cmd_set_on self.set_on() File "/var/polyglot/pg3/ns/0021b9026524_12/nodes/SmartDeviceNode.py", line 164, in set_on res = fut.result() File "/usr/local/lib/python3.9/concurrent/futures/_base.py", line 446, in result return self.__get_result() File "/usr/local/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result raise self._exception File "/var/polyglot/pg3/ns/0021b9026524_12/nodes/SmartDeviceNode.py", line 169, in set_on_a await self.dev.turn_on() File "/var/polyglot/pg3/ns/0021b9026524_12/.local/lib/python3.9/site-packages/kasa/smartplug.py", line 58, in turn_on return await self._query_helper("system", "set_relay_state", {"state": 1}) File "/var/polyglot/pg3/ns/0021b9026524_12/.local/lib/python3.9/site-packages/kasa/smartdevice.py", line 253, in _query_helper raise SmartDeviceException(f"Communication error on {target}:{cmd}") from ex kasa.exceptions.SmartDeviceException: Communication error on system:set_relay_state After restarting, the following occurs: 2023-05-17 13:39:13,465 Thread-8 udi_interface WARNING Controller:_discover: Adding previously known device that didn't respond to discover: {'type': 'SmartDimmer', 'name': 'Driveway Overhead', 'host': '10.214.126.180', 'mac': '34:60:F9:F5:7A:D3', 'model': 'KP405(US)', 'address': '3460f9f57ad3', 'emeter': False, 'id': ''} 2023-05-17 13:39:13,466 Thread-8 udi_interface WARNING Controller:_discover: Adding previously known device that didn't respond to discover: {'type': 'SmartPlug', 'name': 'greenhouse', 'host': '10.214.126.176', 'mac': '10:27:F5:9C:5D:0D', 'model': 'KP115(US)', 'address': '1027f59c5d0d', 'id': ''} 2023-05-17 13:39:13,467 Thread-8 udi_interface WARNING Controller:_discover: Adding previously known device that didn't respond to discover: {'type': 'SmartPlug', 'name': 'Polisy2', 'host': '10.214.126.184', 'mac': 'B4:B0:24:E0:E2:82', 'model': 'HS103(US)', 'address': 'b4b024e0e282', 'id': ''} 2023-05-17 13:39:13,468 Thread-8 udi_interface WARNING Controller:_discover: Adding previously known device that didn't respond to discover: {'type': 'SmartPlug', 'name': 'Butler Pantry', 'host': '10.214.126.178', 'mac': '1C:61:B4:B0:B3:9B', 'model': 'HS200(US)', 'address': '1c61b4b0b39b', 'id': ''} 2023-05-17 13:39:13,469 Thread-8 udi_interface WARNING Controller:_discover: Adding previously known device that didn't respond to discover: {'type': 'SmartPlug', 'name': 'Pi', 'host': '10.214.126.181', 'mac': 'B4:B0:24:E0:F0:89', 'model': 'HS103(US)', 'address': 'b4b024e0f089', 'id': ''} 2023-05-17 13:39:13,469 Thread-8 udi_interface WARNING Controller:_discover: Adding previously known device that didn't respond to discover: {'type': 'SmartPlug', 'name': 'greenhouse fan', 'host': '10.214.126.99', 'mac': '9C:53:22:9E:08:11', 'model': 'HS103(US)', 'address': '9c53229e0811', 'id': 'SmartPlug_NN'} 2023-05-17 13:39:29,679 Thread-62 udi_interface WARNING SmartDeviceNode:handler_poll: greenhouse fan: Node not ready to poll, must be disconnected or slow to respond? 2023-05-17 13:39:35,455 Thread-8 udi_interface ERROR SmartDeviceNode:connect_a: greenhouse fan: Unable to update device 10.214.126.99 will try again later: res=False 2023-05-17 13:39:55,488 Command udi_interface.interface ERROR interface:_handleInput: _parseInput: failed 9c53229e0811.runCmd(DON) Communication error on system:set_relay_state These are all devices online in the Kasa app. 10.214.126.99 is not the correct IP address for greenhouse fan, it should be 189, but it's not updating. Hasn't been 99 in several weeks. After restarting, all nodes disappear, and the following: 2023-05-17 13:49:03,930 MainThread udi_interface INFO __init__:<module>: UDI Python Interface for Polyglot version 3 3.0.59 Starting... 2023-05-17 13:49:03,930 MainThread udi_interface INFO __init__:<module>: UDI Python Interface for Polyglot version 3 3.0.59 Starting... 2023-05-17 13:49:03,994 MainThread udi_interface.interface INFO interface:__init__: Initialization received from Polyglot V3 3.1.26 [ISY: 5.6.0, Slot: 12] 2023-05-17 13:49:03,994 MainThread udi_interface.interface INFO interface:__init__: Initialization received from Polyglot V3 3.1.26 [ISY: 5.6.0, Slot: 12] 2023-05-17 13:49:03,995 MainThread udi_interface.interface INFO interface:__init__: Connect: Network Interface: {'addr': '172.26.18.3', 'netmask': '255.255.255.0', 'broadcast': '172.26.18.255'} 2023-05-17 13:49:03,995 MainThread udi_interface.interface INFO interface:__init__: Connect: Network Interface: {'addr': '172.26.18.3', 'netmask': '255.255.255.0', 'broadcast': '172.26.18.255'} 2023-05-17 13:49:03,995 Interface udi_interface.interface INFO interface:_startMqtt: Connecting to MQTT... localhost:8883 2023-05-17 13:49:03,995 Interface udi_interface.interface INFO interface:_startMqtt: Connecting to MQTT... localhost:8883 2023-05-17 13:49:03,996 MainThread udi_interface.interface WARNING interface:start: No node server version specified. Using deprecated server.json version 2023-05-17 13:49:03,996 MainThread udi_interface.interface WARNING interface:start: No node server version specified. Using deprecated server.json version 2023-05-17 13:49:03,996 MainThread udi_interface.interface WARNING interface:db_getNodeDrivers: tplkasactl not found in database. 2023-05-17 13:49:03,996 MainThread udi_interface.interface WARNING interface:db_getNodeDrivers: tplkasactl not found in database. 2023-05-17 13:49:03,996 MainThread udi_interface.interface WARNING interface:send: MQTT Send waiting on connection :: {'config': {'version': '3.0.21', 'requestId': False}} 2023-05-17 13:49:03,996 MainThread udi_interface.interface WARNING interface:send: MQTT Send waiting on connection :: {'config': {'version': '3.0.21', 'requestId': False}} 2023-05-17 13:49:03,998 Interface udi_interface.interface INFO interface:_startMqtt: Using SSL certs: 0021b9026524_12.cert 0021b9026524_12.key 2023-05-17 13:49:03,998 Interface udi_interface.interface INFO interface:_startMqtt: Using SSL certs: 0021b9026524_12.cert 0021b9026524_12.key 2023-05-17 13:49:04,005 MQTT udi_interface.interface INFO interface:_connect: MQTT Connected with result code 0 (Success) 2023-05-17 13:49:04,005 MQTT udi_interface.interface INFO interface:_connect: MQTT Connected with result code 0 (Success) 2023-05-17 13:49:04,005 MQTT udi_interface.interface INFO interface:_connect: MQTT Subscribing to topic: udi/pg3/ns/clients/00:21:b9:02:65:24_12 - MID: 2 Result: 0 2023-05-17 13:49:04,005 MQTT udi_interface.interface INFO interface:_connect: MQTT Subscribing to topic: udi/pg3/ns/clients/00:21:b9:02:65:24_12 - MID: 2 Result: 0 2023-05-17 13:49:04,048 MQTT udi_interface.interface INFO interface:_subscribe: MQTT Subscribed Succesfully for Message ID: 2 - QoS: (0,) 2023-05-17 13:49:04,048 MQTT udi_interface.interface INFO interface:_subscribe: MQTT Subscribed Succesfully for Message ID: 2 - QoS: (0,) 2023-05-17 13:49:07,043 MainThread udi_interface.interface INFO interface:addNode: Adding node Kasa Controller(tplkasactl) [None] 2023-05-17 13:49:07,043 MainThread udi_interface.interface INFO interface:addNode: Adding node Kasa Controller(tplkasactl) [None] 2023-05-17 13:49:07,044 MainThread udi_interface.interface INFO interface:setController: Using node "tplkasactl", driver "ST" for connection status. 2023-05-17 13:49:07,044 MainThread udi_interface.interface INFO interface:setController: Using node "tplkasactl", driver "ST" for connection status. 2023-05-17 13:49:17,360 Thread-8 udi_interface WARNING Controller:_discover: Adding previously known device that didn't respond to discover: {'type': 'SmartDimmer', 'name': 'Driveway Overhead', 'host': '10.214.126.180', 'mac': '34:60:F9:F5:7A:D3', 'model': 'KP405(US)', 'address': '3460f9f57ad3', 'emeter': False, 'id': ''} 2023-05-17 13:49:17,360 Thread-8 udi_interface WARNING Controller:_discover: Adding previously known device that didn't respond to discover: {'type': 'SmartDimmer', 'name': 'Driveway Overhead', 'host': '10.214.126.180', 'mac': '34:60:F9:F5:7A:D3', 'model': 'KP405(US)', 'address': '3460f9f57ad3', 'emeter': False, 'id': ''} 2023-05-17 13:49:17,361 Thread-8 udi_interface WARNING Controller:_discover: Adding previously known device that didn't respond to discover: {'type': 'SmartPlug', 'name': 'greenhouse', 'host': '10.214.126.176', 'mac': '10:27:F5:9C:5D:0D', 'model': 'KP115(US)', 'address': '1027f59c5d0d', 'id': ''} 2023-05-17 13:49:17,361 Thread-8 udi_interface WARNING Controller:_discover: Adding previously known device that didn't respond to discover: {'type': 'SmartPlug', 'name': 'greenhouse', 'host': '10.214.126.176', 'mac': '10:27:F5:9C:5D:0D', 'model': 'KP115(US)', 'address': '1027f59c5d0d', 'id': ''} 2023-05-17 13:49:17,362 Thread-8 udi_interface WARNING Controller:_discover: Adding previously known device that didn't respond to discover: {'type': 'SmartPlug', 'name': 'Polisy2', 'host': '10.214.126.184', 'mac': 'B4:B0:24:E0:E2:82', 'model': 'HS103(US)', 'address': 'b4b024e0e282', 'id': ''} 2023-05-17 13:49:17,362 Thread-8 udi_interface WARNING Controller:_discover: Adding previously known device that didn't respond to discover: {'type': 'SmartPlug', 'name': 'Polisy2', 'host': '10.214.126.184', 'mac': 'B4:B0:24:E0:E2:82', 'model': 'HS103(US)', 'address': 'b4b024e0e282', 'id': ''} 2023-05-17 13:49:17,363 Thread-8 udi_interface WARNING Controller:_discover: Adding previously known device that didn't respond to discover: {'type': 'SmartPlug', 'name': 'Butler Pantry', 'host': '10.214.126.178', 'mac': '1C:61:B4:B0:B3:9B', 'model': 'HS200(US)', 'address': '1c61b4b0b39b', 'id': ''} 2023-05-17 13:49:17,363 Thread-8 udi_interface WARNING Controller:_discover: Adding previously known device that didn't respond to discover: {'type': 'SmartPlug', 'name': 'Butler Pantry', 'host': '10.214.126.178', 'mac': '1C:61:B4:B0:B3:9B', 'model': 'HS200(US)', 'address': '1c61b4b0b39b', 'id': ''} 2023-05-17 13:49:17,364 Thread-8 udi_interface WARNING Controller:_discover: Adding previously known device that didn't respond to discover: {'type': 'SmartPlug', 'name': 'Pi', 'host': '10.214.126.181', 'mac': 'B4:B0:24:E0:F0:89', 'model': 'HS103(US)', 'address': 'b4b024e0f089', 'id': ''} 2023-05-17 13:49:17,364 Thread-8 udi_interface WARNING Controller:_discover: Adding previously known device that didn't respond to discover: {'type': 'SmartPlug', 'name': 'Pi', 'host': '10.214.126.181', 'mac': 'B4:B0:24:E0:F0:89', 'model': 'HS103(US)', 'address': 'b4b024e0f089', 'id': ''} 2023-05-17 13:49:17,364 Thread-8 udi_interface WARNING Controller:_discover: Adding previously known device that didn't respond to discover: {'type': 'SmartPlug', 'name': 'greenhouse fan', 'host': '10.214.126.99', 'mac': '9C:53:22:9E:08:11', 'model': 'HS103(US)', 'address': '9c53229e0811', 'id': 'SmartPlug_NN'} 2023-05-17 13:49:17,364 Thread-8 udi_interface WARNING Controller:_discover: Adding previously known device that didn't respond to discover: {'type': 'SmartPlug', 'name': 'greenhouse fan', 'host': '10.214.126.99', 'mac': '9C:53:22:9E:08:11', 'model': 'HS103(US)', 'address': '9c53229e0811', 'id': 'SmartPlug_NN'} 2023-05-17 13:49:33,520 Thread-62 udi_interface WARNING SmartDeviceNode:handler_poll: greenhouse fan: Node not ready to poll, must be disconnected or slow to respond? 2023-05-17 13:49:33,520 Thread-62 udi_interface WARNING SmartDeviceNode:handler_poll: greenhouse fan: Node not ready to poll, must be disconnected or slow to respond? 2023-05-17 13:49:39,421 Thread-8 udi_interface ERROR SmartDeviceNode:connect_a: greenhouse fan: Unable to update device 10.214.126.99 will try again later: res=False 2023-05-17 13:49:39,421 Thread-8 udi_interface ERROR SmartDeviceNode:connect_a: greenhouse fan: Unable to update device 10.214.126.99 will try again later: res=False 2023-05-17 13:50:03,550 Thread-69 udi_interface WARNING SmartDeviceNode:handler_poll: greenhouse fan: Node is now ready to poll 2023-05-17 13:50:03,550 Thread-69 udi_interface WARNING SmartDeviceNode:handler_poll: greenhouse fan: Node is now ready to poll All of the nodes other than greenhouse fan do respond even though they have disappeared in PG3 and it says they didn't respond to discover. The fan which is still the wrong IP does not respond. And no new nodes I've added to Kasa appear.... This is a lot I know, I can provide specific actions and associated logs if needed. Thanks! Edit: I restored everything from backups from the migration day, did another migrate on PG3x, unplugged and plugged in all the Kasa devices, and the existing ones seem to be working mostly now, but still not seeing anything I've added since the eisy migration. Edited May 17, 2023 by skunkiechris Link to comment
Michel Kohanim Posted May 18, 2023 Share Posted May 18, 2023 @skunkiechris, please submit a ticket. With kind regards, Michel Link to comment
Recommended Posts