You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi all,
i study this project, zigbee-demo to build self product now.
how to create a model without the models ieee address,
and the server app on zigbee znp.
how to assign to correct models when know the models information(endpoint id, device id ,in/out cluster and att id).
it seem need know device ieee address to read/write action(server.js),*1 and
build models(models.js)*2
*1:
ioServer.regReqHdlr('write', function (args, cb) {
var auxId = _.split(args.auxId, '/'), // [ epId, cid, rid ]
ieeeAddr = args.permAddr,
epId = parseInt(auxId[0]),
cid = auxId[2],
val = args.value,
ep = shepherd.find(ieeeAddr, epId);
if (ieeeAddr === '0x00124b0001ce1003') {
// ep.functional = model.functional;
toggleDev(ep, cid, val);
} else if (cid === 'genOnOff') {
var cmd = val ? 'on' : 'off';
ep.functional('genOnOff', cmd, {}, function (err, rsp) {});
hi all,
i study this project, zigbee-demo to build self product now.
how to create a model without the models ieee address,
and the server app on zigbee znp.
how to assign to correct models when know the models information(endpoint id, device id ,in/out cluster and att id).
it seem need know device ieee address to read/write action(server.js),*1 and
build models(models.js)*2
*1:
ioServer.regReqHdlr('write', function (args, cb) {
var auxId = _.split(args.auxId, '/'), // [ epId, cid, rid ]
ieeeAddr = args.permAddr,
epId = parseInt(auxId[0]),
cid = auxId[2],
val = args.value,
ep = shepherd.find(ieeeAddr, epId);
}
*2.
var weatherDevInfo = {
type: 'EndDevice',
ieeeAddr: '0x00124b0001ce1001',
nwkAddr: 1,
manufId: 0,
epList: [ 1, 2 ],
endpoints: {
1: { // temperature
profId: 0x0104, epId: 1, devId: 770, inClusterList: [ 1026 ], outClusterList: [],
clusters: { msTemperatureMeasurement: { dir: 1, attrs: { measuredValue: 0 } } }
},
2: { // humidity
profId: 0x0104, epId: 2, devId: 770, inClusterList: [ 1029 ], outClusterList: [],
clusters: { msRelativeHumidity : { dir: 1, attrs: { measuredValue: 0 } } }
}
}
};
The text was updated successfully, but these errors were encountered: