diff --git a/apps/aqhome-react/net_read.c b/apps/aqhome-react/net_read.c index 95c4de6..e692330 100644 --- a/apps/aqhome-react/net_read.c +++ b/apps/aqhome-react/net_read.c @@ -730,8 +730,10 @@ int _setParamDoubleValueFromString(AQHREACT_PARAM *param, const char *s) int _readLink(AQHOME_REACT *aqh, AQHREACT_UNIT_NET *unitNet, GWEN_XMLNODE *linkNode) { + const char *sourceNetName; const char *sourceUnitName; const char *sourceSlotName; + const char *targetNetName; const char *targetUnitName; const char *targetSlotName; AQHREACT_UNIT *sourceUnit; @@ -740,8 +742,10 @@ int _readLink(AQHOME_REACT *aqh, AQHREACT_UNIT_NET *unitNet, GWEN_XMLNODE *linkN AQHREACT_OUTPUT_SLOT *outputSlot; AQHREACT_LINK *link; + sourceNetName=GWEN_XMLNode_GetProperty(linkNode, "sourceNet", NULL); sourceUnitName=GWEN_XMLNode_GetProperty(linkNode, "sourceUnit", NULL); sourceSlotName=GWEN_XMLNode_GetProperty(linkNode, "sourceSlot", NULL); + targetNetName=GWEN_XMLNode_GetProperty(linkNode, "targetNet", NULL); targetUnitName=GWEN_XMLNode_GetProperty(linkNode, "targetUnit", NULL); targetSlotName=GWEN_XMLNode_GetProperty(linkNode, "targetSlot", NULL); @@ -754,6 +758,8 @@ int _readLink(AQHOME_REACT *aqh, AQHREACT_UNIT_NET *unitNet, GWEN_XMLNODE *linkN } sourceUnit=AQHREACT_UnitNet_GetUnitById(unitNet, sourceUnitName); + if (sourceUnit==NULL && sourceNetName && *sourceNetName) + sourceUnit=AqHomeReact_FindUnitByNetNameAndUnitId(aqh, sourceNetName, sourceUnitName); if (sourceUnit==NULL) sourceUnit=AqHomeReact_FindUnitByNetNameAndUnitId(aqh, NULL, sourceUnitName); if (sourceUnit==NULL) { @@ -767,6 +773,8 @@ int _readLink(AQHOME_REACT *aqh, AQHREACT_UNIT_NET *unitNet, GWEN_XMLNODE *linkN } targetUnit=AQHREACT_UnitNet_GetUnitById(unitNet, targetUnitName); + if (targetUnit==NULL && targetNetName && *targetNetName) + targetUnit=AqHomeReact_FindUnitByNetNameAndUnitId(aqh, targetNetName, targetUnitName); if (targetUnit==NULL) targetUnit=AqHomeReact_FindUnitByNetNameAndUnitId(aqh, NULL, targetUnitName); if (targetUnit==NULL) { diff --git a/apps/aqhome-react/networks/tvlight.xml b/apps/aqhome-react/networks/tvlight.xml index 695630e..b5a6b8e 100644 --- a/apps/aqhome-react/networks/tvlight.xml +++ b/apps/aqhome-react/networks/tvlight.xml @@ -52,6 +52,7 @@ +