mainDataExplorer - Support: sr #111088, Support JSON format also for...

 
 

sr #111088: Support JSON format also for "data"

Submitter:  Oleksii <oleksii>
Submitted:  Tue 09 Jul 2024 09:06:22 AM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Need Info
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 09 Jul 2024 03:24:59 PM UTC, comment #1: 

I need more explanation for this sentence:
"..and then in device edit define JSON path parameters for each measured value, like "$.balance" etc."
Does it somehow going together with this tabulator of the DevicePropertiesEditor? Refer to attached picture.

I need more explanation for: "This way I may send more data than I actually need".
The device XML is defining 6 values, but you send 8 values. Only 6 of the values going into the record set.

How do the DataExplorer know which values are needed? "take only what I need" How does these values get defined.

So data need to be parsed for measurement name and sort according what? Who is the master and who the slave? What happened if names does not match?

My first thought is, the possible hight flexibility is also high risk exchanging values and positions.

Additionally this should be an array of tuples, within the JSON data segment.

In other discussion thread you told me something about of packet segmentation if data content is getting bigger. I changed the JSON struct according your proposal to short names. And now your proposal have for each measurement an additional name, even if this should be already defined in the device XML, and the value.

Please give a complete JSON line as example, not only a part of the data segment.



Winfried Brügmann <brueg>
Group administrator
Tue 09 Jul 2024 09:06:22 AM UTC, original submission:  

In this report https://savannah.nongnu.org/bugs/?65815 you have implemented basic support of JSON format. I call it JSON for metadata. Thank you for that!

But now is time to move forward and complete this thing, as this is actually a reason why I started to talk about JSON.
JSON for real data!

 while my main request was primary about the data array.
Instead of sending this:
"data":[1001,1002,1003,1004,1005,1006,1007,1008]
I'd like to send it as this:
{
    "VoltTotal": 23,
    "VoltC1": 4110,
    "VoltC2": 4120,
    "VoltC3": 4130,
    "VoltC4": 4140,
    "current": 5100,
    "capacity": 23500,
    "balance": 33
}
and then in device edit define JSON path parameters for each measured value, like "$.balance" etc.

This way I may send more data than I actually need for current device, take only what I need and this way I'm not fixed for order of values etc.

Oleksii <oleksii>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by brueg (Updated the item)
  • -email is unavailable- added by oleksii (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-10-14 brueg StatusNone Need Info
    2024-07-09 brueg Attached File- Added Screenshot@2024-07-09@at@17.01.10.png, #56239

    Back to the top

    Powered by Savane 3.15-e6e5.
    Corresponding source code