#!/usr/bin/env python3 from RFXtrx import PySerialTransport import sys, datetime, os if __name__ == "__main__": transport = PySerialTransport('/dev/ttyUSB0') transport.reset() while True: if os.path.isfile('./stop'): break timestamp = datetime.datetime.timestamp(datetime.datetime.now()) recv = transport.receive_blocking() print(str(recv))