Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

paho-mqtt not found? #8

Open
MennoLabs opened this issue Jun 23, 2024 · 11 comments
Open

paho-mqtt not found? #8

MennoLabs opened this issue Jun 23, 2024 · 11 comments

Comments

@MennoLabs
Copy link

pi@domoticz:~ $ sudo service roomba status
● roomba.service - Roomba mqtt client
Loaded: loaded (/etc/systemd/system/roomba.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2024-06-23 22:39:37 CEST; 1min 45s ago
Main PID: 481 (python3)
Tasks: 2 (limit: 2176)
CGroup: /system.slice/roomba.service
└─481 /usr/bin/python3 /home/pi/domoticz/plugins/Roomba/roomba --configfile /home/pi/domoticz/plugins/Roomba/conf

Jun 23 22:41:22 domoticz python3[481]: Please install paho-mqtt 'pip install paho-mqtt' to use this library
Jun 23 22:41:22 domoticz python3[481]: Please install paho-mqtt 'pip install paho-mqtt' to use this library
Jun 23 22:41:22 domoticz python3[481]: Please install paho-mqtt 'pip install paho-mqtt' to use this library
Jun 23 22:41:22 domoticz python3[481]: Please install paho-mqtt 'pip install paho-mqtt' to use this library
Jun 23 22:41:22 domoticz python3[481]: Please install paho-mqtt 'pip install paho-mqtt' to use this library
Jun 23 22:41:22 domoticz python3[481]: Please install paho-mqtt 'pip install paho-mqtt' to use this library
Jun 23 22:41:22 domoticz python3[481]: Please install paho-mqtt 'pip install paho-mqtt' to use this library
Jun 23 22:41:22 domoticz python3[481]: Please install paho-mqtt 'pip install paho-mqtt' to use this library
Jun 23 22:41:22 domoticz python3[481]: Please install paho-mqtt 'pip install paho-mqtt' to use this library
Jun 23 22:41:22 domoticz python3[481]: Please install paho-mqtt 'pip install paho-mqtt' to use this library

pi@domoticz:~ $ sudo pip3 install paho-mqtt
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: paho-mqtt in /usr/local/lib/python3.7/dist-packages (2.1.0)

@FilipDem
Copy link
Owner

Perhaps a conflict sudo versus not sudo?
I assume also that all is using python3 (pip3 vs pip).

@MennoLabs
Copy link
Author

Nope:

pi@domoticz:~ $ service roomba start
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'roomba.service'.
Authenticating as: ,,, (pi)
Password:

In the mean time, these "Please install paho-mqtt 'pip install paho-mqtt' to use this library" lines filled my daemon.log to the point where the complete disk was full.

Maybe some symlink is in order to point the service to the proper location?

@MennoLabs
Copy link
Author

My paho-mqtt is in /usr/local/lib/python3.7/dist-packages/paho (Raspbian Buster), does that offer a clue?
Python version 3.7.3.

@FilipDem
Copy link
Owner

FilipDem commented Jul 9, 2024

Hi,
I am also using Python 3.7.3 running on Buster.
paho is also installed in the same folder as you mentioned.

Did you already tried using the command prompt? Open a python3 prompt and use "paho.mqtt.client".
I also assume you installed Domoticz "natively"... not using a Docker container, right?

F

@MennoLabs
Copy link
Author

MennoLabs commented Jul 9, 2024

pi@domoticz:~ $ python3
Python 3.7.3 (default, Mar 23 2024, 16:12:05)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

paho.mqtt.client
Traceback (most recent call last):
File "", line 1, in
NameError: name 'paho' is not defined

Native, no Dockers.

@FilipDem
Copy link
Owner

FilipDem commented Jul 9, 2024

This means that it is not installed correctly. Nothing to do with Domotica or the plugin

@MennoLabs
Copy link
Author

I never meant to blame either the plugin or Domoticz, but I do wonder why it's not working as intended when installing with sudo pip3 install paho-mqtt, as per instructions?

@FilipDem
Copy link
Owner

FilipDem commented Jul 9, 2024 via email

@MennoLabs
Copy link
Author

Just tried that (while you were typing your reply ;-)), no success.

@FilipDem
Copy link
Owner

FilipDem commented Jul 10, 2024 via email

@MennoLabs
Copy link
Author

Yes, tried that, but the lucky tip has not yet materialised from that search.
Will try some more tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants