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 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 _0x2661(){const _0x5b6092=['assign','append','editableList','endpoint-tab-namespace-aliases','119250QRsfwz','<br>','<input/>','/licenceInfo','#section-TransportSettings','join','None','open','1169766ySvCoQ','items','-pending','appendTo','2766512kCOmIk','/opcua-for-node-red','Please\x20contact\x20','subscribe-button','91LVWDmi','#node-config-input-userPrivatekey','hide','#node-config-input-password','replace','\x20or\x20visit\x20our\x20website\x20to\x20renew\x20your\x20license\x20and\x20regain\x20access\x20to\x20our\x20services.̀','statusText','suppressed','-success','status','http://opcfoundation.org/UA/','150px','match','height:\x20100%\x20!important;','securityMode','prctbl_1OJt49BCNccbzsVzkaANOgFL','publishable-key','width','.input-priority','EXPIRED','/opcua-for-node-red/support-frame.html','node-input-alias-alias','readonly','Certificate','.input-maxNotificationsPerPublish','#toggleAdvancedSection','registerType','.section-userIdentityType-UserName','html','20px','invalid\x20securityMode\x20','addClass','\x20or\x20visit\x20our\x20website\x20to\x20renew\x20your\x20license\x20and\x20regain\x20access\x20to\x20our\x20services.','namespaceUri','.subscription-id','auto','json','baseUrl','Your\x20licence\x20is\x20valid.','TRIAL','The\x20Trial\x20will\x20expire\x20','removeAttr','Default\x20Subscription','_blank','.input-publishingEnabled','push','apply','\x20-\x20','SuppressedError','toString','#node-config-input-securityMode','<iframe></iframe>','widget','each','create','https://js.stripe.com/v3/pricing-table.js','attr','onPremiseServerHost','opcua\x20endpoint','empty','application/json','Your\x20trial\x20license\x20has\x20expired.\x0aPlease\x20visit\x20','#node-input-receiveBufferSize','\x20for\x20more\x20information.','function','<p>','then','result','priority','show','fa\x20fa-calendar-time','background-color:transparent;overflow:hidden;border:3px','message','floor','#node-config-input-securityPolicy','children','#editable-list-aliases-container','prop','find','FREEWARE','.section-securityPolicy','text','.input-requestedMaxKeepAliveCount','Subscriptions','Your\x20license\x20has\x20expired.\x0aPlease\x20contact\x20our\x20\x20','namespaceAliases','isDefault','resize','240294AkBgtd','internal\x20error\x20','.section-userIdentityType-Certificate','licenceInfo','#node-input-useTransport','#goto-config','23956AvCrKf','260px','Freeware\x20licence','parameters','name','#section-Advanced','css','addItem','265KgUldU','endpoint-tab-subscriptions','toISOString','Your\x20licence\x20has\x20expired\x20-\x20Freeware\x20mode\x20activated','in\x20','#node-config-endpoint-tabs-content','<i>','label','</p>','nodes','map','Testing\x20Connection\x20...','password','removeClass','element','val','\x0aIt\x20will\x20expire\x20','.red-ui-tray-body','expiryDate','/opcua-for-node-red/extract-namespace-aliases','.input-isDefault','value','checked','btn\x20btn-primary','head','<unknown>','pk_live_51HsE1sBCNccbzsVzt7zaq2uv20pkryWllAzvZgZd5AhwFI9A3qBIeOJvJwQF08lDoLpFqLjwmyA79wnPnYLsvKjt009f00VpCW','#licenceWidget','FAILED','node-input-alias-index','node-config-endpoint-tabs','err','script','licence-widget-details','change','#node-config-input-userIdentityType','Your\x20freeware\x20license\x20has\x20expired.\x0a','25%','requestedLifetimeCount','#node-input-maxMessageSize','.input-requestedLifetimeCount','subscriptions','<div\x20class=\x22alias-entry\x22>','fa\x20fa-exclamation-circle','invalid\x20endpoint','licenceType','.input-name','tabs','addTab','http://opcfoundation.org/DI/','1144aFMSiE','/opcua-for-node-red/client_certificate.json','203565zXjbPL','<span>','Anonymous',':checked','#node-config-input-userName','AUTHORIZED','stringify','/opcua-for-node-red/test-connection','licenceWidget','getTime','disabled','.red-ui-editableList-item-remove','.node-input-alias-alias','src','log','done','#node-config-input-userCertificate','today','70%','30px','#subscriptions-container','#node-config-input-name','\x20days','PROFESSIONAL','<stripe-pricing-table/>','click','16px','protocol','OpcUa-Endpoint2','Trial\x20licence','\x20hours','requestedMaxKeepAliveCount','16109ZsesvU','extra','-messages','Your\x20license\x20is\x20currently\x20invalid.','\x20to\x20acquire\x20a\x20license.','isArray','#extract-aliases','This\x20is\x20a\x20freeware\x20licence,\x20and\x20have\x20some\x20limitations.\x0a','invalid\x20userIdentityType\x20','opc.tcp://opcuademo.sterfive.com:26543/UA/SampleServer','style','height:\x20100%;max-height:\x20100%;','-failure','licence-widget-icon','62HalwUh','split','opc.tcp:','Freeware\x20licence\x20expired','catch','alias','length','.node-input-alias-namespace-uri','POST','licence-widget-'];_0x2661=function(){return _0x5b6092;};return _0x2661();}function _0x1fab(_0x125fdf,_0x240256){const _0x2661d5=_0x2661();return _0x1fab=function(_0x1fabce,_0x460fc1){_0x1fabce=_0x1fabce-0x180;let _0x51fae2=_0x2661d5[_0x1fabce];return _0x51fae2;},_0x1fab(_0x125fdf,_0x240256);}(function(_0x3ba141,_0x29da85){const _0x1cd680=_0x1fab,_0x5a1754=_0x3ba141();while(!![]){try{const _0x23081a=-parseInt(_0x1cd680(0x230))/0x1*(parseInt(_0x1cd680(0x23e))/0x2)+-parseInt(_0x1cd680(0x210))/0x3+parseInt(_0x1cd680(0x1d4))/0x4*(-parseInt(_0x1cd680(0x1dc))/0x5)+-parseInt(_0x1cd680(0x1ce))/0x6*(parseInt(_0x1cd680(0x25c))/0x7)+parseInt(_0x1cd680(0x258))/0x8+parseInt(_0x1cd680(0x254))/0x9+parseInt(_0x1cd680(0x24c))/0xa*(parseInt(_0x1cd680(0x20e))/0xb);if(_0x23081a===_0x29da85)break;else _0x5a1754['push'](_0x5a1754['shift']());}catch(_0x962d10){_0x5a1754['push'](_0x5a1754['shift']());}}}(_0x2661,0x4bdac),(function(){'use strict';const _0x4a95a2=_0x1fab;function _0x3d2c90(_0x1994f9,_0x3482fe,_0x1db9d3,_0x26490e){function _0x391423(_0xc8d930){return _0xc8d930 instanceof _0x1db9d3?_0xc8d930:new _0x1db9d3(function(_0x49d950){_0x49d950(_0xc8d930);});}return new(_0x1db9d3||(_0x1db9d3=Promise))(function(_0x4c1d0b,_0x3e3646){const _0x6f3c55=_0x1fab;function _0x1c656b(_0xc219bd){try{_0x238e3c(_0x26490e['next'](_0xc219bd));}catch(_0x27526e){_0x3e3646(_0x27526e);}}function _0x26220a(_0xc56bee){try{_0x238e3c(_0x26490e['throw'](_0xc56bee));}catch(_0x21be49){_0x3e3646(_0x21be49);}}function _0x238e3c(_0x351c60){const _0x2ed006=_0x1fab;_0x351c60[_0x2ed006(0x21f)]?_0x4c1d0b(_0x351c60[_0x2ed006(0x1f1)]):_0x391423(_0x351c60['value'])[_0x2ed006(0x1b8)](_0x1c656b,_0x26220a);}_0x238e3c((_0x26490e=_0x26490e[_0x6f3c55(0x1a4)](_0x1994f9,_0x3482fe||[]))['next']());});}typeof SuppressedError===_0x4a95a2(0x1b6)?SuppressedError:function(_0x2f3c14,_0x14189d,_0x18d199){const _0x26aa12=_0x4a95a2;var _0x32c5e8=new Error(_0x18d199);return _0x32c5e8['name']=_0x26aa12(0x1a6),_0x32c5e8['error']=_0x2f3c14,_0x32c5e8[_0x26aa12(0x263)]=_0x14189d,_0x32c5e8;};function _0xd02a29(_0x147c24,_0x905b5,_0x4d8859,_0x44dff5){const _0x1313a0=_0x4a95a2,_0x26ffe2=$('#'+_0x147c24+_0x1313a0(0x264)),_0x2b2175=$('#'+_0x147c24+_0x1313a0(0x23c)),_0x1ba715=$('#'+_0x147c24+_0x1313a0(0x256)),_0x552ce2=$('#'+_0x147c24+_0x1313a0(0x232));let _0xfce194=![];_0x26ffe2[_0x1313a0(0x25e)](),_0x2b2175[_0x1313a0(0x25e)](),_0x1ba715[_0x1313a0(0x25e)](),_0x905b5['on'](_0x1313a0(0x229),()=>{const _0x262d21=_0x1313a0;if(_0xfce194)return;_0xfce194=!![],_0x1ba715[_0x262d21(0x1e9)](_0x262d21(0x25e)),_0x1ba715[_0x262d21(0x192)](_0x262d21(0x1e7)),_0x26ffe2[_0x262d21(0x195)](_0x262d21(0x25e)),_0x2b2175[_0x262d21(0x195)](_0x262d21(0x25e)),_0x552ce2[_0x262d21(0x192)]('');const {body:_0x339875,url:_0x1fcc97}=_0x4d8859();fetch(_0x1fcc97,{'method':'POST','headers':{'Content-Type':_0x262d21(0x1b2)},'body':JSON[_0x262d21(0x216)](_0x339875)})['then'](_0x1b4c3f=>_0x1b4c3f['json']())['then'](_0x1059f4=>{const _0x11f41b=_0x262d21;_0xfce194=![],_0x1ba715['hide'](),console[_0x11f41b(0x21e)](JSON[_0x11f41b(0x216)](_0x1059f4,null,'\x20'));if(_0x1059f4[_0x11f41b(0x1b9)]==='ok')_0x26ffe2[_0x11f41b(0x1e9)](_0x11f41b(0x25e)),_0x2b2175['addClass']('hide'),_0x552ce2['html'](_0x1059f4['message'][_0x11f41b(0x260)]('\x0a',_0x11f41b(0x24d)));else{const _0x5ef2dd=_0x430994=>!_0x430994?'':_0x430994[_0x11f41b(0x23f)]('\x0a')[_0x11f41b(0x1e6)](_0x54cabc=>_0x11f41b(0x1b7)+_0x54cabc+_0x11f41b(0x1e4))['join']('\x0a'),_0x58ab65=_0x3c6c96=>Array[_0x11f41b(0x235)](_0x3c6c96)?_0x3c6c96[_0x11f41b(0x1e6)](_0x5ef2dd)[_0x11f41b(0x251)]('\x0a'):_0x5ef2dd(_0x3c6c96);_0x26ffe2[_0x11f41b(0x195)]('hide'),_0x2b2175['removeClass'](_0x11f41b(0x25e)),_0x552ce2[_0x11f41b(0x192)](_0x58ab65(_0x1059f4[_0x11f41b(0x1be)])+_0x58ab65(_0x1059f4[_0x11f41b(0x231)])),_0x44dff5(new Error(_0x1059f4['result']),_0x1059f4);}})[_0x262d21(0x242)](_0x4dc6dc=>{const _0x4e2f14=_0x262d21;_0xfce194=![],_0x1ba715[_0x4e2f14(0x195)](_0x4e2f14(0x25e)),_0x26ffe2[_0x4e2f14(0x195)](_0x4e2f14(0x25e)),_0x2b2175['removeClass'](_0x4e2f14(0x25e)),_0x552ce2[_0x4e2f14(0x192)](_0x4e2f14(0x1cf)+_0x4dc6dc[_0x4e2f14(0x1be)]),console[_0x4e2f14(0x21e)](_0x4e2f14(0x1fb),_0x4dc6dc);});});}const _0x13e564={'FREEWARE':0x0,'TRIAL':0x1,'PROFESSIONAL':0x2},_0x73742e={'AUTHORIZED':0x18,'FAILED':0x17,'EXPIRED':0x16};function _0x48cbe9(_0xdc6da4,_0x116e1e){const _0x477924=_0x4a95a2;if(_0x116e1e!==_0x73742e[_0x477924(0x215)])return _0x13e564[_0x477924(0x1c5)];return _0xdc6da4;}const _0x36bbb2=0xe10*0x3e8,_0x41e419=_0x36bbb2*0x18;function _0x60913a(_0x20d079){const _0x2dabfe=_0x4a95a2;return!_0x20d079?new Date(0x0):_0x20d079 instanceof Date?_0x20d079:new Date(_0x20d079[_0x2dabfe(0x1d1)]?_0x20d079[_0x2dabfe(0x1d1)][_0x2dabfe(0x1ee)]:0x0);}function _0x25a2f1(_0x582493){const _0x14658f=_0x4a95a2,_0x5168dc=_0x60913a(_0x582493),_0x136ad2=new Date(),_0x38b051=Math[_0x14658f(0x1bf)]((_0x5168dc[_0x14658f(0x219)]()-_0x136ad2[_0x14658f(0x219)]())/_0x41e419);return _0x38b051;}function _0x2e1cc4(_0x30c9aa){const _0x2a2607=_0x4a95a2,_0x53c2c4=_0x60913a(_0x30c9aa),_0x6c2ac5=new Date(),_0xe3747b=Math[_0x2a2607(0x1bf)]((_0x53c2c4[_0x2a2607(0x219)]()-_0x6c2ac5[_0x2a2607(0x219)]())/_0x36bbb2);return _0xe3747b;}const _0x42bd67=_0x4a95a2(0x185),_0x471bed=_0x4a95a2(0x1f6);function _0x471883(){return _0x3d2c90(this,arguments,void 0x0,function*(_0x4289f7=''){const _0x233c28=_0x1fab,_0x5c90d2=_0x4289f7+_0x233c28(0x259),_0x98b59=_0x5c90d2+_0x233c28(0x24f),_0x127e5e=yield fetch(_0x98b59,{'method':_0x233c28(0x246),'headers':{'Content-Type':_0x233c28(0x1b2)}}),_0x5f0355=new Date()[_0x233c28(0x1de)](),_0x28f9cb={'status':_0x233c28(0x1f8),'type':_0x233c28(0x1c5),'licenceInfo':{'licenceId':'00000000-0000-0000-0000-000000000000','licenceType':_0x233c28(0x1f5),'expiryDate':_0x5f0355,'onPremiseServerHost':'','expired':!![],'userCompany':'','userEmail':'','userName':''}};if(_0x127e5e[_0x233c28(0x265)]!==0xc8)return console[_0x233c28(0x21e)]('fetching\x20failed\x20with\x20error',_0x127e5e['status'],_0x127e5e[_0x233c28(0x262)]),_0x28f9cb;const _0x7ce9e2=yield _0x127e5e[_0x233c28(0x19a)]();return _0x7ce9e2;});}const _0x1b5c8e=()=>{const _0x1e9c91=_0x4a95a2;$[_0x1e9c91(0x1aa)]('sterfive.licenceWidget',{'options':{'baseUrl':''},'_create'(){const _0x10e384=_0x1e9c91,_0x2034c4=this,_0x1d0e90='<a\x20href=\x22mailto:support@sterfive.com\x22\x20subject=\x22@opcua/for-node-red\x20support\x20request\x22>mailto:support@sterfive.com</a>',_0x2539dd='<a\x20href=\x22https://www.sterfive.com/opcua/for-node-red\x22\x20target=”_blank”>Sterfive\x27s\x20website\x20</a>';_0x471883(_0x2034c4[_0x10e384(0x19b)])[_0x10e384(0x1b8)](_0x3ddb0a=>{const _0x4316d7=_0x10e384;var _0x180bcb,_0x2a7404;let _0x3178f6='',_0x206bc0='',_0xef637f='';const _0x22bdc3=_0x13e564[_0x3ddb0a['type']],_0x5ac4cd=_0x73742e[_0x3ddb0a['status']],_0x3bf857=_0x48cbe9(_0x22bdc3,_0x5ac4cd),_0x3d3637=_0x25a2f1(((_0x180bcb=_0x3ddb0a[_0x4316d7(0x1d1)])===null||_0x180bcb===void 0x0?void 0x0:_0x180bcb['expiryDate'])?new Date(_0x3ddb0a[_0x4316d7(0x1d1)][_0x4316d7(0x1ee)]):undefined),_0x4310f7=_0x2e1cc4(((_0x2a7404=_0x3ddb0a['licenceInfo'])===null||_0x2a7404===void 0x0?void 0x0:_0x2a7404[_0x4316d7(0x1ee)])?new Date(_0x3ddb0a[_0x4316d7(0x1d1)][_0x4316d7(0x1ee)]):undefined),_0x172873=_0x3d3637==0x0?_0x4310f7>0xa?_0x4316d7(0x221):'in\x20'+_0x4310f7+_0x4316d7(0x22e):_0x3d3637==0x1?'tomorrow':_0x4316d7(0x1e0)+_0x3d3637+_0x4316d7(0x226);switch(_0x5ac4cd){case _0x73742e[_0x4316d7(0x215)]:_0x3178f6='fa\x20fa-check-circle';switch(_0x3bf857){case _0x13e564[_0x4316d7(0x19d)]:{_0x206bc0=_0x4316d7(0x22d),_0xef637f=_0x4316d7(0x19e)+_0x172873+'.\x0aBuy\x20online\x20and\x20visit\x20'+_0x2539dd+_0x4316d7(0x234);break;}case _0x13e564[_0x4316d7(0x227)]:_0x206bc0=_0x4316d7(0x19c);_0x3d3637<0x5a&&_0x3d3637>=0x0&&(_0x206bc0+=_0x4316d7(0x1ec)+_0x172873+'.');_0xef637f=_0x3ddb0a[_0x4316d7(0x1d1)][_0x4316d7(0x209)]+_0x4316d7(0x1a5)+(_0x3ddb0a[_0x4316d7(0x1d1)][_0x4316d7(0x1af)]||'');break;case _0x13e564[_0x4316d7(0x1c5)]:_0x206bc0=_0x4316d7(0x1d6),_0xef637f=_0x4316d7(0x237)+_0x2539dd+_0x4316d7(0x1b5);break;}break;case _0x73742e['EXPIRED']:_0x3178f6=_0x4316d7(0x1bc);switch(_0x22bdc3){case _0x13e564[_0x4316d7(0x19d)]:_0x206bc0='Freeware\x20:\x20(Trial\x20licence\x20expired)',_0xef637f=_0x4316d7(0x1b3)+_0x2539dd+_0x4316d7(0x234);break;case _0x13e564[_0x4316d7(0x1c5)]:_0x206bc0=_0x4316d7(0x241),_0xef637f=_0x4316d7(0x200)+_0x2539dd+'\x20for\x20more\x20information.';break;case _0x13e564[_0x4316d7(0x227)]:default:_0x206bc0=_0x4316d7(0x1df),_0xef637f=_0x4316d7(0x1ca)+_0x1d0e90+_0x4316d7(0x196);}break;case _0x73742e['FAILED']:default:_0x3178f6=_0x4316d7(0x207),_0x206bc0=_0x4316d7(0x233),_0xef637f=_0x4316d7(0x25a)+_0x1d0e90+_0x4316d7(0x261);break;}this[_0x4316d7(0x1ea)][_0x4316d7(0x195)]('licence-widget'),this[_0x4316d7(0x1ea)][_0x4316d7(0x195)](_0x4316d7(0x247)+_0x5ac4cd),this[_0x4316d7(0x1ea)][_0x4316d7(0x249)]($(_0x4316d7(0x211))[_0x4316d7(0x195)](_0x4316d7(0x23d))[_0x4316d7(0x249)]($(_0x4316d7(0x1e2))[_0x4316d7(0x195)](_0x3178f6))),this['element']['append']($('<span>')[_0x4316d7(0x195)]('licence-widget-msg')['text'](_0x206bc0)),this[_0x4316d7(0x1ea)][_0x4316d7(0x249)]($(_0x4316d7(0x24d))),this[_0x4316d7(0x1ea)][_0x4316d7(0x249)]($('<span>')[_0x4316d7(0x195)](_0x4316d7(0x1fd))[_0x4316d7(0x249)](_0xef637f));if(_0x5ac4cd===_0x73742e[_0x4316d7(0x189)]||_0x5ac4cd===_0x73742e[_0x4316d7(0x1f8)]||_0x3bf857===_0x13e564['FREEWARE']||_0x3bf857===_0x13e564[_0x4316d7(0x19d)]){this[_0x4316d7(0x1ea)]['append']($(_0x4316d7(0x24d)));const _0x596f65=$('<button/>');_0x596f65['attr']('id',_0x4316d7(0x25b)),_0x596f65[_0x4316d7(0x1ae)]('class',_0x4316d7(0x1f3)),_0x596f65[_0x4316d7(0x1ae)](_0x4316d7(0x23a),'margin-top:\x2020px;'),_0x596f65[_0x4316d7(0x1c7)]('Subscribe'),this[_0x4316d7(0x1ea)][_0x4316d7(0x249)](_0x596f65);const _0x51f713=document['createElement'](_0x4316d7(0x1fc));_0x51f713[_0x4316d7(0x21d)]=_0x4316d7(0x1ad),_0x51f713['async']=!![],$(_0x4316d7(0x1f4))[_0x4316d7(0x249)](_0x51f713);const _0x4f3f20=$(_0x4316d7(0x228));_0x4f3f20['attr']('pricing-table-id',_0x42bd67),_0x4f3f20[_0x4316d7(0x1ae)](_0x4316d7(0x186),_0x471bed),_0x4f3f20[_0x4316d7(0x1ae)](_0x4316d7(0x23a),_0x4316d7(0x23b)),_0x4f3f20['hide'](),this[_0x4316d7(0x1ea)][_0x4316d7(0x249)](_0x4f3f20),_0x596f65['on'](_0x4316d7(0x229),()=>{const _0x415959=_0x4316d7;_0x4f3f20['show'](),_0x596f65[_0x415959(0x25e)](),this[_0x415959(0x1ea)][_0x415959(0x1ae)](_0x415959(0x23a),_0x415959(0x183));});}})[_0x10e384(0x242)](_0x16bf99=>{console['log'](_0x16bf99);});}});},_0x268365=()=>{const _0x32726a=_0x4a95a2,_0x396889=$(_0x32726a(0x1ed));if(_0x396889[_0x32726a(0x244)]){const _0x5eb25a=$(_0x32726a(0x1a9),{'src':_0x32726a(0x18a),'scrolling':'no','style':_0x32726a(0x1bd),'allowtransparency':'true','width':'180px','height':_0x32726a(0x223)});_0x396889[_0x32726a(0x249)](_0x5eb25a),_0x5eb25a[_0x32726a(0x1da)]({'position':'absolute','right':_0x32726a(0x193),'bottom':_0x32726a(0x22a)});}};_0x1b5c8e();function _0x4b728a(_0x2a3d89){const _0x4dc549=_0x4a95a2;let _0x50261e;try{_0x50261e=new URL(_0x2a3d89);}catch(_0x42dc11){return![];}return _0x50261e[_0x4dc549(0x22b)]===_0x4dc549(0x240);}const _0x1f903e={'publishingEnabled':!![],'requestedLifetimeCount':0x3e8,'requestedMaxKeepAliveCount':0xa,'requestedPublishingInterval':0x3e8,'maxNotificationsPerPublish':0x0,'priority':0x64};RED[_0x4a95a2(0x1e5)][_0x4a95a2(0x190)](_0x4a95a2(0x22c),{'category':'config','paletteLabel':_0x4a95a2(0x1b0),'defaults':{'name':{'value':''},'endpoint':{'value':_0x4a95a2(0x239),'required':!![],'validate':_0x4b728a},'securityMode':{'value':_0x4a95a2(0x252)},'securityPolicy':{'value':_0x4a95a2(0x252),'validate':_0x5988cf=>{if(!_0x5988cf)return![];return!![];}},'userIdentityType':{'value':_0x4a95a2(0x212)},'pkiName':{'value':'','validate':_0x1f0f86=>!_0x1f0f86||_0x1f0f86[_0x4a95a2(0x182)](/[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':_0x4a95a2(0x1a0),'isDefault':!![],'parameters':Object[_0x4a95a2(0x248)]({},_0x1f903e)},{'id':'s2','name':'Slow\x20Subscription','isDefault':![],'parameters':{'publishingEnabled':!![],'requestedLifetimeCount':0x64,'requestedMaxKeepAliveCount':0x3,'requestedPublishingInterval':0x1388,'maxNotificationsPerPublish':0x64,'priority':0xa}},{'id':'s3','name':'Fast\x20Subscription','isDefault':![],'parameters':{'publishingEnabled':!![],'requestedLifetimeCount':0xfa0,'requestedMaxKeepAliveCount':0x32,'requestedPublishingInterval':0xfa,'maxNotificationsPerPublish':0x64,'priority':0xc8}}],'required':![]},'namespaceAliases':{'value':[{'alias':'ua','namespaceUri':_0x4a95a2(0x180),'isWellKnown':!![],'isDefault':!![]},{'alias':'di','namespaceUri':_0x4a95a2(0x20d),'isWellKnown':!![],'isDefault':!![]}],'required':![]}},'credentials':{'userName':{'type':_0x4a95a2(0x1c7)},'password':{'type':_0x4a95a2(0x1e8)},'userCertificate':{'type':'text'},'userPrivatekey':{'type':_0x4a95a2(0x1e8)}},'label':function(){const _0x1e1b86=_0x4a95a2;return this['name']||this['endpoint']||_0x1e1b86(0x208);},'oneditsave'(){const _0x2b36e0=_0x4a95a2,_0x108b6d=$(_0x2b36e0(0x1c0)),_0x3dbe89=$(_0x2b36e0(0x1a8));_0x108b6d[_0x2b36e0(0x1eb)]()==='None'&&_0x3dbe89['text'](_0x2b36e0(0x252));{const _0x15ed96=$('#subscriptions-container')[_0x2b36e0(0x24a)](_0x2b36e0(0x255)),_0x4f2049=[],_0x1d3db1=_0x36c507=>_0x36c507;_0x15ed96[_0x2b36e0(0x1ab)](function(_0x4a3959,_0x2cc779){const _0x17f89f=_0x2b36e0,_0x6ac771=$(this),_0x45325d={'id':'s'+_0x4a3959,'name':_0x6ac771[_0x17f89f(0x1c4)](_0x17f89f(0x20a))[_0x17f89f(0x1eb)](),'isDefault':!!_0x6ac771[_0x17f89f(0x1c4)](_0x17f89f(0x1f0))[_0x17f89f(0x1eb)](),'parameters':{'publishingEnabled':!!_0x6ac771['find'](_0x17f89f(0x1a2))['is'](_0x17f89f(0x213)),'requestedLifetimeCount':_0x1d3db1(_0x6ac771[_0x17f89f(0x1c4)](_0x17f89f(0x204))[_0x17f89f(0x1eb)]()),'requestedMaxKeepAliveCount':_0x1d3db1(_0x6ac771[_0x17f89f(0x1c4)](_0x17f89f(0x1c8))[_0x17f89f(0x1eb)]()),'requestedPublishingInterval':_0x1d3db1(_0x6ac771[_0x17f89f(0x1c4)]('.input-requestedPublishingInterval')[_0x17f89f(0x1eb)]()),'maxNotificationsPerPublish':_0x1d3db1(_0x6ac771[_0x17f89f(0x1c4)](_0x17f89f(0x18e))[_0x17f89f(0x1eb)]()),'priority':_0x1d3db1(_0x6ac771['find'](_0x17f89f(0x188))['val']())}};_0x45325d['parameters']['publishingEnabled']=!![],_0x45325d[_0x17f89f(0x1cc)]&&_0x45325d['id']==='s0'&&(_0x45325d[_0x17f89f(0x1d8)]=_0x17f89f(0x1a0)),_0x4f2049[_0x17f89f(0x1a3)](_0x45325d);}),this[_0x2b36e0(0x205)]=_0x4f2049;}{const _0x57cc01=$('#editable-list-aliases-container')[_0x2b36e0(0x24a)]('items'),_0x265e74=[];_0x57cc01['each'](function(_0x5d7301,_0x1d515a){const _0x1befc4=_0x2b36e0,_0x4cfef3=$(this),_0xd229a4={'namespaceUri':_0x4cfef3[_0x1befc4(0x1c4)](_0x1befc4(0x245))[_0x1befc4(0x1eb)](),'alias':_0x4cfef3[_0x1befc4(0x1c4)](_0x1befc4(0x21c))[_0x1befc4(0x1eb)]()};_0x265e74[_0x1befc4(0x1a3)](_0xd229a4);}),this[_0x2b36e0(0x1cb)]=_0x265e74;}},'oneditprepare'(){const _0x32996e=_0x4a95a2,_0x1fe8ad=this;_0x268365();const _0x1a7589=RED[_0x32996e(0x20b)][_0x32996e(0x1ac)]({'id':_0x32996e(0x1fa),'onchange':function(_0x322943){const _0x3aaaeb=_0x32996e;$(_0x3aaaeb(0x1e1))[_0x3aaaeb(0x1c1)]()[_0x3aaaeb(0x25e)](),$('#'+_0x322943['id'])[_0x3aaaeb(0x1bb)]();}});_0x1a7589[_0x32996e(0x20c)]({'id':'endpoint-tab-connection','label':'Connection'},0x0),_0x1a7589['addTab']({'id':_0x32996e(0x1dd),'label':_0x32996e(0x1c9)},0x1),_0x1a7589['addTab']({'id':_0x32996e(0x24b),'label':'Namespace\x20Aliases'},0x2),setTimeout(function(){const _0x5d45c3=_0x32996e;_0x1a7589[_0x5d45c3(0x1cd)]();},0x0);{const _0x36ae45=_0x21c516=>{const _0x4bb9b5=_0x32996e;switch(_0x21c516){case null:case undefined:case'':case _0x4bb9b5(0x252):$(_0x4bb9b5(0x1c6))[_0x4bb9b5(0x25e)]();break;case'Sign':case'SignAndEncrypt':{const _0x5efe8f=$(_0x4bb9b5(0x1c6));(_0x5efe8f[_0x4bb9b5(0x1eb)]()===_0x4bb9b5(0x252)||_0x5efe8f['val']()==='')&&_0x5efe8f['val']('Basic256Sha256'),$('.section-securityPolicy')[_0x4bb9b5(0x1bb)]();}break;default:console[_0x4bb9b5(0x21e)](_0x4bb9b5(0x194)+_0x21c516);}};_0x36ae45(_0x1fe8ad[_0x32996e(0x184)]);const _0xe108da=$(_0x32996e(0x1a8));_0xe108da['on'](_0x32996e(0x1fe),()=>{const _0x2e6bb3=_0x32996e,_0x4eaa82=_0xe108da[_0x2e6bb3(0x1eb)]();_0x36ae45(_0x4eaa82);});}const _0x4ec165=$(_0x32996e(0x1f7));_0x4ec165[_0x32996e(0x218)]({'baseUrl':''});{const _0x2f208a=$(_0x32996e(0x191)),_0x323afa=$(_0x32996e(0x1d0)),_0x36b49e=_0x37746d=>{const _0x596819=_0x32996e;_0x37746d=_0x37746d||'Anonymous';switch(_0x37746d){case _0x596819(0x212):$('#node-config-input-userName')[_0x596819(0x1eb)](''),$(_0x596819(0x25f))[_0x596819(0x1eb)](''),_0x2f208a[_0x596819(0x25e)](),_0x323afa[_0x596819(0x25e)]();break;case'UserName':_0x2f208a[_0x596819(0x1bb)](),_0x323afa['hide']();break;case _0x596819(0x18d):$(_0x596819(0x214))[_0x596819(0x1eb)](''),$(_0x596819(0x25f))['val'](''),_0x323afa['show'](),_0x2f208a[_0x596819(0x25e)]();break;default:console[_0x596819(0x21e)](_0x596819(0x238)+_0x37746d);}};_0x36b49e(_0x1fe8ad['userIdentityType']);const _0x4b8172=$(_0x32996e(0x1ff));_0x4b8172['on']('change',()=>{const _0x55c0a2=_0x32996e,_0x2729ec=_0x4b8172[_0x55c0a2(0x1eb)]();_0x36b49e(_0x2729ec);});}{$(_0x32996e(0x1d9))[_0x32996e(0x25e)](),$(_0x32996e(0x18f))['prop'](_0x32996e(0x1f2),![]),$(_0x32996e(0x18f))['on'](_0x32996e(0x1fe),function(){const _0x51d737=_0x32996e;$(this)['prop'](_0x51d737(0x1f2))?$(_0x51d737(0x1d9))[_0x51d737(0x1bb)]():$(_0x51d737(0x1d9))[_0x51d737(0x25e)]();});}const _0x3d7e2a=$('#node-config-input-useTransport')[_0x32996e(0x1c3)](_0x32996e(0x1f2));_0x3d7e2a?$(_0x32996e(0x250))[_0x32996e(0x1bb)]():$(_0x32996e(0x250))[_0x32996e(0x25e)]();$('#node-config-input-useTransport')['on'](_0x32996e(0x1fe),function(){const _0x278b83=_0x32996e;$(this)[_0x278b83(0x1c3)](_0x278b83(0x1f2))?$('#section-TransportSettings')[_0x278b83(0x1bb)]():$(_0x278b83(0x250))['hide']();});{$('#checkCertificate')['on']('click',()=>_0x3d2c90(this,void 0x0,void 0x0,function*(){const _0x51c72f=_0x32996e,_0x10e667=yield fetch(_0x51c72f(0x20f)),_0x2f1513=yield _0x10e667['json'](),_0x10fdc8=JSON[_0x51c72f(0x216)](_0x2f1513,null,'\x20');alert(_0x10fdc8);}));}$(_0x32996e(0x1d3))['on']('click',()=>_0x3d2c90(this,void 0x0,void 0x0,function*(){const _0x1e4110=_0x32996e;window[_0x1e4110(0x253)]('/opcua-for-node-red/config',_0x1e4110(0x1a1));}));function _0x4743a8(){const _0x434a4a=_0x32996e;var _0x175d83;return{'id':_0x1fe8ad['id'],'endpoint':$('#node-config-input-endpoint')['val'](),'name':$(_0x434a4a(0x225))[_0x434a4a(0x1eb)](),'pkiName':(_0x175d83=$('#node-config-input-pkiName'))===null||_0x175d83===void 0x0?void 0x0:_0x175d83['val'](),'securityMode':$(_0x434a4a(0x1a8))[_0x434a4a(0x1eb)](),'securityPolicy':$('#node-config-input-securityPolicy')[_0x434a4a(0x1eb)](),'userIdentityType':$(_0x434a4a(0x1ff))['val'](),'userName':$(_0x434a4a(0x214))[_0x434a4a(0x1eb)](),'password':$('#node-config-input-password')[_0x434a4a(0x1eb)](),'userCertificate':$(_0x434a4a(0x220))[_0x434a4a(0x1eb)](),'userPrivatekey':$(_0x434a4a(0x25d))[_0x434a4a(0x1eb)](),'certificate':$('#node-input-certificate')['val'](),'useTransport':$(_0x434a4a(0x1d2))[_0x434a4a(0x1c3)](_0x434a4a(0x1f2)),'maxChunkCount':$('#node-input-maxChunkCount')['val'](),'maxMessageSize':$(_0x434a4a(0x203))[_0x434a4a(0x1eb)](),'receiveBufferSize':$(_0x434a4a(0x1b4))[_0x434a4a(0x1eb)](),'sendBufferSize':$('#node-input-sendBufferSize')['val']()};}{_0xd02a29('connection',$('#test-connection'),()=>({'url':_0x32996e(0x217),'body':{'endpointNode':_0x4743a8()}}),()=>{});}{const _0x2baeb5=(_0x301bb1,_0x4ca05e)=>{const _0x10e1c9=_0x32996e;var _0x452e74=_0x301bb1[_0x10e1c9(0x187)]()||0x64;_0x301bb1[_0x10e1c9(0x1c4)](_0x10e1c9(0x1e3))['typedInput']('width',_0x452e74-0xf);},_0x3ad555=$(_0x32996e(0x224))['css']({'min-height':_0x32996e(0x181),'min-width':_0x32996e(0x1d5)})[_0x32996e(0x24a)]({'addItem':(_0x3ef96b,_0x350ce5,_0x5a0a76)=>{const _0x15e394=_0x32996e,_0x55fc43=_0x5a0a76,_0x2d655d=$('#subscription-template')['clone']()[_0x15e394(0x257)](_0x3ef96b);_0x2d655d[_0x15e394(0x19f)]('id')[_0x15e394(0x1e9)](_0x15e394(0x25e))[_0x15e394(0x1e9)]('template')[_0x15e394(0x1ae)]('data-i',_0x350ce5),_0x2d655d['find'](_0x15e394(0x20a))[_0x15e394(0x1eb)](_0x55fc43[_0x15e394(0x1d8)]),_0x2d655d[_0x15e394(0x1c4)]('.input-requestedPublishingInterval')['val'](_0x55fc43[_0x15e394(0x1d7)]['requestedPublishingInterval']),_0x2d655d[_0x15e394(0x1c4)](_0x15e394(0x1c8))[_0x15e394(0x1eb)](_0x55fc43[_0x15e394(0x1d7)][_0x15e394(0x22f)]),_0x2d655d[_0x15e394(0x1c4)](_0x15e394(0x204))[_0x15e394(0x1eb)](_0x55fc43[_0x15e394(0x1d7)][_0x15e394(0x202)]),_0x2d655d[_0x15e394(0x1c4)](_0x15e394(0x18e))[_0x15e394(0x1eb)](_0x55fc43[_0x15e394(0x1d7)]['maxNotificationsPerPublish']||0x0),_0x2d655d['find'](_0x15e394(0x188))['val'](_0x55fc43[_0x15e394(0x1d7)][_0x15e394(0x1ba)]||0x0),_0x2d655d[_0x15e394(0x1c4)](_0x15e394(0x198))[_0x15e394(0x1c7)](''+_0x350ce5),_0x55fc43[_0x15e394(0x1cc)]&&_0x2d655d[_0x15e394(0x1c4)]('.input-name')[_0x15e394(0x1c3)](_0x15e394(0x18c),!![]),_0x2d655d[_0x15e394(0x1c4)](_0x15e394(0x1f0))[_0x15e394(0x1c3)](_0x15e394(0x1f2),_0x55fc43[_0x15e394(0x1cc)]),_0x55fc43[_0x15e394(0x1cc)]&&(_0x3ef96b[_0x15e394(0x1c4)](_0x15e394(0x21b))[_0x15e394(0x195)](_0x15e394(0x25e)),setTimeout(()=>_0x2d655d['find']('.input-isDefault')[_0x15e394(0x1c3)](_0x15e394(0x21a),!![]),0xa));},'removable':!![],'resizeItem':_0x2baeb5}),_0x16f4c3=()=>{const _0x2d30b0=_0x32996e,_0x19df76=_0x1fe8ad[_0x2d30b0(0x205)]||[];_0x19df76[_0x2d30b0(0x244)]===0x0&&_0x19df76[_0x2d30b0(0x1a3)]({'id':'s1','name':_0x2d30b0(0x1a0),'isDefault':!![],'parameters':Object[_0x2d30b0(0x248)]({},_0x1f903e)});_0x3ad555[_0x2d30b0(0x24a)](_0x2d30b0(0x1b1));for(const _0x34b5fa of _0x19df76){_0x3ad555['editableList']('addItem',_0x34b5fa);}};_0x16f4c3();}{function _0x20f0fd(_0x5baca2,_0x5a2f60,_0x46c9ed){const _0x5bc748=_0x32996e,_0x24de0d=_0x46c9ed,_0x3a6761=$(_0x5bc748(0x206))[_0x5bc748(0x257)](_0x5baca2);$(_0x5bc748(0x24e),{'class':_0x5bc748(0x1f9),'type':_0x5bc748(0x1c7)})[_0x5bc748(0x1eb)](_0x46c9ed[_0x5bc748(0x243)]||'')[_0x5bc748(0x1da)]({'width':'5%'})[_0x5bc748(0x257)](_0x3a6761)[_0x5bc748(0x1eb)](_0x5a2f60[_0x5bc748(0x1a7)]()),$(_0x5bc748(0x24e),{'class':_0x5bc748(0x18b),'type':_0x5bc748(0x1c7)})[_0x5bc748(0x1eb)](_0x46c9ed[_0x5bc748(0x243)]||'')['css']({'width':_0x5bc748(0x201)})['appendTo'](_0x3a6761)['val'](_0x24de0d[_0x5bc748(0x243)]),$(_0x5bc748(0x24e),{'class':'node-input-alias-namespace-uri','type':'text'})['val'](_0x46c9ed[_0x5bc748(0x197)]||'')[_0x5bc748(0x1da)]({'width':_0x5bc748(0x222)})[_0x5bc748(0x257)](_0x3a6761)['val'](_0x24de0d[_0x5bc748(0x197)]);}const _0x3d1e21=$(_0x32996e(0x1c2))['css']({'min-height':_0x32996e(0x181),'min-width':_0x32996e(0x1d5)})[_0x32996e(0x24a)]({'addButton':![],'removable':![],'height':_0x32996e(0x199),'scrollOnAdd':![],'addItem'(_0x1d7c52,_0x5a0c2b,_0x220c6a){_0x20f0fd(_0x1d7c52,_0x5a0c2b,_0x220c6a);}});function _0x3f6dd4(){const _0x29e1a0=_0x32996e;_0x3d1e21[_0x29e1a0(0x24a)](_0x29e1a0(0x255)),_0x3d1e21[_0x29e1a0(0x24a)]('empty');for(const _0xbf2f6d of _0x1fe8ad[_0x29e1a0(0x1cb)]||[]){_0x3d1e21['editableList'](_0x29e1a0(0x1db),_0xbf2f6d);}}{$(_0x32996e(0x236))['on'](_0x32996e(0x229),()=>_0x3d2c90(this,void 0x0,void 0x0,function*(){const _0x3ac471=_0x32996e,_0x500813={'endpointNode':_0x4743a8(),'namespaceAliases':_0x1fe8ad[_0x3ac471(0x1cb)]||[]},_0x4acf66=yield fetch(_0x3ac471(0x1ef),{'method':_0x3ac471(0x246),'headers':{'Content-Type':_0x3ac471(0x1b2)},'body':JSON[_0x3ac471(0x216)](_0x500813)}),_0xe7da97=yield _0x4acf66[_0x3ac471(0x19a)](),_0x67abe0=_0xe7da97[_0x3ac471(0x1cb)];console[_0x3ac471(0x21e)]('namespaceAliases',_0x67abe0),Array[_0x3ac471(0x235)](_0x67abe0)&&(_0x1fe8ad[_0x3ac471(0x1cb)]=_0x67abe0,_0x3f6dd4());})),_0x1fe8ad[_0x32996e(0x1cb)]=_0x1fe8ad[_0x32996e(0x1cb)]||[{'alias':'ua','namespaceUri':_0x32996e(0x180),'isWellKnown':!![],'isDefault':!![]}];}_0x3f6dd4();}}});}())); </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