diff --git a/rflink/__main__.py b/rflink/__main__.py index 3ebf7e3..30c3621 100644 --- a/rflink/__main__.py +++ b/rflink/__main__.py @@ -2,7 +2,7 @@ Usage: rflink [-v | -vv] [options] - rflink [-v | -vv] [options] [--repeat ] (on | off | allon | alloff) + rflink [-v | -vv] [options] [--repeat ] (on|off|allon|alloff|up|down|stop) rflink (-h | --help) rflink --version @@ -43,7 +43,7 @@ 'repeat': RepeaterProtocol, } -ALL_COMMANDS = ['on', 'off', 'allon', 'alloff'] +ALL_COMMANDS = ['on', 'off', 'allon', 'alloff', 'up', 'down', 'stop'] def main(argv=sys.argv[1:], loop=None): diff --git a/tests/test_parse.py b/tests/test_parse.py index 4879e72..1d875bf 100644 --- a/tests/test_parse.py +++ b/tests/test_parse.py @@ -72,6 +72,10 @@ 'hardware': 'Nodo RadioFrequencyLink', 'firmware': 'RFLink Gateway', }], + ['20;05;RTS;ID=147907;SWITCH=01;CMD=UP;', { + 'id': '147907', 'switch': '01', 'protocol': 'rts', + 'command': 'up', + }] ]) def test_packet_parsing(packet, expect): """Packet should be broken up into their primitives."""