hey, I couldn't get this working on my octoprint at all until I figured out how to print out the exception it was throwing.
pycryptodome is basically a drop in replacement for pycrypto, so no other changes necessary.
in setup.py line 38:
'pycrypto==2.6.1'
change this to
'pycryptodome==3.17'
Also, on line 316 of octoprint_tuyasmartplug/init.py change this:
except:
self._tuyasmartplug_logger.debug(
"Something went wrong while running the command"
)
to this:
except Exception as e:
self._tuyasmartplug_logger.debug(
"Something went wrong while running the command " + str(e)
)
this way it spits out something useful into the debug log instead of a generic message. in my case it was:
PY_SSIZE_T_CLEAN macro must be defined for '#' formats
hey, I couldn't get this working on my octoprint at all until I figured out how to print out the exception it was throwing.
pycryptodome is basically a drop in replacement for pycrypto, so no other changes necessary.
in setup.py line 38:
'pycrypto==2.6.1'
change this to'pycryptodome==3.17'
Also, on line 316 of octoprint_tuyasmartplug/init.py change this:
to this:
this way it spits out something useful into the debug log instead of a generic message. in my case it was:
PY_SSIZE_T_CLEAN macro must be defined for '#' formats