n8henrie / fauxmo-plugins

Plugins for Fauxmo (emulated Wemo devices for the Amazon Echo)

Home Page:https://github.com/n8henrie/fauxmo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mqqt library missing

dedelajoie opened this issue · comments

hello again :(

I am trying to set up the mqtt plug in but it doesn't work.
the other plugin is working fine
my config file has been tested OK
when I run the service (or whatever you call it), I got this error :

(.venv) pi@raspberrypi:~ $ fauxmo -c config3.json -vv
2019-08-30 23:51:16 fauxmo:41 INFO Fauxmo v0.4.9
Traceback (most recent call last):
File "/home/pi/.venv/lib/python3.7/site-packages/fauxmo/fauxmo.py", line 94, in main
module = importlib.import_module(modname)
File "/usr/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'fauxmo.plugins.mqttplugin'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/pi/.venv/bin/fauxmo", line 10, in
sys.exit(cli())
File "/home/pi/.venv/lib/python3.7/site-packages/fauxmo/cli.py", line 37, in cli
main(config_path_str=args.config, verbosity=verbosity)
File "/home/pi/.venv/lib/python3.7/site-packages/fauxmo/fauxmo.py", line 98, in main
module = module_from_file(modname, path_str)
File "/home/pi/.venv/lib/python3.7/site-packages/fauxmo/utils.py", line 76, in module_from_file
spec.loader.exec_module(module) # type: ignore
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/home/pi/fauxmo-plugins/mqttplugin.py", line 73, in
from paho.mqtt.client import Client, MQTTMessage
ModuleNotFoundError: No module named 'paho'

I installed and tested OK mosquitto_client on the raspberry where fauxmo is running
I ran in some python code using paho.mqtt.client -> it's OK

what did I didn't check ?

thank you again

hello
checking my configuration I listed all the modules intalled.
I managed to get it work by installing "python-etcd" within the virtual environnement (don't know if this is important):

pip3 install paho-mqtt python-etcd

paho-mqtt was already installed and working fine.

it's now working : the mqtt message is sent and received OK.

Still there is an annoying message from Alexa saying that the device is not responding when I trigger the "ON" action (but it's OK with the "OFF" action) although both action are properly performed

thank you again for this great creation of yours !

Well I'm glad you got it working.

Again, I can't really help without seeing your config, so I'm closing for the time being.