Giter Site home page Giter Site logo

Comments (13)

presslab-us avatar presslab-us commented on September 5, 2024

I have seen something like this while developing a ZigBee device. I believe the problem is that zigbee4java does not check if the descriptor length is zero and tries to parse it. I think I can come up with a patch, give me a few hours.

from zigbee4java.

presslab-us avatar presslab-us commented on September 5, 2024

Yes, I see the problem in the code. By the way, what lock are you working with?

from zigbee4java.

smulikHakipod avatar smulikHakipod commented on September 5, 2024

Actually I am using the sample lock from TI HA examples. And you are probably right about the length, when I debug the crash I saw that the packet length is zero.

from zigbee4java.

presslab-us avatar presslab-us commented on September 5, 2024

Well, there you go. If you look at sampleDoorLock_TestEp in the sample code, you can see there is no simple descriptor. This is what triggers the bug in zigbee4java. You can just remove the afRegister for this endpoint, you don't need it.

What sort of lock are you working on? I plan to make some kind of DIY ZigBee servo actuator for my deadbolt.

from zigbee4java.

presslab-us avatar presslab-us commented on September 5, 2024

This should fix it, please test and report back. a9654de

from zigbee4java.

smulikHakipod avatar smulikHakipod commented on September 5, 2024

Thanks for your help!!
I will report back ASAP.
About the door lock, the manufacture of doors here uses some unique mechanism that isn't compatible with any smart lock I found. I draw using OpenSCAD a plastic that wraps the around the key and I want the CC2530 to control it.

http://imgur.com/a/dlIDZ

from zigbee4java.

presslab-us avatar presslab-us commented on September 5, 2024

That is a strong looking gear motor, and your part looks very nice. Here are some of my DIY ZigBee efforts: https://groups.google.com/forum/#!topic/zigbee4java/nREaHiQW42s

from zigbee4java.

smulikHakipod avatar smulikHakipod commented on September 5, 2024

Your solution fixed the bug, many thanks!
As for the door lock, it looks like the zigbee4java does not implement the door lock device, so ZigbeeApi matches my door lock as Dimmable Light (working on fixing it now by adding DoorLockDevice?).

from zigbee4java.

presslab-us avatar presslab-us commented on September 5, 2024

Yes I have seen this too. If the device ID is not supported it seemingly picks a different one at random. Your device ID is 0x000A, yes?

You will need to add a door lock device 0x000A, the door lock cluster 0x0101, the cluster attributes 0-6, and the two lock/unlock cluster commands.

from zigbee4java.

smulikHakipod avatar smulikHakipod commented on September 5, 2024

I added the changes to my fork:
master...smulikHakipod:master
For now, really basic lock command and lock state.
Are the names and structure OK? Did I miss anything? Should I make a pull request?
thanks

from zigbee4java.

tlaukkan avatar tlaukkan commented on September 5, 2024

Hi

When you are happy with your code please make a pull request and we will review and merge it to master.

Best regards,
Tommi

from zigbee4java.

tlaukkan avatar tlaukkan commented on September 5, 2024

Nice work by the way and very useful.

from zigbee4java.

tlaukkan avatar tlaukkan commented on September 5, 2024

Thank you for the fix @presslab-us. 👍

from zigbee4java.

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.