2023-09-01 23:37:40 +02:00
|
|
|
from pycsdr.modules import ExecModule
|
|
|
|
|
from pycsdr.types import Format
|
2024-01-30 02:12:23 +01:00
|
|
|
from csdr.module import JsonParser
|
|
|
|
|
from owrx.reporting import ReportingEngine
|
2023-09-01 23:37:40 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class Rtl433Module(ExecModule):
|
|
|
|
|
def __init__(self):
|
|
|
|
|
super().__init__(
|
|
|
|
|
Format.COMPLEX_FLOAT,
|
|
|
|
|
Format.CHAR,
|
2024-01-28 23:04:26 +01:00
|
|
|
["rtl_433", "-r", "cf32:-", "-F", "json", "-M", "time:unix", "-C", "si", "-s", "1200000"]
|
2023-09-01 23:37:40 +02:00
|
|
|
)
|
2024-01-30 02:12:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class IsmParser(JsonParser):
|
|
|
|
|
def __init__(self):
|
|
|
|
|
super().__init__("ISM")
|
|
|
|
|
|
|
|
|
|
def process(self, line):
|
|
|
|
|
data = super().process(line)
|
|
|
|
|
ReportingEngine.getSharedInstance().spot(data)
|
|
|
|
|
return data
|