Created
August 23, 2019 21:18
-
-
Save matiaskorhonen/b339e56b8ee4d1761abd1e30f3a668d9 to your computer and use it in GitHub Desktop.
Parse streaming output from rtl_433
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "json" | |
IO.popen("./rtl_433 -F json") do |io| | |
while (line = io.gets) do | |
begin | |
puts JSON.parse(line).inspect | |
rescue JSON::ParserError | |
puts line | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment