This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52840 custom light bulb compatible with Hue and Alexa

Hello,

I am new to Nordic and quite new to ZigBee. Just had a short evaluation with Silabs so far.

My goal is developing a custom lamp for serial production that needs to be compatible with Hue Bridge & App, as well with Alexa.

I use PCA10056 and started with an example from the SDK but I did not come very far.

On a PCA10056 Board I run zigbee_light_bulb_pca10056 with SES but the lamp will not show up in the hue app using a Hue Bridge 2.1 when searching for lights.

Using PCA10059 Dongle as a sniffer I can see that there is a "transport key" package but the debug log keeps outputting:

<info> app: Network left (leave type: 0)
<info> app: Network steering was not successful (status: -1)

I read a lot here about hue keys, touch link and comissioning but still did not get it running and feel quite lost.

Nordic does not seem to support touch link and uses normal commisioning instead - what will the difference be like for the user?

How do I get this example working with Hue?

And in general - where to start to make this development process less scientific/tryanderror and more straingtforward instead? Where to get an overview about what you need from the beginning?

Thanks in advance!

  • Hi,

    I am proceeding with getting into zigbee but still having some basic problems.

    I changed the switch example and send off-with-effect commands to the bulb example and expect the ZB_ZCL_ON_OFF_WITH_EFFECT_VALUE_CB_ID to be received - but nothing.

    Using this to send on Button Press instead of normal off:

            ZB_ZCL_ON_OFF_SEND_OFF_WITH_EFFECT_REQ(bufid,
                           m_device_ctx.bulb_params.short_addr,
                           ZB_APS_ADDR_MODE_16_ENDP_PRESENT,
                           m_device_ctx.bulb_params.endpoint,
                           LIGHT_SWITCH_ENDPOINT,
                           ZB_AF_HA_PROFILE_ID,
                           ZB_ZCL_DISABLE_DEFAULT_RESPONSE,
                           ZB_ZCL_ON_OFF_EFFECT_ID_DELAYED_ALL_OFF,
                            ZB_ZCL_ON_OFF_EFFECT_VARIANT_FADE,
                           NULL);

    Sniffed packet looks fine and it gets ACK'ed from the dest endpoint.

    Is there anything I need to do to "register" this off-with-effect command? I can't find much command-specific in the documentation. As the on-off cluster is included I'd expect the command to be passed to the cb function...?

    Thanks in advance!

    Alex

  • Hi Alex,

    I'm sorry for the late reply. I've started looking into your issue, but I don't know what the problem might be yet. I tried to implement this myself, but I experienced the same as you, that the packet is sent and I get an ACK, but it never enters the callback function. However, I noticed that I got a ZCL Default Response packet after the 'off with effect' command, with the status 'Unsupported Cluster Command'. It's possible that this command isn't supported in the SDK as it's optional to implement it, as can be seen in the ZCL specification.

    I have asked the Zigbee team internally and will come backto you when I get a response.

    Best regards,

    Marte

  • Hi Marte,

    From what I found out so far it seems that only mandatory commands are fully processed by the library.

    As "Off with effect" is optional it is obviously not handled by the library - but already prepared for it. I would have to override the standard command handler, parse that command myself and e.g. hand it to my device callback.

    Maybe you can verify this with your Zigbee team so I am not making things harder than necessary.

    Thanks & best regards,

    Alex

  • Hi Alex,

    That's what I suspect as well, but I have asked the Zigbee team and will update you when I know more.

    Best regards,

    Marte

  • Hi Marte,

    I already tried to implement this but I did not come far.

    I tried to implement the handler as described here: https://infocenter.nordicsemi.com/topic/sdk_tz_v3.2.0/using_zigbee__z_c_l.html#process_zcl_cmd_implementing

    Now I am stuck again because several of the buffer handling macros and types are nowhere defined in the nRF SDK - e.g. ZB_BUF_FROM_REF and zb_buf_t 
    zb_buf_t *zcl_cmd_buf = (zb_buf_t *)ZB_BUF_FROM_REF(param);
    zb_zcl_parsed_hdr_t *cmd_info = ZB_GET_BUF_PARAM(zcl_cmd_buf, zb_zcl_parsed_hdr_t);

    The missing defines are documented online but the used low level functions are also nowhere accessible:
    So, please help...
    Thanks in advance,
    Alex

Related