Open Kouwe-sudo opened 3 years ago
try to run:
pip install `./gateway.py -r configured`
Unfortunately that didn't work for me with this error:
pi@raspberrypi:~/bt-mqtt-gateway $ pip install `./gateway.py -r configured`
Traceback (most recent call last):
File "./gateway.py", line 11, in <module>
import logger
File "/home/pi/bt-mqtt-gateway/logger.py", line 3, in <module>
import yaml
ModuleNotFoundError: No module named 'yaml'
ERROR: You must give at least one requirement to install (see "pip help install")
By the way: I did upgrade pip after a warning to:
WARNING: You are using pip version 20.3.1; however, version 20.3.3 is available.
You should consider upgrading via the '/home/pi/bt-mqtt-gateway/.venv/bin/python -m pip install --upgrade pip' command.
Did you run sudo pip3 install -r requirements.txt
before ?
Yes I did. No errors when a ran that during set-up.
Try "sudo pip install ./gateway.py -r configured
"
That didn't help either with the next Error:
$ sudo pip install ./gateway.py -r configured
Invalid requirement: './gateway.py'
It looks like a path. File './gateway.py' does not exist.
I think I solved it. Bluepy was in the wrong folder namely Python2.7. I renamed that Folder and reinstalled Bluepy by using: sudo pip3 install bluepy.
Now I get results from MQTT
The only now is that I get an error when running:
sudo systemctl status bt-mqtt-gateway
With an ERROR like this:
● bt-mqtt-gateway.service - Bluetooth MQTT gateway
Loaded: loaded (/etc/systemd/system/bt-mqtt-gateway.service; enabled; vendor
Active: failed (Result: exit-code) since Mon 2020-12-21 14:56:54 CET; 2min 6s
Docs: https://github.com/zewelor/bt-mqtt-gateway
Process: 539 ExecStart=/home/pi/bt-mqtt-gateway/service.sh (code=exited, statu
Main PID: 539 (code=exited, status=1/FAILURE)
dec 21 14:56:54 raspberrypi systemd[1]: bt-mqtt-gateway.service: Service Restart
dec 21 14:56:54 raspberrypi systemd[1]: bt-mqtt-gateway.service: Scheduled resta
dec 21 14:56:54 raspberrypi systemd[1]: Stopped Bluetooth MQTT gateway.
dec 21 14:56:54 raspberrypi systemd[1]: bt-mqtt-gateway.service: Start request r
dec 21 14:56:54 raspberrypi systemd[1]: bt-mqtt-gateway.service: Failed with res
dec 21 14:56:54 raspberrypi systemd[1]: Failed to start Bluetooth MQTT gateway.
Perhaps you have a clue, but I'm convinced I will solve that problem as well. For now it runs, but I have to restart it after a reboot myself. I can live with that for the moment.
I know this is a kind of hacky way (because you leave dependencies in a two places)
But it worked for me adding this line to service.sh:
python3 -m pip install -r requirements.txt
then start the service, check if it works and remove the line afterwards
[] I've read the Troubleshooting Wiki, my problem is not described there and I am already using the specified minimum bluez version.
Describe the bug I don't know what causes the bug but I keep getting an error and the solution described with the existing ERRNO 2 doesn't work for me because those condition is already met..
To Reproduce Steps to reproduce the behavior:
Expected behavior I expected to run the program and get messages from my 2 Xiaomi MyFlora
Config Used config
Debug gateway logs
Server (please complete the following information):
Additional context Add any other context about the problem here.