UNPKG

@opcua/for-node-red

Version:

The Node-RED node to communicate via OPC UA, powered NodeOPCUA and developed by Sterfive's team

461 lines (408 loc) 49.6 kB
<style> .licence-widget-icon{font-size:1.5em;margin-right:10px}.licence-widget{background-color:#fdfdfd;border:1px solid #eaeaea;border-radius:6px;box-sizing:border-box;font-family:Courier New,Courier,monospace;font-size:.8em;font-style:italic;margin-bottom:10px;margin-top:10px;max-height:600px;overflow-x:auto;overflow-y:auto;padding:10px;white-space:nowrap;width:100%}.licence-widget::-webkit-scrollbar{display:none}.licence-widget{scrollbar-color:transparent transparent;scrollbar-width:none}.licence-widget-AUTHORIZED{background-color:#d5f5e3}.licence-widget-FAILED{background-color:#fadbd8}.licence-widget-details{text-wrap:pretty;font-size:.8em;font-style:italic;padding:2px} /*# sourceMappingURL=OpcUa-Endpoint2.css.map */ </style> <script type="text/javascript"> function _0x16dd(_0x4eaa2a,_0x9c6ca5){const _0x5ef14c=_0x5ef1();return _0x16dd=function(_0x16dd8d,_0x5214e0){_0x16dd8d=_0x16dd8d-0x164;let _0x414b29=_0x5ef14c[_0x16dd8d];return _0x414b29;},_0x16dd(_0x4eaa2a,_0x9c6ca5);}(function(_0x95f114,_0x30e30b){const _0x86402=_0x16dd,_0x40672a=_0x95f114();while(!![]){try{const _0x27ccea=-parseInt(_0x86402(0x1b5))/0x1*(-parseInt(_0x86402(0x1c5))/0x2)+-parseInt(_0x86402(0x17b))/0x3*(-parseInt(_0x86402(0x201))/0x4)+parseInt(_0x86402(0x21e))/0x5+parseInt(_0x86402(0x1fb))/0x6*(parseInt(_0x86402(0x197))/0x7)+parseInt(_0x86402(0x1a9))/0x8*(-parseInt(_0x86402(0x23c))/0x9)+parseInt(_0x86402(0x1a1))/0xa+-parseInt(_0x86402(0x209))/0xb*(parseInt(_0x86402(0x1a6))/0xc);if(_0x27ccea===_0x30e30b)break;else _0x40672a['push'](_0x40672a['shift']());}catch(_0x40dc5e){_0x40672a['push'](_0x40672a['shift']());}}}(_0x5ef1,0x39015),(function(){'use strict';const _0xd5cb73=_0x16dd;function _0x575389(_0x37a438,_0x122425,_0x3a5d81,_0x473539){function _0x379d81(_0xe95adc){return _0xe95adc instanceof _0x3a5d81?_0xe95adc:new _0x3a5d81(function(_0x40563d){_0x40563d(_0xe95adc);});}return new(_0x3a5d81||(_0x3a5d81=Promise))(function(_0x4715f7,_0x28e2ea){const _0xe11a21=_0x16dd;function _0x309c62(_0x57d2dd){const _0x940958=_0x16dd;try{_0x5e6e2a(_0x473539[_0x940958(0x1f6)](_0x57d2dd));}catch(_0x1ecbeb){_0x28e2ea(_0x1ecbeb);}}function _0x132401(_0x369342){const _0x22bf94=_0x16dd;try{_0x5e6e2a(_0x473539[_0x22bf94(0x1ac)](_0x369342));}catch(_0x14dec6){_0x28e2ea(_0x14dec6);}}function _0x5e6e2a(_0x24d42d){const _0x4088e2=_0x16dd;_0x24d42d[_0x4088e2(0x228)]?_0x4715f7(_0x24d42d[_0x4088e2(0x21c)]):_0x379d81(_0x24d42d[_0x4088e2(0x21c)])['then'](_0x309c62,_0x132401);}_0x5e6e2a((_0x473539=_0x473539[_0xe11a21(0x23f)](_0x37a438,_0x122425||[]))[_0xe11a21(0x1f6)]());});}typeof SuppressedError===_0xd5cb73(0x220)?SuppressedError:function(_0x3c9b37,_0x4241d3,_0x3a0621){const _0x5bf118=_0xd5cb73;var _0x3780b6=new Error(_0x3a0621);return _0x3780b6[_0x5bf118(0x21d)]='SuppressedError',_0x3780b6[_0x5bf118(0x235)]=_0x3c9b37,_0x3780b6[_0x5bf118(0x1af)]=_0x4241d3,_0x3780b6;};function _0x591ed4(_0x1814dd,_0x4444ee,_0x5f07e9,_0x292e08){const _0x5ede9a=_0xd5cb73,_0x948ec7=$('#'+_0x1814dd+_0x5ede9a(0x224)),_0x98094b=$('#'+_0x1814dd+_0x5ede9a(0x1d4)),_0x222c13=$('#'+_0x1814dd+_0x5ede9a(0x17e)),_0x5a26c8=$('#'+_0x1814dd+_0x5ede9a(0x231));let _0x189faf=![];_0x948ec7[_0x5ede9a(0x23d)](),_0x98094b[_0x5ede9a(0x23d)](),_0x222c13[_0x5ede9a(0x23d)](),_0x4444ee['on'](_0x5ede9a(0x19e),()=>{const _0x437d64=_0x5ede9a;if(_0x189faf)return;_0x189faf=!![],_0x222c13[_0x437d64(0x1dd)](_0x437d64(0x23d)),_0x222c13[_0x437d64(0x1dc)](_0x437d64(0x1ed)),_0x948ec7[_0x437d64(0x21b)](_0x437d64(0x23d)),_0x98094b[_0x437d64(0x21b)](_0x437d64(0x23d)),_0x5a26c8[_0x437d64(0x1dc)]('');const {body:_0x3dc3e7,url:_0x297091}=_0x5f07e9();fetch(_0x297091,{'method':_0x437d64(0x1df),'headers':{'Content-Type':'application/json'},'body':JSON[_0x437d64(0x1e5)](_0x3dc3e7)})[_0x437d64(0x1a0)](_0x2a3aaa=>_0x2a3aaa['json']())[_0x437d64(0x1a0)](_0x54de93=>{const _0x49dfb6=_0x437d64;_0x189faf=![],_0x222c13[_0x49dfb6(0x23d)](),console['log'](JSON[_0x49dfb6(0x1e5)](_0x54de93,null,'\x20'));if(_0x54de93[_0x49dfb6(0x199)]==='ok')_0x948ec7[_0x49dfb6(0x1dd)]('hide'),_0x98094b[_0x49dfb6(0x21b)](_0x49dfb6(0x23d)),_0x5a26c8[_0x49dfb6(0x1dc)](_0x54de93[_0x49dfb6(0x217)]['replace']('\x0a',_0x49dfb6(0x241)));else{const _0x3bc5d5=_0x403315=>!_0x403315?'':_0x403315[_0x49dfb6(0x191)]('\x0a')[_0x49dfb6(0x19d)](_0x19023e=>_0x49dfb6(0x1d0)+_0x19023e+_0x49dfb6(0x1b7))['join']('\x0a'),_0x388590=_0x443b5a=>Array[_0x49dfb6(0x1d6)](_0x443b5a)?_0x443b5a[_0x49dfb6(0x19d)](_0x3bc5d5)[_0x49dfb6(0x1a3)]('\x0a'):_0x3bc5d5(_0x443b5a);_0x948ec7['addClass']('hide'),_0x98094b['removeClass'](_0x49dfb6(0x23d)),_0x5a26c8[_0x49dfb6(0x1dc)](_0x388590(_0x54de93[_0x49dfb6(0x217)])+_0x388590(_0x54de93[_0x49dfb6(0x211)])),_0x292e08(new Error(_0x54de93[_0x49dfb6(0x199)]),_0x54de93);}})['catch'](_0x2d824a=>{const _0x3578a7=_0x437d64;_0x189faf=![],_0x222c13[_0x3578a7(0x21b)](_0x3578a7(0x23d)),_0x948ec7[_0x3578a7(0x21b)](_0x3578a7(0x23d)),_0x98094b['removeClass']('hide'),_0x5a26c8[_0x3578a7(0x1dc)](_0x3578a7(0x17f)+_0x2d824a[_0x3578a7(0x217)]),console[_0x3578a7(0x177)](_0x3578a7(0x1f3),_0x2d824a);});});}var _0x161c7a;(function(_0x31ff0a){const _0x3df601=_0xd5cb73;_0x31ff0a[_0x31ff0a[_0x3df601(0x230)]=0x0]=_0x3df601(0x230),_0x31ff0a[_0x31ff0a['TRIAL']=0x1]=_0x3df601(0x216),_0x31ff0a[_0x31ff0a[_0x3df601(0x1b3)]=0x2]='PROFESSIONAL';}(_0x161c7a||(_0x161c7a={})));var _0x55c352;(function(_0x557437){const _0x141ba3=_0xd5cb73;_0x557437[_0x557437[_0x141ba3(0x16d)]=0x18]=_0x141ba3(0x16d),_0x557437[_0x557437[_0x141ba3(0x237)]=0x17]=_0x141ba3(0x237),_0x557437[_0x557437[_0x141ba3(0x196)]=0x16]=_0x141ba3(0x196);}(_0x55c352||(_0x55c352={})));function _0x4e35cf(_0x5b4e88,_0x1d3aef){const _0x58371e=_0xd5cb73;if(_0x1d3aef!==_0x55c352['AUTHORIZED'])return _0x161c7a[_0x58371e(0x230)];return _0x5b4e88;}const _0x15d178=0xe10*0x3e8,_0x5b200a=_0x15d178*0x18;function _0x20fcf6(_0x9711e5){const _0x430a68=_0xd5cb73;return!_0x9711e5?new Date(0x0):_0x9711e5 instanceof Date?_0x9711e5:new Date(_0x9711e5[_0x430a68(0x1e1)]?_0x9711e5['licenceInfo'][_0x430a68(0x21a)]:0x0);}function _0x3be473(_0xf81b9b){const _0x39828a=_0xd5cb73,_0xda99dc=_0x20fcf6(_0xf81b9b),_0x2626b8=new Date(),_0x2039f1=Math[_0x39828a(0x19a)]((_0xda99dc[_0x39828a(0x1c2)]()-_0x2626b8[_0x39828a(0x1c2)]())/_0x5b200a);return _0x2039f1;}function _0x274d7f(_0x261984){const _0x26a431=_0xd5cb73,_0x3bf3c2=_0x20fcf6(_0x261984),_0x579ddd=new Date(),_0x2b0c62=Math[_0x26a431(0x19a)]((_0x3bf3c2['getTime']()-_0x579ddd[_0x26a431(0x1c2)]())/_0x15d178);return _0x2b0c62;}const _0x12a43c='prctbl_1OJt49BCNccbzsVzkaANOgFL',_0x3654e8=_0xd5cb73(0x1f5);function _0x254b82(){return _0x575389(this,arguments,void 0x0,function*(_0x2a92a5=''){const _0x52d67b=_0x16dd,_0x3f46b0=_0x2a92a5+_0x52d67b(0x1ce),_0x55a9b7=_0x3f46b0+_0x52d67b(0x1ef),_0x397d31=yield fetch(_0x55a9b7,{'method':_0x52d67b(0x1df),'headers':{'Content-Type':_0x52d67b(0x22a)}}),_0x365108=new Date()[_0x52d67b(0x236)](),_0x4a80a4={'status':_0x52d67b(0x237),'type':_0x52d67b(0x230),'licenceInfo':{'licenceId':_0x52d67b(0x218),'licenceType':_0x52d67b(0x22f),'expiryDate':_0x365108,'onPremiseServerHost':'','expired':!![],'userCompany':'','userEmail':'','userName':''}};if(_0x397d31[_0x52d67b(0x1cf)]!==0xc8)return console[_0x52d67b(0x177)](_0x52d67b(0x24a),_0x397d31[_0x52d67b(0x1cf)],_0x397d31[_0x52d67b(0x24f)]),_0x4a80a4;const _0x327264=yield _0x397d31[_0x52d67b(0x1ae)]();return _0x327264;});}const _0x11b3d0=()=>{$['widget']('sterfive.licenceWidget',{'options':{'baseUrl':''},'_create'(){const _0x4dc8ea=_0x16dd,_0x236668=this,_0x69cb9a='<a\x20href=\x22mailto:support@sterfive.com\x22\x20subject=\x22@opcua/for-node-red\x20support\x20request\x22>mailto:support@sterfive.com</a>',_0x1f03eb=_0x4dc8ea(0x1b4);_0x254b82(_0x236668[_0x4dc8ea(0x1e8)])[_0x4dc8ea(0x1a0)](_0x2f8d8b=>{const _0x3d7ec2=_0x4dc8ea;var _0x2b3984,_0x490605;let _0x3a1261='',_0x44f6c5='',_0x240daf='';const _0x217b73=_0x161c7a[_0x2f8d8b['type']],_0x3a74d4=_0x55c352[_0x2f8d8b[_0x3d7ec2(0x1cf)]],_0x251280=_0x4e35cf(_0x217b73,_0x3a74d4),_0x4e7fdc=_0x3be473(((_0x2b3984=_0x2f8d8b['licenceInfo'])===null||_0x2b3984===void 0x0?void 0x0:_0x2b3984[_0x3d7ec2(0x21a)])?new Date(_0x2f8d8b['licenceInfo'][_0x3d7ec2(0x21a)]):undefined),_0x206639=_0x274d7f(((_0x490605=_0x2f8d8b['licenceInfo'])===null||_0x490605===void 0x0?void 0x0:_0x490605[_0x3d7ec2(0x21a)])?new Date(_0x2f8d8b[_0x3d7ec2(0x1e1)][_0x3d7ec2(0x21a)]):undefined),_0x45c138=_0x4e7fdc==0x0?_0x206639>0xa?_0x3d7ec2(0x208):'in\x20'+_0x206639+_0x3d7ec2(0x181):_0x4e7fdc==0x1?'tomorrow':_0x3d7ec2(0x18d)+_0x4e7fdc+_0x3d7ec2(0x19f);switch(_0x3a74d4){case _0x55c352[_0x3d7ec2(0x16d)]:_0x3a1261='fa\x20fa-check-circle';switch(_0x251280){case _0x161c7a['TRIAL']:{_0x44f6c5=_0x3d7ec2(0x1d5),_0x240daf=_0x3d7ec2(0x205)+_0x45c138+'.\x0aBuy\x20online\x20and\x20visit\x20'+_0x1f03eb+_0x3d7ec2(0x246);break;}case _0x161c7a['PROFESSIONAL']:_0x44f6c5=_0x3d7ec2(0x200);_0x4e7fdc<0x5a&&_0x4e7fdc>=0x0&&(_0x44f6c5+=_0x3d7ec2(0x1cc)+_0x45c138+'.');_0x240daf=_0x2f8d8b['licenceInfo']['licenceType']+_0x3d7ec2(0x195)+(_0x2f8d8b[_0x3d7ec2(0x1e1)][_0x3d7ec2(0x1b0)]||'');break;case _0x161c7a[_0x3d7ec2(0x230)]:_0x44f6c5='Freeware\x20licence',_0x240daf=_0x3d7ec2(0x16a)+_0x1f03eb+_0x3d7ec2(0x18b);break;}break;case _0x55c352['EXPIRED']:_0x3a1261=_0x3d7ec2(0x17c);switch(_0x217b73){case _0x161c7a[_0x3d7ec2(0x216)]:_0x44f6c5='Freeware\x20:\x20(Trial\x20licence\x20expired)',_0x240daf=_0x3d7ec2(0x22c)+_0x1f03eb+_0x3d7ec2(0x246);break;case _0x161c7a[_0x3d7ec2(0x230)]:_0x44f6c5=_0x3d7ec2(0x1eb),_0x240daf='Your\x20freeware\x20license\x20has\x20expired.\x0a'+_0x1f03eb+_0x3d7ec2(0x18b);break;case _0x161c7a[_0x3d7ec2(0x1b3)]:default:_0x44f6c5='Your\x20licence\x20has\x20expired\x20-\x20Freeware\x20mode\x20activated',_0x240daf=_0x3d7ec2(0x219)+_0x69cb9a+_0x3d7ec2(0x1a7);}break;case _0x55c352[_0x3d7ec2(0x237)]:default:_0x3a1261=_0x3d7ec2(0x1e7),_0x44f6c5=_0x3d7ec2(0x17a),_0x240daf=_0x3d7ec2(0x1c0)+_0x69cb9a+'\x20or\x20visit\x20our\x20website\x20to\x20renew\x20your\x20license\x20and\x20regain\x20access\x20to\x20our\x20services.̀';break;}this[_0x3d7ec2(0x21f)][_0x3d7ec2(0x21b)](_0x3d7ec2(0x1e2)),this[_0x3d7ec2(0x21f)]['addClass'](_0x3d7ec2(0x1d9)+_0x3a74d4),this[_0x3d7ec2(0x21f)]['append']($(_0x3d7ec2(0x18f))[_0x3d7ec2(0x21b)](_0x3d7ec2(0x1a8))[_0x3d7ec2(0x1bd)]($(_0x3d7ec2(0x20c))[_0x3d7ec2(0x21b)](_0x3a1261))),this[_0x3d7ec2(0x21f)][_0x3d7ec2(0x1bd)]($(_0x3d7ec2(0x18f))[_0x3d7ec2(0x21b)](_0x3d7ec2(0x1ad))[_0x3d7ec2(0x1d3)](_0x44f6c5)),this['element']['append']($(_0x3d7ec2(0x241))),this[_0x3d7ec2(0x21f)][_0x3d7ec2(0x1bd)]($(_0x3d7ec2(0x18f))[_0x3d7ec2(0x21b)]('licence-widget-details')['append'](_0x240daf));if(_0x3a74d4===_0x55c352[_0x3d7ec2(0x196)]||_0x3a74d4===_0x55c352['FAILED']||_0x251280===_0x161c7a['FREEWARE']||_0x251280===_0x161c7a['TRIAL']){this['element']['append']($(_0x3d7ec2(0x241)));const _0x440ab9=$('<button/>');_0x440ab9[_0x3d7ec2(0x192)]('id',_0x3d7ec2(0x223)),_0x440ab9['attr'](_0x3d7ec2(0x1fa),_0x3d7ec2(0x18a)),_0x440ab9[_0x3d7ec2(0x192)]('style',_0x3d7ec2(0x229)),_0x440ab9[_0x3d7ec2(0x1d3)](_0x3d7ec2(0x179)),this[_0x3d7ec2(0x21f)]['append'](_0x440ab9);const _0x2bafef=document[_0x3d7ec2(0x1cd)](_0x3d7ec2(0x1b2));_0x2bafef[_0x3d7ec2(0x170)]=_0x3d7ec2(0x1f1),_0x2bafef[_0x3d7ec2(0x240)]=!![],$(_0x3d7ec2(0x1d7))[_0x3d7ec2(0x1bd)](_0x2bafef);const _0x3a7d12=$('<stripe-pricing-table/>');_0x3a7d12[_0x3d7ec2(0x192)](_0x3d7ec2(0x185),_0x12a43c),_0x3a7d12[_0x3d7ec2(0x192)](_0x3d7ec2(0x238),_0x3654e8),_0x3a7d12[_0x3d7ec2(0x192)](_0x3d7ec2(0x194),_0x3d7ec2(0x206)),_0x3a7d12[_0x3d7ec2(0x23d)](),this[_0x3d7ec2(0x21f)][_0x3d7ec2(0x1bd)](_0x3a7d12),_0x440ab9['on']('click',()=>{const _0x457dfb=_0x3d7ec2;_0x3a7d12[_0x457dfb(0x1e0)](),_0x440ab9[_0x457dfb(0x23d)](),this[_0x457dfb(0x21f)][_0x457dfb(0x192)](_0x457dfb(0x194),_0x457dfb(0x172));});}})[_0x4dc8ea(0x227)](_0x131750=>{const _0x2ed616=_0x4dc8ea;console[_0x2ed616(0x177)](_0x131750);});}});},_0x2336c4=()=>{const _0xabef24=_0xd5cb73,_0xececb=$(_0xabef24(0x244));if(_0xececb['length']){const _0x56f062=$(_0xabef24(0x214),{'src':'/opcua-for-node-red/support-frame.html','scrolling':'no','style':'background-color:transparent;overflow:hidden;border:3px','allowtransparency':_0xabef24(0x1f8),'width':_0xabef24(0x1d8),'height':_0xabef24(0x187)});_0xececb['append'](_0x56f062),_0x56f062['css']({'position':_0xabef24(0x23a),'right':_0xabef24(0x226),'bottom':'16px'});}};_0x11b3d0();function _0x242bf9(_0x5c9fcd){let _0x349a03;try{_0x349a03=new URL(_0x5c9fcd);}catch(_0x1a12aa){return![];}return _0x349a03['protocol']==='opc.tcp:';}const _0x11d95b={'publishingEnabled':!![],'requestedLifetimeCount':0x3e8,'requestedMaxKeepAliveCount':0xa,'requestedPublishingInterval':0x3e8,'maxNotificationsPerPublish':0x0,'priority':0x64};RED[_0xd5cb73(0x175)][_0xd5cb73(0x24d)](_0xd5cb73(0x233),{'category':'config','paletteLabel':_0xd5cb73(0x1c1),'defaults':{'name':{'value':''},'endpoint':{'value':_0xd5cb73(0x23b),'required':!![],'validate':_0x242bf9},'securityMode':{'value':_0xd5cb73(0x1f9)},'securityPolicy':{'value':'None','validate':_0x3c6d3e=>{if(!_0x3c6d3e)return![];return!![];}},'userIdentityType':{'value':'Anonymous'},'pkiName':{'value':'','validate':_0x29db47=>!_0x29db47||_0x29db47[_0xd5cb73(0x1fd)](/[0-9a-zA-Z]*/)?!![]:![]},'useTransport':{'value':![],'required':![]},'maxChunkCount':{'value':0x1,'required':![]},'maxMessageSize':{'value':0x2000,'required':![]},'receiveBufferSize':{'value':0x2000,'required':![]},'sendBufferSize':{'value':0x2000,'required':![]},'subscriptions':{'value':[{'id':'s1','name':'Default\x20Subscription','isDefault':!![],'parameters':Object[_0xd5cb73(0x1d1)]({},_0x11d95b)},{'id':'s2','name':_0xd5cb73(0x221),'isDefault':![],'parameters':{'publishingEnabled':!![],'requestedLifetimeCount':0x64,'requestedMaxKeepAliveCount':0x3,'requestedPublishingInterval':0x1388,'maxNotificationsPerPublish':0x64,'priority':0xa}},{'id':'s3','name':_0xd5cb73(0x250),'isDefault':![],'parameters':{'publishingEnabled':!![],'requestedLifetimeCount':0xfa0,'requestedMaxKeepAliveCount':0x32,'requestedPublishingInterval':0xfa,'maxNotificationsPerPublish':0x64,'priority':0xc8}}],'required':![]},'namespaceAliases':{'value':[{'alias':'ua','namespaceUri':_0xd5cb73(0x193),'isWellKnown':!![],'isDefault':!![]},{'alias':'di','namespaceUri':_0xd5cb73(0x16b),'isWellKnown':!![],'isDefault':!![]}],'required':![]}},'credentials':{'userName':{'type':_0xd5cb73(0x1d3)},'password':{'type':_0xd5cb73(0x215)},'userCertificate':{'type':_0xd5cb73(0x1d3)},'userPrivatekey':{'type':_0xd5cb73(0x215)}},'label':function(){const _0x55353b=_0xd5cb73;return this[_0x55353b(0x21d)]||this['endpoint']||_0x55353b(0x247);},'oneditsave'(){const _0x59c3e9=_0xd5cb73,_0x403cbb=$(_0x59c3e9(0x234)),_0x24b2c2=$(_0x59c3e9(0x1b1));_0x403cbb['val']()==='None'&&_0x24b2c2[_0x59c3e9(0x1d3)](_0x59c3e9(0x1f9));{const _0x577cfd=$(_0x59c3e9(0x164))[_0x59c3e9(0x1f0)]('items'),_0x160dc4=[],_0x555cec=_0x5d46f5=>_0x5d46f5;_0x577cfd[_0x59c3e9(0x1c8)](function(_0x9eb5ea,_0x5c6101){const _0x4b9363=_0x59c3e9,_0xd395c2=$(this),_0x100a6d={'id':'s'+_0x9eb5ea,'name':_0xd395c2[_0x4b9363(0x16f)]('.input-name')[_0x4b9363(0x1b6)](),'isDefault':!!_0xd395c2[_0x4b9363(0x16f)](_0x4b9363(0x19b))[_0x4b9363(0x1b6)](),'parameters':{'publishingEnabled':!!_0xd395c2[_0x4b9363(0x16f)](_0x4b9363(0x1a5))['is'](':checked'),'requestedLifetimeCount':_0x555cec(_0xd395c2[_0x4b9363(0x16f)]('.input-requestedLifetimeCount')[_0x4b9363(0x1b6)]()),'requestedMaxKeepAliveCount':_0x555cec(_0xd395c2['find'](_0x4b9363(0x1da))[_0x4b9363(0x1b6)]()),'requestedPublishingInterval':_0x555cec(_0xd395c2['find'](_0x4b9363(0x207))['val']()),'maxNotificationsPerPublish':_0x555cec(_0xd395c2['find'](_0x4b9363(0x1be))[_0x4b9363(0x1b6)]()),'priority':_0x555cec(_0xd395c2[_0x4b9363(0x16f)](_0x4b9363(0x204))[_0x4b9363(0x1b6)]())}};_0x100a6d['parameters'][_0x4b9363(0x18e)]=!![],_0x100a6d[_0x4b9363(0x1ff)]&&_0x100a6d['id']==='s0'&&(_0x100a6d[_0x4b9363(0x21d)]=_0x4b9363(0x239)),_0x160dc4['push'](_0x100a6d);}),this[_0x59c3e9(0x249)]=_0x160dc4;}{const _0x15592e=$(_0x59c3e9(0x20f))[_0x59c3e9(0x1f0)](_0x59c3e9(0x1b8)),_0x2c8719=[];_0x15592e[_0x59c3e9(0x1c8)](function(_0x58c655,_0x4ebe96){const _0x13f7dd=_0x59c3e9,_0x70c779=$(this),_0x4b06b8={'namespaceUri':_0x70c779['find'](_0x13f7dd(0x245))['val'](),'alias':_0x70c779[_0x13f7dd(0x16f)]('.node-input-alias-alias')[_0x13f7dd(0x1b6)]()};_0x2c8719[_0x13f7dd(0x1fe)](_0x4b06b8);}),this[_0x59c3e9(0x19c)]=_0x2c8719;}},'oneditprepare'(){const _0xae0bc7=_0xd5cb73,_0x3b9457=this;_0x2336c4();const _0x36bcd2=RED['tabs']['create']({'id':'node-config-endpoint-tabs','onchange':function(_0x4845b0){const _0x3ccef5=_0x16dd;$(_0x3ccef5(0x20b))[_0x3ccef5(0x183)]()[_0x3ccef5(0x23d)](),$('#'+_0x4845b0['id'])[_0x3ccef5(0x1e0)]();}});_0x36bcd2[_0xae0bc7(0x1c9)]({'id':_0xae0bc7(0x1ab),'label':'Connection'},0x0),_0x36bcd2[_0xae0bc7(0x1c9)]({'id':_0xae0bc7(0x1ba),'label':'Subscriptions'},0x1),_0x36bcd2[_0xae0bc7(0x1c9)]({'id':'endpoint-tab-namespace-aliases','label':'Namespace\x20Aliases'},0x2),setTimeout(function(){_0x36bcd2['resize']();},0x0);{const _0x240997=_0x2dfbb6=>{const _0xd3b7f3=_0xae0bc7;switch(_0x2dfbb6){case null:case undefined:case'':case _0xd3b7f3(0x1f9):$(_0xd3b7f3(0x165))[_0xd3b7f3(0x23d)]();break;case _0xd3b7f3(0x202):case _0xd3b7f3(0x178):{const _0x1eb657=$(_0xd3b7f3(0x165));(_0x1eb657[_0xd3b7f3(0x1b6)]()===_0xd3b7f3(0x1f9)||_0x1eb657[_0xd3b7f3(0x1b6)]()==='')&&_0x1eb657[_0xd3b7f3(0x1b6)]('Basic256Sha256'),$(_0xd3b7f3(0x165))['show']();}break;default:console[_0xd3b7f3(0x177)](_0xd3b7f3(0x1cb)+_0x2dfbb6);}};_0x240997(_0x3b9457[_0xae0bc7(0x232)]);const _0x33176e=$(_0xae0bc7(0x1b1));_0x33176e['on'](_0xae0bc7(0x1bb),()=>{const _0x1c5ad7=_0x33176e['val']();_0x240997(_0x1c5ad7);});}const _0x91400f=$(_0xae0bc7(0x20e));_0x91400f[_0xae0bc7(0x20a)]({'baseUrl':''});{const _0x1f181c=$('.section-userIdentityType-UserName'),_0x48a8cf=$(_0xae0bc7(0x24b)),_0x59eea3=_0x5cea66=>{const _0x225cb5=_0xae0bc7;_0x5cea66=_0x5cea66||_0x225cb5(0x1fc);switch(_0x5cea66){case _0x225cb5(0x1fc):$(_0x225cb5(0x190))['val'](''),$(_0x225cb5(0x1db))['val'](''),_0x1f181c[_0x225cb5(0x23d)](),_0x48a8cf[_0x225cb5(0x23d)]();break;case _0x225cb5(0x18c):_0x1f181c[_0x225cb5(0x1e0)](),_0x48a8cf[_0x225cb5(0x23d)]();break;case _0x225cb5(0x1c4):$(_0x225cb5(0x190))[_0x225cb5(0x1b6)](''),$(_0x225cb5(0x1db))[_0x225cb5(0x1b6)](''),_0x48a8cf[_0x225cb5(0x1e0)](),_0x1f181c[_0x225cb5(0x23d)]();break;default:console['log'](_0x225cb5(0x1de)+_0x5cea66);}};_0x59eea3(_0x3b9457[_0xae0bc7(0x1e3)]);const _0x2b509d=$('#node-config-input-userIdentityType');_0x2b509d['on'](_0xae0bc7(0x1bb),()=>{const _0x549f28=_0x2b509d['val']();_0x59eea3(_0x549f28);});}{$('#section-Advanced')[_0xae0bc7(0x23d)](),$(_0xae0bc7(0x242))[_0xae0bc7(0x184)]('checked',![]),$('#toggleAdvancedSection')['on'](_0xae0bc7(0x1bb),function(){const _0xf09680=_0xae0bc7;$(this)[_0xf09680(0x184)](_0xf09680(0x174))?$(_0xf09680(0x24c))[_0xf09680(0x1e0)]():$(_0xf09680(0x24c))[_0xf09680(0x23d)]();});}const _0x305737=$(_0xae0bc7(0x22e))[_0xae0bc7(0x184)](_0xae0bc7(0x174));_0x305737?$(_0xae0bc7(0x1f4))[_0xae0bc7(0x1e0)]():$('#section-TransportSettings')[_0xae0bc7(0x23d)]();$(_0xae0bc7(0x22e))['on'](_0xae0bc7(0x1bb),function(){const _0x112463=_0xae0bc7;$(this)[_0x112463(0x184)](_0x112463(0x174))?$('#section-TransportSettings')[_0x112463(0x1e0)]():$(_0x112463(0x1f4))['hide']();});{$(_0xae0bc7(0x212))['on'](_0xae0bc7(0x19e),()=>_0x575389(this,void 0x0,void 0x0,function*(){const _0xc5865e=_0xae0bc7,_0x53b418=yield fetch(_0xc5865e(0x203)),_0x153397=yield _0x53b418[_0xc5865e(0x1ae)](),_0x4a81aa=JSON['stringify'](_0x153397,null,'\x20');alert(_0x4a81aa);}));}$(_0xae0bc7(0x17d))['on']('click',()=>_0x575389(this,void 0x0,void 0x0,function*(){const _0x5c6730=_0xae0bc7;window['open'](_0x5c6730(0x1c6),_0x5c6730(0x23e));}));function _0xb0cb62(){const _0x46cfad=_0xae0bc7;var _0x48dc70;return{'id':_0x3b9457['id'],'endpoint':$(_0x46cfad(0x182))[_0x46cfad(0x1b6)](),'name':$('#node-config-input-name')[_0x46cfad(0x1b6)](),'pkiName':(_0x48dc70=$('#node-config-input-pkiName'))===null||_0x48dc70===void 0x0?void 0x0:_0x48dc70[_0x46cfad(0x1b6)](),'securityMode':$(_0x46cfad(0x1b1))['val'](),'securityPolicy':$(_0x46cfad(0x234))[_0x46cfad(0x1b6)](),'userIdentityType':$(_0x46cfad(0x1c3))['val'](),'userName':$(_0x46cfad(0x190))['val'](),'password':$(_0x46cfad(0x1db))[_0x46cfad(0x1b6)](),'userCertificate':$(_0x46cfad(0x168))[_0x46cfad(0x1b6)](),'userPrivatekey':$(_0x46cfad(0x1c7))[_0x46cfad(0x1b6)](),'certificate':$(_0x46cfad(0x1ec))['val'](),'useTransport':$(_0x46cfad(0x243))[_0x46cfad(0x184)](_0x46cfad(0x174)),'maxChunkCount':$('#node-input-maxChunkCount')[_0x46cfad(0x1b6)](),'maxMessageSize':$('#node-input-maxMessageSize')[_0x46cfad(0x1b6)](),'receiveBufferSize':$('#node-input-receiveBufferSize')[_0x46cfad(0x1b6)](),'sendBufferSize':$('#node-input-sendBufferSize')[_0x46cfad(0x1b6)]()};}{_0x591ed4(_0xae0bc7(0x22d),$(_0xae0bc7(0x1e6)),()=>({'url':_0xae0bc7(0x24e),'body':{'endpointNode':_0xb0cb62()}}),()=>{});}{const _0x5a8798=(_0x45308c,_0x4b21b6)=>{const _0x2e3f33=_0xae0bc7;var _0x6d998=_0x45308c[_0x2e3f33(0x210)]()||0x64;_0x45308c['find'](_0x2e3f33(0x169))['typedInput'](_0x2e3f33(0x210),_0x6d998-0xf);},_0x51bf1d=$(_0xae0bc7(0x164))[_0xae0bc7(0x1ca)]({'min-height':'150px','min-width':_0xae0bc7(0x167)})['editableList']({'addItem':(_0x1d791e,_0x8cbaef,_0x5adbce)=>{const _0x34d980=_0xae0bc7,_0x473d38=_0x5adbce,_0x2366e1=$(_0x34d980(0x1bf))[_0x34d980(0x213)]()[_0x34d980(0x1a4)](_0x1d791e);_0x2366e1[_0x34d980(0x1e9)]('id')[_0x34d980(0x1dd)](_0x34d980(0x23d))[_0x34d980(0x1dd)](_0x34d980(0x1f7))[_0x34d980(0x192)](_0x34d980(0x1f2),_0x8cbaef),_0x2366e1['find'](_0x34d980(0x188))[_0x34d980(0x1b6)](_0x473d38[_0x34d980(0x21d)]),_0x2366e1[_0x34d980(0x16f)](_0x34d980(0x207))[_0x34d980(0x1b6)](_0x473d38['parameters'][_0x34d980(0x20d)]),_0x2366e1[_0x34d980(0x16f)](_0x34d980(0x1da))[_0x34d980(0x1b6)](_0x473d38[_0x34d980(0x1e4)][_0x34d980(0x16c)]),_0x2366e1[_0x34d980(0x16f)](_0x34d980(0x225))[_0x34d980(0x1b6)](_0x473d38['parameters'][_0x34d980(0x176)]),_0x2366e1[_0x34d980(0x16f)](_0x34d980(0x1be))[_0x34d980(0x1b6)](_0x473d38['parameters'][_0x34d980(0x180)]||0x0),_0x2366e1[_0x34d980(0x16f)]('.input-priority')[_0x34d980(0x1b6)](_0x473d38[_0x34d980(0x1e4)][_0x34d980(0x186)]||0x0),_0x2366e1[_0x34d980(0x16f)](_0x34d980(0x1aa))[_0x34d980(0x1d3)](''+_0x8cbaef),_0x473d38['isDefault']&&_0x2366e1[_0x34d980(0x16f)]('.input-name')['prop'](_0x34d980(0x173),!![]),_0x2366e1[_0x34d980(0x16f)]('.input-isDefault')[_0x34d980(0x184)](_0x34d980(0x174),_0x473d38[_0x34d980(0x1ff)]),_0x473d38[_0x34d980(0x1ff)]&&(_0x1d791e[_0x34d980(0x16f)](_0x34d980(0x16e))[_0x34d980(0x21b)]('hide'),setTimeout(()=>_0x2366e1[_0x34d980(0x16f)](_0x34d980(0x19b))[_0x34d980(0x184)](_0x34d980(0x248),!![]),0xa));},'removable':!![],'resizeItem':_0x5a8798}),_0x4a6adf=()=>{const _0x3d155c=_0xae0bc7,_0x56ed15=_0x3b9457[_0x3d155c(0x249)]||[];_0x56ed15[_0x3d155c(0x1b9)]===0x0&&_0x56ed15['push']({'id':'s1','name':_0x3d155c(0x239),'isDefault':!![],'parameters':Object[_0x3d155c(0x1d1)]({},_0x11d95b)});_0x51bf1d[_0x3d155c(0x1f0)](_0x3d155c(0x1bc));for(const _0x49ff4a of _0x56ed15){_0x51bf1d[_0x3d155c(0x1f0)](_0x3d155c(0x1ee),_0x49ff4a);}};_0x4a6adf();}{function _0x5cf9c4(_0x9db490,_0x1b7add,_0x36bafd){const _0x20d248=_0xae0bc7,_0x47fad9=_0x36bafd,_0x1f60aa=$('<div\x20class=\x22alias-entry\x22>')[_0x20d248(0x1a4)](_0x9db490);$('<input/>',{'class':'node-input-alias-index','type':_0x20d248(0x1d3)})[_0x20d248(0x1b6)](_0x36bafd[_0x20d248(0x22b)]||'')[_0x20d248(0x1ca)]({'width':'5%'})['appendTo'](_0x1f60aa)[_0x20d248(0x1b6)](_0x1b7add['toString']()),$('<input/>',{'class':_0x20d248(0x166),'type':_0x20d248(0x1d3)})[_0x20d248(0x1b6)](_0x36bafd[_0x20d248(0x22b)]||'')[_0x20d248(0x1ca)]({'width':'25%'})[_0x20d248(0x1a4)](_0x1f60aa)[_0x20d248(0x1b6)](_0x47fad9[_0x20d248(0x22b)]),$(_0x20d248(0x189),{'class':_0x20d248(0x222),'type':'text'})[_0x20d248(0x1b6)](_0x36bafd['namespaceUri']||'')[_0x20d248(0x1ca)]({'width':_0x20d248(0x171)})[_0x20d248(0x1a4)](_0x1f60aa)[_0x20d248(0x1b6)](_0x47fad9['namespaceUri']);}const _0x12d434=$('#editable-list-aliases-container')['css']({'min-height':_0xae0bc7(0x1ea),'min-width':_0xae0bc7(0x167)})[_0xae0bc7(0x1f0)]({'addButton':![],'removable':![],'height':_0xae0bc7(0x1a2),'scrollOnAdd':![],'addItem'(_0x97f670,_0x4a729f,_0x2f705e){_0x5cf9c4(_0x97f670,_0x4a729f,_0x2f705e);}});function _0x3592ab(){const _0x100b9e=_0xae0bc7;_0x12d434[_0x100b9e(0x1f0)](_0x100b9e(0x1b8)),_0x12d434['editableList'](_0x100b9e(0x1bc));for(const _0x40b048 of _0x3b9457[_0x100b9e(0x19c)]||[]){_0x12d434['editableList']('addItem',_0x40b048);}}{$(_0xae0bc7(0x198))['on'](_0xae0bc7(0x19e),()=>_0x575389(this,void 0x0,void 0x0,function*(){const _0x1f7428=_0xae0bc7,_0x47fa01={'endpointNode':_0xb0cb62(),'namespaceAliases':_0x3b9457['namespaceAliases']||[]},_0x11a20e=yield fetch(_0x1f7428(0x1d2),{'method':_0x1f7428(0x1df),'headers':{'Content-Type':'application/json'},'body':JSON[_0x1f7428(0x1e5)](_0x47fa01)}),_0x374690=yield _0x11a20e[_0x1f7428(0x1ae)](),_0x2c251b=_0x374690['namespaceAliases'];console[_0x1f7428(0x177)]('namespaceAliases',_0x2c251b),Array[_0x1f7428(0x1d6)](_0x2c251b)&&(_0x3b9457[_0x1f7428(0x19c)]=_0x2c251b,_0x3592ab());})),_0x3b9457['namespaceAliases']=_0x3b9457['namespaceAliases']||[{'alias':'ua','namespaceUri':_0xae0bc7(0x193),'isWellKnown':!![],'isDefault':!![]}];}_0x3592ab();}}});}()));function _0x5ef1(){const _0x1303f4=['licence-widget-','.input-requestedMaxKeepAliveCount','#node-config-input-password','html','removeClass','invalid\x20userIdentityType\x20','POST','show','licenceInfo','licence-widget','userIdentityType','parameters','stringify','#test-connection','fa\x20fa-exclamation-circle','baseUrl','removeAttr','150px','Freeware\x20licence\x20expired','#node-input-certificate','Testing\x20Connection\x20...','addItem','/licenceInfo','editableList','https://js.stripe.com/v3/pricing-table.js','data-i','err','#section-TransportSettings','pk_live_51HsE1sBCNccbzsVzt7zaq2uv20pkryWllAzvZgZd5AhwFI9A3qBIeOJvJwQF08lDoLpFqLjwmyA79wnPnYLsvKjt009f00VpCW','next','template','true','None','class','13500JpQTgT','Anonymous','match','push','isDefault','Your\x20licence\x20is\x20valid.','3824wLiuwB','Sign','/opcua-for-node-red/client_certificate.json','.input-priority','The\x20Trial\x20will\x20expire\x20','height:\x20100%;max-height:\x20100%;','.input-requestedPublishingInterval','today','230758mrmwbq','licenceWidget','#node-config-endpoint-tabs-content','<i>','requestedPublishingInterval','#licenceWidget','#editable-list-aliases-container','width','extra','#checkCertificate','clone','<iframe></iframe>','password','TRIAL','message','00000000-0000-0000-0000-000000000000','Your\x20license\x20has\x20expired.\x0aPlease\x20contact\x20our\x20\x20','expiryDate','addClass','value','name','234595ldedTf','element','function','Slow\x20Subscription','node-input-alias-namespace-uri','subscribe-button','-success','.input-requestedLifetimeCount','20px','catch','done','margin-top:\x2020px;','application/json','alias','Your\x20trial\x20license\x20has\x20expired.\x0aPlease\x20visit\x20','connection','#node-config-input-useTransport','<unknown>','FREEWARE','-messages','securityMode','OpcUa-Endpoint2','#node-config-input-securityPolicy','error','toISOString','FAILED','publishable-key','Default\x20Subscription','absolute','opc.tcp://opcuademo.sterfive.com:26543/UA/SampleServer','504UeQfuM','hide','_blank','apply','async','<br>','#toggleAdvancedSection','#node-input-useTransport','.red-ui-tray-body','.node-input-alias-namespace-uri','\x20to\x20acquire\x20a\x20license.','invalid\x20endpoint','disabled','subscriptions','fetching\x20failed\x20with\x20error','.section-userIdentityType-Certificate','#section-Advanced','registerType','/opcua-for-node-red/test-connection','statusText','Fast\x20Subscription','#subscriptions-container','.section-securityPolicy','node-input-alias-alias','260px','#node-config-input-userCertificate','label','This\x20is\x20a\x20freeware\x20licence,\x20and\x20have\x20some\x20limitations.\x0a','http://opcfoundation.org/DI/','requestedMaxKeepAliveCount','AUTHORIZED','.red-ui-editableList-item-remove','find','src','70%','height:\x20100%\x20!important;','readonly','checked','nodes','requestedLifetimeCount','log','SignAndEncrypt','Subscribe','Your\x20license\x20is\x20currently\x20invalid.','723SKCGCk','fa\x20fa-calendar-time','#goto-config','-pending','internal\x20error\x20','maxNotificationsPerPublish','\x20hours','#node-config-input-endpoint','children','prop','pricing-table-id','priority','30px','.input-name','<input/>','btn\x20btn-primary','\x20for\x20more\x20information.','UserName','in\x20','publishingEnabled','<span>','#node-config-input-userName','split','attr','http://opcfoundation.org/UA/','style','\x20-\x20','EXPIRED','742wKXzLw','#extract-aliases','result','floor','.input-isDefault','namespaceAliases','map','click','\x20days','then','2185580infynd','auto','join','appendTo','.input-publishingEnabled','84hFxEwi','\x20or\x20visit\x20our\x20website\x20to\x20renew\x20your\x20license\x20and\x20regain\x20access\x20to\x20our\x20services.','licence-widget-icon','64088nwMynZ','.subscription-id','endpoint-tab-connection','throw','licence-widget-msg','json','suppressed','onPremiseServerHost','#node-config-input-securityMode','script','PROFESSIONAL','<a\x20href=\x22https://www.sterfive.com/opcua/for-node-red\x22\x20target=”_blank”>Sterfive\x27s\x20website\x20</a>','4978rtVDHV','val','</p>','items','length','endpoint-tab-subscriptions','change','empty','append','.input-maxNotificationsPerPublish','#subscription-template','Please\x20contact\x20','opcua\x20endpoint','getTime','#node-config-input-userIdentityType','Certificate','38opeMAY','/opcua-for-node-red/config','#node-config-input-userPrivatekey','each','addTab','css','invalid\x20securityMode\x20','\x0aIt\x20will\x20expire\x20','createElement','/opcua-for-node-red','status','<p>','assign','/opcua-for-node-red/extract-namespace-aliases','text','-failure','Trial\x20licence','isArray','head','180px'];_0x5ef1=function(){return _0x1303f4;};return _0x5ef1();} </script> <script type="text/x-red" data-template-name="OpcUa-Endpoint2"> <div id="licenceWidget"></div> <div class="form-row"> <label for="node-config-input-name"><i class="fa fa-tag"></i>Name</label> <input type="text" id="node-config-input-name" placeholder="enter the friendly name of the connection" /> </div> <div class="form-row"> <ul style="min-width: 600px; margin-bottom: 20px" id="node-config-endpoint-tabs"></ul> </div> <div id="node-config-endpoint-tabs-content" style="min-height: 150px"> <div id="endpoint-tab-connection" style="display: none"> <div class="form-row"> <label for="node-config-input-endpoint"> <i class="fa fa-plug"> </i> Endpoint</label> <input type="text" id="node-config-input-endpoint" placeholder="opc.tcp://opcuademo.sterfive.com:26543" /> </div> <div class="form-row"> <div class="form-tips" style="width: 100%"> Tip: ensure that you have deploy your flow at least once with this endpoint connection settings to take advantage of OPCUA for NodeRed advanced browse and node selection capability </div> </div> <div class="form-row"> <button id="test-connection" class="btn btn-primary" style="margin-left: 10px"> <i class="fa fa-flask"></i> Check Connection </button> &nbsp; <button id="goto-config" class="btn btn-primary" style="margin-left: 10px"> <i class="fa fa-lock"></i> Check Licence </button> &nbsp; <i id="connection-pending" class="hide fa fa-spinner" style="display: none" color="green"></i> <i id="connection-success" class="hide fa fa-check-square" style="color: green; font-size: 1.2em; display: none"></i> <i id="connection-failure" class="hide fa fa-exclamation-triangle" style="color: red; font-size: 1.2em; display: none" ></i> <style> #connection-messages { margin-top: 10px; margin-bottom: 10px; display: none; background-color: #fdfdfd; width: 100%; max-height: 200px; padding: 10px; box-sizing: border-box; border-radius: 6px; font-size: 0.8em; font-style: italic; font-family: "Courier New", Courier, monospace; white-space: nowrap; overflow-x: auto; overflow-y: auto; } /* For Webkit browsers like Chrome and Safari */ #connection-messages::-webkit-scrollbar { display: none; } #connection-messages { /* For Firefox */ scrollbar-width: none; scrollbar-color: transparent transparent; /* makes the thumb and track transparent */ } #connection-failure:not(.hide) ~ #connection-messages { border: 2px solid red; display: inline-block; } #connection-success:not(.hide) ~ #connection-messages { border: 2px solid green; display: inline-block; } #connection-messages p { display: block; margin: 2, 0, 2, 0; padding: 0, 0, 0, 0, 0; /* Adjust spacing before the break */ } </style> <div id="connection-messages"></div> </div> <fieldset> <legend>Security</legend> <div class="form-row"> <label for="node-config-input-securityMode"><i class="icon-key"></i> Security Mode</label> <select type="text" id="node-config-input-securityMode"> <option value="None">None</option> <option value="Sign">Sign</option> <option value="SignAndEncrypt">Sign&Encrypt</option> </select> </div> <div class="form-row section-securityPolicy"> <label for="node-config-input-securityPolicy"><i class="icon-key"></i> Security Policy</label> <select type="text" id="node-config-input-securityPolicy"> <!-- <option value="None">None</option> --> <option value="Basic256Rsa15">Basic256Rsa15</option> <option value="Basic256Sha256">Basic256Sha256</option> <option value="Aes128_Sha256">Aes128_Sha256</option> <option value="Aes128_Sha256_RsaOaep">Aes128_Sha256_RsaOaep</option> <!-- <option value="PubSub_Aes128_CTR">PubSub_Aes128_CTR</option> <option value="PubSub_Aes256_CTR">PubSub_Aes256_CTR</option> --> <option value="Basic128">Basic128 (obsolete)</option> <option value="Basic192">Basic192 (obsolete)</option> <option value="Basic192Rsa15">Basic192Rsa15 (obsolete)</option> <option value="Basic128Rsa15">Basic128Rsa15 (obsolete)</option> <option value="Basic256">Basic256 (obsolete)</option> </select> </div> </fieldset> <fieldset> <legend>User Session Type</legend> <div class="form-row"> <label for="node-config-input-userIdentityType"><i class="icon-key"></i>User Identity</label> <select type="text" id="node-config-input-userIdentityType"> <option value="Anonymous">Anonymous</option> <option value="UserName">Username & Password</option> <option value="Certificate">X509 Certificate</option> </select> </div> <div class="section-userIdentityType-UserName"> <div class="form-row"> <label for="node-config-input-userName"><i class="fa fa-user"></i> User</label> <input type="text" id="node-config-input-userName" /> </div> <div class="form-row"> <label for="node-config-input-password"><i class="fa fa-lock"></i> Password</label> <input type="password" id="node-config-input-password" /> </div> </div> <div class="section-userIdentityType-Certificate"> <div class="form-row"> <label style="width: 35%" for="node-config-input-userCertificate" ><i class="fa fa-certificate"></i> Certificate</label > </div> <div class="form-row"> <label style="width: 35%" for="node-config-input-userPrivatekey"><i class="fa fa-key"></i> Private key</label> <input style="width: 65%" type="text" id="node-config-input-userPrivatekey" /> </div> </div> </fieldset> <hr /> <style> label { display: block; cursor: pointer; } </style> <style> .custom-checkbox-container { width: 100%; cursor: pointer; user-select: none; } .custom-checkbox-label { cursor: pointer; font-family: "FontAwesome"; } .custom-checkbox-input:checked + .custom-checkbox-label::before { content: "\f205"; font-size: 24px; /* fa-toggle-on */ } .custom-checkbox-input:not(:checked) + .custom-checkbox-label::before { content: "\f204"; font-size: 24px; /* fa-toggle-off */ } .custom-checkbox-input { display: none !important; } .subscription-mini-form table { width: 100%; border: 1; } .subscription-mini-form label { display: block; cursor: pointer; display: block; width: auto; } .subscription-mini-form input { width: calc(100% - 10px); /* Takes the full width minus 10px for right spacing */ box-sizing: border-box; /* Ensures padding and borders are included in the width */ } .button-style a { display: inline-block; padding: 10px 20px; background-color: #4caf50; color: white; text-decoration: none; border-radius: 4px; border: none; cursor: pointer; font-size: 16px; } .button-style a:hover { background-color: #45a049; } .button-style a:active { background-color: #3e8e41; } </style> <div class="form-row"> <button id="checkCertificate">Check my certificate</button> &nbsp; <button> <a href="/opcua-for-node-red/client_certificate.pem" id="downloadPEMCertificateLink" class="button-style" download="client_certificate.pem" > download in PEM format&nbsp; <i class="fa fa-download"></i> </a> </button> &nbsp; <button> <a href="/opcua-for-node-red/client_certificate.der" id="downloadDERCertificateLink" class="button-style" download="client_certificate.der" > download in DER format&nbsp; <i class="fa fa-download"></i> </a> </button> </div> <div class="form-row"> <label class="custom-checkbox-container" style="width: 100%"> <input id="toggleAdvancedSection" checked="false" type="checkbox" class="custom-checkbox-input" /> <span class="custom-checkbox-label">&nbsp;Advanced parameters ....</span> </label> </div> <div id="section-Advanced"> <!--- For PKI --> <div class="form-row"> <label for="node-config-input-pkiName"><i class="fa fa-tag"></i>PKIName</label> <input type="text" id="node-config-input-pkiName" placeholder="enter an alternate pki name or leave blank for default" /> </div> <!--- For Transport settings --> <div class="form-row"> <label class="custom-checkbox-container" style="width: 100%"> <input id="node-config-input-useTransport" type="checkbox" class="custom-checkbox-input" /> <span class="custom-checkbox-label">&nbsp;Use custom transport settings</span> </label> </div> <div id="section-TransportSettings"> <p>only use those parameters if you know what you are doing !</p> <div class="form-row"> <label for="node-config-input-maxChunkCount"><i class="icon-tasks"></i> Max ChunkCount</label> <input type="number" id="node-config-input-maxChunkCount" placeholder="1000" style="width: 20%" /> </div> <div class="form-row"> <label for="node-config-input-maxMessageSize"><i class="icon-tasks"></i> Max MessageSize</label> <input type="number" id="node-config-input-maxMessageSize" placeholder="8192000000" style="width: 20%" /> </div> <div class="form-row"> <label for="node-config-input-receiveBufferSize"><i class="icon-tasks"></i> Receive BufferSize</label> <input type="number" id="node-config-input-receiveBufferSize" placeholder="65535" style="width: 20%" /> </div> <div class="form-row"> <label for="node-config-input-sendBufferSize"><i class="icon-tasks"></i> Send BufferSize</label> <input type="number" id="node-config-input-sendBufferSize" placeholder="65535" style="width: 20%" /> </div> </div> </div> </div> <div id="endpoint-tab-subscriptions" style="display: none"> <div class="form-row"> <ol class="DebugMe" id="subscriptions-container"></ol> </div> </div> <div id="endpoint-tab-namespace-aliases" style="display: none"> <div class="form-row"> <button id="extract-aliases"><i class="fa fa-copy">Extract namespace table</i></button> <ol id="editable-list-aliases-container"></ol> </div> </div> </div> <!-- the template for the subscription --> <div class="hide template subscription-mini-form" id="subscription-template"> <h3>subscription <span class="subscription-id"></span></h3> <input type="checkbox" class="hide input-isDefault" /> <table> <tr> <td><i class="fa fa-tag"></i><strong>&nbsp;Name </strong></td> <td> <input type="text" class="input-name" placeholder="enter a subscription name" /> </td> </tr> <tr> <td><i class="fa fa-bell"> </i> &nbsp;Publishing Interval</td> <td> <input type="number" class="input-requestedPublishingInterval" /> <span>ms</span> </td> </tr> <tr> <td><i class="fa fa-heartbeat"> </i>&nbsp;Max Keepalive count</td> <td> <input type="number" class="input-requestedMaxKeepAliveCount" /> </td> </tr> <tr> <td><i class="fa fa-hourglass-end"> </i> &nbsp;Live Time Count</td> <td> <input type="number" class="input-requestedLifetimeCount" /> </td> </tr> <tr> <td><i class="fa fa-tag"></i> &nbsp;Max notifications per publishing</td> <td> <input type="number" class="input-maxNotificationsPerPublish" /> </td> </tr> <tr> <td><i class="fa fa-exclamation"></i>&nbsp; Priority</td> <td> <input type="number" class="input-priority" /> </td> </tr> <tr> <td>Publishing</td> <td> <label class="custom-checkbox-container"> <input type="checkbox" checked class="nide custom-checkbox-input input-publishingEnabled" /> <span class="custom-checkbox-label"></span> </label> </td> </tr> </table> </div> </script> <script type="text/markdown" data-help-name="OpcUa-Endpoint2"> # notes: ## Where is the PKI ? - `@opcua/for-node-red` stores its PKI in the following folder | Platform | Location | | -------- | ------------------------------------------------- | | Linux | "~/.config/opcua-for-node-red-nodejs/PKI" | | Windows | %APP_DATA%\Roaming\opcua-for-node-red-nodejs\PKI" | - This PKI is shared by all endpoint connection nodes in order to avoid having to generate multiple certificates for each endpoint and facilitate the management of the certificates. - all OPCUA Client connection that are created by the OPCUA Endpoint node will use this PKI. #### PKI folder structure ```console └─ 📂 certificates └─📂 PKI ├─📂 issuers │ ├─📂 certs │ └─📂 crl ├─📂 own │ ├─📂 certs │ │ └─🔐 client_certificate.pem │ └─📂 private │ └─🔐 private_key.pem ├─📂 rejected └─📂 trusted ├─📂 certs └─📂 crl ``` ## Secure connections: When using a secure connection to the OPCUA server, you'll have to make sure that the server certificate is trusted by the client and that the client certificate is trusted by the server. This is needed to ensure that the connection is secure and that the data is not intercepted by a third party. Client and Server uses public key stored in certificates of the other party and its own private key to encrypt and decrypt data. If the `@opcua/for-node-red` client certificate is not trusted by the server, the server will refuse the connection. connection to endpoint opc.tcp://machine:4840 could not be established ### ensuring that the `@opcua/for-node-red` client certificate is trusted by the server - If you are using a "Sign" or "SignAndEncrypt" connection to the OPCUA Server, you'll have to make sure that your client certificate is trusted by the server. - This can be done by copying the client certificate of your `@opcua/for-node-red` instance to the server and adding it to the trusted certificates folder in the PKI of the server. - (you can download the client certificate in PEM or DER format from the OPCUA Endpoint node, using the provided buttons) - The client certificate can be found in the "pki" folder of the OPCUA Endpoint node. - The certificate is named `client_certificate.pem` and is located in the PKI folder (see above) at this location `PKI/own/certs/` - Refers to your server documentation to know where to copy the client certificate. ### ensuring that `@opcua/for-node-red` trusts the server certificate - Similarly, if you are using a "Sign" or "SignAndEncrypt" connection to the OPCUA Server, you'll have to make sure that the server certificate is trusted by the client. - By default, `@opcua/for-node-red` is setup to automatically accept any server certificate. This can be changed by setting the "rejectUnauthorized" option to true the global settings of the OPCUA Endpoint node. ( available to Pro version only) ## default certificate generation - A default self-signed certificate generation is done by the `@opcua/for-node-red` node when it is first deployed. - The certificate is generated in the "pki" folder of the OPCUA Endpoint node. - The certificate is named "client_certificate.pem" and is located in the folder ## How to provided my own key pair (client certificate and private key) ? - You can provide your own key pair by copying the client certificate and private key in the "pki" folder of the OPCUA Endpoint node. - The certificate must be named "client_certificate.pem" and stored in the "pki/own/certs" folder. - The private key must be named "private_key.pem" and stored in the "pki/own/private" folder. - If your certificate is not a self-signed certificate, you'll have to also copy the certificate of the Certificate Authority that signed your certificate in the "pki/issuers/certs" folder and its CRL (Certificate revocation list) in the "pki/issuers/crl" folder. </script> //# sourceMappingURL=OpcUa-Endpoint2.html.map