Skip to content
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

As of now you can insert dictionary key pair { "key": value } only in the readings #1551

Open
skumarorxa opened this issue Feb 10, 2025 · 2 comments
Assignees

Comments

@skumarorxa
Copy link

skumarorxa commented Feb 10, 2025

readings has the following attributes asset_code, timestamp, reading etc. I want to insert another attributes "events" which is filter using python35 the events is list of dictionary. In the format "events" : [ { "name": "CB", "value": 1 } , {"name": EF : "value": 0 }] but not able to insert this key asset in filter readings when using python35. The filter is working without error in south plugin but in the Http north plugin when posting this data to the DB I do not see this "event" in payload. As of payload can accept simple Key value pair only. How to implement this use case

@MarkRiddoch
Copy link
Contributor

Are you inserting the events below the readings, i.e. as a datapoint in the readings or alongside the readings? If it is the later, then no, you can not do this as the readings JSON format has to have a standard layout. Maybe you could post an example of the JSON structure you are creating so that it is clearer to us.

@skumarorxa
Copy link
Author

Thanks for reply I want to add data point below the readings in this format "readings": { "Asset": "TEST01", "timestamp": "2025-02-21 08:00:00", "reading": { "DP1":0, "DP2": 1: "DP3": 2 }, "events": : [ { "name": "CB", "value": 1 } , {"name": EF : "value": 0 }]

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

No branches or pull requests

3 participants