Using rtl_433 with InfluxDB

1,246 views
Skip to first unread message

Simon Eigeldinger

unread,
Nov 22, 2019, 3:53:30 PM11/22/19
to rtl...@googlegroups.com
Hi all,

Anyone played with InfluxDB?
I have seen that rtl_433 can send data to it.
Can i look then into the data using Chronograf and InfluxDB or do i need
the complete TICK (Telegraf, InfluxDB, Chronograf and Kapacitor) stack?


Greetings,
Simon

Christian Zuckschwerdt

unread,
Nov 22, 2019, 4:12:35 PM11/22/19
to rtl_433
Hi Simon,

I'm running only an InfluxDB to store the data and then Grafana to run the graphing. Chronograf would be similar. You don't need Telegraf for data collection or Kapacitor for processing.
You can even query the data using old-school text queries on the influx CLI:

$ influx
Connected to http://localhost:8086 version unknown
InfluxDB shell version: unknown
> use rtl433
Using database rtl433
> SHOW MEASUREMENTS
name: measurements
name
----
...
Bresser-3CH
LaCrosse-TX
...
> select * from "Bresser-3CH"
...

Simon Eigeldinger

unread,
Nov 22, 2019, 4:22:34 PM11/22/19
to rtl...@googlegroups.com
Hi Christian,

Thanks for the info.
Will play with that.
I am looking for a gui to look at the tables.
As a blind person you can't see pictures anyway. *smile*

Greetings,
Simon

Christian Zuckschwerdt

unread,
Nov 22, 2019, 5:20:34 PM11/22/19
to rtl_433
rtl_433 can connect to the raw stand-alone InfluxDB and then you can use any frontend that works for you.

Grafana has a dozend or so output plugins, among that are Table (Spreadsheet-like) and Singlestat (current value, average, ...).
It's quite powerful, not sure if the Web-UI is easy to navigate though.

As last resort fallback (and to quickly check data is coming in) you can script queries to the influx-cli.
Perhaps there is even a more advanced CLI (something Python?) available? I'd like to have current values scrolling in a easy to track terminal too :)

Simon Eigeldinger

unread,
Nov 22, 2019, 6:33:24 PM11/22/19
to rtl...@googlegroups.com
Hi,

Currently playing with InfluxDB and Chronograf.
Connecting and creating a db was pretty easy and a pice of cake.
Though they seem to have forgotten to label a bunch of links in the
navigation menu.

Currently I seem just to have some issues connecting rtl_433 to the db.
Is there something wrong with the command?

$ rtl_433 -M newmodel -F "influx://localhost:8086/write?db=rtl433"

I am using InfluxDB V1.

Later I need to figure out how the dashboards and queries work. *smile*

Greetings and thanks for helping,
Simon

Christian Zuckschwerdt

unread,
Nov 23, 2019, 3:20:44 AM11/23/19
to rtl_433
Yes, that should work. I'm using:

rtl_433 -v -C si -M newmodel -M level -F kv -F "influx://127.0.0.1:8086/write?db=rtl433"

Is the InfluxDB set up? Did you create the database? E.g. in the influx CLI run

SHOW DATABASES

if the rtl433 database isn't there then run

CREATE DATABASE rtl433

Nothing else comes to mind, should "just work".


Simon Eigeldinger

unread,
Nov 23, 2019, 12:54:24 PM11/23/19
to rtl...@googlegroups.com
Hi Christian,

Thanks.
Figured out what was not working.
You can't say localhost in the db connection parameters for rtl_433.
You need to specify the ip address like 127.0.0.1.

Greetings,
Simon

Christian Zuckschwerdt

unread,
Nov 23, 2019, 2:19:12 PM11/23/19
to rtl_433
Could that be because "localhost" for you resolves also to IPv6 (i.e. "::1")?
That's my setup at least and I need to be careful if I need IPv4 specifically.

Simon Eigeldinger

unread,
Nov 23, 2019, 2:46:41 PM11/23/19
to rtl...@googlegroups.com
That might be.
I am under Windows but i also seem to have the IPv6 stack installed and
also getting oth addresses.

David Woodhouse

unread,
Nov 23, 2019, 2:55:33 PM11/23/19
to rtl...@googlegroups.com, Simon Eigeldinger
Sounds like a bug in whatever you're connecting to, which is only listening on Legacy IP and not IPv6. Was it written before 1995, when IPv6 was standardised? Is there a version available that was released in the 21st century?
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Greg Troxel

unread,
Nov 23, 2019, 3:04:34 PM11/23/19
to David Woodhouse, rtl...@googlegroups.com, Simon Eigeldinger
David Woodhouse <dw...@infradead.org> writes:

> Sounds like a bug in whatever you're connecting to, which is only
> listening on Legacy IP and not IPv6. Was it written before 1995, when
> IPv6 was standardised? Is there a version available that was released
> in the 21st century?

1995 is not fair. I'm pretty sure you weren't running computers in 1995
that had full support for IPv6 and had every single one of them on the
6bone :-) I didn't even have that set up until perhaps 1997, but my
memory is fuzzy.

But you have a point that in 2019 software should support IPv6 as a
normal case.

