home/__main__.py
def rfxcom(device):
    """Start the event loop to collect data from the serial device."""

    # If the device isn't passed in, look for it in the config.
    if device is None:
        device = app.config.get('DEVICE')

    # If the device is *still* none, error.
    if device is None:
        print("The serial device needs to be passed in as --device or "
              "set in the config as DEVICE.")
        return

    rfxcom_collect(device)
def rfxcom(device):
    """Start the event loop to collect data from the serial device."""

    # If the device isn't passed in, look for it in the config.
    if device is None:
        device = app.config.get('DEVICE')

    # If the device is *still* none, error.
    if device is None:
        print("The serial device needs to be passed in as --device or "
              "set in the config as DEVICE.")
        return

    rfxcom_collect(device)
Start the event loop to collect data from the serial device.