Coder Social home page Coder Social logo

Comments (9)

sanyatuning avatar sanyatuning commented on August 17, 2024 1

@Adminiuga
Thank you for the suggestion, but with 0xff it responds with error status
0x0F comes form zigbee-herdsman

from zigpy-cc.

sanyatuning avatar sanyatuning commented on August 17, 2024

This message is normal (I will remove it)
What device do you want to pair?
pls provide debug logs

HA config to get debug logs.

logs:
  homeassistant.components.zha: debug
  zigpy: debug
  zigpy_cc: debug

from zigpy-cc.

stevetz avatar stevetz commented on August 17, 2024

I am trying to pair Ikea Tradfri bulbs and control outlets, and aqara temp sensors. Since my last message I removed ZHA integration, deleted the zigbee.db, rebooted the vm and tried to start from scratch... Now it wont add the same devices which were initially paired - 3 days ago (HA 0.107.5, since upgraded to 0.109.2).

Here is the log from just now, trying to pair new devices:

2020-05-02 11:44:17 DEBUG (MainThread) [zigpy_cc.zigbee.application] broadcast (0, 54, 0, 0, 0, 0, 1, b'\x01<\x00', <BroadcastAddress.ALL_ROUTERS_AND_COORDINATOR: 65532>)
2020-05-02 11:44:17 DEBUG (MainThread) [zigpy_cc.api] --> SREQ ZDO mgmtPermitJoinReq tsn: 1 {'addrmode': 15, 'dstaddr': 0xfffc, 'duration': 60, 'tcsignificance': 0}
2020-05-02 11:44:17 DEBUG (MainThread) [zigpy_cc.uart] Send: b'\xfe\x05%6\x0f\xfc\xff<\x00&'
2020-05-02 11:44:17 DEBUG (MainThread) [zigpy_cc.uart] Frame received: <UnpiFrame type=CommandType.SRSP subsystem=Subsystem.ZDO command_id=54 data=b'\x00' length=1 fcs=82>
2020-05-02 11:44:17 DEBUG (MainThread) [zigpy_cc.api] <-- SRSP ZDO mgmtPermitJoinReq tsn: None {'status': 0}
2020-05-02 11:44:17 DEBUG (MainThread) [zigpy_cc.uart] Frame received: <UnpiFrame type=CommandType.AREQ subsystem=Subsystem.ZDO command_id=203 data=b'<' length=1 fcs=179>
2020-05-02 11:44:17 DEBUG (MainThread) [zigpy_cc.api] <-- AREQ ZDO permitJoinInd tsn: None {'duration': 60}
2020-05-02 11:44:17 DEBUG (MainThread) [zigpy_cc.api] --> SREQ ZDO mgmtPermitJoinReq tsn: None {'addrmode': 15, 'dstaddr': 65532, 'duration': 60, 'tcsignificance': 0}
2020-05-02 11:44:17 DEBUG (MainThread) [zigpy_cc.uart] Send: b'\xfe\x05%6\x0f\xfc\xff<\x00&'
2020-05-02 11:44:17 DEBUG (MainThread) [zigpy_cc.uart] Frame received: <UnpiFrame type=CommandType.AREQ subsystem=Subsystem.ZDO command_id=182 data=b'\x00\x00\x00' length=3 fcs=240>
2020-05-02 11:44:17 DEBUG (MainThread) [zigpy_cc.api] <-- AREQ ZDO mgmtPermitJoinRsp tsn: None {'srcaddr': 0x0000, 'status': 0}
2020-05-02 11:44:17 WARNING (MainThread) [zigpy_cc.zigbee.application] missing tsn from mgmtPermitJoinRsp, maybe not a reply
2020-05-02 11:44:17 DEBUG (MainThread) [zigpy_cc.uart] Frame received: <UnpiFrame type=CommandType.SRSP subsystem=Subsystem.ZDO command_id=54 data=b'\x00' length=1 fcs=82>
2020-05-02 11:44:17 DEBUG (MainThread) [zigpy_cc.api] <-- SRSP ZDO mgmtPermitJoinReq tsn: None {'status': 0}
2020-05-02 11:44:17 DEBUG (MainThread) [zigpy_cc.uart] Frame received: <UnpiFrame type=CommandType.AREQ subsystem=Subsystem.ZDO command_id=182 data=b'\x00\x00\x00' length=3 fcs=240>
2020-05-02 11:44:17 DEBUG (MainThread) [zigpy_cc.api] <-- AREQ ZDO mgmtPermitJoinRsp tsn: None {'srcaddr': 0x0000, 'status': 0}
2020-05-02 11:44:17 WARNING (MainThread) [zigpy_cc.zigbee.application] missing tsn from mgmtPermitJoinRsp, maybe not a reply
2020-05-02 11:44:22 DEBUG (MainThread) [zigpy_cc.uart] Frame received: <UnpiFrame type=CommandType.AREQ subsystem=Subsystem.ZDO command_id=196 data=b'w\x15\x00' length=3 fcs=224>
2020-05-02 11:44:22 DEBUG (MainThread) [zigpy_cc.api] <-- AREQ ZDO srcRtgInd tsn: None {'dstaddr': 0x1577, 'relaycount': 0, 'relaylist': []}
2020-05-02 11:44:22 DEBUG (MainThread) [zigpy_cc.zigbee.application] message ignored: srcRtgInd
2020-05-02 11:44:22 DEBUG (MainThread) [zigpy_cc.uart] Frame received: <UnpiFrame type=CommandType.AREQ subsystem=Subsystem.ZDO command_id=196 data=b'w\x15\x00' length=3 fcs=224>
2020-05-02 11:44:22 DEBUG (MainThread) [zigpy_cc.api] <-- AREQ ZDO srcRtgInd tsn: None {'dstaddr': 0x1577, 'relaycount': 0, 'relaylist': []}
2020-05-02 11:44:22 DEBUG (MainThread) [zigpy_cc.zigbee.application] message ignored: srcRtgInd
2020-05-02 11:44:24 DEBUG (MainThread) [zigpy_cc.uart] Frame received: <UnpiFrame type=CommandType.AREQ subsystem=Subsystem.ZDO command_id=196 data=b'w\x15\x00' length=3 fcs=224>
2020-05-02 11:44:24 DEBUG (MainThread) [zigpy_cc.api] <-- AREQ ZDO srcRtgInd tsn: None {'dstaddr': 0x1577, 'relaycount': 0, 'relaylist': []}
2020-05-02 11:44:24 DEBUG (MainThread) [zigpy_cc.zigbee.application] message ignored: srcRtgInd
2020-05-02 11:44:24 DEBUG (MainThread) [zigpy_cc.uart] Frame received: <UnpiFrame type=CommandType.AREQ subsystem=Subsystem.ZDO command_id=196 data=b'w\x15\x00' length=3 fcs=224>
2020-05-02 11:44:24 DEBUG (MainThread) [zigpy_cc.api] <-- AREQ ZDO srcRtgInd tsn: None {'dstaddr': 0x1577, 'relaycount': 0, 'relaylist': []}
2020-05-02 11:44:24 DEBUG (MainThread) [zigpy_cc.zigbee.application] message ignored: srcRtgInd
2020-05-02 11:44:36 DEBUG (MainThread) [zigpy_cc.uart] Frame received: <UnpiFrame type=CommandType.AREQ subsystem=Subsystem.ZDO command_id=196 data=b'w\x15\x00' length=3 fcs=224>
2020-05-02 11:44:36 DEBUG (MainThread) [zigpy_cc.api] <-- AREQ ZDO srcRtgInd tsn: None {'dstaddr': 0x1577, 'relaycount': 0, 'relaylist': []}
2020-05-02 11:44:36 DEBUG (MainThread) [zigpy_cc.zigbee.application] message ignored: srcRtgInd
2020-05-02 11:44:36 DEBUG (MainThread) [zigpy_cc.uart] Frame received: <UnpiFrame type=CommandType.AREQ subsystem=Subsystem.ZDO command_id=196 data=b'w\x15\x00' length=3 fcs=224>
2020-05-02 11:44:36 DEBUG (MainThread) [zigpy_cc.api] <-- AREQ ZDO srcRtgInd tsn: None {'dstaddr': 0x1577, 'relaycount': 0, 'relaylist': []}
2020-05-02 11:44:36 DEBUG (MainThread) [zigpy_cc.zigbee.application] message ignored: srcRtgInd
2020-05-02 11:44:38 DEBUG (MainThread) [zigpy_cc.uart] Frame received: <UnpiFrame type=CommandType.AREQ subsystem=Subsystem.ZDO command_id=196 data=b'w\x15\x00' length=3 fcs=224>
2020-05-02 11:44:38 DEBUG (MainThread) [zigpy_cc.api] <-- AREQ ZDO srcRtgInd tsn: None {'dstaddr': 0x1577, 'relaycount': 0, 'relaylist': []}
2020-05-02 11:44:38 DEBUG (MainThread) [zigpy_cc.zigbee.application] message ignored: srcRtgInd
2020-05-02 11:44:38 DEBUG (MainThread) [zigpy_cc.uart] Frame received: <UnpiFrame type=CommandType.AREQ subsystem=Subsystem.ZDO command_id=196 data=b'w\x15\x00' length=3 fcs=224>
2020-05-02 11:44:38 DEBUG (MainThread) [zigpy_cc.api] <-- AREQ ZDO srcRtgInd tsn: None {'dstaddr': 0x1577, 'relaycount': 0, 'relaylist': []}
2020-05-02 11:44:38 DEBUG (MainThread) [zigpy_cc.zigbee.application] message ignored: srcRtgInd
2020-05-02 11:44:41 DEBUG (MainThread) [zigpy_cc.zigbee.application] broadcast (0, 54, 0, 0, 0, 0, 3, b'\x03<\x00', <BroadcastAddress.ALL_ROUTERS_AND_COORDINATOR: 65532>)
2020-05-02 11:44:41 DEBUG (MainThread) [zigpy_cc.api] --> SREQ ZDO mgmtPermitJoinReq tsn: 3 {'addrmode': 15, 'dstaddr': 0xfffc, 'duration': 60, 'tcsignificance': 0}
2020-05-02 11:44:41 DEBUG (MainThread) [zigpy_cc.uart] Send: b'\xfe\x05%6\x0f\xfc\xff<\x00&'
2020-05-02 11:44:42 DEBUG (MainThread) [zigpy_cc.uart] Frame received: <UnpiFrame type=CommandType.SRSP subsystem=Subsystem.ZDO command_id=54 data=b'\x00' length=1 fcs=82>
2020-05-02 11:44:42 DEBUG (MainThread) [zigpy_cc.api] <-- SRSP ZDO mgmtPermitJoinReq tsn: None {'status': 0}
2020-05-02 11:44:42 DEBUG (MainThread) [zigpy_cc.uart] Frame received: <UnpiFrame type=CommandType.AREQ subsystem=Subsystem.ZDO command_id=182 data=b'\x00\x00\x00' length=3 fcs=240>
2020-05-02 11:44:42 DEBUG (MainThread) [zigpy_cc.api] <-- AREQ ZDO mgmtPermitJoinRsp tsn: None {'srcaddr': 0x0000, 'status': 0}
2020-05-02 11:44:42 WARNING (MainThread) [zigpy_cc.zigbee.application] missing tsn from mgmtPermitJoinRsp, maybe not a reply
2020-05-02 11:44:42 DEBUG (MainThread) [zigpy_cc.api] --> SREQ ZDO mgmtPermitJoinReq tsn: None {'addrmode': 15, 'dstaddr': 65532, 'duration': 60, 'tcsignificance': 0}
2020-05-02 11:44:42 DEBUG (MainThread) [zigpy_cc.uart] Send: b'\xfe\x05%6\x0f\xfc\xff<\x00&'
2020-05-02 11:44:42 DEBUG (MainThread) [zigpy_cc.uart] Frame received: <UnpiFrame type=CommandType.SRSP subsystem=Subsystem.ZDO command_id=54 data=b'\x00' length=1 fcs=82>
2020-05-02 11:44:42 DEBUG (MainThread) [zigpy_cc.api] <-- SRSP ZDO mgmtPermitJoinReq tsn: None {'status': 0}
2020-05-02 11:44:42 DEBUG (MainThread) [zigpy_cc.uart] Frame received: <UnpiFrame type=CommandType.AREQ subsystem=Subsystem.ZDO command_id=182 data=b'\x00\x00\x00' length=3 fcs=240>
2020-05-02 11:44:42 DEBUG (MainThread) [zigpy_cc.api] <-- AREQ ZDO mgmtPermitJoinRsp tsn: None {'srcaddr': 0x0000, 'status': 0}
2020-05-02 11:44:42 WARNING (MainThread) [zigpy_cc.zigbee.application] missing tsn from mgmtPermitJoinRsp, maybe not a reply

