You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BROKER = "192.168.8.195"#Replace with your MQTT broker's IP address
86
-
CLIENT_ID = "Car_Park"
85
+
BROKER = "192.168.8.195"#ThingsBoard Host-Name
86
+
CLIENT_ID = "Car_Park"# The Client ID which you give in the Thingsboard End
87
87
PORT = 1883
88
-
TOPIC = "v1/devices/me/telemetry"#Adjust to match your topic
88
+
TOPIC = "v1/devices/me/telemetry"#Topic For Sending data to ThingsBoard
89
89
90
90
mqtt_client = mqtt.Client(CLIENT_ID)
91
91
@@ -140,19 +140,106 @@ if __name__ == "__main__":
140
140
141
141
## Step 4: Install ThingsBoard and Add a Device
142
142
143
-
[ThingsBoard](https://thingsboard.io/) is an open-source IoT platform designed fordevice management, data collection, processing, and visualization. It supports various communication protocols such as **MQTT, CoAP, and HTTP**, making it versatile for integrating IoT devices and systems. The platform enables users to **create interactive dashboards, monitor devicesin real-time, and analyze data through advanced visualization tools. With its rule engine, ThingsBoard automates workflows and event processing**, simplifying the implementation of IoT use cases across industries. Its scalability and flexibility make it suitable for projects of any size, from small prototypes to large-scale deployments.
143
+
[ThingsBoard](https://thingsboard.io/) is an open-source IoT platform designed fordevice management, data collection, processing, and visualization. It supports various communication protocols such as **MQTT, CoAP, and HTTP**, making it versatile for integrating IoT devices and systems. The platform enables users to **create interactive dashboards, monitor devicesin real-time, and analyze data through advanced visualization tools. With its rule engine, ThingsBoard automates workflows and event processing**, simplifying the implementation of IoT use cases across industries. Its scalability and flexibility make it suitable for projects of any size, from small prototypes to large-scale deployments.Additionally, you can use their [cloud solution](https://thingsboard.io/products/paas/) for easier deployment and management.
144
+
145
+
144
146
145
147
We have provided instructions on [installing the ThingsBoard Community Edition](https://wiki.seeedstudio.com/recomputer_r1000_thingsboard_ce/) and the Edge version. You can refer to this wiki lesson for guidance.
146
148
147
-
After installing ThingsBoard, you need to add a device. [This lesson](https://wiki.seeedstudio.com/recomputer_r1000_thingsboard_dashboard/) also explains how to create widgets and build dashboards using MQTT credentials. When adding a device, specify the client name in the device configuration and ensure the client name and broker settings in the above code match your ThingsBoard platform configuration.
148
149
149
-
Since this is a demo, **we have not added a username or password when creating the device**.
150
+
## Step 5: Provision a Device
151
+
152
+
1. Navigate to the **Devices** page under the **Entities** section.
153
+
154
+

155
+
156
+
2. Click the **'+'** icon in the top right corner of the table and select**'Add new device'** from the drop-down menu.
157
+
158
+

159
+
160
+
3. Enter the **device name**, **Client ID**, **Password**, and **Username**.
161
+
Since this is a demo, we have not added a username or password when creating the device.
162
+
163
+
4. Click **Add**.
164
+
165
+

166
+
167
+
5. As you add more devices, they will appear at the top of the table. The table automatically sorts devices by creation time, with the newest ones listed first.
168
+
169
+

170
+
171
+
172
+
## Step 6: Connect the Device
173
+
174
+
1. Click on your device and then click the **Check connectivity** button in the **Device details** window.
175
+

176
+
177
+
2. In the opened window, select the messaging protocol and your operating system:
178
+
- **Operating System:** Linux
179
+
- **Protocol:** MQTT
180
+
181
+

182
+
183
+
3. Make sure to install the required client tools.
184
+
4. Execute the copied command. Once the temperature readings are published successfully, the device state will change from **"Inactive"** to **"Active"**. You will also see the published temperature readings.
185
+
186
+

187
+
188
+
## Run the Code
150
189
151
190
```bash
152
-
BROKER = "192.168.8.195"# Replace with your MQTT broker's IP address
153
-
CLIENT_ID = "Car_Park" # Replace with your client ID
0 commit comments