Replies: 5 comments 2 replies
-
A normal Zigbee command sent to a device be very fast with zigpy (and the ZHA integration in Home Assistant), but maybe those commands you are trying are not normal? Anyway, the bellows CLI is not maintained any longer, it has been replaced by the combination of the main zigpy libary (for ZCL + ZDO) and zigpy-cli: https://github.com/zigpy/zigpy https://github.com/zigpy/zigpy-cli For implementation reference you should need to look at the ZHA integration component inside Home Assistant core: https://github.com/home-assistant/core/tree/dev/homeassistant/components/zha Alternatively look at Zigbee plugin for Domoticz which only makes partial use of zigpy's radio libraries without using the full zigpy library: https://github.com/zigbeefordomoticz/Domoticz-Zigbee Unfortunatly, no one has written application examples or documentation than what is in zigpy wiki and CONTRIBUTING.md file: https://github.com/zigpy/zigpy/wiki https://github.com/zigpy/zigpy/blob/dev/CONTRIBUTING.md#the-zigpy-api There are more references in existing requests asking for application examples and development documentation in these open issues: PS: Off-topic but FYI, you also need to be aware that the otherwise most common problem with slow response is usually due to radio noise from EMF/EMI/RMI that is jamming Zigbee signals/message so you always need to make sure to follow best practices and take actions to avoid that, and that goes regardless of your setup, see -> https://community.home-assistant.io/t/zigbee-networks-how-to-guide-for-avoiding-interference-and-optimize-for-getting-better-range-coverage/515752 |
Beta Was this translation helpful? Give feedback.
-
Bellows CLI isn't really maintained anymore. Can you run it in verbose mode to see what it is doing? |
Beta Was this translation helpful? Give feedback.
-
Oh, that is really two different questions, and questions regaring using zigpy APIs are probably better asked here in this existing issue tracker that is requests for zigpy application examples and API documentation -> #1087 And as mentioned there, the CLI of bellows and other zigpy radio libaries has been replaced by a unified ”zigpy-cli” that is in its own repository, but understand that is not meant to be a complete API for all zigpy functions, instead zigpy-cli is qt this point more just meant to be only a set of common tools that is available for all radios. |
Beta Was this translation helpful? Give feedback.
-
The CLI isn't made to be used directly like this: there is a giant initialization process that happens before a radio is in a usable state (including resets, loading state, etc.), which will be done every time you run the CLI. Why not control your lights with Home Assistant's ZHA component or with zigpy directly? |
Beta Was this translation helpful? Give feedback.
-
All good tips and answers. It sounds like I should expect things to be faster running in zha and after all the initialization, etc. I'll dig deeper and expect that will make a difference, and things will be more instantaneous (sub second). Thanks all. |
Beta Was this translation helpful? Give feedback.
-
I'm new to zigpy and bellows, etc., but am an engineer and programmer. Quick question for the community....
I have bellows working using CLI to turn a Sengled LED bulb on and off. Testing out an EFR32MG21 dongle. However, it takes a full 8 seconds from when I press enter every time I toggle it. This seems exceedingly slow, and I would expect it to be nearly instantaneous (under a second). I'm running on an ODROID XU4 8-core ARM under Ubuntu -- should be fast and capable enough. When I run bellows CLI with debug it looks like it is doing what appears to be some redundant or extraneous things in order to simply toggle the lamp -- and I don't see any errors or retries, etc. Do others using bellows CLI get the same slow result? Is it that Python is just slow? Is the bellows CLI meant to be a practical and quick low-level command line interface to the bellows API, or is it meant more as a simple debug and demonstrator app, and thus expected to be slow or at least not intentionally designed as a quick practical low-level interface? I'm just trying to figure out if this is expected, or if something else might be slowing things down. Should I expect it to be much faster, under 1 second, if I go after the API directly? (My assumption is of course that zigpy/bellows (and zha) and the Zigbee controlled item should react quite quickly.)
The test command line I am running is:
bellows -d /dev/ttyUSB0 -b 115200 --flow-control software zcl 'b0:ce:18:14:03:36:a4:f3' 1 6 command toggle
Thanks for any wisdom...
(I can attach the debug output if that would help, but it is long and I didn't want to paste it here unless it would be further helpful.)
Beta Was this translation helpful? Give feedback.
All reactions