fairecasoimeme / ZiGatev2

ZiGate+ (v2) universal zigbee gateway
https://zigate.fr
22 stars 6 forks source link

Zigate V2 when used a s a router , wont get any commands sent to its endpoint other than 1 or unless the source ep is same as destination ep #60

Closed dmsherazi closed 10 months ago

dmsherazi commented 1 year ago

I want to add soem endpoints to the Control bridge Router ( 3 endpoints to control on/off lights for example). What I want to acheive:

What I Have done so far:

Problem: So after all the above , the endpoints are implemented and I can send ON/OFF commands and get the Attribute Read responses but with One issue. If the source endpoint is not same as the destination endpoint Router Zigate wont recieve anything.

tsZLO_ControlBridgeDevice    sControlBridge;

tsZLO_OnOffLightDevice    sOnOFFLight[3];

tsCLD_ZllDeviceTable         sDeviceTable =  { ZLO_NUMBER_DEVICES,  //3+1
                                                 { { 0,
                                                    ZLO_PROFILE_ID,
                                                    CONTROL_BRIDGE_DEVICE_ID, 
                                                    CONTROLBRIDGE_ZLO_ENDPOINT, //1
                                                    2,
                                                    GROUPS_REQUIRED,
                                                    0
                                                  }

                                                   ,{ 0,
                                                    ZLO_PROFILE_ID, 
                                                      ON_OFF_LIGHT_DEVICE_ID, 
                                                    CONTROLBRIDGE_LIGHT1_ENDPOINT, //4
                                                    2,
                                                    GROUPS_REQUIRED,
                                                    0
                                                  }
                                                ,{ 0,
                                                   ZLO_PROFILE_ID,
                                                   ON_OFF_LIGHT_DEVICE_ID,
                                                   CONTROLBRIDGE_LIGHT2_ENDPOINT,  //5
                                                   2,
                                                   GROUPS_REQUIRED,
                                                   0
                                                }

                                                ,{ 0,
                                                   ZLO_PROFILE_ID,
                                                   ON_OFF_LIGHT_DEVICE_ID,
                                                   CONTROLBRIDGE_LIGHT3_ENDPOINT, //6
                                                   2,
                                                   GROUPS_REQUIRED,
                                                   0
                                                }
                                                 }
                                             };
for (int i = 0; i < 4; i++) {
    eZLO_RegisterOnOffLightEndPoint( 4+i,
                                     fptr,
                                     &sOnOFFLight[i] );

image

dmsherazi commented 10 months ago

Solved by increasing #define BDB_QUEUE_SIZE to 5 in app_start.c file.