Possible issue with sending AT commands with Python3 in _build_command().
The following code:
self._xbee.send('at', command='MY')
Running on python3 causes error:
File "../pyalertme/base.py", line 119, in read_addresses
self._xbee.send('at', command='MY')
File "/usr/local/lib/python3.5/site-packages/xbee/base.py", line 394, in send
self._write(self._build_command(cmd, **kwargs))
File "/usr/local/lib/python3.5/site-packages/xbee/base.py", line 212, in _build_command
packet += data
TypeError: can't concat bytes to str
Think caused by:
packet = b''
...
...
# Add the data to the packet, if it has been specified.
# Otherwise, the parameter was of variable length, and not given.
if data:
packet += data
A cheeky workaround is to do:
self._xbee.send('at', command=str.encode('MY'))
Possible issue with sending AT commands with Python3 in _build_command().
The following code:
self._xbee.send('at', command='MY')
Running on python3 causes error:
Think caused by:
A cheeky workaround is to do:
self._xbee.send('at', command=str.encode('MY'))