Tool to extract JSON field+values from rtl_433.json into CSV format #2451
hdtodd
started this conversation in
Show and tell
Replies: 2 comments
-
You might find |
Beta Was this translation helpful? Give feedback.
0 replies
-
Christian,
Yes, thanks! I'm expecting to need something like jq, so I've
downloaded and tested it and will keep it for future use. Right now,
doing a lot of analysis for which a CSV format is better suited, but I
expect to need to do some JSON processing, too.
…On 3/24/23 11:31 AM, Christian W. Zuckschwerdt wrote:
You might find |jq| <https://stedolan.github.io/jq/> interesting.
—
Reply to this email directly, view it on GitHub
<#2451 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJWBXHB2PUVOEGXSGGKSMDW5W45JANCNFSM6AAAAAAWGWVSRE>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I found it helpful to extract specific fields and associated values from rtl_433 JSON log files into CSV format for subsequent processing. I tired of writing one-off Python scripts to extract various fields for different analyses, so I wrote a more generalized tool.
In case it's useful, it's posted in repository rtl_433_stats under py-version/tools as
xtract-json
. Instructions for its use can be obtained by appending the '-h' switch.For example, working from the
rtl_433_stats
directory, the command line:py-version/tools/xtract-json -i xaa.json -f battery_ok status -o x; sort x | uniq
produces the following report:
(The '0' before "Device" is intentional to allow for processing by sort)
I'm currently exploring battery and status changes over extended periods of time, so over a 2-month period, that report tells me what to look for as changes in the "battery_ok" and "status" fields for various devices.
Before writing this program, I did a similar extract to study the inter-transmission gap times and packet-per-transmission counts, so this generalized tool might be useful for other analyses of device characteristics over long terms.
Beta Was this translation helpful? Give feedback.
All reactions