|
|
|
"script" : "\nfunction decode(msg)\n return {\n ['identifier'] = 'report',\n ['mid'] = '1',\n ['type'] = 'property',\n ['data'] ={\n ['power']=string.sub(msg.data,3,3)\n }\n }\nend\n\nfunction encode(service)\n return {\n\t['mid'] = 1,\n\t['model'] = 'M1',\n\t['mac'] = service.deviceName,\n\t['data'] = 'BB2'\n }\nend\n",
|