Can anybody help me out with changing the parameters ("bri"/"hue"/"sat"/"swi") of a RGB LED Shield with a complete curl example?
I'm able to get a token.
The problem is that I do not know what API I should use... possibly "devicesV2UpdateProperties"?
Basically I want to do the same things I can do using the dashboard but via curl only (cli for scripting purposes).
Here the data of my things and dashboard.
#------------------#
# dashboardsV2List #
#------------------#
[
{
"created_by": {
"user_id": "1d37efc1-72c3-40da-9d21-04aa4b73c5f9",
"username": "xxxxxxxxxxxxxxx"
},
"id": "ce529420-5c4e-486d-a331-eaf7e40abea0",
"name": "SHIELDS",
"updated_at": "2022-07-18T07:26:52.050975Z",
"widgets": [
{
"has_permission_incompatibility": false,
"has_type_incompatibility": false,
"height": 8,
"height_mobile": 8,
"id": "27ec023e-0270-4a79-a845-bdf213883ea0",
"name": "Colored light",
"options": {
"frameless": false,
"icon": "colored-lamp",
"section": "section-1",
"showThing": true,
"thingId": "d8dw9bc9-a222-4558-b307-7e7cd77a48be"
},
"type": "Colored light",
"variables": [
{
"id": "83hwlbb7-d229-42f8-94c7-02s6h2785f11",
"last_value": {
"bri": 30.350698471069336,
"hue": 240,
"sat": 100,
"swi": 0
},
"last_value_updated_at": "2022-07-20T11:54:00.699Z",
"name": "MATRIX1",
"permission": "READ_WRITE",
"thing_id": "d8dw9bc9-a222-4558-b307-7e7cd77a48be",
"thing_name": "SHIELD1",
"thing_timezone": {
"name": "America/New_York",
"offset": -14400,
"until": "2022-11-06T06:00:00Z"
},
"type": "HOME_COLORED_LIGHT",
"variable_name": "mATRIX1"
}
],
"width": 7,
"width_mobile": 7,
"x": 3,
"x_mobile": 0,
"y": 3,
"y_mobile": 0
},
{
"has_permission_incompatibility": false,
"has_type_incompatibility": false,
"height": 8,
"height_mobile": 8,
"id": "8e0837ce-5aaa-4ed4-92cd-9b397a9a4143",
"name": "Colored light",
"options": {
"icon": "colored-lamp",
"section": "section-1",
"showThing": true,
"thingId": "gd53j2o9-f850-47a9-a024-aa7c7bdda564"
},
"type": "Colored light",
"variables": [
{
"id": "5g02d542-5160-40ce-ass3-06fe30dd93fc",
"last_value": {
"bri": 30.09757423400879,
"hue": 0,
"sat": 100,
"swi": 1
},
"last_value_updated_at": "2022-07-20T12:22:55.524Z",
"name": "MATRIX2",
"permission": "READ_WRITE",
"thing_id": "gd53j2o9-f850-47a9-a024-aa7c7bdda564",
"thing_name": "SHIELD2",
"thing_timezone": {
"name": "Europe/Zurich",
"offset": 7200,
"until": "2022-10-30T01:00:00Z"
},
"type": "HOME_COLORED_LIGHT",
"variable_name": "mATRIX2"
}
],
"width": 7,
"width_mobile": 7,
"x": 14,
"x_mobile": 0,
"y": 3,
"y_mobile": 8
}
]
}
]
#---------------#
# devicesV2List #
#---------------#
[
{
"created_at": "2022-07-18T05:28:46.487433Z",
"events": [
{
"name": "LIB_VERSION",
"updated_at": "2022-07-20T02:38:49.77Z",
"value": "1.6.1"
},
{
"name": "thing_id",
"updated_at": "2022-07-20T02:38:50.302Z",
"value": "gd53j2o9-f850-47a9-a024-aa7c7bdda564"
},
{
"name": "r_topicStatus",
"updated_at": "2022-07-20T02:38:51.027Z",
"value": "SUBSCRIBED_TO:/a/t/gd53j2o9-f850-47a9-a024-aa7c7bdda564/shadow/i"
},
{
"name": "r_thingTopicStatus",
"updated_at": "2022-07-20T02:38:51.033Z",
"value": "SUBSCRIBED"
},
{
"name": "r_status",
"updated_at": "2022-07-20T02:38:49.283Z",
"value": "CONNECTED"
}
],
"fqbn": "arduino:samd:mkrwifi1010",
"href": "/iot/v2/devices/2b5263b0-6867-4082-b3c7-62d86109f9f0",
"id": "2b5263b0-6867-4082-b3c7-62d86109f9f0",
"label": "Arduino MKR WiFi 1010",
"last_activity_at": "2022-07-20T12:22:55.524Z",
"latest_wifi_fw_version": "1.4.8",
"name": "Windy",
"ota_available": true,
"ota_compatible": true,
"required_wifi_fw_version": "1.4.7",
"serial": "D8CF2A6850553439392E3120FF132F28",
"thing": {
"created_at": "2022-07-18T05:29:34.162503Z",
"device_fqbn": "arduino:samd:mkrwifi1010",
"device_id": "2b5263b0-6867-4082-b3c7-62d86109f9f0",
"device_name": "Windy",
"device_type": "mkrwifi1010",
"href": "/iot/v1/things/gd53j2o9-f850-47a9-a024-aa7c7bdda564",
"id": "gd53j2o9-f850-47a9-a024-aa7c7bdda564",
"name": "SHIELD2",
"properties": [
{
"created_at": "2022-07-18T05:30:30.130982Z",
"href": "/iot/v1/things/gd53j2o9-f850-47a9-a024-aa7c7bdda564/properties/5g02d542-5160-40ce-ass3-06fe30dd93fc",
"id": "5g02d542-5160-40ce-ass3-06fe30dd93fc",
"last_value": {
"bri": 30.09757423400879,
"hue": 0,
"sat": 100,
"swi": 1
},
"name": "MATRIX2",
"permission": "READ_WRITE",
"persist": true,
"tag": 1,
"thing_id": "gd53j2o9-f850-47a9-a024-aa7c7bdda564",
"type": "HOME_COLORED_LIGHT",
"update_parameter": 0,
"update_strategy": "ON_CHANGE",
"updated_at": "2022-07-18T05:30:30.130982Z",
"value_updated_at": "2022-07-20T12:22:55.524Z",
"variable_name": "mATRIX2"
}
],
"properties_count": 1,
"sketch_id": "e412784d-3285-4e57-a52e-e24eb7d375ad",
"timezone": "Europe/Zurich",
"updated_at": "2022-07-18T05:42:11.448103Z",
"user_id": "1d37efc1-72c3-40da-9d21-04aa4b73c5f9",
"webhook_active": false
},
"type": "mkrwifi1010",
"user_id": "1d37efc1-72c3-40da-9d21-04aa4b73c5f9",
"wifi_fw_version": "1.4.8"
},
{
"created_at": "2022-04-12T15:28:09.320949Z",
"events": [
{
"name": "LIB_VERSION",
"updated_at": "2022-07-20T06:26:22.06Z",
"value": "1.6.1"
},
{
"name": "r_topicStatus",
"updated_at": "2022-07-20T06:25:52.548Z",
"value": "SUBSCRIBED_TO:/a/t/d8dw9bc9-a222-4558-b307-7e7cd77a48be/shadow/i"
},
{
"name": "r_thingTopicStatus",
"updated_at": "2022-07-20T06:25:52.558Z",
"value": "SUBSCRIBED"
},
{
"name": "r_status",
"updated_at": "2022-07-20T06:26:21.504Z",
"value": "CONNECTED"
},
{
"name": "thing_id",
"updated_at": "2022-07-20T06:26:22.872Z",
"value": "d8dw9bc9-a222-4558-b307-7e7cd77a48be"
}
],
"fqbn": "arduino:samd:mkrwifi1010",
"href": "/iot/v2/devices/303635cf-654d-4da8-99de-94983d38608a",
"id": "303635cf-654d-4da8-99de-94983d38608a",
"label": "Arduino MKR WiFi 1010",
"last_activity_at": "2022-07-20T11:54:00.699Z",
"latest_wifi_fw_version": "1.4.8",
"name": "Evie",
"ota_available": true,
"ota_compatible": true,
"required_wifi_fw_version": "1.4.7",
"serial": "067044DC50593730372E3120FF0D1624",
"thing": {
"created_at": "2022-04-12T16:27:37.930403Z",
"device_fqbn": "arduino:samd:mkrwifi1010",
"device_id": "303635cf-654d-4da8-99de-94983d38608a",
"device_name": "Evie",
"device_type": "mkrwifi1010",
"href": "/iot/v1/things/d8dw9bc9-a222-4558-b307-7e7cd77a48be",
"id": "d8dw9bc9-a222-4558-b307-7e7cd77a48be",
"name": "SHIELD1",
"properties": [
{
"created_at": "2022-04-12T16:28:05.005693Z",
"href": "/iot/v1/things/d8dw9bc9-a222-4558-b307-7e7cd77a48be/properties/83hwlbb7-d229-42f8-94c7-02s6h2785f11",
"id": "83hwlbb7-d229-42f8-94c7-02s6h2785f11",
"last_value": {
"bri": 30.350698471069336,
"hue": 240,
"sat": 100,
"swi": 0
},
"name": "MATRIX1",
"permission": "READ_WRITE",
"persist": true,
"tag": 1,
"thing_id": "d8dw9bc9-a222-4558-b307-7e7cd77a48be",
"type": "HOME_COLORED_LIGHT",
"update_parameter": 0,
"update_strategy": "ON_CHANGE",
"updated_at": "2022-07-18T05:43:59.163796Z",
"value_updated_at": "2022-07-20T11:54:00.699Z",
"variable_name": "mATRIX1"
}
],
"properties_count": 1,
"sketch_id": "60b76ef3-102b-4c7d-b906-7a6db9a10d59",
"timezone": "America/New_York",
"updated_at": "2022-07-18T04:42:12.153963Z",
"user_id": "1d37efc1-72c3-40da-9d21-04aa4b73c5f9",
"webhook_active": false
},
"type": "mkrwifi1010",
"user_id": "1d37efc1-72c3-40da-9d21-04aa4b73c5f9",
"wifi_fw_version": "1.4.8"
}
]
#------------------#
# propertiesV2List #
#------------------#
[
{
"created_at": "2022-07-18T05:30:30.130982Z",
"href": "/iot/v1/things/gd53j2o9-f850-47a9-a024-aa7c7bdda564/properties/5g02d542-5160-40ce-ass3-06fe30dd93fc",
"id": "5g02d542-5160-40ce-ass3-06fe30dd93fc",
"last_value": {
"bri": 30.09757423400879,
"hue": 0,
"sat": 100,
"swi": 1
},
"name": "MATRIX2",
"permission": "READ_WRITE",
"persist": true,
"tag": 1,
"thing_id": "gd53j2o9-f850-47a9-a024-aa7c7bdda564",
"thing_name": "SHIELD2",
"type": "HOME_COLORED_LIGHT",
"update_parameter": 0,
"update_strategy": "ON_CHANGE",
"updated_at": "2022-07-18T05:30:30.130982Z",
"value_updated_at": "2022-07-20T12:22:55.524Z",
"variable_name": "mATRIX2"
}
]
[
{
"created_at": "2022-04-12T16:28:05.005693Z",
"href": "/iot/v1/things/d8dw9bc9-a222-4558-b307-7e7cd77a48be/properties/83hwlbb7-d229-42f8-94c7-02s6h2785f11",
"id": "83hwlbb7-d229-42f8-94c7-02s6h2785f11",
"last_value": {
"bri": 30.350698471069336,
"hue": 240,
"sat": 100,
"swi": 0
},
"name": "MATRIX1",
"permission": "READ_WRITE",
"persist": true,
"tag": 1,
"thing_id": "d8dw9bc9-a222-4558-b307-7e7cd77a48be",
"thing_name": "SHIELD1",
"type": "HOME_COLORED_LIGHT",
"update_parameter": 0,
"update_strategy": "ON_CHANGE",
"updated_at": "2022-07-18T05:43:59.163796Z",
"value_updated_at": "2022-07-20T11:54:00.699Z",
"variable_name": "mATRIX1"
}
]