Skip to main content

Library and CLI tools for interacting with RFlink 433MHz transceiver.

Project description

https://travis-ci.org/aequitas/python-rflink.svg?branch=master https://img.shields.io/pypi/v/rflink.svg https://img.shields.io/pypi/pyversions/rflink.svg https://img.shields.io/codeclimate/github/aequitas/python-rflink.svg https://img.shields.io/codeclimate/coverage/github/aequitas/python-rflink.svg https://img.shields.io/requires/github/aequitas/python-rflink.svg

Library and CLI tools for interacting with RFlink 433MHz transceiver.

http://www.nemcon.nl/blog2/

Requirements

  • Python 3.4 (or higher)

Description

This package is created as a library for the Home assistant Rflink component implementation. A CLI has been created mainly for debugging purposes but may be extended in the future for more real-world application if needed.

Installation

$ pip install rflink

Usage

$ rflink -h
Command line interface for rflink library.

Usage:
  rflink [-v | -vv] [options]
  rflink [-v | -vv] [options] [--repeat <repeat>] (on | off | allon | alloff) <id>
  rflink (-h | --help)
  rflink --version

Options:
  -p --port=<port>   Serial port to connect to [default: /dev/ttyACM0],
                       or TCP port in TCP mode.
  --baud=<baud>      Serial baud rate [default: 57600].
  --host=<host>      TCP mode, connect to host instead of serial port.
  --repeat=<repeat>  How often to repeat a command [default: 1].
  -m=<handling>      How to handle incoming packets [default: event].
  --ignore=<ignore>  List of device ids to ignore, end with * to match wildcard.
  -h --help          Show this screen.
  -v                 Increase verbosity
  --version          Show version.

Intercept and display Rflink packets:

$ rflink
rflink                           Nodo RadioFrequencyLink RFLink Gateway V1.1 R45
newkaku_00000001_4               off
newkaku_00000001_3               on
alectov1_0334_temp               7.4 °C
alectov1_0334_bat                low
alectov1_0334_hum                26 %

Turn a device on or off:

$ rflink on newkaku_0000_1
$ rflink off newkaku_0000_1

Use of TCP mode instead of serial port (eg: ESP8266 serial bridge):

$ rflink --host 1.2.3.4 --port 1234

Debug logging is shown in verbose mode for debugging:

$ rflink -vv
DEBUG:asyncio:Using selector: EpollSelector
DEBUG:rflink.protocol:connected
DEBUG:rflink.protocol:received data: 20;00;Nodo RadioFrequen
DEBUG:rflink.protocol:received data: cyLink - RFLink Gateway
DEBUG:rflink.protocol:received data: V1.1 - R45;
DEBUG:rflink.protocol:got packet: 20;00;Nodo RadioFrequencyLink - RFLink Gateway V1.1 - R45;
DEBUG:rflink.protocol:decoded packet: {'revision': '45', 'node': 'gateway', 'version': '1.1', 'protocol': 'unknown', 'firmware': 'RFLink Gateway', 'hardware': 'Nodo RadioFrequencyLink'}
DEBUG:rflink.protocol:got event: {'version': '1.1', 'revision': '45', 'firmware': 'RFLink Gateway', 'hardware': 'Nodo RadioFrequencyLink', 'id': 'rflink'}
rflink                           Nodo RadioFrequencyLink RFLink Gateway V1.1 R45
DEBUG:rflink.protocol:received data: 2
DEBUG:rflink.protocol:received data: 0;01;NewKaku;ID=00000001
DEBUG:rflink.protocol:received data: ;SWITCH=4;CMD=OFF;
DEBUG:rflink.protocol:got packet: 20;01;NewKaku;ID=00000001;SWITCH=4;CMD=OFF;
DEBUG:rflink.protocol:decoded packet: {'id': '00000001', 'protocol': 'newkaku', 'command': 'off', 'switch': '4', 'node': 'gateway'}
DEBUG:rflink.protocol:got event: {'id': 'newkaku_00000001_4', 'command': 'off'}
newkaku_00000001_4               off

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for rflink, version 0.0.37
Filename, size File type Python version Upload date Hashes
Filename, size rflink-0.0.37-py3-none-any.whl (13.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size rflink-0.0.37.tar.gz (11.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page