Is there a way to obtain the PAN ID programatically?

Title really says it all. I thought it might be under hub or zigbee properties but no sign of it.

It's listed in Hub Information Driver 'Current states' so it should be possible:

Screenshot 2023-10-17 at 07.44.00

1 Like

location.hub.zigbeeEui or location.hub.zigbeeId are the numbers you're showing,

Edit: @joshlobe (below) is correct in that there is a specific Pan ID data item that is a 4 character code.

3 Likes

location.hub.data.zigbeePanID

1 Like

Thanks everyone.

Interestingly if I search "location.hub.data" in the community or the documentation, this thread is the only result.

Be nice if they included the extended PanID as well, but you can't have everything.

If you want to pull in a JSON string and process it you can use the endpoint:

http://<hub IP Address>hub2/zigbeeInfo

and look at the epan element

3 Likes

Thank you, this is excellent. Quite a lot of info there. I can also get message count and last message time which are of interest.