Raspberry PI command transfer

Hi, I am trying to send device commands to the raspberry PI from the cloud(based on IBM) node-red, so that I can use it to control the PI. If I try to connect the two to the device I get constant reconnection issues. Both work separately. Any suggestions?

Thanks, Dillon

How are you sending command to the Raspberry pi?

If you have connected you pi to the internet have you made sure you have done it securely?