Comments (11)
Does it always produce the RESET_POWER_ON
status code? Even if you run it multiple times in a row?
from zigpy-cli.
Yes, it seems to. I am happy to rerun a test. If I go that route, let it hang 30 seconds (should I wait longer?) and then ^c and then repeat a few more times?
from zigpy-cli.
It takes about 10 seconds to run for me with my HUSBZB-1, you should either see immediate output or an error code.
What about if you install and run bellows from its main branch (in a new venv)?
$ pip install bellows
$ bellows -v DEBUG -d /dev/... backup
The backup format for the above command won't be compatible with the other tools but it should also fail with a similar status.
from zigpy-cli.
ok, so on the first question, here are 3 runs in a row.
Here are three runs of zigpy, they all look the same to me, but maybe I am missing something.
(venv) zigpy $ zigpy -vv radio ezsp /dev/ttyUSB1 backup backup.json
2022-03-12 19:26:59.150 localhost.localdomain asyncio DEBUG Using selector: EpollSelector
2022-03-12 19:26:59.259 localhost.localdomain zigpy.appdb DEBUG SQLite version for <module 'sqlite3' from '/usr/lib64/python3.8/sqlite3/__init__.py'>: 3.37.2
2022-03-12 19:26:59.313 localhost.localdomain asyncio DEBUG Using selector: EpollSelector
2022-03-12 19:26:59.437 localhost.localdomain bellows.ezsp DEBUG Resetting EZSP
2022-03-12 19:26:59.438 localhost.localdomain bellows.uart DEBUG Resetting ASH
2022-03-12 19:26:59.438 localhost.localdomain bellows.uart DEBUG Sending: b'1ac038bc7e'
2022-03-12 19:27:00.732 localhost.localdomain bellows.uart DEBUG RSTACK Version: 2 Reason: RESET_POWER_ON frame: b'c102029b7b7e'
2022-03-12 19:27:00.733 localhost.localdomain bellows.ezsp ERROR NCP entered failed state. Requesting APP controller restart
2022-03-12 19:27:00.734 localhost.localdomain bellows.uart DEBUG Closed serial connection
^C
Aborted!
2022-03-12 19:27:09.750 localhost.localdomain asyncio ERROR Task was destroyed but it is pending!
task: <Task pending name='Task-6' coro=<Gateway.reset() running at /home/jesse/dev/zigpy/venv/lib/python3.8/site-packages/bellows/uart.py:223> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7f32e5a8daf0>()]> cb=[_chain_future.<locals>._call_set_state() at /usr/lib64/python3.8/asyncio/futures.py:367]>
(venv) zigpy $ zigpy -vv radio ezsp /dev/ttyUSB1 backup backup.json
2022-03-12 19:27:11.312 localhost.localdomain asyncio DEBUG Using selector: EpollSelector
2022-03-12 19:27:11.413 localhost.localdomain zigpy.appdb DEBUG SQLite version for <module 'sqlite3' from '/usr/lib64/python3.8/sqlite3/__init__.py'>: 3.37.2
2022-03-12 19:27:11.464 localhost.localdomain asyncio DEBUG Using selector: EpollSelector
2022-03-12 19:27:11.581 localhost.localdomain bellows.ezsp DEBUG Resetting EZSP
2022-03-12 19:27:11.582 localhost.localdomain bellows.uart DEBUG Resetting ASH
2022-03-12 19:27:11.582 localhost.localdomain bellows.uart DEBUG Sending: b'1ac038bc7e'
2022-03-12 19:27:12.883 localhost.localdomain bellows.uart DEBUG RSTACK Version: 2 Reason: RESET_POWER_ON frame: b'c102029b7b7e'
2022-03-12 19:27:12.884 localhost.localdomain bellows.ezsp ERROR NCP entered failed state. Requesting APP controller restart
2022-03-12 19:27:12.885 localhost.localdomain bellows.uart DEBUG Closed serial connection
^C
Aborted!
2022-03-12 19:27:23.205 localhost.localdomain asyncio ERROR Task was destroyed but it is pending!
task: <Task pending name='Task-6' coro=<Gateway.reset() running at /home/jesse/dev/zigpy/venv/lib/python3.8/site-packages/bellows/uart.py:223> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7f8f765728b0>()]> cb=[_chain_future.<locals>._call_set_state() at /usr/lib64/python3.8/asyncio/futures.py:367]>
(venv) zigpy $ zigpy -vv radio ezsp /dev/ttyUSB1 backup backup.json
2022-03-12 19:27:26.124 localhost.localdomain asyncio DEBUG Using selector: EpollSelector
2022-03-12 19:27:26.225 localhost.localdomain zigpy.appdb DEBUG SQLite version for <module 'sqlite3' from '/usr/lib64/python3.8/sqlite3/__init__.py'>: 3.37.2
2022-03-12 19:27:26.279 localhost.localdomain asyncio DEBUG Using selector: EpollSelector
2022-03-12 19:27:26.400 localhost.localdomain bellows.ezsp DEBUG Resetting EZSP
2022-03-12 19:27:26.401 localhost.localdomain bellows.uart DEBUG Resetting ASH
2022-03-12 19:27:26.401 localhost.localdomain bellows.uart DEBUG Sending: b'1ac038bc7e'
2022-03-12 19:27:27.699 localhost.localdomain bellows.uart DEBUG RSTACK Version: 2 Reason: RESET_POWER_ON frame: b'c102029b7b7e'
2022-03-12 19:27:27.700 localhost.localdomain bellows.ezsp ERROR NCP entered failed state. Requesting APP controller restart
2022-03-12 19:27:27.701 localhost.localdomain bellows.uart DEBUG Closed serial connection
^C
Aborted!
2022-03-12 19:27:35.080 localhost.localdomain asyncio ERROR Task was destroyed but it is pending!
task: <Task pending name='Task-6' coro=<Gateway.reset() running at /home/jesse/dev/zigpy/venv/lib/python3.8/site-packages/bellows/uart.py:223> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7ff6f20cdfd0>()]> cb=[_chain_future.<locals>._call_set_state() at /usr/lib64/python3.8/asyncio/futures.py:367]>
On the bellows test, I removed and reinserted the USB stick in order to make sure the blue light started on. I switched virtual envs and got this:
(venv) dev $ bellows -v DEBUG -d /dev/ttyUSB1 backup
debug: Using selector: EpollSelector
debug: Using selector: EpollSelector
debug: Connected. Resetting.
debug: Resetting EZSP
debug: Resetting ASH
debug: Sending: b'1ac038bc7e'
debug: RSTACK Version: 2 Reason: RESET_POWER_ON frame: b'c102029b7b7e'
error: NCP entered failed state. Requesting APP controller restart
debug: _reset_controller_application callback: (<NcpResetCode.RESET_POWER_ON: 2>,)
debug: Closed serial connection
^C
Aborted!
error: Task was destroyed but it is pending!
error: task: <Task pending name='Task-5' coro=<Gateway.reset() done, defined at /home/jesse/dev/venv/lib/python3.8/site-packages/bellows/uart.py:202> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7fcd4748a5b0>()]> cb=[_chain_future.<locals>._call_set_state() at /usr/lib64/python3.8/asyncio/futures.py:367]>
(venv) dev $ bellows -v DEBUG -d /dev/ttyUSB1 backup
debug: Using selector: EpollSelector
debug: Using selector: EpollSelector
debug: Connected. Resetting.
debug: Resetting EZSP
debug: Resetting ASH
debug: Sending: b'1ac038bc7e'
debug: RSTACK Version: 2 Reason: RESET_POWER_ON frame: b'c102029b7b7e'
error: NCP entered failed state. Requesting APP controller restart
debug: _reset_controller_application callback: (<NcpResetCode.RESET_POWER_ON: 2>,)
debug: Closed serial connection
^C
Aborted!
error: Task was destroyed but it is pending!
error: task: <Task pending name='Task-5' coro=<Gateway.reset() done, defined at /home/jesse/dev/venv/lib/python3.8/site-packages/bellows/uart.py:202> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7f5c7c38b550>()]> cb=[_chain_future.<locals>._call_set_state() at /usr/lib64/python3.8/asyncio/futures.py:367]>
(venv) dev $ bellows -v DEBUG -d /dev/ttyUSB1 backup
debug: Using selector: EpollSelector
debug: Using selector: EpollSelector
debug: Connected. Resetting.
debug: Resetting EZSP
debug: Resetting ASH
debug: Sending: b'1ac038bc7e'
debug: RSTACK Version: 2 Reason: RESET_POWER_ON frame: b'c102029b7b7e'
error: NCP entered failed state. Requesting APP controller restart
debug: _reset_controller_application callback: (<NcpResetCode.RESET_POWER_ON: 2>,)
debug: Closed serial connection
^C
Aborted!
error: Task was destroyed but it is pending!
error: task: <Task pending name='Task-5' coro=<Gateway.reset() done, defined at /home/jesse/dev/venv/lib/python3.8/site-packages/bellows/uart.py:202> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7f626da4b5b0>()]> cb=[_chain_future.<locals>._call_set_state() at /usr/lib64/python3.8/asyncio/futures.py:367]>
I gave that 10 seconds or so before killing it with ^c. I also have three outputs from that.
from zigpy-cli.
This looks like a problem either with the stick or with the host. Are you sure no other software is accessing the stick (i.e ZHA or Zigbee2MQTT)? Can you try a different type of USB port or a different computer?
from zigpy-cli.
I initially tried this on my HA VM. When that didn't work (I don't remember what the error there was), I decided it was easier to move to my Linux laptop. My laptop doesn't have HA or anything else on it that should know or care about the zigbee dongle. I tried a different USB port (even moving from USB-A to Thunderbolt) and I don't see any change...
from zigpy-cli.
If on a Linux laptop: make sure modemmanager is not running / there
from zigpy-cli.
I removed ModemManager, although I don't think it was actually running. Zigpy and Bellows both give me the same error.
from zigpy-cli.
Bellows is the library ZHA and zigpy-cli use to communicate with the HUSBZB-1. If it can't connect, I'm not sure how you're able to use Home Assistant with it in the first place.
Some suggestions:
- Try yet another environment. If it 100% works within HA OS, you can disable ZHA and create the virtualenv in there to install the packages.
- Edit bellows to disable this specific check: https://github.com/zigpy/bellows/blob/dd00f42792efa200e40e1c806c5b84c5129b2d74/bellows/uart.py#L150
from zigpy-cli.
Ok, yeah, this device was being used on HA (on a different machine), so I can try to move back to that environment and give it another go, or dig into that further. That will take a little longer to turn around. Thanks for your help so far.
from zigpy-cli.
I was able to run this in the HA VM. not sure what caused the issue on my other machine. Thanks for the help.
from zigpy-cli.
Related Issues (18)
- Update README.md for zigpy-cli to cover basic backup (and restore) commands
- When I choose zigate to form a network , there is always zigpy.exceptions.NetworkNotFormed appear HOT 13
- Error using zigpy-cli HOT 5
- OTA command failing with HueSBLOTAImage HOT 1
- [REQUEST] Publish zigpy-cli on PyPi? HOT 1
- Worth taking a look at pyspinel CLI as a reference? HOT 1
- [BUG] Version inconsistency on installation from GitHub HOT 6
- [BUG] Sonoff Zigbee 3.0 USB Dongle Plus-P (Windows) HOT 2
- [BUG] no attribute 'attribute_updated' on 'permit' HOT 1
- [REQUEST] Add command to probe running firmware?
- Would be good to trigger OTA directly from the zigpy-CLI HOT 2
- Add Child, Remove Child, Remove Neighbor via direct manipulation of child/neighbor table by the application? HOT 1
- Migration bugged - Restore does not seem to work HOT 10
- Maybe also worth taking a look at the Zigbee Shell / CLI wrapper for Nordic Semi nRF5 family of NCP as a reference?
- Add parameter to set channel HOT 4
- zigpy-cli - socket interface HOT 7
- Silicon Labs Zigbee EmberZNet 7.0.0.0 migrated to the new unified CLI system for Ember 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-cli.