Pairing Ezlo Plus Zigbee with SCE smart meter

I spent some time familiarizing myself with the API tool and was trying to find the values necessary to link this hub to my SCE smart meter.

The form requests a device ID which is the EUI 64 MAC address of the Zigbee radio, and a Device Install Code which is an 18 byte hex value (in Zigbee 3.0) which acts as a temporary password to securely link to the smart meter.
image

https://pages.email.sce.com/home-area-network/

I have tried the hub.info.get api call and it does not return any info on the Zigbee radio. Any idea where/how I can get the info necessary to link the Ezlo to my smart meter? This is one of the big reasons I bought the new hub after owning a Vera Lite (no Zigbee support) for many years.

Thanks

Hi @C141FE,
You can see the network parameters (MAC, PAN ID, and Extended PAN ID) on the logs of the controller. I think those are the values you are looking for. To do this, follow the steps below:

  1. Reboot the controller.
  2. Access the controller through SSH from a computer connected locally using the command:
    ssh root@IP
    The password you will be requested is on the label at the bottom of the controller.
  3. Run the commands below:
    cat /var/log/firmware/ha-zigbeed.log | grep -i 'getnetworkparameters'
    You will get an output like this:
getNetworkParameters: MAC = cc:cc:cc:ff:fe:38:a9:e4
getNetworkParameters: ePanId = add3ec76bb69b16c
getNetworkParameters: PanId = 96b6

Kind regards!

1 Like

Hello Oscar,

Thanks for your response. I’ll take a look at those logs and see what I can find. The PAN ID is more like a VLAN in ethernet networking if I understand correctly. I found this on the net and I think what I need is the MAC from the Zigbee radio and I hope what you have above is that MAC.

It’s also interesting to note that Extended PAN IDs are completely unrelated to PAN IDs, and also to MAC addresses. They are a unique 64-bit number, used solely for helping nodes find the right network.

Also this:

Frame 6 (Length = 21 bytes)
IEEE 802.15.4
Frame Control: 0xc823
Sequence Number: 59
Destination PAN Identifier: 0x000a
Destination Address: 0x0000
Source PAN Identifier: 0xffff
Source Address: 0x0050c209cc066801
MAC Payload
Command Frame Identifier = Association Request: (0x01)
Capability Information: 0x84
… …0. = Alternate PAN Coordinator: Not capable of becoming PAN Coordinator
…. …0. = Device Type: RFD
…. .1… = Power Source: Receiving power from alternating current mains
…. 0… = Receiver on when idle: Disables receiver when idle
…00 …. = Reserved
.0… …. = Security Capability: Not capable of using security suite
1… …. = Allocate Address: Coordinator should allocate short address
Frame Check Sequence: Correct

https://www.eetimes.com/zigbee-applications-part-3-zigbee-pans/

I’ll dig around in that log a bit and post what I find.

Thanks,

1 Like

Hi Oscar,

I think the MAC listed in that log is what I need for device Id, however, I don’t think it’s showing the value for device install code, which I suspect from the output to be the application link key.

getNetworkParameters: MAC = 5c:02:72:ff:fe:xx:xx:xx
getNetworkParameters: ePanId = 43249278bcdede5e
getNetworkParameters: PanId = 32af
getNetworkParameters: nwkManagerId = 0
getNetworkParameters: nwkUpdateId = 0
getNetworkParameters: radioChannel = 25
Trust center link key is:E4:BD:77:4B:6B:AD:5A:6A:F9:0B:40:C4:E1:B0:5D:45
Network key (current) is:52:79:EA:66:09:64:DA:FD:15:64:E8:28:53:CD:87:C4
Failed to get Network key (next)
Failed to get Application link key
FD Dispatch select() failed: Interrupted system call

I think we are headed in the right direction, thanks for the help.

A bit more digging on the internet produced this document and a discussion of link keys in Zigbee.

https://www.digi.com/support/knowledge-base/zigbee-3-0-security

In this doc there is a discussion of link keys and the install code:

Install code derived link key - High security

Every device supporting Zigbee 3.0 is required to have an install code. The install code can be read by querying the I? command and it consists of a 16-byte install code + 2 byte CRC. The install code must be read from the joining node and entered to the trust center through an out-of-band method. Typically, the user would read an install code from some type of display or application on the joining node (it cannot be printed on label or physical unit). The user then provides the joiner’s install code and serial number to the trust center using a locally issued 0x24 registration API frame and setting bit 0 of the options field.

Using install codes for generating link keys is the most secure method, as it allows the user to clearly identify the joining node to the trust center and it guarantees that each joining device has a random link key.

In order for a joining device to use an install code, DC bit 0 (DC=1) must be set on the joining device. This generates a link key based on the install code and the KY parameter will be ignored.

I think this is what is needed, but I have no idea how to set the DC bit to 1 so it will generate a install code key.

Thanks again for your help.

Hi @Oleh @cw-kid suggested I tag you here and see if you can offer any additional info.

Thanks in advance.

Hi @C141FE,
This is what Silicon Labs says about the Application link key:

Standard security supports devices establishing application link keys with other devices. These keys are separate from the trust center link key and not required for normal operation.

And this is what they say about the Installation code:

An installation code key is just a preconfigured trust center link key used to enter the Zigbee network and obtain the current network key. Because this unique key must be known to both the joining device and the trust center at the time of network entry, a piece of shareable data known as the “installation code” (sometimes also referred to as the “install code”) is used to derive the key at both sides.
The code can be any arbitrary value of 6, 8, 12, or 16 bytes, followed by a 16-bit CRC (least significant byte first) over those bytes.

Find more information at https://www.silabs.com/documents/public/application-notes/an1233-zigbee-security.pdf. It seems like the logs show the Installation code key (or Trust center link key) but not the Installation code (or Install code). I’m still trying to find this value. I also think Oleg may be able to give us more information about it.

Any updates on this? I can’t help but think this is something pretty simple if one knows how to generate the install code by sending the right commands via the api or something.

Still looking for instructions on how to generate the key needed to link this to my smart meter.

Hi @C141FE ,

Reading zigbee smart meters requires different zigbee protocol profiles.


Even if you find the Installation code, these profiles must be in the gateway you are using, otherwise gateway cannot pull data.
Ezlo currently does not support these profiles. Actually only a handful of zigbee gateways support those. It is also in our future plans but it is a long process and requires verification and testing etc…
For a quicker solution would be, getting another zigbee smart meter reading device which is already compliant with SCE and then we can work on connecting that device to Ezlo.
One of the used ones is : “Rainforest EMU–2” . Device is connected to a computer/hub via USB port. It reads the values from your smart meter and then those data can be pulled via USB port reading. Unfortunately USB port reading has not been released yet on our platform. It will be there but we still need time for that.
Another alternative would be “Emporia Vue Energy Monitor” .

That device has Wifi connection and a unofficial cloud API.
So if you decide to use this device then we can create a plugin and connect to it via Ezlo hubs. It seems possible.

Hope this helps.

Hi @osman,

Thanks for the response. I was quite certain that when I was researching the Ezlo plus the specs showed compatibility with Smart Energy Profile 1.0. Very disappointed to hear that it’s not.

Mark.