-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to add the event subset. #2
Comments
The prefix is mostly for processing the data by a cloud backend or an app. Just adding the So, if you want something to be event based (e.g. publish a report after each change in a state machine), you'll need to call e.g.
You added a group
Hope that helps. |
Hi @martinjaeger, Thank you for your prompt response! I understand your point and have also noticed the same thing in the SDK source for the event-based subset. I added the TemperatureValue and SerialNumber data under the TemperatureSensor sensor group, as shown below. uart:~$ thingset ? uart:~$ thingset ?TempratureSensor I also enabled live notifications for some of the data. #mLive_ {"Log":{"t_s":0},"TempratureSensor":{"TempratureValue":25,"SerialNUmber":""},"ImuSensor":{"Gyro":0,"SerialNUmber":""}} Currently, I'm trying to access the live notification using the shell command. To remove the TemperatureValue node from the live notification, I'm using the commands mentioned below. uart:~$ thingset -mLive_ "TempratureSensor/TempratureValue" However, we received an error: AF(THINGSET_ERR_UNSUPPORTED_FORMAT). Do you have any suggestions on what I might be doing wrong? Best regards, |
I guess you have to escape the quotation marks in the shell. Try this:
|
Thanks @martinjaeger, Awesome! It's working fine. Regards, |
Hi @martinjaeger, I'm using binary mode in my application and have looked over the details provided in https://thingset.io/spec/v0.6. I have a few questions about this mode:
Regarding the records, I have a couple of questions:
Thanks in advance, |
The binary mode is currently not supported for the UART, see here: However, it would be possible to use the same packetization mechanisms as used for BLE. If you need this and would like to implement it, I'm happy to support.
Once binary works over serial, it can also be used to send live data.
The shell will not work in binary mode. It's text-mode only.
No, that's currently not possible. Records are already a sort of trick to make the data more dynamic with static memory allocation. Adding a sub-record would under another record would probably be very difficult to implement in C. |
Thanks a lot, @martinjaeger , I find your assistance truly helpful! However, I have a few doubts. Could you please take a look at the data format I wish to achieve? I've attached the file below. So as we can not create the subrecord under the record is there any other method to achieve the same? I require that particular data structure for my application. I am simply clarifying the format of the data. Within the "Sen" node, there are multiple sets of data such as "Ty", "Ser", and "ECG". The "ECG" data is presented in pairs of "V" and "T". The number of "v" and "t" pairs can vary. How can I achieve this using thingset data format? |
Unfortunately, such a data structure is not possible at the moment, if both records need to be able to fit a variable amount of data. |
Hello @martinjaeger, Thank you for reaching out to me. I see that such a data structure is not possible, which is perfectly understandable. I was wondering, is it possible to add new records dynamically during runtime based on certain events or data you receive? Currently, while streaming, the record's data is not being streamed. Instead, the number of records is being streamed. Is there any way to stream the data itself? Also, I was wondering if we could add new nodes inside any group at runtime. Thank you for taking the time to read this, and I look forward to hearing back from you. Take care, |
Hey,
I am adding a new subset with the prefix 'e'. I want the data to be published whenever the value is updated. However, I am continuously receiving published data but the value has not changed.
I have added the following lines to my application, but they are not functioning as expected.
THINGSET_ADD_GROUP(TS_ID_ROOT, 0x02, "Sample", THINGSET_NO_CALLBACK);
THINGSET_ADD_ITEM_UINT32(0x02, 0x40, "rCounter", &counter, THINGSET_ANY_R, 0);
THINGSET_ADD_ITEM_UINT32(0x02, 0x41, "wCounter", &counter, THINGSET_ANY_RW, 0);
I am trying to display the data using the shell command, but the rCounter and wCounter nodes are not being displayed.
uart:~$ thingset ?
85 {"Sample":null,"pNodeID":"E9C101C32B6A8827","pNodeName":"Thermo","_Reporting":null}
Please let me know if there is anything I am doing wrong.
Thanks in Advance,
The text was updated successfully, but these errors were encountered: