Have anyone ever made a dashboard using the ThingsBoard HTTP API? I keep getting bad request with this request:
{
"id": {
"id": "new-id"
},
"tenantId": {
"id": "c157c070-54a6-11eb-a8d3-39dcdb19ff25"
},
"title": "Test Dashboard",
"name": "TDB",
"configuration": ""
}
what am i doing wrong?
I get errorCode 31 "Device name should be specified" when I try to add a device using rest API. Actually I specified the name with -d 'DeviceD'. Why do I get this error?
This is my command:
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"username":"tenant@thingsboard.org", "password":"tenant"}' --header 'X-Authorization: Bearer TOKEN' -d 'DeviceD' 'http://localhost:8080/api/device'
Hi guys, this may be a stupid question, but i am trying to use a public certificate (public.cer) and CA certificate (ca.cer) given my private.key Can someone explain me how to use them? i got them in volume /sslcerts.
Can someone explain me how to setup the environment variables (i watched at this list https://thingsboard.io/docs/user-guide/install/config/ ) btw i need only https
did you set server.ssl.enabled to true?
I get errorCode 31 "Device name should be specified" when I try to add a device using rest API. Actually I specified the name with -d 'DeviceD'. Why do I get this error?
This is my command:curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{"username":"tenant@thingsboard.org", "password":"tenant"}' --header 'X-Authorization: Bearer TOKEN' -d 'DeviceD' 'http://localhost:8080/api/device'
This could be to the permission level of the admin. check with the customer user/operator login
Has anyone ever made a widget that get input and sends it to a specific rule-chain?
you can use attribute update on the widget and monitor the rule chain for attribute updated.
Hi guys, this may be a stupid question, but i am trying to use a public certificate (public.cer) and CA certificate (ca.cer) given my private.key Can someone explain me how to use them? i got them in volume /sslcerts.
Can someone explain me how to setup the environment variables (i watched at this list https://thingsboard.io/docs/user-guide/install/config/ ) btw i need only httpsdid you set server.ssl.enabled to true?
Yeah but i don't understand how to config thingsboard with .cer and .key file to allow him read them
No enum constant org.thingsboard.server.common.data.EntityType.undefined
attributeService.saveEntityAttributes(
'61871f10-2dc3-11eb-976f-c7fabdd2ed91',
'SHARED_SCOPE',
[
{key: 'someAttr', value: '123456789'}
]
)
.subscribe((res) => {
console.log("OK ", res);
}, (res) => {
console.log("Faild", res);
});
Hi guys again, now i am working with thingsbaord-gw on docker. I configured all copy-paste by https://thingsboard.io/docs/iot-gateway/config/mqtt/ i got my config volume with:
Can someone help me?
Hi everyone,
I'm a newbie. I have a mobile app to send my telemetry data via the api:
curl --location --request POST 'https://thingsboard.cloud/api/v1/$ACCESS_TOKEN/telemetry?timeout=20000' \
--header 'Content-Type: application/json' \
--data-raw '
{
"temp": 37
}'
The API works fine. $ACCESS_TOKEN is device token in thingsboard
Mobile app save the telemetry data, then the device needs to update the telemetry data in realtime to the device screen. The device used MQTT to subscribe topics:
'v1/devices/me/rpc/request/+',
'v1/devices/me/rpc/response/+',
'v1/devices/me/attributes',
'v1/devices/me/telemetry'
(auth with username = $ACCESS_TOKEN of the device to connect to MQTT ==> successfully).
I tried to use the RPC API, but the API needs $JWT_TOKEN to auth
curl --location --request POST 'https://thingsboard.cloud/api/plugins/rpc/oneway/${deviceId}' \
--header 'Content-Type: application/json' \
--header 'X-Authorization: Bearer $JWT_TOKEN' \
--data-raw '{
"method": "setTemp",
"params": {
"value": temp
},
"timeout": 60000
}'
The RPC API works. My device receives the telemetry data from MQTT.
My Question: How to my device receive real-time telemetry data from my mobile app saved to thingsboard server and don't need to use RPC API or $JWT_TOKEN ?
Sorry, my English is not good.
Can someone help me?
Thank you very much
Hi... is there a way to retrieve the deviceType in RPC when using mqtt connector ?
so far ${deviceName} and ${methodName} are resolved... but not ${deviceType}
"serverSideRpc": [
{
"deviceNameFilter": ".*",
"methodFilter": "val",
"requestTopicExpression": "cmnd/${deviceType}/${deviceName}/${methodName}",
"valueExpression": "${params}"
}
]