Skip to content

Commit e7be0d9

Browse files
committed
examples: Improve README by describing scripts
Expand description of the directory, making it clearer that some programs have production use. Declare that python scripts are python3. It's clear that nobody is trying to use them with python 2.7, and if they did, we would tell them not to. List the scripts with a one-line description, sorting them into production (none yet), generally usable, and true examples. Leave some uncategorized.
1 parent 321f231 commit e7be0d9

File tree

1 file changed

+59
-6
lines changed

1 file changed

+59
-6
lines changed

examples/README.md

Lines changed: 59 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
This directory contains a number of scripts to process the output of
44
rtl_433 in various ways. Some are truly examples; they worked for
55
someone else and won't work for you but will help understanding. Some
6-
are (or will be once enhanced) actually useful to a fairly broad set
7-
of people.
6+
are actually useful to a fairly broad set of people and are used in
7+
production. Some of course are somewhere in the middle.
88

99
It is likely that a use outside what has been contemplated will
1010
require writing new code, with some kind of filtering and
1111
transformation.
1212

13-
Generally, python scripts should work with Python 2 or relatively
14-
recent Python 3. (It is TBD to deprecate Python 2; it is not clear
15-
that anyone still cares.)
13+
Generally, python scripts should work with relatively recent Python 3.
14+
(While they might work with 2.7, no one is paying attention to that.)
1615

1716
These scripts typically send data to some other system, store it in a
1817
database, or process it in some way. Recall that rtl_433's philosophy
1918
is to just output received transmissions, with minimal processing and
20-
with no checking/correlation of adjacent repeated frames.
19+
with no checking/correlation of adjacent repeated frames. These
20+
scripts bridge the gap between raw output and useful information.
2121

2222
This directory has a strong bias to the use of JSON; the point of that
2323
encoding is that it is machine parseble and that's what we want to do.
@@ -54,6 +54,59 @@ With this, one can run `tcpdump -A -i lo0 udp and port 1433`
5454
(substitute your loopback interface) to watch the traffic. One can
5555
also run multiple rtl_433 processes.
5656

57+
# Orientation
58+
59+
We attempt to categorize and describe the scripts in this directory.
60+
61+
Home Assistant is abbreviated HA.
62+
63+
## Production Scripts
64+
65+
A production script could be installed as a program, if it also had a
66+
man page. Many people should be able to use it without having to edit
67+
the source code.
68+
69+
## Generally Usable Scripts
70+
71+
A generally usable script will likely need minor tweaking.
72+
73+
- rtl_433_mqtt_relay.py: Send data via MQTT (e.g. to HA).
74+
- rtl_433_mqtt_hass.py: Send HA autoconfiguration data, so that entities for the decoded sensors will automatically appear.
75+
76+
## True Examples
77+
78+
These are not likely to to be useful, except that reading them will
79+
lead to better understanding, and bits of code may be useful..
80+
81+
- mqtt_rtl_433_test_client.py: Connect to broker and print data from rtl topics
82+
- rtl_433_custom.php: Receive json syslog packets in php
83+
- rtl_433_custom.py: Receive json syslog packets in python
84+
- rtl_433_gps.py: Receive json data and also gpsd data
85+
- rtl_433_http_cmd.py: Custom hop controller example for rtl_433's HTTP cmd API
86+
- rtl_433_http_cmd.sh: Custom hop controller example for rtl_433's HTTP cmd API
87+
- rtl_433_http_events.py: Custom data handling example for rtl_433's HTTP (chunked) streaming API of JSON events
88+
- rtl_433_http_stream.php: Short example of an TCP client written in PHP for rtl_433
89+
- rtl_433_http_stream.py: Custom data handling example for rtl_433's HTTP (line) streaming API of JSON events
90+
- rtl_433_http_ws.py: Custom data handling example for rtl_433's HTTP WebSocket API of JSON events
91+
92+
## Not Understood
93+
94+
- sigrok-conv.sh: print a hint
95+
- sigrok-open.sh: print a hint
96+
97+
## Uncategorized
98+
99+
These scripts are in the directory but have not been sorted and described.
100+
101+
- rtl_433_graphite_relay.py: Send data to graphite
102+
- rtl_433_influxdb_relay.py: Send data to influxdb
103+
- rtl_433_prometheus_relay.py: Send data to prometheus
104+
- rtl_433_rrd_relay.py: Send data to rrd
105+
- rtl_433_statsd_relay.py: Send data to statsd
106+
- rtl_433_collectd_pipe.py: Send data to collected
107+
- rtl_433_statsd_pipe.py: Send data to statsd
108+
- rtl_433_json_to_rtlwmbus.py: convert rtl_433 wmbus json output to rtlwmbus output
109+
57110
# Strategies for Processing, Transmitting and Storing
58111

59112
(This does not belong here, but is useful to those contemplating the

0 commit comments

Comments
 (0)