NodeRed on local Pi to NodeRed in Bluemix

I have an instance of NodeRed on a Pi and it works perfectly. I used the Pi GPIO to monitor some mechanical equipment, created alarms, runtime, cycle counts and local UI using NodeRED dashboards. I couldn't be more pleased and have a few more Pis planned to deploy. Got a modbus issue to work though, but I'm on it.

Next Id like to tie it all into a instance of NodeRed on IBM BlueMix also running BlueMix. Got the account setup and NodeRed in IBM running, no problem.
Getting my Pi running node red attached as a IOT device in BlueMix is where things start falling apart for me. I have been searching the internet , watching videos and experimenting. At this point here are my questions.

  1. Most of the videos I'm watching are older and seem to refer to the Watson IOT node which hasn't seen an update in 4 years. I'm getting the impression this has been largely dropped for the MQTT out node pointed to BlueMix. Is that a correct assumption and if so I'm a little unclear how to correctly configure for connection to BlueMix, and if a certificate is needed. If anyone knows of documentation that provides specific direction on configuring NideRED MQTT node I'd appreciate it. My research efforts so far either refer too the watson node or don't specifically tell me how to format the fields to IBMs liking. I did read something about "xx.messaging.internetofthings.ibmcloud.com" but haven't had any luck with it so far.

  2. Device VS Gateway. One of the videos I watched showed setting up node red as a gateway both in the watson node in the the IBM iot device config. How is it a gateway? I don't understand the distinction as it applies to this usage.

I'm still a little new to NodeRED, because I'm very excited about the potential here I have been investing heavily in coming to know this platform..

Thank you!

Made some progress,
I figured out that in my local Pis nodeRED MQTT connection when I prefix the client id with "d:" that now my data shows up in the watson IOT. Excellent!

Now I have node RED running in the IBM cloud as well as on my Pi& the Pis pushing todat to watson. However I want the MQTT data my local NodeRED is pushing to Watson to show up in NodeRed in the cloud. I'm trying to use the MQTT "in node" in the cloud NodeRED.
Using a MQTT in node, Here is what I did:
server: to [ORG ID].messaging.internetofthings.ibmcloud.com
I created a "connection" between IOT platform and NodeRed, and used the API Key and Token the connection created as the username and password in the MQTT node.
The only thing that leaves is client ID. my understanding is that it should be "a:orgId:appId", but where does this appId come from exactly? am I even on the right track?

I wish understood why the IBM IOT in node works and the MQTT node does not.