piping rtl_433 output into a sqlite db?

1,014 views
Skip to first unread message

Simon Eigeldinger

unread,
Mar 8, 2016, 2:25:49 PM3/8/16
to rtl...@googlegroups.com
Hi all,

Can i pipe rtl_433 output into a sqlite db?
then i could do a small php interface to show current data.

greetings,
simon

---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus

Jim Midkiff

unread,
Apr 3, 2016, 2:59:52 PM4/3/16
to rtl_433
Attached is a Python script I wrote for doing this for my Acurite 5n1.  It executes "rtl_433" as a subprocess, grabs and parses the output as it occurs, then writes the results to the console & a sqlite DB.

 

 
rtl_433_wrapper.py

Daryl Williams

unread,
Aug 1, 2016, 9:36:06 AM8/1/16
to rtl_433
Noticed the python script Jim Midkiff wrote.

Very interesting code. Great comments and easy to read.

I will have to get back to you and let you know how I used it and possible changes for my device.


Jim Midkiff

unread,
Aug 28, 2016, 1:39:51 PM8/28/16
to rtl_433
A little late to reply - thx for the kind words :).  I've had a slightly modified version of that script running continuously for many month now & it's been rock-solid for me.  I'd be interested in hearing about  anyone's experience with the script - stability, changes made, etc. 

One challenge I've ran into is the output format variations across the different devices, support for JSON in my case.  I've got several 433 mhz devices around my house & would like to leverage rtl_433 to capture the output of several home automation sensors I'm working on as well.   Having consistent support for the "common" formats (CSV, TSV, JSON, etc) could make the task of capturing data for an arbitrary number of devices pretty straightforward and would enable a scenario where someone can have a single instance of rtl_433 act as a hub for data collection.

Anyone else faced with a similar situation?  If so, how have you dealt with it?  Anyone interested in collaborating on some code refactoring to make output formatting more modular & easier to add for new devices?

 

Benjamin Larsson

unread,
Aug 28, 2016, 2:41:53 PM8/28/16
to rtl...@googlegroups.com
If you supply samples for every format you have that is not using the
make_data() api that will help for converting all the device modules.

Info is on the main project page.

MvH
Benjamin Larsson

Jim Midkiff

unread,
Aug 28, 2016, 5:12:25 PM8/28/16
to rtl_433
Will do ... thanks for the suggestion, I'll take a look.  Had been meaning to get more familar with the source & this will provide a perfect opportunity.

Dag B

unread,
Sep 10, 2016, 4:03:45 PM9/10/16
to rtl_433


On Sunday, 3 April 2016 20:59:52 UTC+2, Jim Midkiff wrote:
Attached is a Python script I wrote for doing this for my Acurite 5n1.  It executes "rtl_433" as a subprocess, grabs and parses the output as it occurs, then writes the results to the console & a sqlite DB.

 

 

Hi.

Just wanted to thank you for posting this. I butchered it a bit and now I am logging my Efergy Optical and a WT450 to sqlite. 
Yay!




Jan Büttner

unread,
Oct 14, 2018, 3:31:06 PM10/14/18
to rtl_433
Hi,

i tried the script - the table was created in the sqlite database but the data is not in there.

The json output is coming in the shell.

Any ideas?

Jan
Reply all
Reply to author
Forward
0 new messages