Tuya smartplug in Domoticz - ImportError: No module named pyaes

Hi I’m trying to get the Tuya smartplug to work in Domoticz, I followed all the steps to set it up properly, but when I execute the following Python script I get this error message:

pi@raspberrypi:~/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin $ sudo python turnON.py
Traceback (most recent call last):
File “turnON.py”, line 31, in <module>
import pytuya
File “/home/pi/domoticz/plugins/Domoticz-Tuya-SmartPlug-Plugin/pytuya/__init__.py”, line 28, in <module>
import pyaes # https://github.com/ricmoo/pyaes
ImportError: No module named pyaes

Now I found a possible solution, but I don’t know how to implement this correctly “A better fix than setting PYTHONPATH is to use python -m module.path”

https://stackoverflow.com/questions/2325923/how-to-fix-importerror-no-module-named-error-in-python

Can someone please help?

Hi @ojoojoo,

This post was moved to a different board that fits your topic of discussion a bit better. This means you’ll get better engagement on your post, and it keeps our community organized so users can more easily find information.

As you’ll notice, your topic is now here in the Programming Help and Discussion board. No action is needed on your part; you can continue the conversation as normal here.