leaf-python-mqtt icon indicating copy to clipboard operation
leaf-python-mqtt copied to clipboard

Python 3.6

Open mph88 opened this issue 7 years ago • 1 comments

Thanks for the great work you did with this program. I wanted to make your version work under py3.6, so there were a couple of changes I noticed. I'm using the py3 fork of pycarwings2 by BenWoodford.

lower case on ConfigParser in line5: from configparser import SafeConfigParser

The mqtt message to run get_leaf_update or climate_control was not working due to the change in bytes/strings. In line 56, should be: logging.info(msg.topic+" "+msg.payload.decode('UTF-8'))

By the same token in line 59: control_message = msg.payload.decode('UTF-8')

I don't know if these break your version for py2 as I didn't test.

mph88 avatar Oct 02 '18 16:10 mph88

Hi @mph88,

I've made another fork of pycarwings2, supporting python3 and with a few other bug fixes, see https://github.com/filcole/pycarwings2. I've uploaded it to PyPi to make it easy to include.

filcole avatar Jan 05 '19 21:01 filcole