Comments (25)
@MattWestb 'scan_device' is not the energy scan function, but the function to discover/read clusters, attributes and commands on a device.
from zha-toolkit.
- The method I used to detect if the variable was iterable did not work, so I now use a less pleasing method with try/except. Pre-release v0.8.6
- a. You could try a leave with rejoin. Hopefully that works for you because there was a bug in zigpy (See discussions in #2) . This is probably the best solution.
b. There is a Restart Device Command in the Commissioning cluster, but that is not available on routers.
c. The Basic cluster has a Reset to Factory Defaults available on some devices. In theory networking functionality, bindings, etc. should not be affected by this, but when I did this on a Tuya light, I had to reassociate the light. So that will depend on your device.
d. There is also functionnality to rescan the network:- https://github.com/mdeweerd/zha-toolkit#zdo_scan_now-do-a-topology-scan
- In the UI using "<Your_base_url>/config/zha/visualization" then "REFRESH TOPOLOGY":
from zha-toolkit.
I had problems with attaching file, so now it is is new comment.
home-assistant.log
Thanx Jarda
from zha-toolkit.
When calling the service, did you specify "manf", even empty?
If so, then it forces "manf" to b""
so that the manufacturer is not automatically set. This works in cases where I used it, but apparently not here.
Or, as you are using a newer version of HA, the fix for a limitation related to automatic manufacturer expansion is now propagated to HA, and then I can force "NO_MANUFACTURER" differently.
So if you added 'manf:', the solution is likely to not add it. Adding it means that you do not want the automatic manufacturer (I should add something in the documentation about that as well).
from zha-toolkit.
Hello,
no, I was not aware about this parameter. Unfortunatell even now, trying with manf="" (or manf=''):
2022-04-11 11:56:26 INFO (MainThread) [custom_components.zha_toolkit] Running ZHA Toolkit service: <ServiceCall zha_toolkit.scan_device (c:514403e654ae94b0dc00cdf77fdfeed0): ieee=a4:c1:38:d3:82:6f:f8:50, manf=>
still ends with same error:
2022-04-11 11:56:26 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Unexpected error for call_service at pos 1: Failed to convert manufacturer=b'' from type <class 'bytes'> to <class 'zigpy.types.basic.uint16_t'>
Thanx Jarda
from zha-toolkit.
I was not able to reproduce this, but I modified the "global" manf parameter analysis and manf parameter adjustment in scan_device were it was set to b''
when manf was not set.
I made the v0.8.1 pre-release.
from zha-toolkit.
Hello,
tested v0.8.1 and problem is gone, scan result file is created successfully :-)
Thanx :-)
Jarda
from zha-toolkit.
Hello,
one fresh information - I have recently updated HA to version 2022.4.3 and scan_device started again to fail with similar error:
2022-04-13 22:34:32 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Unexpected error for call_service at pos 1: Failed t
o convert manufacturer='' from type <class 'str'> to <class 'zigpy.types.basic.uint16_t'>
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/zigpy/types/struct.py", line 39, in _convert_type
return self.type(value)
File "/usr/local/lib/python3.9/site-packages/zigpy/types/basic.py", line 61, in new
n = super().new(cls, *args, **kwargs)
ValueError: invalid literal for int() with base 10: ''
I have found, that because of issues with updated zigpy-deconz and ConBee there was downgrade of zigpy-deconz back to version 0.14.0. So I tried to downgrade also zha-toolkit to version 0.8.0 and it works - although scan takes long time with many timeouts.
Hopefully this info will spare some time to someone else :-)
Jarda
from zha-toolkit.
Can you provide the line in zha-toolkit that leads up to this so that I can an idea what may cause it in zha-toolkit.
I am not really capable of reproducing this - but I did improve the handling of a forced "No manufacturer" in the pre-release 0.8.2 after testing in 2022.4.
from zha-toolkit.
Log file attached:
home-assistant.1.log
from zha-toolkit.
@zviratkos Thanks, that log has another error than the "fresh information".
I have a workaround in v0.8.3 - the command arguments to a command were supposed to be a list, but apparently they not always are. So I am interested to see what it actually returns. Maybe it's 'None', in which case I'll further change the code. It should not fail for that anymore.
from zha-toolkit.
Hello @mdeweerd
problem again fixed, thanx :-) I am attaching logs home-assistant.log.gz, hopefully you will find, what you need to see. I have started scan_device twice, one (ieee=00:12:4b:00:22:69:c2:9e) is simple Sonoff TH01 Thermometer running on battery, second (ieee=a4:c1:38:d3:82:6f:f8:50) is Tuya multisensor permanently connected to power.
Scan for Thermometer did not finished till now (~50 minutes from start), Multisensor finished in approx 10 minutes. Couldn't that be, that only one discovery can run in time, so by starting second I cancelled the previous one?
Thanx Jarda
from zha-toolkit.
In the log I see that HA puts a timeout on service calls, but I am not so sure that this puts an end on the service call.
In my experience these service calls (can) run in parallel. You should limit the count of course.
The TH01 does not wake up a lot and scan_device implies a lot of requests. I did not update the code to accept and propagate the "tries" parameter to extend it beyond up to 3 requests.
I could not see the outcome of the request, and the file that is created with the scan information should hold the information on the command.
from zha-toolkit.
@mdeweerd Trying scanning with Sleeping end device is domed failing then they normally dont have one complete zigbee stack (at least Silabs is have reduced functionality in the Gecko SDK) and dont have the all routers parts implanted and doing network scans is one work for routers and not for sleepers.
from zha-toolkit.
I agree that several devices - including permanently powered devices - do not implement all features used by scan_device
, but scan_device
should not be insisting when the device actually responds with some "unsupported" or other clear message.
I even have a permanently powered device that crashes when doing scan_device
on it.
That does not mean we can't "try" to scan the device with best effort and have devices where this actually succeeds.
Configuring reporting of a TH01 can take easily 50 tries before it succeeds. So 'scanning' it would take a multiple number of 50 times, I suppose easily exceeding 1000 packets that need to be sent.
Currently the scan_device
feature tries every zigbee command "only" 3 times and to allow modifying that in the UI, the 'tries' option has to be used and added to every method used in scan_device
.
I live by the following expression: "The secret to success, is constancy to purpose".
from zha-toolkit.
Little of the team but i have reading but i cant finding it that Silabs have disabling the energy scan if the device is in one formed network for the latest Zigbee stacks then its braking Zigbee spec and shall only being made if not in one formed network.
The background that the Zigbee 3 network steering is demanding the routers must being online all the time for doing source routing and other network maintenance so they have disabling it if the device is in one network for keeping EZSP Zigbee 3 complaint.
I have looking in some release notes but i cant finding it but keep locking for it perhaps i can finding it.
I remember it then i like getting network key auto rolling and also moving the network if getting interference autonomous in the network (if having not so much Xiaomi devices) if having good Zigbee 3 devices.
from zha-toolkit.
Sorry i was misunderstanding the "scan" ;-((
Hope you is getting all things in the right plase so we can using it in our system !
from zha-toolkit.
@MattWestb Try scan_device - you may find it interesting for quirks.
from zha-toolkit.
I have doing it but it was some mount ago before that last TS004F with adding the tuya magic spell with help of you and also the LIDL problem with not working color (that can being triggered of toolkit attribute scan) .
But if i getting time i shall testing updating one (of 2) LIDL power strip to new firmware and testing your version of tuya magic and after that i can doing more testing of your toolkit :-)))
from zha-toolkit.
Hello @mdeweerd
after update to HA 2022.4.6 and ZHA-toolkit 0.8.4 I have met again error with "object is not iteratable", can you please take a look?
2022-04-24 23:54:57 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Unexpected error for call_service at pos 1: 'type' object is not iterable
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 379, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 582, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1634, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1671, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/config/custom_components/zha_toolkit/init.py", line 692, in toolkit_service
raise handler_exception
File "/config/custom_components/zha_toolkit/init.py", line 656, in toolkit_service
await handler(
File "/config/custom_components/zha_toolkit/init.py", line 741, in command_handler_default
await default.default(
File "/config/custom_components/zha_toolkit/default.py", line 33, in default
await handler(app, listener, ieee, cmd, data, service, params, event_data)
File "/config/custom_components/zha_toolkit/scan_device.py", line 394, in scan_device
scan = await scan_results(device, endpoints, manufacturer=manf)
File "/config/custom_components/zha_toolkit/scan_device.py", line 81, in scan_results
endpoint.update(await scan_endpoint(ep, manufacturer))
File "/config/custom_components/zha_toolkit/scan_device.py", line 107, in scan_endpoint
clusters[key] = await scan_cluster(
File "/config/custom_components/zha_toolkit/scan_device.py", line 153, in scan_cluster
cmds_rec: await discover_commands_received(cluster, is_server),
File "/config/custom_components/zha_toolkit/scan_device.py", line 307, in discover_commands_received
cmd_args = [arg.name for arg in cmd_args]
TypeError: 'type' object is not iterable
2022-04-24 23:54:57 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1704200152] Error handling message: Unknown error (unknown_error)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 630, in handle_execute_script
await script_obj.async_run(msg.get("variables"), context=context)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1275, in async_run
await asyncio.shield(run.async_run())
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 359, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 379, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 582, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1634, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1671, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/config/custom_components/zha_toolkit/init.py", line 692, in toolkit_service
raise handler_exception
File "/config/custom_components/zha_toolkit/init.py", line 656, in toolkit_service
await handler(
File "/config/custom_components/zha_toolkit/init.py", line 741, in command_handler_default
await default.default(
File "/config/custom_components/zha_toolkit/default.py", line 33, in default
await handler(app, listener, ieee, cmd, data, service, params, event_data)
File "/config/custom_components/zha_toolkit/scan_device.py", line 394, in scan_device
scan = await scan_results(device, endpoints, manufacturer=manf)
File "/config/custom_components/zha_toolkit/scan_device.py", line 81, in scan_results
endpoint.update(await scan_endpoint(ep, manufacturer))
File "/config/custom_components/zha_toolkit/scan_device.py", line 107, in scan_endpoint
clusters[key] = await scan_cluster(
File "/config/custom_components/zha_toolkit/scan_device.py", line 153, in scan_cluster
cmds_rec: await discover_commands_received(cluster, is_server),
File "/config/custom_components/zha_toolkit/scan_device.py", line 307, in discover_commands_received
cmd_args = [arg.name for arg in cmd_args]
TypeError: 'type' object is not iterable
I have to mention, that this is different device (Immax Plug-230V-ZB3.0), other devices work fine.
Thanx Jarda
P.S. Haven't you met any possibility to restart remotely zigbee devices? Sometime this plug (serving as zigbee router) hangs, is accessible over zigbee, powers devices plugged into it, but all devices connected/routed through it are inaccessible. When I restart plug manually (unplug & replug), even zigbee functions are restored. I would like to automate that, but I was not able to find a way, how to do it. I wanted now to explore functions/clusters available, but ended with this error :-(
from zha-toolkit.
Hello,
sorry for delayed answer, I was couple of days more busy than usual :-( I tried scan_device and different error appeared:
2022-05-03 21:26:16 INFO (MainThread) [custom_components.zha_toolkit] Running ZHA Toolkit service: <ServiceCall zha_toolkit.scan_device (c:befcdb59e8d37b6ab165923822c52d36): ieee=cc:cc:cc:ff:fe:d7:26:a9>
2022-05-03 21:26:21 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Unexpected error for call_service at pos 1: 'type' object is not iterable
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 379, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 582, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1634, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1671, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/config/custom_components/zha_toolkit/init.py", line 692, in toolkit_service
raise handler_exception
File "/config/custom_components/zha_toolkit/init.py", line 656, in toolkit_service
await handler(
File "/config/custom_components/zha_toolkit/init.py", line 741, in command_handler_default
await default.default(
File "/config/custom_components/zha_toolkit/default.py", line 33, in default
await handler(app, listener, ieee, cmd, data, service, params, event_data)
File "/config/custom_components/zha_toolkit/scan_device.py", line 394, in scan_device
scan = await scan_results(device, endpoints, manufacturer=manf)
File "/config/custom_components/zha_toolkit/scan_device.py", line 81, in scan_results
endpoint.update(await scan_endpoint(ep, manufacturer))
File "/config/custom_components/zha_toolkit/scan_device.py", line 107, in scan_endpoint
clusters[key] = await scan_cluster(
File "/config/custom_components/zha_toolkit/scan_device.py", line 154, in scan_cluster
cmds_gen: await discover_commands_generated(cluster, is_server),
File "/config/custom_components/zha_toolkit/scan_device.py", line 359, in discover_commands_generated
cmd_args = [arg.name for arg in cmd_args]
TypeError: 'type' object is not iterable
2022-05-03 21:26:21 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [1703581128] Error handling message: Unknown error (unknown_error)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 630, in handle_execute_script
await script_obj.async_run(msg.get("variables"), context=context)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1275, in async_run
await asyncio.shield(run.async_run())
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 359, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 379, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 582, in _async_call_service_step
await service_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1634, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1671, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/config/custom_components/zha_toolkit/init.py", line 692, in toolkit_service
raise handler_exception
File "/config/custom_components/zha_toolkit/init.py", line 656, in toolkit_service
await handler(
File "/config/custom_components/zha_toolkit/init.py", line 741, in command_handler_default
await default.default(
File "/config/custom_components/zha_toolkit/default.py", line 33, in default
await handler(app, listener, ieee, cmd, data, service, params, event_data)
File "/config/custom_components/zha_toolkit/scan_device.py", line 394, in scan_device
scan = await scan_results(device, endpoints, manufacturer=manf)
File "/config/custom_components/zha_toolkit/scan_device.py", line 81, in scan_results
endpoint.update(await scan_endpoint(ep, manufacturer))
File "/config/custom_components/zha_toolkit/scan_device.py", line 107, in scan_endpoint
clusters[key] = await scan_cluster(
File "/config/custom_components/zha_toolkit/scan_device.py", line 154, in scan_cluster
cmds_gen: await discover_commands_generated(cluster, is_server),
File "/config/custom_components/zha_toolkit/scan_device.py", line 359, in discover_commands_generated
cmd_args = [arg.name for arg in cmd_args]
TypeError: 'type' object is not iterable
2022-05-03 21:26:21 ERROR (MainThread) [custom_components.zha_toolkit.scan_device] Failed 'discover_attributes_extended' starting 0x0005/0x0000. Error: [0xa2d2:1:0x0005]: Message send failure
Another device had this error:
2022-05-03 21:03:06 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall zha_toolkit.scan_device (c:4ff80e1b6731148337451ea8737a743a): ieee=a4:c1:38:d3:82:6f:f8:50>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 1652, in catch_exceptions
await coro_or_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1671, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/config/custom_components/zha_toolkit/init.py", line 692, in toolkit_service
raise handler_exception
File "/config/custom_components/zha_toolkit/init.py", line 656, in toolkit_service
await handler(
File "/config/custom_components/zha_toolkit/init.py", line 741, in command_handler_default
await default.default(
File "/config/custom_components/zha_toolkit/default.py", line 33, in default
await handler(app, listener, ieee, cmd, data, service, params, event_data)
File "/config/custom_components/zha_toolkit/scan_device.py", line 394, in scan_device
scan = await scan_results(device, endpoints, manufacturer=manf)
File "/config/custom_components/zha_toolkit/scan_device.py", line 81, in scan_results
endpoint.update(await scan_endpoint(ep, manufacturer))
File "/config/custom_components/zha_toolkit/scan_device.py", line 107, in scan_endpoint
clusters[key] = await scan_cluster(
File "/config/custom_components/zha_toolkit/scan_device.py", line 134, in scan_cluster
attributes = await discover_attributes_extended(cluster, None)
File "/config/custom_components/zha_toolkit/scan_device.py", line 169, in discover_attributes_extended
done, rsp = await wrapper(
ValueError: not enough values to unpack (expected 2, got 1)
Thanx Jarda
from zha-toolkit.
Well, same type of issue in another location. It seems to be the last one, I didn't think there were two of them. See fix in v0.8.7 .
from zha-toolkit.
Great, scan_device of Immax plug works now fine :-)
I tried also the second one - multimeter TS0601__TZE200_dwcarsat - there are strange errors, seems to me, that device is not yet probably fully supported? But during device_scan, there are two errors, second seems to be in zha_toolkit, but I'm not sure, whethere is it not caused bad "driver" for that TS0601:
error are:
TypeError: not enough arguments for format string and ValueError: not enough values to unpack (expected 2, got 1)
2022-05-03 23:48:28 INFO (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Executing step call service
2022-05-03 23:48:28 INFO (MainThread) [custom_components.zha_toolkit] Running ZHA Toolkit service: <ServiceCall zha_toolkit.scan_device (c:b4f69ff82e673d3678ac916153a138c7): ieee=a4:c1:38:d3:82:6f:f8:50>
2022-05-03 23:48:28 WARNING (MainThread) [zigpy.zcl] [0xA2D2:1:0xef00] No 'handle_set_data_response' tuya handler found for set_data_response(data=TuyaCommand(status=0, tsn=3, dp=20, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'^\x00\x00\x00', *payload=94)))
2022-05-03 23:48:29 INFO (SyncWorker_4) [root] Sending handshake.
2022-05-03 23:48:30 ERROR (MainThread) [custom_components.zha_toolkit.scan_device] got Status.FAILURE status for discover_commands starting 0
2022-05-03 23:48:30 ERROR (MainThread) [custom_components.zha_toolkit.scan_device] got Status.FAILURE status for discover_commands starting 0
2022-05-03 23:48:32 ERROR (MainThread) [custom_components.zha_toolkit.scan_device] got Status.FAILURE status for discover_commands starting 0
2022-05-03 23:48:32 ERROR (MainThread) [custom_components.zha_toolkit.scan_device] got Status.FAILURE status for discover_commands starting 0
2022-05-03 23:48:33 ERROR (MainThread) [custom_components.zha_toolkit.scan_device] got Status.FAILURE status for discover_commands starting 0
2022-05-03 23:48:34 ERROR (MainThread) [custom_components.zha_toolkit.scan_device] got Status.FAILURE status for discover_commands starting 0
2022-05-03 23:48:35 ERROR (MainThread) [custom_components.zha_toolkit.scan_device] got Status.FAILURE status for discover_commands starting 0
2022-05-03 23:48:35 ERROR (MainThread) [custom_components.zha_toolkit.scan_device] got Status.FAILURE status for discover_commands starting 0
2022-05-03 23:48:35 WARNING (MainThread) [zigpy.zcl] [0xA2D2:1:0xef00] No 'handle_set_data_response' tuya handler found for set_data_response(data=TuyaCommand(status=0, tsn=2, dp=20, data=T
uyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b']\x00\x00\x00', *payload=93)))
2022-05-03 23:48:35 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xD4AD:1:0x0b04]: async_update
2022-05-03 23:48:39 INFO (SyncWorker_7) [root] Sending handshake.
2022-05-03 23:48:46 WARNING (MainThread) [zigpy.zcl] [0xA2D2:1:0xef00] No 'handle_set_data_response' tuya handler found for set_data_response(data=TuyaCommand(status=0, tsn=3, dp=20, data=T
uyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'[\x00\x00\x00', *payload=91)))
2022-05-03 23:48:49 INFO (SyncWorker_6) [root] Sending handshake.
2022-05-03 23:48:51 ERROR (MainThread) [custom_components.zha_toolkit.scan_device] Failed 'discover_attributes_extended' starting 0x040d/0x0000. Error:
2022-05-03 23:48:53 WARNING (MainThread) [zigpy.zcl] [0xA2D2:1:0xef00] No 'handle_set_data_response' tuya handler found for set_data_response(data=TuyaCommand(status=0, tsn=1, dp=20, data=T
uyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'Z\x00\x00\x00', *payload=90)))
2022-05-03 23:48:59 INFO (SyncWorker_2) [root] Sending handshake.
2022-05-03 23:49:00 WARNING (MainThread) [zigpy.zcl] [0xA2D2:1:0xef00] No 'handle_set_data_response' tuya handler found for set_data_response(data=TuyaCommand(status=0, tsn=1, dp=20, data=T
uyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'Y\x00\x00\x00', *payload=89)))
2022-05-03 23:49:03 WARNING (MainThread) [zigpy.zcl] [0xA2D2:1:0xef00] No 'handle_set_data_response' tuya handler found for set_data_response(data=TuyaCommand(status=0, tsn=1, dp=20, data=T
uyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'X\x00\x00\x00', *payload=88)))
2022-05-03 23:49:05 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xD4AD:1:0x0b04]: async_update
2022-05-03 23:49:06 ERROR (Thread-2) [root] Uncaught thread exception
Traceback (most recent call last):
File "/usr/local/lib/python3.9/threading.py", line 973, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.9/threading.py", line 910, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.9/logging/handlers.py", line 1529, in _monitor
self.handle(record)
File "/usr/local/lib/python3.9/logging/handlers.py", line 1510, in handle
handler.handle(record)
File "/usr/local/lib/python3.9/logging/init.py", line 952, in handle
self.emit(record)
File "/usr/src/homeassistant/homeassistant/components/system_log/init.py", line 192, in emit
entry = LogEntry(record, stack, _figure_out_source(record, stack, self.hass))
File "/usr/src/homeassistant/homeassistant/components/system_log/init.py", line 99, in init
self.message = deque([record.getMessage()], maxlen=5)
File "/usr/local/lib/python3.9/logging/init.py", line 367, in getMessage
msg = msg % self.args
TypeError: not enough arguments for format string
2022-05-03 23:49:09 INFO (SyncWorker_1) [root] Sending handshake.
2022-05-03 23:49:11 WARNING (MainThread) [zigpy.zcl] [0xA2D2:1:0xef00] No 'handle_set_data_response' tuya handler found for set_data_response(data=TuyaCommand(status=0, tsn=1, dp=20, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'W\x00\x00\x00', *payload=87)))
2022-05-03 23:49:18 WARNING (MainThread) [zigpy.zcl] [0xA2D2:1:0xef00] No 'handle_set_data_response' tuya handler found for set_data_response(data=TuyaCommand(status=0, tsn=1, dp=20, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'V\x00\x00\x00', *payload=86)))
2022-05-03 23:49:19 INFO (SyncWorker_5) [root] Sending handshake.
2022-05-03 23:49:22 ERROR (MainThread) [custom_components.zha_toolkit.scan_device] Failed to discover commands starting 0. Error:
2022-05-03 23:49:28 WARNING (MainThread) [zigpy.zcl] [0xA2D2:1:0xef00] No 'handle_set_data_response' tuya handler found for set_data_response(data=TuyaCommand(status=0, tsn=3, dp=20, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'U\x00\x00\x00', *payload=85)))
2022-05-03 23:49:29 INFO (SyncWorker_7) [root] Sending handshake.
2022-05-03 23:49:35 WARNING (MainThread) [zigpy.zcl] [0xA2D2:1:0xef00] No 'handle_set_data_response' tuya handler found for set_data_response(data=TuyaCommand(status=0, tsn=1, dp=20, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'U\x00\x00\x00', *payload=85)))
2022-05-03 23:49:35 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xD4AD:1:0x0b04]: async_update
2022-05-03 23:49:37 ERROR (MainThread) [custom_components.zha_toolkit.scan_device] Failed 'discover_attributes_extended' starting 0x042b/0x0000. Error:
2022-05-03 23:49:39 INFO (SyncWorker_1) [root] Sending handshake.
2022-05-03 23:49:43 WARNING (MainThread) [zigpy.zcl] [0xA2D2:1:0xef00] No 'handle_set_data_response' tuya handler found for set_data_response(data=TuyaCommand(status=0, tsn=2, dp=20, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'U\x00\x00\x00', *payload=85)))
2022-05-03 23:49:46 WARNING (MainThread) [zigpy.zcl] [0xA2D2:1:0xef00] No 'handle_set_data_response' tuya handler found for set_data_response(data=TuyaCommand(status=0, tsn=2, dp=20, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'T\x00\x00\x00', *payload=84)))
2022-05-03 23:49:49 INFO (SyncWorker_3) [root] Sending handshake.
2022-05-03 23:49:53 WARNING (MainThread) [zigpy.zcl] [0xA2D2:1:0xef00] No 'handle_set_data_response' tuya handler found for set_data_response(data=TuyaCommand(status=0, tsn=1, dp=20, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'T\x00\x00\x00', *payload=84)))
2022-05-03 23:49:53 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall zha_toolkit.scan_device (c:b4f69ff82e673d3678ac916153a138c7): ieee=a4:c1:38:d3:82:6f:f8:50>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 1652, in catch_exceptions
await coro_or_task
File "/usr/src/homeassistant/homeassistant/core.py", line 1671, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/config/custom_components/zha_toolkit/init.py", line 692, in toolkit_service
raise handler_exception
File "/config/custom_components/zha_toolkit/init.py", line 656, in toolkit_service
await handler(
File "/config/custom_components/zha_toolkit/init.py", line 741, in command_handler_default
await default.default(
File "/config/custom_components/zha_toolkit/default.py", line 33, in default
await handler(app, listener, ieee, cmd, data, service, params, event_data)
File "/config/custom_components/zha_toolkit/scan_device.py", line 397, in scan_device
scan = await scan_results(device, endpoints, manufacturer=manf)
File "/config/custom_components/zha_toolkit/scan_device.py", line 81, in scan_results
endpoint.update(await scan_endpoint(ep, manufacturer))
File "/config/custom_components/zha_toolkit/scan_device.py", line 107, in scan_endpoint
clusters[key] = await scan_cluster(
File "/config/custom_components/zha_toolkit/scan_device.py", line 154, in scan_cluster
cmds_gen: await discover_commands_generated(cluster, is_server),
File "/config/custom_components/zha_toolkit/scan_device.py", line 334, in discover_commands_generated
done, rsp = await wrapper(
ValueError: not enough values to unpack (expected 2, got 1)
2022-05-03 23:49:59 INFO (SyncWorker_6) [root] Sending handshake.
2022-05-03 23:50:00 WARNING (MainThread) [zigpy.zcl] [0xA2D2:1:0xef00] No 'handle_set_data_response' tuya handler found for set_data_response(data=TuyaCommand(status=0, tsn=7, dp=20, data=TuyaData(dp_type=<TuyaDPType.VALUE: 2>, function=0, raw=b'T\x00\x00\x00', *payload=84)))
2022-05-03 23:50:05 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xD4AD:1:0x0b04]: async_update
2022-05-03 23:50:09 INFO (SyncWorker_0) [root] Sending handshake.
Merci beacoup et bonne nuit
Jarda
from zha-toolkit.
There's a number of thins happening here:
- The device does not seem to support the discover_attributes and discover_commands requests;
- The device handler (zigpy/quirks) doesn ot support some responses;
scan_device
expects two values as the return of some wrapped zigpy functions related to the discovery - I guess that only one value is returned when the device does not support these discoveries.
I updated in v0.8.8 - hopefully that works around that issue (I added the ValueError exception as a good reason to abort the specific discovery.
Bonne nuit
(I speak french daily because I live in a french speaking region, my native tongue is "dutch" ;-) ).
from zha-toolkit.
Again sorry for delay, I can confirm, that I'm now able to scan whole device :-)
Thanx, have a great weekend
Jarda
from zha-toolkit.
Related Issues (20)
- Zha toolkit HOT 1
- TypeError("ZDO.request() got an unexpected keyword argument 'tries'") even on v0.9.1 HOT 1
- ZHA Toolkit fails to initialise on Home Assistant Core: 2023.7.2 HOT 8
- Setup failed for custom integration zha_toolkit HOT 3
- 'Neighbors' object has no attribute 'neighbor_table_list'
- module 'custom_components.zha_toolkit.neighbours' has no attribute 'get_routes_and_neighbours' HOT 1
- [Errno 2] No such file or directory: '/config/scans/tmptphbmdk_' HOT 4
- The robovac custom integration is using deprecated vacuum feature HOT 5
- Fallback on on actual attribute read if `use_cache` is `True` but attribute not in cache for `attr_read`/`attr_write HOT 3
- set attribute on tuya device HOT 7
- Make use of zigpy's new "Manufacturer OTA Firmware Update Support" feature (also referred to as "*Generic OTA providers")? HOT 3
- Leave: Need 'ieee' and command_data HOT 1
- zdo_scan_now: Unable to serialize to JSON HOT 1
- ZHA toolkit not working for OTA updates HOT 3
- Setting a different report interval to my thermostat via ZHA toolkit didn’t work HOT 7
- ZHAData is not subscriptable after upgrade to 2023.10.0 HOT 9
- Zigbee throwing errors HOT 1
- Setting New reportable_change on Tuya TS0201 (Temp + Humidity - No Display) HOT 2
- 🧰 ZHA Toolkit: Get Binding Table not working HOT 3
- Fehler beim Aufrufen des Diensts zha_toolkit.scan_device. Unknown error HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zha-toolkit.