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 Maintainability Test Coverage https://img.shields.io/requires/github/aequitas/python-rflink.svg https://img.shields.io/badge/Cyberveiligheid-97%25-yellow.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 mainly 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.

The package also provides a CLI utility which allows a single RFLink hardware to be shared by multiple clients, e.g. Home assistant + Domoticz or multiple Home assistant instances.

Changes

  • 01-11-2018 - rflinkproxy CLI command added, thanks to a contribution by emontnemery.

Installation

$ pip install rflink

Usage of RFLinkProxy CLI

$ rflinkproxy -h
Command line interface for rflink proxy.

Usage:
  rflinkproxy [-v | -vv] [options]
  rflinkproxy (-h | --help)
  rflinkproxy --version

Options:
  --listenport=<port>  Port to listen on
  --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].
  -h --help            Show this screen.
  -v                   Increase verbosity
  --version            Show version.

Share RFLink connected to serial port /dev/ttyACM1, the proxy will listen on port 2345:

$ rflink --port /dev/ttyACM0 --listenport 2345

Share TCP mode RFLink instead of serial port (eg: ESP8266 serial bridge), the proxy will listen on port 2345:

$ rflink --host 1.2.3.4 --port 1234 --listenport 2345

Debug logging is shown in verbose mode for debugging:

$ rflink -vv --host 1.2.3.4 --port 1234 --listenport 2345
DEBUG:asyncio:Using selector: EpollSelector
INFO:rflinkproxy.__main__:Serving on ('0.0.0.0', 2345)
INFO:rflinkproxy.__main__:Initiating Rflink connection
DEBUG:rflink.protocol:connected
INFO:rflinkproxy.__main__:Connected to Rflink
INFO:rflinkproxy.__main__:Incoming connection from: ::1:63293
DEBUG:rflinkproxy.__main__:got packet: 20;00;Xiron;ID=4001;TEMP=00f1;HUM=38;BAT=LOW;
DEBUG:rflinkproxy.__main__:decoded packet: {'node': 'gateway', 'protocol': 'xiron', 'id': '4001', 'temperature': 24.1, 'temperature_unit': '°C', 'humidity': 38, 'humidity_unit': '%', 'battery': 'low'}
INFO:rflinkproxy.__main__:forwarding packet 20;00;Xiron;ID=4001;TEMP=00f1;HUM=38;BAT=LOW; to clients
DEBUG:rflinkproxy.__main__:got packet: 20;00;NewKaku;ID=013373f6;SWITCH=10;CMD=ON;
DEBUG:rflinkproxy.__main__:decoded packet: {'node': 'gateway', 'protocol': 'newkaku', 'id': '013373f6', 'switch': '10', 'command': 'on'}
INFO:rflinkproxy.__main__:forwarding packet 20;00;NewKaku;ID=013373f6;SWITCH=10;CMD=ON; to clients
DEBUG:rflinkproxy.__main__:got packet: 20;00;Auriol V2;ID=D101;TEMP=006f;BAT=OK;
DEBUG:rflinkproxy.__main__:decoded packet: {'node': 'gateway', 'protocol': 'auriol v2', 'id': 'd101', 'temperature': 11.1, 'temperature_unit': '°C', 'battery': 'ok'}
INFO:rflinkproxy.__main__:forwarding packet 20;00;Auriol V2;ID=D101;TEMP=006f;BAT=OK; to clients

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.53
Filename, size File type Python version Upload date Hashes
Filename, size rflink-0.0.53-py3-none-any.whl (18.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size rflink-0.0.53.tar.gz (18.5 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