Skip to content

XRT-4009: update put/get commands on device service examples - #334

Open
BenthicWolf wants to merge 2 commits into
v3.4-branchfrom
XRT-4009
Open

BenthicWolf wants to merge 2 commits into
v3.4-branchfrom
XRT-4009

Conversation

@BenthicWolf

Copy link
Copy Markdown

No description provided.

'{
"metrics":
[
{ "name": "Random", "is_null": true },

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Counter" missing when comparing to the old get_multi_request

}'
"metrics":
[
{ "name": "change_friendly_name", "value": {"from": "0x7cb03eaa00a9b799", "to": "LED_new_friendly_name"}, "datatype": 19 }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just want to check, how did you get datatype: 19 here?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're writing to coordinator_device, which uses coordinator_profile, which has resource "change_friendly_name" of type object.

In data.h the enum iot_data_type_t has IOT_DATA_MULTI as 19 and is used for "Multiple data types, used for array, map, vector and list contained type"

The sparkplug spec defines:

Text = 14;
// Additional Metric Types
UUID = 15;
DataSet = 16;
Bytes = 17;
File = 18;
Template = 19

Can't find anything definitive but it seemed the most likely

"id": "0x000d6ffffe400162", "cluster": "msIlluminanceMeasurement", "attribute": "measuredValue",
"minimum_report_interval":8,"maximum_report_interval":"8","reportable_change":1
},
"datatype": 19 }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here too.
Also, maybe it's just the differ but would be good to clean up the formatting on this file.

"brightness": 254,
"transition": 1,
"state": true,
"color_hs": {"hue": 100, "saturation": 100} No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy pasted stuff left in

"metrics":
[
{ "name": "brightness", "value": 254, "datatype": 9 }
{ "name": "transition", "value": 1, "datatype": 9 }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

brightness and transition are float64 in the profile, so their datatypes should be 10

Comment thread DeviceServices/zigbee/commands/write.sh Outdated
'{
"metrics":
[
{ "name": "brightness", "value": 150, "datatype": 9 }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10 here too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants