Node-Red + Cloudant

Hi i try to connect NR and Cloudant via this tutorial, but i have this error:

Any help, please?

I also try with this node

Hi @Martin10

it isn't really possible to tell the difference between those two screenshots, so it isn't clear what exactly you've tried.

What cloudant node are you using? I would recommend

What payload are you passing into the node?

Yes, i use this node. I use this msg

msg.payload = msg.payload;
return msg;

i'm worried about that in the cloudant config there is a pass tab, but in the cloudant Service credentials i don't see pass. Instead i use api key, but i'm not shure if it is right to use it?

Well at this point you've just shared your service credentials with the whole internet... so you may want to generate some new credentials :slight_smile:

I think you would use the apikey value for the password.

That isn't doing anything but passing through the message exactly how it was received. That doesn't tell us anything about the value of msg.payload you are trying to pass the node and what you'd like it to do with that value.

I just want to pass the sensor data to the cloudant, but obviously i miss something. Do i need some addition code in the function node?

Please, any help?

I suggested you try using the apiKey as the password. Did that not help?

Cloudant stores JSON documents - I don't think you can pass it "25.00" by itself.

You could try adding a Function node before the cloudant node that changes the payload into an object:

msg.payload = {
   "temperature": msg.payload
return msg;

Yes, i try both your advices, but error i got, is the same

What i miss?
I watched this video, and try it, but did not work with me

Do i need to do this first?

It depends what your requirements are.

If you want to do everything locally, then yes, you could install couchdb, or look at the other database options like sqlite. There are lots of guides for doing that online.

I'm afraid I've not had time today to look into your cloudant issue. I can't see anything obviously wrong given what you've shared, so you could consider raising an issue against the cloudant node so its author could help you.

I want to upload sensor data in the cloud. Something like in the video i post.

When i upload data in the grafana via influxDB, i still need to install influxDB locally. I don't know is it the same here?

Thanks for help so far, if you or any body have any idea what i do wrong, i will be grateful if you share with me, whenever you can.

Funny... When i insert the api key of the Cloudant Service credentials in the cloudant NR node as a password, and i deploy the flow, and than i reopen the node, the password is shorter, anyone know the reason?

Do you mean it shows the wrong number of stars? Since the password encryption is not reversible there is no way for the software to know how many characters there are in your password after you have left the page on which you enter it.

So, it's not a problem?

If the software does not know how long the password is then it is impossible for it to show the right number of stars. If it showed the right number of stars (except by coincidence) then that would be a problem because it would mean that your password had not be encrypted by a secure algorithm.

Thank you for the explanation.
Eventually what can be the reason why i can't upload sensor data into the cloudant, basis on the errors i received?

I can't help with that I am afraid, never having used cloudant.

I was able to install and create CouchDB on RPI ( But still can't upload sensor data to the cloud, any idea?