Hi Support team!
I use JN-AN-1216-Zigbee-3-0-IoT-ControlBridge as a coordiator to control Led from End device (Just change DIO state)
Is there have any Example for that?
Thanks :smileygrin:
Hi Trian,
Did you try the ON OFF cluster option?
Regards,
Mario
Dear Mario Ignacio Castaneda Lopez
As i know in the JN-SW-4170 have a lib for change led state base on PWM output. (LightingBoard.c, OnOffCommandHandler.c)
Actually. I need change state of some LED IO (>4 leds), As I understand , in the JN-AN-1218-Zigbee-3-0-Light-Bulb DimmableLight have create endpoint
to control led pin DIO13 with PWM
=>> How to create or add endpoint to control 4 leds? It so hard for me :smileysad:
If you have any idea for that, Please let me know.!
Thanks
Hi Tran,
If you want to control 4 DIO. You have to set the direction of those pins.
Look at the LightingBoard.c file C:\NXP\bstudio_nxp\sdk\JN-SW-4170\Platform\DK4\Source\LightingBoard.c
The file is setting the PWM for the DIO13, You could take as reference. Also, look at the App_DimmableLight.c that provides a switch for the commands that you will receive.
Note: Be sure that the 4 pins support the PWM functionality.
Regards,
Mario
Dear Mario
Thannk for your response.
Relate to : https://community.nxp.com/message/1145323.
I think to change state of leds (>1 led) have to adding new endpoint for each led ===>> It is correct?
So. How to add multi endpoint? or have any example? Thanks a lot! :smileygrin:
Hi Tran,
I think to change the state of LEDs (>1 led) have to add a new endpoint for each led ===>> It is correct?
It will depend on your application, if you want an endpoint for 4 LEDs, you could do it.
You could create endpoints for each LED.
Create new endpoints in the zpscfg file
1.6 Compile-Time Options ZigBee 3.0 Devices User Guide
You can follow the next link. https://community.nxp.com/docs/DOC-340508, the first section is for the kw41 but please look at the Router/zcl_options.h section.
Comment the next code app_zcl_task.c
/*else if(E_ZCL_RESTORE_DEFAULT_REPORT_CONFIGURATION == psEvent->eZCL_Status)
{
vRestoreDefaultRecord(app_u8GetDeviceEndpoint(),
psEvent->psClusterInstance->psClusterDefinition->u16ClusterEnum,
psAttributeReportingRecord);
}*/
You could send an active request and the router device, in this case, will response with the active endpoints.
Please let me know if you have any question.
Regards,
Mario
Dear Mario.
Hope you help!
PUBLIC void APP_taskRouter(void)
I have added 4 endpoint to control leds. It work well
=> How to send response from Router to Coordinator when User press to button? (change state of sBaseDevice)
As i know, In the JN-AN-1220 There is already an AN that implements attribute reporting. Now i'm try to get information from it.
Can you give me an idea?
Addition
For change state led with Group. I add some groups with same endpoint ( 4 group with same endpoint 1,2,3,4)
It work well when i send :
Then, If i set all endpoints (8 endpoint - 2 Node) into one Group, It's false (# Destination Endpoint)
=> How to change state all led in the same time?
Can you give me an idea?
Thanks you! :smileygrin:
Hi Tran,
=> How to send a response from Router to Coordinator when User press to button?
Depending on the cluster client/server that you previously set.
=> How to change state all led in the same time?
This is part of the application, you could create an endpoint with all the leds, or sending en endpoint broadcast.
Regards,
Mario
Dear Mario
Thanks a million for your help! 3000
It help me a lot. :smileygrin::smileygrin::smileygrin: