Giter Club home page Giter Club logo

Comments (8)

Mr-Markus avatar Mr-Markus commented on June 18, 2024

Hello,

if there is a new device announced the library creates an instance of the NodeDiscoverer class to retrieve necessary information of the device like the NetworkAdress, implemented clusters etc. and adds the node to an internal list.
With these information it should be possible to send messages to the node without calling a BIND_REQUEST. As I understand the Bind Request is used to send messages without knowing the NetworkAddress. (Please correct me if it is wrong)

So you should be able to use your implemented Cluster like this:

networkManager.AddSupportedCluster(0x06);

var node = networkManager.GetNode(addr);
if (node != null)
{
        ZigBeeEndpoint ep = new ZigBeeEndpoint(node, 0);
        node.AddEndpoint(ep);

        ZclOnOffCluster onOff = new ZclOnOffCluster(node.GetEndpoint(0));

        onOff.ToggleCommand();
}

That's the way it should work, but I still have problems with getting information on DeviceAnnounce Message with CC2531 😕

Maybe the Zigbee Link Key is not implemented correctly with this Hardware. As you can see in the BasicSample Project the LinkKey is set in the demo Program. Do you have deeper understanding in it?

If you have any idea I would be very happy about your PullRequest

from zigbeenet.

thombrink avatar thombrink commented on June 18, 2024

I just created a pull request. It's not fully finished, but you can take a look at it.

As far as I know, you need to have a valid Zigbee Link Key to communicate with a device.
The ZNP image should already have the correct Zigbee Link Key compiled with it.
So I don't think that's the problem.

To be honest, before this week I never heard of CC2531 or anything related to it.

from zigbeenet.

Mr-Markus avatar Mr-Markus commented on June 18, 2024

Ok but it makes sense. I will take a look on it.

As you said it should not be the problem and there is another point of code which is relevant.

Which Zigbee gateway do you have?

The architecture of this library is designed to use it with different gateways. CC2531 is one on many and after i began to start with it I realized that it is the most complexe. I am at the point that I would start to implement another gateway like XBee, because some steps like pairing make me going crazy...

But I do not give up and will further work on this project.

from zigbeenet.

Mr-Markus avatar Mr-Markus commented on June 18, 2024

Thanks for your pullrequest. I merged it into the master branch.

I tested the PlayGround example with an Ikea Tradfri lamp and it works!
I toggled the lamp a few times by switch so that it was in the pairing mode, then the device was announced in the console and displayed the network address and with that address i was able to execute the implemented toggle, level and move commands.

I also tried to disconnect the lamp from the mains and connect it again and it worked again and the network address was still the same.

Does it also work with your hardware?

from zigbeenet.

thombrink avatar thombrink commented on June 18, 2024

I'm sorry, I forgot to reply.

I have a CC2531 gateway, and I'm thinking about testing with a CC2530 too.
You can find a lot of info about pairing etc on this repo: https://github.com/Koenkk/zigbee2mqtt.

He has a great wiki for the CC2530 and CC2531 (including range comparison)

The playground was my test project for some commands as you can see. The toggle,level and move commands both work fine with my hardware (also a Ikea Tradfri).

To get everything working I started the playground, switched the light off and on to register it and typed a command in the console window.

Before requesting the pull request I removed the code that automatically added the node by address, so I didn't had to keep turning the light off and on while testing.

What is your next objective (with this repo)?

from zigbeenet.

Mr-Markus avatar Mr-Markus commented on June 18, 2024

Thanks for this informations. It will help a lot for a better understanding.

As next steps I think it is the best to implement other clusters, beginning with the Generals and Ligthing
The clusters are described in the official Zigbee document (Chapter 3 and 5):
https://github.com/Mr-Markus/ZigbeeNet/blob/master/docs/Zigbee-cluster-library-specification.pdf

If there are some clusters it would be great if another hardware like XBee will be implemented.

The target of this repo should be to provide a library for working with Zigbee with .netstandard or .net core on different plattforms. I do not plan to develop an application or smart home system here.

It would be interesting to know what do you plan to do with this library. Maybe we have some common topics.
I also would be pleased if you help me to implement some clusters and do some further work on this repo 😊

from zigbeenet.

thombrink avatar thombrink commented on June 18, 2024

I don't like the idea of relying on software companies or open source projects to control my home. Therefore I would like to build my own sort of smart home system.

It's not realistic to expect that this is something that's done in a few hours, resulting in the same features and stability.

My idea is to create a google assistant (actions) project to control my home first, so I can work out my own system in the meantime. I would like to create a nuget package from this repo to use in my google assistant/smart home project.

Because I only have one Zigbee device at the moment, I can't really test the cluster feature. As soon as I have another device (could take a while), I will make it work. If you're impatient I'm happy to assist you if there are any questions about implementing the clusters.

from zigbeenet.

Mr-Markus avatar Mr-Markus commented on June 18, 2024

All right, I understand. I would create an issue for creating a Nuget package if there is the first running version with node discovery and would mention you in it.

This issue here should now be closed, right

from zigbeenet.

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.