@strato-automation/node-red-contrib-strato-automation
Version:
Strato Automation Official Node Red Library
1 lines • 44.9 kB
JavaScript
function a4_0x2613(_0x4d94be,_0x207f3c){_0x4d94be=_0x4d94be-0xfb;const _0x2b9102=a4_0x2b91();let _0x2613d9=_0x2b9102[_0x4d94be];return _0x2613d9;}function a4_0x2b91(){const _0x4ce1cb=['__mqtt_topic','presentValue','https://','test','writeMstpObject','Select\x20a\x20point','length','red','registerType','/+/','context','node','833045JfBbDA','_actual','mqtt_connect','Write\x20service\x20unavailable','_watchTimer','payload','autoLabel','PresentValueUpdateService\x20not\x20available\x20in\x20global\x20context','flow','isFinite','description','controller','_service','_closed','output_type','missing\x20args','configId','object_id','_watcherListener','devices','objectInstance','objectLabelMode','2787470yDnFhR','Error\x20writing\x20to\x20BACnet\x20point:\x20','advanced','699260KBUjOi','device_instance','code','deploy','Loading.','5092528bfsZAQ','httpAdmin','events','once','send','nodeId','objects','lastFetchedAt','off','catch','dot','registration','nodes','split','forEach','state','object','_apiInterval','45978kXEzpp','instance','Disconnected','bnx','mqtt_disconnect','findController','Please\x20deploy','bacnet-point-out','167959BxTpMr','source','_requested','node\x20not\x20found','Actual:\x20','i2g','trim','getWatcherForConfig','map','modelName','advancedMode','min','isArray','size','Write\x20error','deviceInstance','/bacnet-point-out/objects','string','connectionId','topic','/bacnet-point-out/resolveName','No\x20OCN\x20Server\x20config','lastAttemptAt','log','eachNode','writeIpObject','sort','blue','bacnet-controller','createNode','yellow','object_instance','units','objectTypeName','match','Requested:\x20','MSV','unauthorized','object_type','close','_missingSticky','debug','_lastSent','acquireConfig','function','Waiting\x20for\x20MQTT\x20value','get','\x20\x20\x20Requested:\x20','green','guid','lookupControllerByGuid','OCN\x20Server\x20configuration\x20not\x20found','names','priority','bacnet-point-out\x20nodePropertiesBatch:\x20skipping\x20node\x20','/api/v1','Always','global','getSummary','objByKey','name','objectType','44FhPcMs','ring','then','now','ocn_server_node','getNode','../lib/bacnetHub.js','resolution','No\x20OCN\x20Server','g2i','lastErrorCode','Point\x20not\x20found\x20in\x20controller\x20','networkNumber','objectName','filterNodes','status','1984764zWNNfN','../lib/ocnApiClient.js','watcher','bypass_priority','error','toFixed','acknowledged_mqtt','keys','update','network_number','type','_presenceTimer','json','input','_deployListener','removeListener','/bacnet-point-out/refreshAndGetProperties','device_name','_mqttDisconnectListener','_refreshMapping','_resolution','query','__mqtt_provider','api_token','lastError','controller_guid','deviceName','PresentValueUpdateService','telemetry/','mode','allow_msg_override','set','number','default','Loading…','changed','message','toUpperCase','ocn_ip','send_policy','controllerGuid','/bacnet-point-out/nodeProperties','missing\x20nodeId','labelMode'];a4_0x2b91=function(){return _0x4ce1cb;};return a4_0x2b91();}(function(_0x181954,_0x5b3802){const _0x41be17=a4_0x2613,_0x1a292c=_0x181954();while(!![]){try{const _0x1ddadd=-parseInt(_0x41be17(0x177))/0x1+parseInt(_0x41be17(0x1b5))/0x2*(parseInt(_0x41be17(0x16f))/0x3)+parseInt(_0x41be17(0x158))/0x4+-parseInt(_0x41be17(0x13f))/0x5+parseInt(_0x41be17(0x107))/0x6+parseInt(_0x41be17(0x155))/0x7+-parseInt(_0x41be17(0x15d))/0x8;if(_0x1ddadd===_0x5b3802)break;else _0x1a292c['push'](_0x1a292c['shift']());}catch(_0x39a525){_0x1a292c['push'](_0x1a292c['shift']());}}}(a4_0x2b91,0x41e21),module['exports']=function(_0x350809){const _0x3b9d31=a4_0x2613,_0x5e92ec=require(_0x3b9d31(0x108)),_0xa80f5d=require(_0x3b9d31(0xfd)),_0x371865=_0xa80f5d,_0x39aa1d={0x0:'AI',0x1:'AO',0x2:'AV',0x3:'BI',0x4:'BO',0x5:'BV',0xc:'MI',0xd:'MO',0xe:'MV',0x13:_0x3b9d31(0x19b)};function _0x532bc9(_0x3650a2){const _0x2fa235=_0x3b9d31,_0x1912da={0x0:'AI',0x1:'AO',0x2:'AV',0x3:'BI',0x4:'BO',0x5:'BV',0xc:'MI',0xd:'MO',0xe:'MV',0x13:_0x2fa235(0x19b)};if(typeof _0x3650a2===_0x2fa235(0x127))return _0x1912da[_0x3650a2]||String(_0x3650a2);const _0x588e34=String(_0x3650a2||'')[_0x2fa235(0x17d)]()[_0x2fa235(0x12c)]();if(/^\d+$/['test'](_0x588e34))return _0x1912da[+_0x588e34]||_0x588e34;return _0x1912da[_0x588e34]!=null?_0x1912da[_0x588e34]:_0x588e34;}function _0x406e5c(_0x3cbeb8){const _0x366e63=_0x3b9d31,_0x590d71={'AI':0x0,'AO':0x1,'AV':0x2,'BI':0x3,'BO':0x4,'BV':0x5,'MI':0xc,'MO':0xd,'MV':0xe,'MSV':0x13};if(typeof _0x3cbeb8==='number')return _0x3cbeb8;const _0x3d0958=String(_0x3cbeb8||'')[_0x366e63(0x17d)]()[_0x366e63(0x12c)]();if(/^\d+$/[_0x366e63(0x136)](_0x3d0958))return+_0x3d0958;return _0x590d71[_0x3d0958]!=null?_0x590d71[_0x3d0958]:_0x3d0958;}function _0x521b12(_0x30f9e8,_0x166cb9){const _0x528e77=_0x3b9d31;if(_0x30f9e8==null||_0x166cb9==null||String(_0x30f9e8)===''||String(_0x166cb9)==='')return'';return(_0x532bc9(_0x30f9e8)+'-'+String(_0x166cb9))[_0x528e77(0x12c)]();}function _0x5728d2(_0x322d6f){const _0x2a2360=_0x3b9d31;if(_0x322d6f===undefined||_0x322d6f===null)return'';if(typeof _0x322d6f===_0x2a2360(0x127)&&!isNaN(_0x322d6f))return _0x322d6f;const _0x3c84a9=String(_0x322d6f)['trim']();if(!_0x3c84a9)return'';return _0x3c84a9[_0x2a2360(0x12c)]();}function _0x42bd0b(_0x2f04ec){const _0x206067=_0x3b9d31;if(_0x2f04ec===undefined||_0x2f04ec===null||_0x2f04ec==='')return'';if(typeof _0x2f04ec==='number'&&isFinite(_0x2f04ec))return _0x2f04ec;const _0xfa8998=String(_0x2f04ec)['trim']();if(!_0xfa8998)return'';const _0x13e6ed=Number(_0xfa8998);if(Number[_0x206067(0x148)](_0x13e6ed))return _0x13e6ed;return _0xfa8998;}function _0x3f3a3b(_0x253f8f){if(_0x253f8f===undefined||_0x253f8f===null)return'';return String(_0x253f8f)['trim']();}function _0x4e2b04(_0x2b5765){return _0x3f3a3b(_0x2b5765);}function _0x20e2f3(_0x10397b){if(_0x10397b===undefined||_0x10397b===null)return null;const _0x56407c=String(_0x10397b)['trim']();return _0x56407c===''?null:_0x56407c;}function _0x236305(_0x50d83d){const _0x4140c4=_0x3b9d31,_0x145a6b=_0x50d83d[_0x4140c4(0x1a5)](_0x4140c4(0x172))||{};if(!_0x145a6b['i2g'])_0x145a6b[_0x4140c4(0x17c)]={};if(!_0x145a6b[_0x4140c4(0x100)])_0x145a6b[_0x4140c4(0x100)]={};if(!_0x145a6b[_0x4140c4(0x1ab)])_0x145a6b[_0x4140c4(0x1ab)]={};return _0x145a6b;}const _0x50ca11=new Map();function _0x14c4de(_0x10a61b){const _0x12e19c=_0x3b9d31,_0x3205e0=String(_0x10a61b||'');if(!_0x3205e0)return null;if(_0x50ca11['has'](_0x3205e0)){const _0x4e4ec9=_0x50ca11['get'](_0x3205e0);if(_0x4e4ec9&&_0x350809[_0x12e19c(0x169)][_0x12e19c(0xfc)]&&_0x350809[_0x12e19c(0x169)][_0x12e19c(0xfc)](_0x4e4ec9['id']))return _0x4e4ec9;_0x50ca11['delete'](_0x3205e0);}if(_0x50ca11[_0x12e19c(0x184)]===0x0){const _0x3577e1=_0x350809['nodes']&&typeof _0x350809[_0x12e19c(0x169)][_0x12e19c(0x105)]==='function'?_0x350809[_0x12e19c(0x169)][_0x12e19c(0x105)]({'type':'bacnet-controller'}):[];for(const _0x50ca80 of _0x3577e1){if(_0x50ca80&&_0x50ca80[_0x12e19c(0x1a8)]){const _0x1c6033=String(_0x50ca80[_0x12e19c(0x1a8)]);_0x50ca11[_0x12e19c(0x126)](_0x1c6033,_0x50ca80);}}}if(_0x50ca11['has'](_0x3205e0))return _0x50ca11[_0x12e19c(0x1a5)](_0x3205e0);const _0x3bd11d=_0x350809['nodes']&&typeof _0x350809[_0x12e19c(0x169)][_0x12e19c(0x105)]===_0x12e19c(0x1a3)?_0x350809[_0x12e19c(0x169)]['filterNodes']({'type':_0x12e19c(0x193)}):[];for(const _0x9f6fa3 of _0x3bd11d){if(_0x9f6fa3&&String(_0x9f6fa3['guid']||'')===_0x3205e0)return _0x50ca11[_0x12e19c(0x126)](_0x3205e0,_0x9f6fa3),_0x9f6fa3;}return null;}function _0x49165(_0x2fba47){const _0x1746a1=_0x3b9d31,_0x1c49e2=_0x14c4de(_0x2fba47[_0x1746a1(0x120)]||'');if(!_0x1c49e2)return null;const _0xf65339=_0x1c49e2[_0x1746a1(0xfb)]||'';if(!_0xf65339)return null;return _0x350809[_0x1746a1(0x169)][_0x1746a1(0xfc)](_0xf65339)||null;}function _0x557129(_0x5950aa){const _0x1a8d2a=_0x3b9d31;if(!_0x5950aa)return null;if(typeof _0x5950aa===_0x1a8d2a(0x188))return _0x350809['nodes'][_0x1a8d2a(0xfc)](_0x5950aa)||null;if(typeof _0x5950aa===_0x1a8d2a(0x16d)&&_0x5950aa['id'])return _0x350809[_0x1a8d2a(0x169)]['getNode'](_0x5950aa['id'])||_0x5950aa;return null;}function _0x2f2d09(_0x347f5e){const _0x100195=_0x3b9d31;if(!_0x347f5e)return null;return _0xa80f5d[_0x100195(0x1a9)](String(_0x347f5e));}function _0x5a3f33(_0x5b77de,_0x20acb0){const _0x1a1556=_0x3b9d31;if(!_0x5b77de||!_0x20acb0)return![];let _0xd2c4c9=![];const _0x3c39ad=_0x5b77de[_0x1a1556(0x186)]!=null?String(_0x5b77de[_0x1a1556(0x186)]):'',_0x7899fe=_0x5b77de[_0x1a1556(0x121)]!=null?String(_0x5b77de[_0x1a1556(0x121)]):'',_0x197a4d=_0x5b77de[_0x1a1556(0x103)]!=null?String(_0x5b77de[_0x1a1556(0x103)]):'';return _0x3c39ad&&_0x3c39ad!==String(_0x20acb0[_0x1a1556(0x186)]||'')&&(_0x20acb0[_0x1a1556(0x186)]=_0x3c39ad,_0xd2c4c9=!![]),_0x7899fe&&_0x7899fe!==String(_0x20acb0[_0x1a1556(0x121)]||'')&&(_0x20acb0[_0x1a1556(0x121)]=_0x7899fe,_0xd2c4c9=!![]),_0x197a4d&&_0x197a4d!==String(_0x20acb0[_0x1a1556(0x103)]||'')&&(_0x20acb0[_0x1a1556(0x103)]=_0x197a4d,_0xd2c4c9=!![]),_0xd2c4c9;}_0x350809[_0x3b9d31(0x169)][_0x3b9d31(0x13b)](_0x3b9d31(0x176),function(_0xdac083){const _0x3e6d43=_0x3b9d31;_0x350809[_0x3e6d43(0x169)][_0x3e6d43(0x194)](this,_0xdac083);const _0x959f4=this;function _0x23c521(_0x420bbe,_0x183dee,_0x2b3670,_0x427a48){const _0x38d0f9=_0x3e6d43;try{const _0xe13bc=_0x959f4[_0x38d0f9(0x13d)]()['global'],_0x40f7e1=_0xe13bc[_0x38d0f9(0x1a5)](_0x38d0f9(0x152))||{},_0x40c3f6=_0x20e2f3(_0x420bbe),_0x21b427=_0x20e2f3(_0x183dee),_0x1114dd=_0x20e2f3(_0x2b3670);if(!_0x40c3f6||!_0x21b427||_0x1114dd==null)return;if(!_0x40f7e1[_0x40c3f6])_0x40f7e1[_0x40c3f6]={};if(!_0x40f7e1[_0x40c3f6][_0x21b427])_0x40f7e1[_0x40c3f6][_0x21b427]={};if(!_0x40f7e1[_0x40c3f6][_0x21b427][_0x1114dd])_0x40f7e1[_0x40c3f6][_0x21b427][_0x1114dd]={};_0x427a48(_0x40f7e1[_0x40c3f6][_0x21b427][_0x1114dd],_0x40f7e1,_0x40c3f6),_0xe13bc[_0x38d0f9(0x126)]('devices',_0x40f7e1);}catch(_0x4a4854){}}function _0x20762d(_0x269c26){const _0x172296=_0x3e6d43,_0x1c0fe0=_0x3b8ff4(),_0x16ebdb=_0x532bc9(_0x959f4[_0x172296(0x1b4)]),_0x3a3de9=_0x20e2f3(_0x959f4[_0x172296(0x153)]);if(_0x3a3de9==null)return;_0x23c521(_0x1c0fe0,_0x16ebdb,_0x3a3de9,function(_0x143ea6,_0x18a993,_0xeb84d4){const _0x3690b9=_0x172296;_0x143ea6['pv']=_0x269c26,Object[_0x3690b9(0x10e)](_0x143ea6)[_0x3690b9(0x16b)](_0x8746e1=>{if(_0x8746e1!=='pv')delete _0x143ea6[_0x8746e1];});const _0x3b1b4c=String(_0x959f4[_0x3690b9(0x104)]||'')[_0x3690b9(0x17d)]();if(_0x3b1b4c){const _0x1d11ee=_0x18a993[_0xeb84d4][_0x3b1b4c]||{};_0x1d11ee['pv']=_0x269c26,Object['keys'](_0x1d11ee)[_0x3690b9(0x16b)](_0x5be4eb=>{if(_0x5be4eb!=='pv')delete _0x1d11ee[_0x5be4eb];}),_0x18a993[_0xeb84d4][_0x3b1b4c]=_0x1d11ee;}});}function _0x563f9f(){const _0x12ef1b=_0x3e6d43;try{if(!_0x959f4[_0x12ef1b(0x186)]||!_0x52e452())return![];const _0x37d029=_0x959f4[_0x12ef1b(0x13d)]()[_0x12ef1b(0x1b0)];if(!_0x37d029||typeof _0x37d029['get']!=='function')return![];const _0x24de24=_0x37d029[_0x12ef1b(0x1a5)](_0x12ef1b(0x152));if(!_0x24de24||typeof _0x24de24!=='object')return![];const _0x548c12=_0x20e2f3(_0x959f4[_0x12ef1b(0x186)]),_0x1a238a=_0x532bc9(_0x959f4[_0x12ef1b(0x1b4)]),_0x2de192=_0x20e2f3(_0x959f4[_0x12ef1b(0x153)]);if(!_0x548c12||!_0x1a238a||_0x2de192==null)return![];const _0x1dc570=_0x24de24[_0x548c12];if(!_0x1dc570||typeof _0x1dc570!==_0x12ef1b(0x16d))return![];const _0x21eb0c=_0x1dc570[_0x1a238a];if(_0x21eb0c&&typeof _0x21eb0c===_0x12ef1b(0x16d)){const _0x35d79e=_0x21eb0c[_0x2de192];if(_0x35d79e&&_0x35d79e['pv']!==undefined&&_0x35d79e['pv']!==null)return _0x959f4['_actual']=Number(_0x35d79e['pv']),_0x5b31eb(),!![];}const _0x1db122=String(_0x959f4[_0x12ef1b(0x104)]||'')[_0x12ef1b(0x17d)]();if(_0x1db122&&_0x1dc570[_0x1db122]){const _0x56930d=_0x1dc570[_0x1db122];if(_0x56930d&&_0x56930d['pv']!==undefined&&_0x56930d['pv']!==null)return _0x959f4[_0x12ef1b(0x140)]=Number(_0x56930d['pv']),_0x5b31eb(),!![];}return![];}catch(_0x43161a){return![];}}function _0x3b8ff4(){const _0x5a10ef=_0x3e6d43;if(_0x959f4['deviceInstance'])return String(_0x959f4[_0x5a10ef(0x186)]);try{const _0x3193f3=_0x959f4['context']()[_0x5a10ef(0x147)],_0x479af8=String(_0x959f4[_0x5a10ef(0x120)]||'');if(_0x3193f3){const _0x5d6969=_0x236305(_0x3193f3);if(_0x479af8&&_0x5d6969&&_0x5d6969[_0x5a10ef(0x100)]&&_0x5d6969[_0x5a10ef(0x100)][_0x479af8])return String(_0x5d6969['g2i'][_0x479af8]);}}catch(_0x2051a4){}return'';}function _0x1b0c7a(_0x50ec0a){return;}function _0x12aa85(_0x9e641e){const _0x4c320e=_0x3e6d43;if(!_0x9e641e)return![];_0x1b0c7a(_0x9e641e);let _0x493ad2=![];const _0x160809=String(_0x9e641e[_0x4c320e(0x104)]||'')[_0x4c320e(0x17d)]();_0x160809&&_0x160809!==String(_0x959f4['objectName']||'')&&(_0x959f4['objectName']=_0x160809,_0x493ad2=!![]);const _0x43c77e=_0x9e641e['description']!=null?String(_0x9e641e['description']):'';_0x43c77e!==String(_0x959f4[_0x4c320e(0x149)]||'')&&(_0x959f4[_0x4c320e(0x149)]=_0x43c77e,_0x493ad2=!![]);const _0x174f2c=_0x9e641e[_0x4c320e(0x197)]!=null?String(_0x9e641e[_0x4c320e(0x197)]):'';return _0x174f2c!==String(_0x959f4[_0x4c320e(0x197)]||'')&&(_0x959f4[_0x4c320e(0x197)]=_0x174f2c,_0x493ad2=!![]),_0x493ad2;}_0x959f4['name']=_0xdac083[_0x3e6d43(0x1b3)];const _0x67f799=_0xdac083['ocn_server_node']&&typeof _0xdac083[_0x3e6d43(0xfb)]==='string'?_0x350809[_0x3e6d43(0x169)][_0x3e6d43(0xfc)](_0xdac083[_0x3e6d43(0xfb)]):null;_0x959f4['ocn_server_node']=_0x67f799||_0x49165(_0xdac083)||_0x557129(_0xdac083[_0x3e6d43(0xfb)])||null,_0x959f4[_0x3e6d43(0x124)]=_0xdac083[_0x3e6d43(0x124)]||(_0xdac083['advancedMode']?_0x3e6d43(0x157):'list'),_0x959f4[_0x3e6d43(0x181)]=!!_0xdac083['advancedMode']||_0x959f4[_0x3e6d43(0x124)]===_0x3e6d43(0x157),_0x959f4[_0x3e6d43(0x125)]=!!_0xdac083['allow_msg_override'],_0x959f4['acknowledged_mqtt']=_0xdac083[_0x3e6d43(0x10d)]!==![]&&_0xdac083[_0x3e6d43(0x10d)]!=='false';_0xdac083[_0x3e6d43(0x178)]!==undefined&&_0xdac083['acknowledged_mqtt']===undefined&&(_0x959f4[_0x3e6d43(0x10d)]=_0xdac083[_0x3e6d43(0x178)]==='mqtt');_0x959f4[_0x3e6d43(0x14d)]=_0xdac083[_0x3e6d43(0x14d)]||'ip',_0x959f4['priority']=String(_0xdac083[_0x3e6d43(0x1ac)]??'9'),_0x959f4[_0x3e6d43(0x10a)]=!!_0xdac083[_0x3e6d43(0x10a)],_0x959f4[_0x3e6d43(0x12e)]=_0xdac083[_0x3e6d43(0x12e)]||_0x3e6d43(0x1af),_0x959f4['topic']=_0xdac083['topic']||_0x3e6d43(0x128);const _0x8a4af9=_0xdac083[_0x3e6d43(0x1b4)]??_0xdac083[_0x3e6d43(0x19d)],_0x2dd3e3=_0xdac083[_0x3e6d43(0x153)]??_0xdac083[_0x3e6d43(0x196)];_0x959f4[_0x3e6d43(0x1b4)]=_0x5728d2(_0x8a4af9),_0x959f4[_0x3e6d43(0x153)]=_0x42bd0b(_0x2dd3e3);if((!_0x959f4[_0x3e6d43(0x1b4)]||_0x959f4[_0x3e6d43(0x153)]===''||_0x959f4[_0x3e6d43(0x153)]==null)&&_0xdac083[_0x3e6d43(0x150)]){const _0x3cdd19=String(_0xdac083[_0x3e6d43(0x150)])[_0x3e6d43(0x17d)](),_0x81868a=_0x3cdd19[_0x3e6d43(0x199)](/^([A-Z]+)\-([0-9]+)$/i);_0x81868a&&(_0x959f4[_0x3e6d43(0x1b4)]=_0x5728d2(_0x81868a[0x1]),_0x959f4[_0x3e6d43(0x153)]=_0x42bd0b(_0x81868a[0x2]));}_0x959f4[_0x3e6d43(0x104)]=_0x3f3a3b(_0xdac083['objectName']),_0x959f4[_0x3e6d43(0x149)]=_0x3f3a3b(_0xdac083[_0x3e6d43(0x149)]),_0x959f4[_0x3e6d43(0x197)]=_0x3f3a3b(_0xdac083[_0x3e6d43(0x197)]);const _0x127fde=_0xdac083[_0x3e6d43(0x186)]??_0xdac083['device_instance'];_0x959f4[_0x3e6d43(0x186)]=_0x4e2b04(_0x127fde);const _0x1c5b9a=_0xdac083[_0x3e6d43(0x121)]??_0xdac083[_0x3e6d43(0x118)];_0x959f4[_0x3e6d43(0x121)]=_0x3f3a3b(_0x1c5b9a);const _0x7ef4bd=_0xdac083[_0x3e6d43(0x103)]??_0xdac083[_0x3e6d43(0x110)];_0x959f4[_0x3e6d43(0x103)]=_0x3f3a3b(_0x7ef4bd),_0x959f4[_0x3e6d43(0x145)]=_0xdac083[_0x3e6d43(0x145)]!==![],_0x959f4[_0x3e6d43(0x132)]=_0xdac083['labelMode']||_0x3e6d43(0x170),_0x959f4[_0x3e6d43(0x154)]=_0xdac083['objectLabelMode']||'name';const _0x54d8df=_0xdac083[_0x3e6d43(0x120)]??_0xdac083[_0x3e6d43(0x12f)];_0x959f4[_0x3e6d43(0x120)]=_0x3f3a3b(_0x54d8df);function _0x2e9040(){const _0x1e8598=_0x3e6d43,_0x274698=_0x49165(_0x959f4),_0xbb9180=_0x274698||_0x959f4[_0x1e8598(0xfb)]||_0xdac083[_0x1e8598(0xfb)]||null,_0x3a3fda=_0x557129(_0xbb9180),_0x4e6b74=_0x3a3fda&&_0x3a3fda['id']!=null?String(_0x3a3fda['id']):typeof _0xbb9180===_0x1e8598(0x188)?_0xbb9180:_0xbb9180&&_0xbb9180['id']?String(_0xbb9180['id']):'';_0x959f4['__ocn_server_id']=_0x4e6b74||'';if(_0x3a3fda)return _0x959f4[_0x1e8598(0xfb)]=_0x3a3fda,_0x3a3fda;if(_0xbb9180!=null)_0x959f4[_0x1e8598(0xfb)]=_0xbb9180;return null;}_0x2e9040(),_0x959f4[_0x3e6d43(0x14b)]=_0x959f4['context']()['global'][_0x3e6d43(0x1a5)](_0x3e6d43(0x122)),_0x959f4[_0x3e6d43(0x140)]=undefined,_0x959f4[_0x3e6d43(0x179)]=undefined,_0x959f4[_0x3e6d43(0x11b)]=0.1,_0x959f4[_0x3e6d43(0x1a1)]=undefined,_0x959f4[_0x3e6d43(0x133)]=null,_0x959f4[_0x3e6d43(0x11d)]=null,_0x959f4['_apiInterval']=null,_0x959f4[_0x3e6d43(0x112)]=null,_0x959f4[_0x3e6d43(0x143)]=null,_0x959f4[_0x3e6d43(0x19f)]=![];function _0x52e452(){const _0x81552a=_0x3e6d43;return _0x521b12(_0x959f4[_0x81552a(0x1b4)],_0x959f4[_0x81552a(0x153)]);}function _0x5b31eb(){const _0x1babd9=_0x3e6d43;if(_0x959f4[_0x1babd9(0x19f)])return;function _0x4a1775(_0x1523e8){const _0x246193=_0x1babd9;if(_0x1523e8===undefined||_0x1523e8===null)return'-';if(typeof _0x1523e8===_0x246193(0x127)&&isFinite(_0x1523e8))return Number(_0x1523e8)[_0x246193(0x10c)](0x2);const _0x178918=String(_0x1523e8);return _0x178918[_0x246193(0x139)]?_0x178918:'-';}if(!_0x959f4[_0x1babd9(0x10d)]){const _0x22ad41=_0x4a1775(_0x959f4[_0x1babd9(0x179)]),_0x2c712a=_0x22ad41!=='-'&&_0x959f4['units']?'\x20'+_0x959f4['units']:'';_0x959f4[_0x1babd9(0x106)]({'fill':_0x1babd9(0x192),'shape':_0x1babd9(0x167),'text':_0x1babd9(0x19a)+_0x22ad41+_0x2c712a});return;}const _0x10497b=_0x4a1775(_0x959f4[_0x1babd9(0x140)]),_0x2bb90e=_0x4a1775(_0x959f4[_0x1babd9(0x179)]),_0x540246=_0x10497b!=='-'&&_0x959f4[_0x1babd9(0x197)]?'\x20'+_0x959f4[_0x1babd9(0x197)]:'',_0x5465b0=_0x2bb90e!=='-'&&_0x959f4[_0x1babd9(0x197)]?'\x20'+_0x959f4[_0x1babd9(0x197)]:'',_0xcb6142=_0x1babd9(0x17b)+_0x10497b+_0x540246+_0x1babd9(0x1a6)+_0x2bb90e+_0x5465b0,_0x5cff0d=typeof _0x959f4[_0x1babd9(0x140)]===_0x1babd9(0x127)&&isFinite(_0x959f4['_actual'])&&typeof _0x959f4[_0x1babd9(0x179)]===_0x1babd9(0x127)&&isFinite(_0x959f4[_0x1babd9(0x179)]);if(_0x959f4[_0x1babd9(0x140)]===undefined&&_0x959f4['_requested']===undefined){_0x959f4['status']({'fill':'grey','shape':_0x1babd9(0x167),'text':_0x1babd9(0x1a4)});return;}if(_0x5cff0d){const _0x15bfe2=Math['abs'](Number(_0x959f4['_actual'])-Number(_0x959f4[_0x1babd9(0x179)]))<_0x959f4[_0x1babd9(0x11b)];_0x959f4[_0x1babd9(0x106)]({'fill':_0x15bfe2?_0x1babd9(0x1a7):'yellow','shape':_0x1babd9(0x167),'text':_0xcb6142});}else _0x959f4['status']({'fill':_0x1babd9(0x192),'shape':'dot','text':_0xcb6142});}function _0x4e6080(){const _0x216e6e=_0x3e6d43;_0x959f4['_missingSticky']=!![],_0x959f4['status']({'fill':_0x216e6e(0x13a),'shape':_0x216e6e(0x1b6),'text':_0x216e6e(0x102)+(_0x959f4[_0x216e6e(0x186)]||'')}),_0x2aef6b(),_0x21f51f();}function _0x69a948(){const _0x35e179=_0x3e6d43;if(!_0x959f4[_0x35e179(0x19f)])return;_0x959f4[_0x35e179(0x19f)]=![],_0x5b31eb(),_0x3e5870();}function _0x1f3940(){const _0x1322f6=_0x3e6d43;if(!_0x959f4[_0x1322f6(0x1b4)]||_0x959f4['objectInstance']==null)return;const _0x5678d8=String(_0x959f4[_0x1322f6(0x120)]||'');if(!_0x5678d8)return;const _0x55c70c=_0x2f2d09(_0x5678d8);if(!_0x55c70c)return;const _0x13afd5=_0x55c70c[_0x1322f6(0x16c)]||null,_0xe14cb8=_0x55c70c['controller']||null;if(_0xe14cb8)_0x5a3f33(_0xe14cb8,_0x959f4);if(_0x13afd5&&_0x13afd5[_0x1322f6(0x11f)])return;if(!_0xe14cb8||!_0xe14cb8[_0x1322f6(0x1b2)]){if(_0x13afd5&&(!_0x13afd5[_0x1322f6(0x164)]||_0x13afd5[_0x1322f6(0x18d)]&&_0x13afd5[_0x1322f6(0x164)]<_0x13afd5[_0x1322f6(0x18d)]&&Date[_0x1322f6(0x1b8)]()-_0x13afd5['lastAttemptAt']<0x3a98)){if(!_0x959f4[_0x1322f6(0x19f)])_0x959f4[_0x1322f6(0x106)]({'fill':'blue','shape':_0x1322f6(0x1b6),'text':'Loading\x20controllers'});return;}_0x4e6080();return;}const _0x4a8cb2=String(_0x406e5c(_0x959f4[_0x1322f6(0x1b4)]))+'|'+String(_0x959f4[_0x1322f6(0x153)]),_0x7b220b=_0xe14cb8[_0x1322f6(0x1b2)][_0x1322f6(0x1a5)](_0x4a8cb2);if(_0x7b220b)_0x12aa85(_0x7b220b),_0x69a948();else _0x4e6080();}function _0x3e1db3(){const _0x5e6505=_0x3e6d43,_0x4c2df7=_0x2e9040();if(!_0x4c2df7||!_0x4c2df7[_0x5e6505(0x189)]){if(!_0x959f4[_0x5e6505(0x19f)])_0x959f4['status']({'fill':_0x5e6505(0x195),'shape':'ring','text':_0x5e6505(0x15c)});return;}if(!_0x959f4[_0x5e6505(0x186)]||!_0x52e452()){if(!_0x959f4['_missingSticky'])_0x959f4['status']({'fill':_0x5e6505(0x13a),'shape':'ring','text':_0x5e6505(0x138)});return;}_0x959f4[_0x5e6505(0x133)]=_0x5e6505(0x123)+_0x4c2df7[_0x5e6505(0x189)]+_0x5e6505(0x13c)+_0x959f4[_0x5e6505(0x186)]+'/'+_0x52e452();try{_0x4c2df7['subscribeNode'](_0x959f4[_0x5e6505(0x133)],_0x295705),_0x959f4[_0x5e6505(0x11d)]=_0x4c2df7;}catch(_0x46f9f7){}_0x5b31eb();}function _0x2aef6b(){const _0x47f7af=_0x3e6d43,_0x28ac65=_0x959f4[_0x47f7af(0x11d)]||_0x557129(_0x959f4[_0x47f7af(0xfb)]);if(_0x28ac65&&_0x959f4[_0x47f7af(0x133)])try{_0x28ac65['unsubscribeNode'](_0x959f4['__mqtt_topic'],_0x295705);}catch(_0x242a27){}_0x959f4['__mqtt_provider']=null,_0x959f4[_0x47f7af(0x133)]=null;}function _0x16bc53(){const _0x7350cb=_0x3e6d43,_0x88508c=_0x2e9040();if(!_0x88508c)return;const _0x27a215=_0x88508c[_0x7350cb(0x12d)],_0xa990a1=_0x88508c[_0x7350cb(0x11e)];if(!_0x27a215||!_0xa990a1||_0x959f4[_0x7350cb(0x186)]==null||_0x959f4['deviceInstance']===''||_0x959f4[_0x7350cb(0x153)]==null||_0x959f4[_0x7350cb(0x153)]==='')return;const _0xa6982c=new _0x5e92ec(_0x7350cb(0x135)+_0x27a215+_0x7350cb(0x1ae),_0xa990a1),_0x4d1bcd=_0x406e5c(_0x959f4[_0x7350cb(0x1b4)]);_0x21f51f(),_0x959f4[_0x7350cb(0x16e)]=setInterval(function(){const _0xaa3e32=_0x7350cb;_0xa6982c['getShallowObject'](Number(_0x959f4['deviceInstance']),_0x4d1bcd,Number(_0x959f4['objectInstance']))['then'](function(_0x3749c7){const _0x57aed4=a4_0x2613;if(_0x3749c7[_0x57aed4(0x106)]===0xc8)_0x3749c7['json']()[_0x57aed4(0x1b7)](function(_0x270c22){const _0xac9713=_0x57aed4;_0x959f4[_0xac9713(0x140)]=Number(_0x270c22['presentValue']),_0x20762d(_0x959f4[_0xac9713(0x140)]),_0x1b0c7a(_0x270c22);const _0x399f19=Number(_0x270c22[_0xac9713(0xfe)]);if(isFinite(_0x399f19)&&_0x399f19>0x0)_0x959f4[_0xac9713(0x11b)]=_0x399f19;_0x5b31eb(),_0x959f4[_0xac9713(0x161)]([undefined,{'payload':_0x959f4['_actual'],'topic':_0x959f4['topic'],'actual':!![],'object_id':_0x52e452(),'device_instance':_0x959f4[_0xac9713(0x186)],'object_type':_0x532bc9(_0x959f4['objectType']),'object_instance':_0x959f4[_0xac9713(0x153)],'units':_0x959f4['units']}]);})[_0x57aed4(0x166)](function(){});else _0x3749c7[_0x57aed4(0x106)]===0x194&&_0x4e6080();})[_0xaa3e32(0x166)](function(){});},0x3e8);}function _0x21f51f(){const _0x41f4e0=_0x3e6d43;_0x959f4[_0x41f4e0(0x16e)]&&(clearInterval(_0x959f4[_0x41f4e0(0x16e)]),_0x959f4[_0x41f4e0(0x16e)]=null);}function _0x295705(_0xc5e9d9,_0x26ea96){const _0x2f4cc5=_0x3e6d43;try{const _0x459f40=JSON['parse'](_0x26ea96);_0x959f4[_0x2f4cc5(0x140)]=Number(_0x459f40['Value']),_0x20762d(_0x959f4[_0x2f4cc5(0x140)]),_0x5b31eb(),_0x959f4['send']([undefined,{'payload':_0x959f4[_0x2f4cc5(0x140)],'topic':_0x959f4[_0x2f4cc5(0x18a)],'actual':!![],'object_id':_0x52e452(),'device_instance':_0x959f4[_0x2f4cc5(0x186)],'object_type':_0x532bc9(_0x959f4[_0x2f4cc5(0x1b4)]),'object_instance':_0x959f4['objectInstance'],'units':_0x959f4[_0x2f4cc5(0x197)]}]);}catch(_0x1f3915){}}function _0x3e5870(){const _0x3046b0=_0x3e6d43;if(_0x959f4[_0x3046b0(0x19f)])return;_0x2aef6b(),_0x21f51f();if(_0x959f4[_0x3046b0(0x10d)]){const _0x3ca1a=_0x2e9040();if(_0x3ca1a&&_0x3ca1a['is_mqtt_connected'])_0x3e1db3();else _0x3ca1a&&(!_0x959f4[_0x3046b0(0x19f)]&&_0x959f4['status']({'fill':_0x3046b0(0x195),'shape':_0x3046b0(0x1b6),'text':_0x3046b0(0x129)}),typeof _0x3ca1a['once']===_0x3046b0(0x1a3)&&_0x3ca1a[_0x3046b0(0x160)](_0x3046b0(0x141),_0x3e1db3));}}function _0x1fe5b9(){const _0x28aca7=_0x3e6d43,_0x341a75=_0x959f4[_0x28aca7(0x13d)]()[_0x28aca7(0x147)],_0x259e1f=_0x236305(_0x341a75),_0x6094c0=String(_0x959f4['controller_guid']||''),_0x3d8bf5=_0x14c4de(_0x6094c0),_0x5844e4=_0x3d8bf5&&_0x3d8bf5[_0x28aca7(0x186)]!=null?String(_0x3d8bf5[_0x28aca7(0x186)]):null,_0x358d55=_0x3d8bf5&&_0x3d8bf5['deviceName']?String(_0x3d8bf5[_0x28aca7(0x121)]):null,_0x52c56b=_0x6094c0?_0x2f2d09(_0x6094c0):null,_0x3214b1=_0x52c56b&&_0x52c56b[_0x28aca7(0x14a)];let _0x44f057=![];if(_0x3214b1)_0x44f057=_0x5a3f33(_0x3214b1,_0x959f4)||_0x44f057;const _0x2ff405=_0x3214b1?_0x3214b1[_0x28aca7(0x121)]||_0x3214b1[_0x28aca7(0x180)]||'':'',_0x6a36c5=_0x3214b1&&_0x3214b1[_0x28aca7(0x186)]!=null?String(_0x3214b1[_0x28aca7(0x186)]):null,_0x4dce15=_0x6a36c5?_0x6a36c5:_0x6094c0&&_0x259e1f[_0x28aca7(0x100)]&&_0x259e1f[_0x28aca7(0x100)][_0x6094c0]?String(_0x259e1f[_0x28aca7(0x100)][_0x6094c0]):_0x5844e4?_0x5844e4:'',_0x4f746c=_0x2ff405?String(_0x2ff405):_0x6094c0&&_0x259e1f[_0x28aca7(0x1ab)]&&_0x259e1f[_0x28aca7(0x1ab)][_0x6094c0]?String(_0x259e1f[_0x28aca7(0x1ab)][_0x6094c0]):_0x358d55?_0x358d55:'';let _0x330235=_0x3214b1;if(_0x4dce15&&_0x52c56b?.['registration']?.[_0x28aca7(0x14f)])try{const _0x293326=_0x371865['findController']?.(_0x52c56b[_0x28aca7(0x168)][_0x28aca7(0x14f)],_0x4dce15,_0x52c56b[_0x28aca7(0x168)][_0x28aca7(0x103)]);_0x293326&&(_0x330235=_0x293326);}catch(_0x4b00b1){}_0x4dce15&&_0x4dce15!==String(_0x959f4[_0x28aca7(0x186)]||'')&&(_0x959f4[_0x28aca7(0x186)]=_0x4dce15,_0x44f057=!![]);_0x4f746c&&_0x4f746c!==String(_0x959f4[_0x28aca7(0x121)]||'')&&(_0x959f4[_0x28aca7(0x121)]=_0x4f746c,_0x44f057=!![]);const _0x5a0e67=_0x330235||_0x3214b1;if(_0x5a0e67?.[_0x28aca7(0x1b2)]&&_0x959f4[_0x28aca7(0x1b4)]!=null&&_0x959f4[_0x28aca7(0x153)]!=null){const _0x2ca3bf=_0x406e5c(_0x959f4[_0x28aca7(0x1b4)]),_0x8c8bb8=String(_0x2ca3bf)+'|'+String(_0x959f4['objectInstance']),_0x498265=_0x5a0e67['objByKey']['get'](_0x8c8bb8);if(_0x498265){const _0x40b5df=_0x498265[_0x28aca7(0x104)]||'';_0x40b5df!==String(_0x959f4[_0x28aca7(0x104)]||'')&&(_0x959f4['objectName']=_0x40b5df,_0x44f057=!![]);const _0x37c3a4=_0x498265[_0x28aca7(0x197)]||'';_0x37c3a4!==String(_0x959f4[_0x28aca7(0x197)]||'')&&(_0x959f4[_0x28aca7(0x197)]=_0x37c3a4,_0x44f057=!![]);const _0x1445ce=_0x498265['description']||'';_0x1445ce!==String(_0x959f4['description']||'')&&(_0x959f4['description']=_0x1445ce,_0x44f057=!![]);}}_0x44f057&&(_0x959f4['changed']=!![],_0x69a948(),_0x3e5870()),_0x1f3940(),_0x5b31eb();}function _0x83392c(_0x3354b7,_0x5e45d8){const _0xbeb5d5=_0x3e6d43;_0x959f4[_0xbeb5d5(0x14b)]=_0x959f4[_0xbeb5d5(0x14b)]||_0x959f4['context']()[_0xbeb5d5(0x1b0)]['get'](_0xbeb5d5(0x122));if(!_0x959f4[_0xbeb5d5(0x14b)]){_0x959f4[_0xbeb5d5(0x10b)](_0xbeb5d5(0x146)),_0x959f4[_0xbeb5d5(0x106)]({'fill':_0xbeb5d5(0x13a),'shape':_0xbeb5d5(0x1b6),'text':_0xbeb5d5(0x142)}),_0x959f4[_0xbeb5d5(0x10b)](_0xbeb5d5(0x146));return;}const _0x129c57=_0x2e9040(),_0x47e446=_0x532bc9(_0x959f4[_0xbeb5d5(0x1b4)]),_0x3b92e1=_0x959f4[_0xbeb5d5(0x153)];if(!_0x959f4[_0xbeb5d5(0x186)]||!_0x47e446||_0x3b92e1==null){!_0x959f4['_missingSticky']&&_0x959f4[_0xbeb5d5(0x106)]({'fill':_0xbeb5d5(0x13a),'shape':_0xbeb5d5(0x1b6),'text':_0xbeb5d5(0x138)});return;}if(!_0x129c57){_0x959f4[_0xbeb5d5(0x106)]({'fill':_0xbeb5d5(0x13a),'shape':_0xbeb5d5(0x1b6),'text':_0xbeb5d5(0x18c)}),_0x959f4[_0xbeb5d5(0x10b)](_0xbeb5d5(0x1aa));return;}const _0x33c818={'propertyId':0x55,'priority':Number(_0x5e45d8),'value':_0x3354b7};try{String(_0x959f4[_0xbeb5d5(0x14d)])['toLowerCase']()==='ip'?(_0x959f4['_service'][_0xbeb5d5(0x190)](_0x129c57[_0xbeb5d5(0x12d)],_0x129c57['api_token'],_0x959f4[_0xbeb5d5(0x186)],_0x47e446,_0x3b92e1,_0x33c818),_0x5b31eb()):(_0x959f4[_0xbeb5d5(0x14b)][_0xbeb5d5(0x137)](_0x129c57[_0xbeb5d5(0x12d)],_0x129c57[_0xbeb5d5(0x11e)],_0x959f4[_0xbeb5d5(0x186)],_0x47e446,_0x3b92e1,_0x33c818),_0x5b31eb());}catch(_0x3b1ce9){_0x959f4[_0xbeb5d5(0x106)]({'fill':'red','shape':_0xbeb5d5(0x1b6),'text':_0xbeb5d5(0x185)}),_0x959f4[_0xbeb5d5(0x10b)](_0xbeb5d5(0x156)+(_0x3b1ce9[_0xbeb5d5(0x12b)]||_0x3b1ce9));}}_0x959f4['_refreshMapping']=_0x1fe5b9;const _0x38b7d6=_0x2e9040();if(!_0x38b7d6)_0x959f4['status']({'fill':_0x3e6d43(0x13a),'shape':_0x3e6d43(0x1b6),'text':_0x3e6d43(0xff)});else{_0x5b31eb(),_0x1fe5b9(),_0x3e5870(),_0x959f4['_deployListener']=function(){setTimeout(()=>{const _0x51972d=a4_0x2613;_0x959f4&&!_0x959f4[_0x51972d(0x14c)]&&_0x1fe5b9();},0xc8);},_0x350809[_0x3e6d43(0x15f)]['on'](_0x3e6d43(0x15b),_0x959f4[_0x3e6d43(0x115)]);if(!_0x959f4[_0x3e6d43(0x143)]){function _0xe40aa(){const _0xd70a7d=_0x3e6d43,_0x4c2560=String(_0x959f4['controller_guid']||''),_0x20a93a=_0x14c4de(_0x4c2560);if(!_0x20a93a||!_0x20a93a[_0xd70a7d(0xfb)])return null;const _0x39c562=_0xa80f5d[_0xd70a7d(0x17e)](_0x20a93a['ocn_server_node']);return _0x39c562&&(_0x959f4['_watcherListener']=_0x1fe5b9,_0x39c562['on'](_0xd70a7d(0x10f),_0x959f4[_0xd70a7d(0x151)])),null;}_0x959f4[_0x3e6d43(0x143)]=_0xe40aa();}typeof _0x38b7d6['on']===_0x3e6d43(0x1a3)&&(_0x959f4[_0x3e6d43(0x119)]=function(){const _0x3d63d4=_0x3e6d43;_0x959f4[_0x3d63d4(0x10d)]&&!_0x959f4['_missingSticky']&&_0x959f4[_0x3d63d4(0x106)]({'fill':_0x3d63d4(0x13a),'shape':_0x3d63d4(0x1b6),'text':_0x3d63d4(0x171)});},_0x38b7d6['on']('mqtt_disconnect',_0x959f4[_0x3e6d43(0x119)]));}_0x959f4['on'](_0x3e6d43(0x19e),function(){const _0x21e514=_0x3e6d43;_0x2aef6b(),_0x21f51f();_0x959f4[_0x21e514(0x143)]&&(clearInterval(_0x959f4['_watchTimer']),_0x959f4[_0x21e514(0x143)]=null);if(_0x959f4['_watcherListener']){const _0x426517=String(_0x959f4['controller_guid']||''),_0x582515=_0x14c4de(_0x426517);if(_0x582515&&_0x582515['ocn_server_node']){const _0x335e0f=_0xa80f5d[_0x21e514(0x17e)](_0x582515[_0x21e514(0xfb)]);_0x335e0f&&_0x335e0f[_0x21e514(0x116)](_0x21e514(0x10f),_0x959f4['_watcherListener']);}_0x959f4[_0x21e514(0x151)]=null;}typeof _0x38b7d6==='object'&&typeof _0x38b7d6[_0x21e514(0x116)]===_0x21e514(0x1a3)&&_0x959f4[_0x21e514(0x119)]&&(_0x38b7d6['removeListener'](_0x21e514(0x173),_0x959f4['_mqttDisconnectListener']),_0x959f4[_0x21e514(0x119)]=null);if(_0x959f4[_0x21e514(0x115)]){if(typeof _0x350809[_0x21e514(0x15f)][_0x21e514(0x116)]==='function')_0x350809[_0x21e514(0x15f)]['removeListener'](_0x21e514(0x15b),_0x959f4[_0x21e514(0x115)]);else typeof _0x350809[_0x21e514(0x15f)][_0x21e514(0x165)]===_0x21e514(0x1a3)&&_0x350809[_0x21e514(0x15f)][_0x21e514(0x165)]('deploy',_0x959f4[_0x21e514(0x115)]);_0x959f4[_0x21e514(0x115)]=null;}}),_0x959f4['on'](_0x3e6d43(0x114),function(_0x43b805,_0x145347,_0x44580c){const _0x501567=_0x3e6d43;let _0x52cc88=![];if(_0x959f4[_0x501567(0x125)]){if(_0x43b805[_0x501567(0x150)]){const _0x372b69=String(_0x43b805[_0x501567(0x150)])[_0x501567(0x16a)]('-');_0x372b69[_0x501567(0x139)]===0x2&&(_0x959f4[_0x501567(0x1b4)]=_0x5728d2(_0x372b69[0x0]),_0x959f4[_0x501567(0x153)]=_0x42bd0b(_0x372b69[0x1]),_0x52cc88=!![]);}_0x43b805[_0x501567(0x19d)]!==undefined&&_0x43b805['object_type']!==null&&_0x43b805[_0x501567(0x196)]!==undefined&&_0x43b805[_0x501567(0x196)]!==null&&(_0x959f4[_0x501567(0x1b4)]=_0x5728d2(_0x43b805['object_type']),_0x959f4[_0x501567(0x153)]=_0x42bd0b(_0x43b805['object_instance']),_0x52cc88=!![]),_0x43b805['device_instance']!==undefined&&_0x43b805[_0x501567(0x159)]!==null&&(_0x959f4['deviceInstance']=_0x4e2b04(_0x43b805[_0x501567(0x159)]),_0x52cc88=!![]),_0x52cc88&&(_0x959f4[_0x501567(0x140)]=undefined,_0x563f9f(),_0x959f4[_0x501567(0x19f)]?_0x69a948():_0x3e5870(),_0x1f3940());}const _0x3329a8=_0x52e452(),_0x3faa30=_0x2e9040();if(!_0x3faa30||!_0x3329a8||!_0x959f4[_0x501567(0x186)]){!_0x959f4[_0x501567(0x19f)]&&_0x959f4[_0x501567(0x106)]({'fill':_0x501567(0x13a),'shape':_0x501567(0x1b6),'text':'Select\x20a\x20point'});if(_0x44580c)_0x44580c();return;}const _0x3d0aa8=_0x43b805[_0x501567(0x144)]===null?null:Number(_0x43b805[_0x501567(0x144)]);if(_0x3d0aa8!==null&&isNaN(_0x3d0aa8)){if(_0x44580c)_0x44580c();return;}let _0x464bfe=_0x959f4['priority'];_0x959f4[_0x501567(0x10a)]&&_0x43b805[_0x501567(0x1ac)]!=null&&(_0x464bfe=String(_0x43b805[_0x501567(0x1ac)]));const _0x2c3d38=Math['max'](0x1,Math[_0x501567(0x182)](0x10,parseInt(_0x464bfe,0xa)||0x9));_0x959f4[_0x501567(0x179)]=_0x3d0aa8,_0x5b31eb();const _0x53bca2=(function(){const _0x523b89=_0x501567;if(_0x959f4[_0x523b89(0x12e)]===_0x523b89(0x1af))return!![];if(_0x959f4[_0x523b89(0x1a1)]===undefined)return!![];if(_0x3d0aa8===null&&_0x959f4[_0x523b89(0x1a1)]!==null)return!![];if(_0x3d0aa8===null&&_0x959f4[_0x523b89(0x1a1)]===null)return![];if(_0x3d0aa8!==null&&_0x959f4[_0x523b89(0x1a1)]===null)return!![];const _0x403b8e=Math['abs'](Number(_0x3d0aa8)-Number(_0x959f4[_0x523b89(0x1a1)]))<_0x959f4['_resolution'];return!_0x403b8e;}());_0x53bca2&&(_0x959f4[_0x501567(0x1a1)]=_0x3d0aa8,_0x83392c(_0x3d0aa8,_0x2c3d38));const _0x5e0de1={'payload':_0x3d0aa8,'topic':_0x43b805[_0x501567(0x18a)]||_0x959f4[_0x501567(0x18a)],'requested':!![],'object_id':_0x3329a8,'device_instance':_0x959f4[_0x501567(0x186)],'object_type':_0x532bc9(_0x959f4[_0x501567(0x1b4)]),'object_instance':_0x959f4[_0x501567(0x153)],'units':_0x959f4[_0x501567(0x197)],'priority':_0x2c3d38,'output_type':_0x959f4[_0x501567(0x14d)],'acknowledged_mqtt':_0x959f4['acknowledged_mqtt'],'send_policy':_0x959f4[_0x501567(0x12e)]};(_0x145347||_0x959f4[_0x501567(0x161)])([_0x5e0de1,undefined]);if(_0x44580c)_0x44580c();});});function _0x41a255(_0x5b5a99){const _0x7df29d=_0x3b9d31;if(!_0x5b5a99)return[];const _0x5bb1cb=Array[_0x7df29d(0x183)](_0x5b5a99[_0x7df29d(0x163)])?_0x5b5a99[_0x7df29d(0x163)]:[],_0x442b49=_0x5b5a99[_0x7df29d(0x121)]||_0x5b5a99[_0x7df29d(0x180)]||'',_0x1afd35=String(_0x5b5a99['deviceInstance']||'');return _0x5bb1cb[_0x7df29d(0x17f)](_0x52101c=>{const _0xda599f=_0x7df29d,_0x2065f8=_0x406e5c(_0x52101c[_0xda599f(0x1b4)]);return{'objectType':_0x2065f8,'objectTypeName':_0x52101c[_0xda599f(0x198)]||_0x39aa1d[_0x2065f8]||String(_0x2065f8),'objectInstance':_0x52101c[_0xda599f(0x153)],'objectName':_0x52101c[_0xda599f(0x104)]||'','description':_0x52101c[_0xda599f(0x149)]||'','units':_0x52101c[_0xda599f(0x197)]||'','presentValue':_0x52101c[_0xda599f(0x134)],'controllerName':_0x442b49,'controllerDeviceInstance':_0x1afd35};})[_0x7df29d(0x191)]((_0x261c2b,_0x3b1759)=>_0x261c2b[_0x7df29d(0x1b4)]!==_0x3b1759[_0x7df29d(0x1b4)]?_0x261c2b[_0x7df29d(0x1b4)]-_0x3b1759[_0x7df29d(0x1b4)]:_0x261c2b['objectInstance']-_0x3b1759[_0x7df29d(0x153)]);}function _0x2a9f6e(_0x53f666){return function(){const _0x59e0c5=a4_0x2613,_0x5236b2=_0x350809['nodes'][_0x59e0c5(0xfc)](_0x53f666);if(!_0x5236b2)return null;return{'ocn_ip':_0x5236b2[_0x59e0c5(0x12d)],'api_token':_0x5236b2[_0x59e0c5(0x11e)]};};}_0x350809[_0x3b9d31(0x15e)][_0x3b9d31(0x1a5)](_0x3b9d31(0x187),async function(_0x5857f9,_0x4a74bd){const _0x2dfa4e=_0x3b9d31;try{const _0x47410f=String(_0x5857f9[_0x2dfa4e(0x11c)]['nodeId']||'');let _0x31313d=String(_0x5857f9[_0x2dfa4e(0x11c)]['deviceInstance']||'');const _0x3c07ca=String(_0x5857f9[_0x2dfa4e(0x11c)][_0x2dfa4e(0x103)]||'');if(!_0x47410f){_0x4a74bd[_0x2dfa4e(0x106)](0x190)[_0x2dfa4e(0x113)]({'error':_0x2dfa4e(0x131)});return;}let _0x2b8259=_0x350809[_0x2dfa4e(0x169)][_0x2dfa4e(0x13e)]?_0x350809[_0x2dfa4e(0x169)][_0x2dfa4e(0x13e)](_0x47410f):null;!_0x2b8259&&(_0x2b8259=_0x350809[_0x2dfa4e(0x169)]['getNode']?_0x350809[_0x2dfa4e(0x169)][_0x2dfa4e(0xfc)](_0x47410f):null);if(!_0x2b8259){_0x4a74bd[_0x2dfa4e(0x106)](0x190)[_0x2dfa4e(0x113)]({'error':_0x2dfa4e(0x175)});return;}let _0x50f96c='',_0x5b520d=null;const _0x66a307=_0x14c4de(_0x2b8259['controller_guid']||'');if(_0x66a307){_0x50f96c=String(_0x66a307[_0x2dfa4e(0xfb)]||'');if(_0x50f96c)_0x5b520d=_0x350809[_0x2dfa4e(0x169)][_0x2dfa4e(0xfc)](_0x50f96c)||null;}if(!_0x5b520d){const _0x1a45cf=_0x2b8259[_0x2dfa4e(0xfb)];if(typeof _0x1a45cf==='string')_0x50f96c=_0x1a45cf,_0x5b520d=_0x350809[_0x2dfa4e(0x169)][_0x2dfa4e(0xfc)](_0x1a45cf)||null;else _0x1a45cf&&_0x1a45cf['id']&&(_0x50f96c=String(_0x1a45cf['id']),_0x5b520d=_0x1a45cf);}if(!_0x31313d){const _0x104d34=_0x2b8259[_0x2dfa4e(0x13d)]()['flow'],_0x508cb0=_0x236305(_0x104d34),_0x109422=String(_0x2b8259[_0x2dfa4e(0x120)]||''),_0x10feca=_0x109422&&_0x508cb0[_0x2dfa4e(0x100)]?_0x508cb0['g2i'][_0x109422]:'';if(_0x10feca)_0x31313d=String(_0x10feca);}if(!_0x31313d){_0x4a74bd['json']([]);return;}if(!_0x50f96c){_0x4a74bd[_0x2dfa4e(0x113)]([]);return;}if(!_0x5b520d){_0x4a74bd[_0x2dfa4e(0x113)]([]);return;}if(_0x5b520d&&(!_0x5b520d['ocn_ip']||!_0x5b520d['api_token'])){_0x4a74bd[_0x2dfa4e(0x113)]([]);return;}let _0x322c3d=null,_0x2f8f48=null,_0x2937b7=null;try{_0x50f96c&&(_0x322c3d=_0x371865[_0x2dfa4e(0x1a2)](_0x50f96c,_0x2a9f6e(_0x50f96c)));if(_0x322c3d&&_0x322c3d[_0x2dfa4e(0x109)])_0x2f8f48=_0x322c3d['watcher'][_0x2dfa4e(0x1b1)](),_0x2937b7=_0x3c07ca?_0x322c3d[_0x2dfa4e(0x109)][_0x2dfa4e(0x174)](_0x31313d,_0x3c07ca):_0x322c3d['watcher'][_0x2dfa4e(0x174)](_0x31313d,'');else{const _0x157343=_0x371865['lookupControllerByGuid'](_0x2b8259['controller_guid']||'');_0x2f8f48=_0x157343&&_0x157343[_0x2dfa4e(0x16c)],_0x2937b7=_0x157343&&_0x157343['controller'],_0x2937b7&&_0x3c07ca&&String(_0x2937b7[_0x2dfa4e(0x103)]||'')!==String(_0x3c07ca)&&(_0x2937b7=null);}}finally{if(_0x322c3d)_0x322c3d['release']();}if(_0x2f8f48&&_0x2f8f48[_0x2dfa4e(0x11f)]){if(_0x2f8f48[_0x2dfa4e(0x101)]===0x191||_0x2f8f48[_0x2dfa4e(0x101)]===0x193){_0x4a74bd[_0x2dfa4e(0x106)](0x191)[_0x2dfa4e(0x113)]({'error':_0x2dfa4e(0x19c)});return;}_0x4a74bd[_0x2dfa4e(0x106)](0x1f6)[_0x2dfa4e(0x113)]({'error':_0x2f8f48['lastError']});return;}_0x4a74bd['json'](_0x41a255(_0x2937b7));}catch(_0x3e3a71){if(_0x3e3a71&&_0x3e3a71[_0x2dfa4e(0x15a)]===0x191)_0x4a74bd[_0x2dfa4e(0x106)](0x191)[_0x2dfa4e(0x113)]({'error':_0x2dfa4e(0x19c)});else _0x4a74bd[_0x2dfa4e(0x106)](0x1f6)[_0x2dfa4e(0x113)]({'error':String(_0x3e3a71&&_0x3e3a71['message']||_0x3e3a71)});}}),_0x350809['httpAdmin'][_0x3b9d31(0x1a5)](_0x3b9d31(0x18b),async function(_0x518fce,_0x51c243){const _0x22814e=_0x3b9d31;try{const _0x175dcd=String(_0x518fce['query'][_0x22814e(0x162)]||''),_0x23f80d=String(_0x518fce[_0x22814e(0x11c)][_0x22814e(0x1b4)]||''),_0x17764e=String(_0x518fce[_0x22814e(0x11c)]['objectInstance']||'');if(!_0x175dcd||!_0x23f80d||!_0x17764e){_0x51c243[_0x22814e(0x106)](0x190)['json']({'error':_0x22814e(0x14e)});return;}let _0x316610=_0x350809[_0x22814e(0x169)]['node']?_0x350809['nodes'][_0x22814e(0x13e)](_0x175dcd):null;!_0x316610&&(_0x316610=_0x350809[_0x22814e(0x169)][_0x22814e(0xfc)]?_0x350809[_0x22814e(0x169)][_0x22814e(0xfc)](_0x175dcd):null);if(!_0x316610){_0x51c243['status'](0x190)[_0x22814e(0x113)]({'error':_0x22814e(0x175)});return;}const _0x2814bb=_0x316610[_0x22814e(0x13d)]()[_0x22814e(0x147)],_0x143df6=_0x236305(_0x2814bb),_0x80907b=String(_0x316610[_0x22814e(0x120)]||''),_0x342688=_0x80907b?_0x371865[_0x22814e(0x1a9)](_0x80907b):null,_0xe45cb3=_0x342688&&_0x342688[_0x22814e(0x16c)],_0x44968b=_0x342688&&_0x342688['controller'];if(_0xe45cb3&&_0xe45cb3['lastError']){_0x51c243['json']({});return;}if(_0x44968b&&_0x44968b[_0x22814e(0x1b2)]){const _0xeec937=_0x406e5c(_0x23f80d),_0x439aa2=String(_0xeec937)+'|'+String(_0x17764e),_0x5cbb00=_0x44968b[_0x22814e(0x1b2)][_0x22814e(0x1a5)](_0x439aa2);if(_0x5cbb00){const _0x1ecdf4=_0x44968b['deviceName']||_0x44968b[_0x22814e(0x180)]||'',_0x423964=_0x143df6['names']&&_0x143df6['names'][_0x80907b]?String(_0x143df6[_0x22814e(0x1ab)][_0x80907b]):'',_0x4d13fc=_0x1ecdf4||_0x423964||'',_0x1b068d=_0x44968b[_0x22814e(0x186)]!=null?String(_0x44968b[_0x22814e(0x186)]):_0x80907b&&_0x143df6[_0x22814e(0x100)]?String(_0x143df6[_0x22814e(0x100)][_0x80907b]):'';_0x51c243['json']({'objectName':_0x5cbb00[_0x22814e(0x104)]||'','units':_0x5cbb00['units']||'','controllerName':_0x4d13fc||'','controllerDeviceInstance':_0x1b068d});return;}}_0x51c243[_0x22814e(0x113)]({});}catch(_0x637660){if(_0x637660&&_0x637660[_0x22814e(0x15a)]===0x191)_0x51c243[_0x22814e(0x106)](0x191)['json']({'error':_0x22814e(0x19c)});else _0x51c243[_0x22814e(0x106)](0x1f6)[_0x22814e(0x113)]({'error':String(_0x637660&&_0x637660[_0x22814e(0x12b)]||_0x637660)});}}),_0x350809['httpAdmin'][_0x3b9d31(0x1a5)](_0x3b9d31(0x117),async function(_0x18e446,_0x405552){const _0x8f4c27=_0x3b9d31;try{const _0x4b9c43=String(_0x18e446[_0x8f4c27(0x11c)][_0x8f4c27(0x162)]||'');if(!_0x4b9c43){_0x405552[_0x8f4c27(0x106)](0x190)[_0x8f4c27(0x113)]({'error':_0x8f4c27(0x131)});return;}const _0x37da7e=_0x350809[_0x8f4c27(0x169)][_0x8f4c27(0xfc)]?_0x350809[_0x8f4c27(0x169)]['getNode'](_0x4b9c43):null;if(!_0x37da7e){_0x405552[_0x8f4c27(0x106)](0x194)['json']({'error':_0x8f4c27(0x17a)});return;}const _0x2c9cb8=String(_0x37da7e[_0x8f4c27(0x104)]||''),_0x28b32c=String(_0x37da7e[_0x8f4c27(0x121)]||''),_0xae8e64=String(_0x37da7e[_0x8f4c27(0x186)]||'');typeof _0x37da7e[_0x8f4c27(0x11a)]==='function'&&_0x37da7e[_0x8f4c27(0x11a)]();await new Promise(_0x1b016c=>setTimeout(_0x1b016c,0x64));const _0x5c8e7b=String(_0x37da7e[_0x8f4c27(0x104)]||''),_0x4133e5=String(_0x37da7e['deviceName']||''),_0xb8197f=String(_0x37da7e[_0x8f4c27(0x186)]||'');_0x405552['json']({'nodeId':_0x37da7e['id'],'before':{'objectName':_0x2c9cb8,'deviceName':_0x28b32c,'deviceInstance':_0xae8e64},'after':{'objectName':_0x5c8e7b,'deviceName':_0x4133e5,'deviceInstance':_0xb8197f},'changed':_0x2c9cb8!==_0x5c8e7b||_0x28b32c!==_0x4133e5||_0xae8e64!==_0xb8197f});}catch(_0x12138d){_0x405552[_0x8f4c27(0x106)](0x1f4)[_0x8f4c27(0x113)]({'error':String(_0x12138d&&_0x12138d[_0x8f4c27(0x12b)]||_0x12138d)});}});function _0x482ab8(_0x4501ce){const _0x5d3501=_0x3b9d31,_0x452744=String(_0x4501ce[_0x5d3501(0x120)]||''),_0x423aaf=_0x4501ce[_0x5d3501(0x13d)]()[_0x5d3501(0x147)],_0x21ff4b=_0x236305(_0x423aaf),_0x41daf8=_0x452744?_0x2f2d09(_0x452744):null,_0x35055e=_0x41daf8&&_0x41daf8['controller'],_0x1f2882=_0x35055e?_0x35055e[_0x5d3501(0x121)]||_0x35055e[_0x5d3501(0x180)]||'':'',_0x1322f3=_0x35055e&&_0x35055e[_0x5d3501(0x186)]!=null?String(_0x35055e[_0x5d3501(0x186)]):null,_0x1631b7=_0x14c4de(_0x452744),_0x36e138=_0x1631b7&&_0x1631b7[_0x5d3501(0x186)]!=null?String(_0x1631b7[_0x5d3501(0x186)]):null,_0x1e405e=_0x1322f3?_0x1322f3:_0x452744&&_0x21ff4b[_0x5d3501(0x100)]&&_0x21ff4b[_0x5d3501(0x100)][_0x452744]?String(_0x21ff4b[_0x5d3501(0x100)][_0x452744]):_0x36e138?_0x36e138:'';_0x1e405e&&String(_0x4501ce[_0x5d3501(0x186)])!==String(_0x1e405e)&&(_0x4501ce['deviceInstance']=_0x1e405e,_0x4501ce[_0x5d3501(0x12a)]=!![]);let _0x4725eb=null;if(_0x1e405e&&_0x41daf8?.[_0x5d3501(0x168)]?.['configId'])try{_0x4725eb=_0x371865[_0x5d3501(0x174)]?.(_0x41daf8[_0x5d3501(0x168)][_0x5d3501(0x14f)],_0x1e405e,_0x41daf8[_0x5d3501(0x168)]['networkNumber']);}catch(_0x5bda48){}const _0x151536=_0x4725eb||_0x35055e;if(_0x151536){const _0x10aa1f=_0x151536[_0x5d3501(0x121)]||_0x151536[_0x5d3501(0x180)]||'';_0x10aa1f&&_0x10aa1f!==String(_0x4501ce[_0x5d3501(0x121)]||'')&&(_0x4501ce['deviceName']=_0x10aa1f,_0x4501ce[_0x5d3501(0x12a)]=!![]);}if(_0x4501ce[_0x5d3501(0x1b4)]!=null&&_0x4501ce[_0x5d3501(0x153)]!=null&&_0x151536?.['objByKey']){const _0x533896=_0x406e5c(_0x4501ce[_0x5d3501(0x1b4)]),_0x3fabfc=String(_0x533896)+'|'+String(_0x4501ce['objectInstance']),_0x9ad413=_0x151536['objByKey'][_0x5d3501(0x1a5)](_0x3fabfc);_0x9ad413?.[_0x5d3501(0x104)]&&_0x9ad413[_0x5d3501(0x104)]!==String(_0x4501ce[_0x5d3501(0x104)]||'')&&(_0x4501ce[_0x5d3501(0x104)]=_0x9ad413[_0x5d3501(0x104)]);}return{'nodeId':_0x4501ce['id'],'objectName':String(_0x4501ce[_0x5d3501(0x104)]||''),'deviceName':String(_0x4501ce['deviceName']||''),'deviceInstance':_0x4501ce[_0x5d3501(0x186)]!=null?String(_0x4501ce[_0x5d3501(0x186)]):'','controllerName':String(_0x4501ce['deviceName']||''),'controllerDeviceInstance':_0x4501ce[_0x5d3501(0x186)]!=null?String(_0x4501ce[_0x5d3501(0x186)]):'','units':String(_0x4501ce[_0x5d3501(0x197)]||''),'description':String(_0x4501ce[_0x5d3501(0x149)]||'')};}_0x350809['httpAdmin'][_0x3b9d31(0x1a5)](_0x3b9d31(0x130),async function(_0x1fd15a,_0x2fa7f4){const _0x164803=_0x3b9d31;try{const _0x5e5b1d=String(_0x1fd15a[_0x164803(0x11c)][_0x164803(0x162)]||'');if(!_0x5e5b1d){_0x2fa7f4['status'](0x190)['json']({'error':'missing\x20nodeId'});return;}const _0xdfa584=_0x350809[_0x164803(0x169)][_0x164803(0xfc)]?_0x350809[_0x164803(0x169)][_0x164803(0xfc)](_0x5e5b1d):null;if(!_0xdfa584){_0x2fa7f4['status'](0x194)[_0x164803(0x113)]({'error':'node\x20not\x20found'});return;}_0x2fa7f4[_0x164803(0x113)](_0x482ab8(_0xdfa584));}catch(_0x6385ec){_0x2fa7f4['status'](0x1f4)[_0x164803(0x113)]({'error':String(_0x6385ec&&_0x6385ec['message']||_0x6385ec)});}}),_0x350809[_0x3b9d31(0x15e)][_0x3b9d31(0x1a5)]('/bacnet-point-out/nodePropertiesBatch',function(_0x3f22df,_0x400c0d){const _0x3692d9=_0x3b9d31;try{const _0x1496f2={};_0x350809[_0x3692d9(0x169)][_0x3692d9(0x18f)](function(_0x578a54){const _0x4f05c1=_0x3692d9;if(!_0x578a54||_0x578a54[_0x4f05c1(0x111)]!==_0x4f05c1(0x176))return;const _0x418016=_0x350809[_0x4f05c1(0x169)]['getNode'](_0x578a54['id']);if(!_0x418016)return;try{_0x1496f2[_0x418016['id']]=_0x482ab8(_0x418016);}catch(_0x1ddea0){_0x350809[_0x4f05c1(0x18e)][_0x4f05c1(0x1a0)](_0x4f05c1(0x1ad)+_0x578a54['id']+':\x20'+String(_0x1ddea0&&_0x1ddea0[_0x4f05c1(0x12b)]||_0x1ddea0));}}),_0x400c0d['json'](_0x1496f2);}catch(_0x4ec3b4){_0x400c0d[_0x3692d9(0x106)](0x1f4)[_0x3692d9(0x113)]({'error':String(_0x4ec3b4&&_0x4ec3b4[_0x3692d9(0x12b)]||_0x4ec3b4)});}});});