Coder Social home page Coder Social logo

Comments (4)

mdeweerd avatar mdeweerd commented on August 19, 2024

Probabably not the reason, but deconz api/radio detection by zha-toolkit seems not complete.
I added some debug information to >=0.8.17 (not released in any way) where it will read "Did not recognize _api '...'" to have more information about what to look for.
However detection in itself might be ok.

The following hints that the internal _api variable of deconz is set to "None":

File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 509, in request
await self._api.aps_data_request(
AttributeError: 'NoneType' object has no attribute 'aps_data_request'

That shows that 'aps_data_request' is called on a None, which means that _api in zigpy_deconz is None.
https://github.com/zigpy/zigpy-deconz/blob/dev/zigpy_deconz/zigbee/application.py#L90-L94

Which is strange because you succeeded a scan of the device at some point

So does that mean that zigpy_deconz suddenly got unconfigured/reset/... ?.

IMHO, deconz can not be functionnal if it has _api set to None, which suggests its not initialized at that point.
The "scan_device' run was clearly able to read the attributes, and scan_device and attr_read use the same method. Si if one works, so should t he other.

You could try to do the scan_device again after your failing read to at least see if it is related or not to deconz's actual availability.

from zha-toolkit.

lelmarir avatar lelmarir commented on August 19, 2024

A reboot has indeed fixed the problem, now i'ts working like a charm. I'll keep it monitored, thank you

from zha-toolkit.

MattWestb avatar MattWestb commented on August 19, 2024

I see 2 problems with scan network.

  • 1 its not allowed in Zigbee 3 doing in one active network then its braking the active routing in the mesh (Silabs have taking away automatic scans in there Zigbee stack).
  • 2 It can being that the NCP need being retested after doing the scan for going back to normal working mode (all things is not documented in the deCONZ protocol) and its not implanted in the deCONZ lib and only way is doing one new start of ZHA.

from zha-toolkit.

mdeweerd avatar mdeweerd commented on August 19, 2024

@lelmarir Thank you for the followup.
@MattWestb It is not clear at all that a scan_network broke things. The ApplicationController._app was None - one could ask when that can happen - at least on start up, but is it set to None somewhere after it has been initialised? Also, when that attribute is None, maybe Deconz could try to reinitialize. Now that all is something to be discussed at https://github.com/zigpy/zigpy-deconz/issues .

from zha-toolkit.

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.