thingsboard / thingsboard-edge

Apache License 2.0
98 stars 74 forks source link

Connection between Edge and Thingsboard Docker Version #45

Closed jose-franco-PT closed 1 year ago

jose-franco-PT commented 1 year ago

Description

Good morning, I have successfully installed Thingsboard Edge on 4GB RAM Raspberry Pi 4 device through the installation instructions on Ubuntu operating system, as explained in the link below:

https://thingsboard.io/docs/user-guide/install/edge/deb-installation/

I then followed the instructions that are described in the following link:

https://thingsboard.io/docs/edge/getting-started/

Essentially, having followed the instructions described, I can now send data from Thingsboard Edge ( which is running inside the Raspberry Pi) to Thingsboard Cloud( https://demo.thingsboard.io/login).

Basically I created a python script that has an infinite loop sending dummy temperature values( from 0 to 100), via MQTT to thingsboard Edge. As you can see from the image below:

1

On the thingsboard Edge side the correct reception of the data is confirmed: 2

I then created a Dashboard according to the instructions in one of the links indicated above and successfully receive the information in Thingsboard Cloud:

3

Meanwhile I installed Thingsboard on Docker Windows 10, according to the instructions given in the following link:

https://thingsboard.io/docs/user-guide/install/windows/

At this moment, I have the following question:

Is it possible for Thingsboard Edge instead of sending data to Thingsboard Cloud, to send data to Thingsboard running on docker?

Thank you

Environment

volodymyr-babak commented 1 year ago

@jose-franco-PT

yes, you can do this. First, you'll need to provision edge entity on your ThingsBoard that is running on docker following this guide: https://thingsboard.io/docs/edge/provision-edge-on-server/

You did this already for ThingsBoard Cloud and now you should do the same for your ThingsBoard instance.

Once edge is provisioned on your ThingsBoard instance please follow installation guide again https://thingsboard.io/docs/user-guide/install/edge/deb-installation/. Probably you can skip 1, 2 and 3 steps because your edge is already installed and running fine.

But on the 4th step (https://thingsboard.io/docs/user-guide/install/edge/deb-installation/#step-4-configure-thingsboard-edge) you'll need properly set next variables: image

So you'll need to update 4 variables above and in this way you should be able to connect to your ThingsBoard instance.

Here are more details what is CLOUD_RPC_HOST image

jose-franco-PT commented 1 year ago

Good afternoon,

I just checked the instructions you sent me and it is already working.

Thank you very much for your attention!