Comments (3)
+1 sergorl
I'm trying to use the zigpy-znp, I managed to bootstrap the app as it seems:
async def run(radio_path):
config = ControllerApplication.SCHEMA({"device": {"path": radio_path}})
app = ControllerApplication(config)
try:
await app.startup()
except NetworkNotFormed as e:
LOGGER.error("Could not start application: %s", e)
return
async def main(argv):
parser = setup_parser("TEST")
args = parser.parse_args(argv)
await run(args.serial)
if __name__ == "__main__":
asyncio.run(main(sys.argv[1:]))
and it seems to start fine, then it stops
pi@nezha:~$ python3 test2.py /dev/ttyACM0
2023-01-02 12:49:12.605 nezha zigpy.device INFO [0x0000] Requesting 'Node Descriptor'
2023-01-02 12:49:12.681 nezha zigpy.device INFO [0x0000] Got Node Descriptor: NodeDescriptor(logical_type=<LogicalType.Coordinator: 0>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice|AlternatePanCoordinator: 143>, manufacturer_code=0, maximum_buffer_size=80, maximum_incoming_transfer_size=160, server_mask=1, maximum_outgoing_transfer_size=160, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=True, *is_coordinator=True, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=False, *is_security_capable=False)
2023-01-02 12:49:12.688 nezha zigpy.device INFO [0x0000] Discovering endpoints
2023-01-02 12:49:12.738 nezha zigpy.device INFO [0x0000] Discovered endpoints: [2, 1]
2023-01-02 12:49:12.741 nezha zigpy.device INFO [0x0000] Initializing endpoints [<Endpoint id=2 in=[] out=[] status=<Status.NEW: 0>>, <Endpoint id=1 in=[] out=[] status=<Status.NEW: 0>>]
2023-01-02 12:49:12.747 nezha zigpy.endpoint INFO [0x0000:2] Discovering endpoint information
2023-01-02 12:49:12.819 nezha zigpy.endpoint INFO [0x0000:2] Discovered endpoint information: SizePrefixedSimpleDescriptor(endpoint=2, profile=49246, device_type=2080, device_version=0, input_clusters=[0], output_clusters=[])
2023-01-02 12:49:12.824 nezha zigpy.endpoint INFO [0x0000:1] Discovering endpoint information
2023-01-02 12:49:12.896 nezha zigpy.endpoint INFO [0x0000:1] Discovered endpoint information: SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=1024, device_version=0, input_clusters=[0, 6, 10, 25, 1281], output_clusters=[1, 32, 1280, 1282])
2023-01-02 12:49:12.903 nezha zigpy.device INFO [0x0000] Already have model and manufacturer info
2023-01-02 12:49:12.906 nezha zigpy.device INFO [0x0000] Discovered basic device information for <ZNPCoordinator model='CC2531, Z-Stack Home 1.2 (build 20211115)' manuf='Texas Instruments' nwk=0x0000 ieee=00:12:4b:00:1c:dc:ab:ab is_initialized=True>
2023-01-02 12:49:12.912 nezha zigpy_znp.zigbee.application WARNING Your network is using the insecure Zigbee2MQTT network key!
2023-01-02 12:49:12.915 nezha zigpy_znp.zigbee.application INFO Permitting joins for 0 seconds
2023-01-02 12:49:12.940 nezha zigpy_znp.zigbee.application INFO Coordinator is not permitting joins anymore
pi@nezha:~$
I need to run an endless loop now I reckon?
from zigpy-znp.
Hi @jaroslavpsenicka i need one more complete example, you have ?
from zigpy-znp.
Request is duplicate of this zigpy issue -> zigpy/zigpy#1087 (also duplicate issue of this bellows issue -> zigpy/bellows#431)
Note! Be aware that many tools from zigpy radio libraries are deprecated as have instead been moved to zigpy-cli instead:
https://github.com/zigpy/zigpy-cli
Regardless, zigpy-znp is not made to be used directly, instead use zigpy directly (which in turn will depend on zigpy-znp), see:
https://github.com/zigpy/zigpy
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
Currently, best zigpy use reference is instead Home Assistant's zha component integration as Zigbee gateway implementation:
https://github.com/home-assistant/core/tree/dev/homeassistant/components/zha
Again, there are more references in existing requests asking for application examples and development documentation in these open issues:
from zigpy-znp.
Related Issues (20)
- OTA for Texas Instruments CC1352/CC2652, Z-Stack HOT 7
- Unable to start zigpy-znp HOT 5
- (zigpy_znp.__version__) not available HOT 3
- Dubious licensing HOT 2
- Various failing tests with zigpy==0.54.0 HOT 1
- Dependencies are unclear to me - Docker /alpine/v3.16 HOT 2
- timeout error when read CC2652 Sonoff dongle HOT 1
- Unable to form network - No module named form_network HOT 2
- zigpy_znp.tools.network_backup fails with asyncio.exceptions.CancelledError on SkyConnect HOT 5
- Develco Products "ZigBee Wallplug HA SP2" unsupported frame
- test_on_af_message_callback fails with zigpy==0.59.0
- Unable to pair devices HOT 13
- Better Error Reporting HOT 5
- command "zigpy_znp.tools.nvram_read" Timeout
- `zigpy_znp.tools.network_restore` fails with `AttributeError` HOT 2
- CC2674 (CC2674P/CC2674R) and CC1354 (CC1354P) Zigbee Coordinator compatibility with with zigpy-znp? HOT 3
- MotionSensor detected but stuck at configuration within HomeAssistant (ZHA) HOT 1
- Failed OSALNVReadExt request HOT 3
- '<' not supported between instances of 'ZigbeePacket' and 'ZigbeePacket' HOT 3
- setuptools-git-versioning < 2 still needed? HOT 1
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 zigpy-znp.