rtl_433 | decode radio transmissions from devices on the ISM bands | Navigation library
kandi X-RAY | rtl_433 Summary
kandi X-RAY | rtl_433 Summary
rtl_433 (despite the name) is a generic data receiver, mainly for the 433.92 MHz, 868 MHz (SRD), 315 MHz, 345 MHz, and 915 MHz ISM bands. The official source code is in the repository. For more documentation and related projects see the site. It works with RTL-SDR and/or SoapySDR. Actively tested and supported are Realtek RTL2832 based DVB dongles (using RTL-SDR) and LimeSDR (LimeSDR USB and LimeSDR mini engineering samples kindly provided by MyriadRf), PlutoSDR, HackRF One (using SoapySDR drivers), as well as SoapyRemote.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of rtl_433
rtl_433 Key Features
rtl_433 Examples and Code Snippets
Community Discussions
Trending Discussions on rtl_433
QUESTION
I have a program, rtl_433
, that outputs lines of JSON - maybe once or twice a minute, while it's running. I need to pipe that data as HTTP POST
data to curl.
What complicates matters is that this string needs to be encapsulated in single quotes, which they're not, so I need to add that before shipping it to curl
.
Now, here's the thing: This works just fine:
...ANSWER
Answered 2022-Feb-16 at 08:42The problem here is that rtl_433
never exits, it just keeps printing lines for every message it receives.
This is a problem because curl
is going to wait until it receives an EOF (end of file) marker to know when it has received all payload it needs to send to in the HTTP request, but of course it never gets this. The EOF would be automatically added when rtl_433
exited.
Your best bet is probable to move from a one line script to a proper bash command reads from rtl_433
a line at a time and then runs sed
on that line before passing it to curl.
e.g.
QUESTION
I'm receiving the weather data from my weather station with a dongle on my raspberry pi, that has internet connection via wifi. Now I want to send this data to a rails api/app to save it there in a database. The rails app runs on another server, so I want to post the data via http.
How can I do this. I can't add the curl dependency to the rtl_433 project (https://github.com/merbanan/rtl_433) to send the data directly to my backend. Am I able to run the rtl_433 for example with a python script like:
rlt_433 -F json
and take that output to send it to my backend or how can I realize that?
ANSWER
Answered 2021-Jan-30 at 16:13You should be able to execute rtl_433
as a subprocess using the subprocess module. Normally you would just use subprocess.run
, but since rtl_433
produces output until it is killed, you will need to use subprocess.Popen
and parse the output.
Another option is to pipe the output of rtl_433
to your program and using input()
or sys.stdin.readline()
to read lines. Like rtl_433 -flags | python3 script.py
.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install rtl_433
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page