Mr-Markus / ZigbeeNet

A .NET Standard library for working with ZigBee
Eclipse Public License 1.0
131 stars 47 forks source link

get device information from IKEA LED1732G11 #65

Closed bmachuletz closed 5 years ago

bmachuletz commented 5 years ago

Hi, is anyone able to help me to get device Information (model) from that type of bulb? The "manufacturer id" is already discovered but i cant get more Information.

thx

bmachuletz commented 5 years ago

ok got it:)

First

networkManager.Send(test, new ReadAttributesCommand { Identifiers = new List<ushort> { ZclBasicCluster.ATTR_MODELIDENTIFIER, ZclBasicCluster.ATTR_MANUFACTURERNAME } });

Second

In an IZigbeeCommandListener set a filter like this:

if (command is ZigBeeNet.ZCL.Clusters.General.ReadAttributesResponse)
{
              ((ZigBeeNet.ZCL.Clusters.General.ReadAttributesResponse)command).Records.ForEach(record =>
                {

                    Console.WriteLine(record.AttributeValue);
                });  
}
Mr-Markus commented 5 years ago

Hi @bmachuletz ,

you also able to retrieve the model name like following:

ZigBeeNode node = _networkManager.GetNode(4711);
string model = node.Endpoints.FirstOrDefault().Value.GetInputCluster(ZclBasicCluster.CLUSTER_ID)).GetModelIdentifier(60); // caches value for 60 secods

You can do this with any cluster and attribute 😉

Mr-Markus commented 5 years ago

I will retrieve something like this here:

image

bmachuletz commented 5 years ago
    Hello Markus,sorry for the late response. I am in holiday mode.In this case you will get the string „Tradfri bulb...“.How can I do this with a different attribute, in order to get the string „LED ...“?

On Thu, Jul 25, 2019 at 8:27 PM +0200, "Markus" notifications@github.com wrote:

I will retrieve something like this here:

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.