Farmbot information dashboarding

Hello everyone,

I have 2 farmbots one indoor at my office and one in my backyard. I connect this to Salesforce with api and mqtt. The reason that i choose for Salesforce is that i can create this without writing code. In this way i can create some dashboarding with information. Its just a begin but i thought it is good to share.

  • Weather api so get the temp, humidity and sun hours for each day
  • Days of growing for each plant
  • Create a picture everyday with a timestamp so i know on what day the picture is made
  • Store the amount of watering
  • I also test to send the picture to Salesforce einstein. (Its a kind of AI tool from Salesforce) And he recognized lettuce as lettuce by scanning the image.

You can see it in the image below

I next steps that i want tot take

  • Add a water flow sensor so i can see amount of water
  • Take every day a picture and try to recognize the size of the plant from the picture and store it in the database
  • Find trends and try to give better amount of water/light i.e.
  • Store also the values of the soil sensor

I’m wondering of some other people on this forum have some ideas about it.

5 Likes

Wow!

I so like what you are doing!
I just signed up for a 30-day trial of Salesforce.
Can you provide some pointers, steps and detail as to how to get some basic info such as you show, please?
(I only have 30 days… :wink: )

Ok, so I got Node-Red up and running…
Do you have any basic info to help me get connected to my FarmBot and pul down some info?
Right now, i can basically just do a “Hello World” with the NodeRed UI (but a very cool hello world!)

Good to hear that you like it!
Offcourse i can explain you what actions you need to take to create the same what i added in the pictures but there are some limitations on Salesforce. You have 2 options: 30 days trial or you can signup for a developer org but than you have only 5 mb record storage. (I’m a Salesforce partner and use it in my work everyday so this gives me some benefits)

But maybe its better for you that we connect your farmbot to the Salesforce environment that i already created and give you a login where you can acces your own data? We can share more ideas and its not needed for you to create everything again.

Let me know what you think about it.

1 Like

I like that idea!
I’ll message you…
Thanks!

@Maikel That is an amazing setup! Great work.

Thank you Rick! Nice to hear that you like it to!

@Intelbotfarmer: Here the explanation from how you get the bearer token with node-red. :

Picture%201

First node its a inject node where i add the following json:

{“user”:{“email”:“Addyourusernamehere”,“password”:“Addyourpasswordhere”}}

Second node i add the url:

https://my.farmbot.io/api/tokens

Third node is the debug node. This shows the respons in the debug tab on the right.

You can also use postman for this if you want. But i explain node-red because you already installed this.

@Maikel
I am not sure what i am doing wrong, but node-red returns the following:

6/10/2019, 6:05:46 PMnode: 3ddb86f0.b1d8eamsg.payload : string[126]
“{“error”:“You failed to authenticate with the API. Ensure that you provide a JSON Web Token in the Authorization: header.”}”

And, if i try to directly go through the browser, I get:
{“error”:“You failed to authenticate with the API. Ensure that you provide a JSON Web Token in the Authorization: header.”}

Am I missing something?

@Intelbotfarmer

No problem.

This is the json in the inject node:

{
“user”: {
“email”: “Your email adress”,
“password”: “Your password”
}
}

Change the payload of the inject node to json and add the json in that field.

Set the http request on post.

Return back: a parsed json object. This is the best readable.

Your token looks like this:

eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJib3QiLCJzdWIiOjI1MjIsImlhdCI6MTU2MDI0MzE3MiwianRpIjoiN2YxNzFiNjctMmUyMi00NDUxLWJlOGQtNTQ2ZDBmMmRiYjJlIiwiaXNzIjoiLy9teS5mYXJtLmJvdDo0NDMiLCJleHAiOjE1NjM2OTkxNzIsIm1xdHQiOiJjbGV2ZXItb2N0b3B1cy5ybXEuY2xvdWRhbXFwLmNvbSIsImJvdCI6ImRldmljZV8yNTE5Iiwidmhvc3QiOiJ4aWNvbmZ1bSIsIm1xdHRfd3MiOiJ3c3M6Ly9jbGV2ZXItb2N0b3B1cy5ybXEuY2xvdWRhbXFwLmNvbTo0NDMvd3MvbXF0dCIsIm9zX3VwZGF0ZV9zZXJ2ZXIiOiJodHRwczovL2FwaS5naXRodWIuY29tL3JlcG9zL2Zhcm1ib3QvZmFybWJvdF9vcy9yZWxlYXNlcy9sYXRlc3QiLCJiZXRhX29zX3VwZGF0ZV9zZXJ2ZXIiOiJodHRwczovL2FwaS5naXRodWIuY29tL3JlcG9zL0Zhcm1Cb3QvZmFybWJvdF9vcy9yZWxlYXNlcy8xNDU4MTg3MSJ9.SqnKd5OFC_y-wMmOInlAUWm0lYXhGDSJXNZ8AjsJP9opUnD-X2hbifoWLYH3jBYvnPsSBdr_PHUUS42tsxKL-4HSKVkdjZs0S_sK_JwBcWtQtblJ3IzOGKkn…