265
265
266
266
#### Write the home sensor actions data to InfluxDB
267
267
268
- Use the ` influxdb3 ` CLI, InfluxDB v2 API, or InfluxDB v1 API to write the
268
+ Use the ` influxdb3 ` CLI, InfluxDB v3 API, InfluxDB v2 API, or InfluxDB v1 API to write the
269
269
home sensor actions sample data to {{< product-name >}}.
270
270
271
271
{{< code-tabs-wrapper >}}
272
272
{{% code-tabs %}}
273
273
[ influxdb3] ( # )
274
+ [ V3 API] ( # )
274
275
[ v2 API] ( # )
275
276
[ v1 API] ( # )
276
277
{{% /code-tabs %}}
@@ -297,6 +298,25 @@ home_actions,room=Living\ Room,action=alert,level=warn description="Carbon monox
297
298
{{% /code-tab-content %}}
298
299
{{% code-tab-content %}}
299
300
301
+ {{% influxdb/custom-timestamps %}}
302
+ {{% code-placeholders "AUTH_TOKEN|DATABASE_NAME" %}}
303
+ ``` sh
304
+ curl -v " http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto&accept_partial=true" \
305
+ --data-raw " home_actions,room=Kitchen,action=cool,level=ok description=\" Temperature at or above 23°C (23°C). Cooling to 22°C.\" 1739437200
306
+ home_actions,room=Kitchen,action=cool,level=ok description=\" Temperature at or above 23°C (23.3°C). Cooling to 22°C.\" 1739469600
307
+ home_actions,room=Kitchen,action=cool,level=ok description=\" Temperature at or above 23°C (23.1°C). Cooling to 22°C.\" 1739473200
308
+ home_actions,room=Kitchen,action=alert,level=warn description=\" Carbon monoxide level above normal: 18 ppm.\" 1739469600
309
+ home_actions,room=Kitchen,action=alert,level=warn description=\" Carbon monoxide level above normal: 22 ppm.\" 1739473200
310
+ home_actions,room=Kitchen,action=alert,level=warn description=\" Carbon monoxide level above normal: 26 ppm.\" 1739476800
311
+ home_actions,room=Living Room,action=alert,level=warn description=\" Carbon monoxide level above normal: 14 ppm.\" 1739473200
312
+ home_actions,room=Living Room,action=alert,level=warn description=\" Carbon monoxide level above normal: 17 ppm.\" 1739476800"
313
+ ```
314
+ {{% /code-placeholders %}}
315
+ {{% /influxdb/custom-timestamps %}}
316
+
317
+ {{% /code-tab-content %}}
318
+ {{% code-tab-content %}}
319
+
300
320
{{% influxdb/custom-timestamps %}}
301
321
{{% code-placeholders "AUTH_TOKEN|DATABASE_NAME" %}}
302
322
``` sh
0 commit comments