diff --git a/alarmdecoder/decoder.py b/alarmdecoder/decoder.py index 66ad156..3365224 100644 --- a/alarmdecoder/decoder.py +++ b/alarmdecoder/decoder.py @@ -303,7 +303,7 @@ class AlarmDecoder(object): :returns: :py:class:`~alarmdecoder.messages.Message` """ - data = str(data) + data = data.decode('utf-8') if data is not None: data = data.lstrip('\0') @@ -314,8 +314,6 @@ class AlarmDecoder(object): msg = None header = data[0:4] - #print('header', header, type(header), type(header[0])) - if header[0] != '!' or header == '!KPM': msg = self._handle_keypad_message(data) diff --git a/requirements.txt b/requirements.txt index 8313187..9bbdf93 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ +future==0.14.3 pyserial==2.7 diff --git a/setup.py b/setup.py index b5e733c..8a436c9 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,8 @@ setup(name='alarmdecoder', license='MIT', packages=['alarmdecoder', 'alarmdecoder.event'], install_requires=[ - 'pyserial>=2.7', + 'future==0.14.3' + 'pyserial==2.7', ], test_suite='nose.collector', tests_require=['nose', 'mock'],