Open capt-rob opened 9 months ago
I had the same issue but found a link to an issue on github and a solution that worked for me. Here's the link: https://github.com/pybluez/pybluez/issues/431#issuecomment-1107884273
What i did was, after installing all the prereqs, ran these commands
sudo apt install -y git
pip install git+https://github.com/pybluez/pybluez.git#egg=pybluez
pip3 install tilt-pitch
That seemed to do the trick. Thanks a ton!
However, now on running Tilt Pitch I get the following: plex@PLEXSERVER:~$ python3 -m pitch
/ (_) /__/ / / // / / _/ / \ / __/ / /_/ // / / / // //_/\// //
Starting... ...started: Prometheus (http://127.0.0.1:8000/metrics) ...started: File (pitch_log.json) Exception in thread Thread-2: Traceback (most recent call last): ...started: Tilt scanner Ready! Listening for beacons File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/home/plex/.local/lib/python3.10/site-packages/beacontools/scanner.py", line 144, in run self.socket = self.backend.open_dev(self.bt_device_id) File "/home/plex/.local/lib/python3.10/site-packages/beacontools/backend/linux.py", line 11, in open_dev bluez.hci_filter_all_events(filtr) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 4: invalid start byte
That ones over my pay grade :). Problem is pybluez is not maintained anymore. I found a commit referencing the issue but it hasn't been incorporated into the master repo so i dont know how to fix this issue
https://github.com/pybluez/pybluez/pull/488/commits/44265df1d9b42c30a03e73d14c1bce4987c9e291
I actually stopped using tilt pitch and i'm using TiltBridge now. Much better and supports Tilt Pro Hydrometers.
Thanks for giving it a shot anyway. i know just enough about Linux to get myself in trouble and even less about coding in Python, LOL! Got an old Raspberry Pi kicking around and got TiltPi running on that. Was just hoping to run the data monitor on an already running machine, but heck, TiltPi is probably my best bet. Happy brewing!
If anyone has the same problem, there are two dependencies that need to be overridden. You need pybluez off the master branch as mentioned above and beacontools 2.0.2 because the latest version of beacontools seems to have a breaking change.
pip3 install git+https://github.com/pybluez/pybluez.git#egg=pybluez
pip3 install beacontools[scan]==2.0.2
I wonder if it would be worth raising a PR to pin these dependencies. It's not ideal to depend on a git repo but pybluez isn't maintained so there isn't much choice. We could pin it to a hash.
Something like this:
diff --git a/requirements.txt b/requirements.txt
index 3d21a45..72b9eb6 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -4,6 +4,6 @@ python-interface
pyfiglet<1
influxdb
influxdb-client[ciso]
-beacontools[scan]
+beacontools[scan]==2.0.2
azure-iot-device==3.0.0b2
-pybluez
+pybluez @ git+https://github.com/AcrossTheCloud/pybluez@82cbba8a1ebd4c1e3442dfafd8581d58c50fa39e
Had an issue attempting to install tilt-pitch on my Linux Mint machine. I saved a text file of the readouts from the Terminal. Below is the last error I got:
plex@PLEXSERVER:~$ pip3 install tilt-pitch Defaulting to user installation because normal site-packages is not writeable Collecting tilt-pitch Downloading tilt_pitch-1.0.2-py3-none-any.whl (36 kB) Collecting influxdb-client[ciso] Downloading influxdb_client-1.39.0-py3-none-any.whl (743 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 744.0/744.0 KB 4.7 MB/s eta 0:00:00 Collecting influxdb Downloading influxdb-5.3.1-py2.py3-none-any.whl (77 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 77.9/77.9 KB 5.8 MB/s eta 0:00:00 Collecting pybluez Downloading PyBluez-0.23.tar.gz (97 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.6/97.6 KB 1.8 MB/s eta 0:00:00 Preparing metadata (setup.py) ... error error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [1 lines of output] error in PyBluez setup command: use_2to3 is invalid. [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed
× Encountered error while generating package metadata. ╰─> See above for output.
note: This is an issue with the package mentioned above, not pip. hint: See above for details. plex@PLEXSERVER:~$ pytho3 - pitch Command 'pytho3' not found, did you mean: command 'python3' from deb python3 (3.10.6-1~22.04) Try: sudo apt install
plex@PLEXSERVER:~$ python3 -m pitch
/usr/bin/python3: No module named pitch
plex@PLEXSERVER:~$