It also seems that normal practice, when resolving a name and getting
both IPv6 and IPv4 addresses, is to try to connect to the IPv6 ones
first, and the continue on to IPv4.

If the daemon is listening on 127.0.0.1 only, then connections to ::1
should be cleanly and quickly refused and rtl_433 should move on to the
other addresses.

It would be helpful to understand what's going on in this case, in terms
of whether localhost includes the IPv6 address ::1, if the daemon is
listening there, what happens when the attempt is made, what happens
next, etc.


Jörg Hedtmann (GMX)

unread,
Nov 23, 2019, 3:06:36 PM11/23/19
to rtl...@googlegroups.com


On 23.11.19 20:55, David Woodhouse wrote:
Sounds like a bug in whatever you're connecting to, which is only listening on Legacy IP and not IPv6. Was it written before 1995, when IPv6 was standardised? Is there a version available that was released in the 21st century?
Is it that late already?

On 23 November 2019 19:46:38 GMT, Simon Eigeldinger <simon.ei...@vol.at> wrote:
That might be.
I am under Windows but i also seem to have the IPv6 stack installed and
also getting oth addresses.



Am 23.11.2019 um 20:19 schrieb Christian Zuckschwerdt:
Could that be because "localhost" for you resolves also to IPv6 (i.e. "::1")? That's my setup at least and I need to be careful if I need IPv4 specifically.

--
Sent from my Android device with K-9 Mail. Please excuse my brevity. --
You received this message because you are subscribed to the Google Groups "rtl_433" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtl_433+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rtl_433/465AD571-C111-4F3E-A2A4-EA79A0ACF052%40infradead.org.

David Woodhouse

unread,
Nov 23, 2019, 3:08:52 PM11/23/19
to Greg Troxel, rtl...@googlegroups.com, Simon Eigeldinger
Yeah, that's fair. I don't think I was running everything with IPv6 until 1998. But still, it was last century.

And yes, the successor of RFC3484 probably means that rtl_433 should iterate through the results that getaddrinfo() returns until we get a successful connection, instead of just trying the first and giving up.

Christian Zuckschwerdt

unread,
Nov 23, 2019, 4:45:27 PM11/23/19
to rtl_433
Could be some special handling in Mongoose (perhaps due to it being compact embeddable).
mg_connect() uses mg_parse_address() and there is an exception that "localhost" needs to be resolved from the hosts file.

Andrew King

unread,
Nov 28, 2019, 5:51:32 AM11/28/19
to rtl_433
Hi Simon,

Maybe overkill, but I do

rtl_433 -> MQTT -> CodeRED -> InfluxDB -> Grafana

and it runs OK on a Raspberry PI 3!

This lets me use CodeRED to easily pre-process data before it is squirted into Influx, without writing any code. This lets me monitor multiple sensors (each into it's own database) and produce really nice historical graphs. Incidentally, you can still write functions in Python or JavaScript with CodeRED if necessary (and I have so for another part of my project).

InfluxDB has some super advanced stuff you can do with data retention and thinning out the data as it ages (so you can keep a historical record for much longer before running out of space).

The only annoying downside with Grafana is that it doesn't yet supported European date formats on the axis labels. 

Andrew King

unread,
Nov 28, 2019, 6:15:06 AM11/28/19
to rtl_433
Ah, just noticed you mentioned that you are blind. CodeRED may not work for you depending on your degree of loss and screen-reading software. It's a drag and drop web-based GUI interface for processing data-streams, but it plays nicely with lots of inputs and outputs, and there is a bit of a community, so there are pre-existing modules that interface with many things - both hardware and web services.

Perfect if you don't like re-inventing the wheel or having to unnecessarily write and debug code for simple tasks.

Sumpter Smartt

unread,
Dec 15, 2019, 1:28:26 PM12/15/19
to rtl_433
Hi Simon,
I've used InfluxDB for a number of years at my job. Recently I attempted to make it work and had to put MQTT in the middle. I'm using telegraf with the MQTT connector listening to the Mosquitto container I have running. I may attempt to get it working directly by borrowing your command. I'm glad to see I'm not the only person in the world trying to glue rtl_433 and influx together. I think it has some seriously interesting potential.

Sumpter Smartt

Benjamin Larsson

unread,
Dec 15, 2019, 1:33:37 PM12/15/19
to rtl...@googlegroups.com
On 2019-12-15 19:28, Sumpter Smartt wrote:
> Hi Simon,
> I've used InfluxDB for a number of years at my job. Recently I attempted
> to make it work and had to put MQTT in the middle. I'm using telegraf
> with the MQTT connector listening to the Mosquitto container I have
> running. I may attempt to get it working directly by borrowing your
> command. I'm glad to see I'm not the only person in the world trying to
> glue rtl_433 and influx together. I think it has some seriously
> interesting potential.
>
> Sumpter Smartt

I hope you know there is a builtin rtl_433 output plugin for InfluxDb.

MvH
Benjamin Larsson

Sumpter Smartt

unread,
Dec 15, 2019, 8:48:46 PM12/15/19
to rtl_433
I somehow overlooked this development and ws running an old build. This is very exciting.

Thanks
Reply all
Reply to author
Forward
0 new messages