from zigpy-cc.

Adminiuga avatar Adminiuga commented on August 17, 2024

@sanyatuning

One thing I'm noticing for ZDO broadcast we set the "addr mode" to 0x0F

2020-05-02 11:44:17 DEBUG (MainThread) [zigpy_cc.uart] Send: b'\xfe\x05%6\x0f\xfc\xff<\x00&'

"addrmode": 0x0F,

Per sniffer it does look like the broadcast goes out, but should the addr mode be 0xFF for broadcast? In Test API pdf revision 1.14 for broadcast it looks like it should be 0xFF
image

In the next command they expand available dst addr modes
image

from zigpy-cc.

puddly avatar puddly commented on August 17, 2024

@Adminiuga

The spec PDF has a ton of mistakes. The firmware itself uses 0x0F for the broadcast address mode:

enum
{
  AddrNotPresent = 0,
  AddrGroup = 1,
  Addr16Bit = 2,
  Addr64Bit = 3,
  AddrBroadcast = 15
};

from zigpy-cc.

Adminiuga avatar Adminiuga commented on August 17, 2024

So, it's documented in form of source code then :)

from zigpy-cc.

sanyatuning avatar sanyatuning commented on August 17, 2024

@stevetz
The log looks good to me.
Try unplug the USB stick
If you have another zigbee coordinators turn them off while you pairing.

from zigpy-cc.

stevetz avatar stevetz commented on August 17, 2024

Thanks for the suggestion, and sorry for the delay getting back - I've now sorted this... by switching to zigbee2mqtt. However, this may be relevant: I also couldn't get z2m to work! The logs showed that 'unknown' routers were trying to connect, each device was unknown... I unbound the cc2531, rebooted the VM, re bound the usb stick again and it worked fine! So possibly that is the 'fix' for ZHA as well.... at least in my case - however I'm not able now to fiddle with it any more. I already lost a ton of WAF points doing this!!
Thanks

from zigpy-cc.

roger- avatar roger- commented on August 17, 2024

FWIW I had a similar issue where I couldn't pair any new devices with ZHA and would only see the same missing tsn messages (even though paired devices were apparently still working). In my case the fix was to reconnect the CC2531.

Recently I had another issue where the CC2531 would constant disconnect and the solution there was to reflash the firmware. So there's definitely some stability issues related to hardware/firmware.

from zigpy-cc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.