Trying to connect to a SNAP PAC from Node Red

Hi Guys,

I am trying to connect from Node Red (Within an EPIC) to a SNAP PAC PLC that’s within our network. I was able to get the API Name and Key, but i am still getting an error that says DEPTH_ZERO_SELF_SIGNED_CERT.

From what I read, seems to be missing a SSL Cert. Been trying to create one, but i haven’t been successful yet. What do you guys recommend for this instance? Whats the easist way to create a cert?

thanks

The easiest way is to not use a cert.

HTTPS slows a SNAP PAC Controller down a bit, since it sounds like you are on the same network, you don’t really need to take that hit in performance for some unneeded encryption.

From PAC Manager looking at that SNAP PAC Controller, make sure your HTTPS is turned off from Communications → Network Security

Set up your REST API keys as per this guide:
https://developer.opto22.com/rest/pac/

In the PAC Node, select HTTP and put your key name and API key in.
Leave the cert blank and you will be up and running in a minute.

1 Like

Thanks Beno,

I am not sure, but i think we use the HTTPS login for some AWS datalogging. If i change it, would it impact that data loggin setup?

I don’t know your setup so cant really comment.

Did you follow this guide?
https://developer.opto22.com/nodered/pac/security/certificates/

Yeah, tried to create the certificate. But didn’t have luck. I’m fairly new to security setups. Ill contact my IS team to see options.

thanks

Hector

Unless you have an open firewall to the PAC (hope not!), then your https outbound connection to AWS has nothing to do with the HTTP/S setting on the PAC, so you can use HTTP for Node-RED and HTTPS in the PAC Control comm handle to AWS.
But that is a big assumption from me that that is how you have it setup.

1 Like

Makes sense!

Ill give it a go and see.

Thanks!

Looking forward to the new training material there.

Thanks

HI Guys,

I changed from HTTPS to HTTP, and now i am getting this error.

“Connection refused. Error code: ECONNREFUSED from system call “connect””

Is your HTTP connection using port 80?
Check in PAC Manager, when using Node-RED it MUST be port 80. The screen shot I posted in this thread was when I was testing some other code and so I moved it to 8080.

1 Like