Betree / magicblue

💡 Unofficial Python API to control Magic Blue bulbs over Bluetooth
MIT License
100 stars 23 forks source link

Install and run magicblue in Raspbian Stretch (kernel version 4.9) - SOLVED! #42

Closed ndabar closed 6 years ago

ndabar commented 6 years ago

Install and run magicblue in Raspbian Stretch (kernel version 4.9) - SOLVED!

Hi folks,

Probably some of you have dealt with this issue already, others maybe no. Magicblue was running nice and smooth in the old Raspbian version (Jessie), however if you decided to upgrade your OS and want to install it, you will find some difficulties.

_sudo pip3 install magicblue
Collecting magicblue
  Using cached magicblue-0.5.0.tar.gz
Collecting bluepy==1.1.2 (from magicblue)
  **Could not find a version that satisfies the requirement bluepy==1.1.2 (from magicblue)** (from versions: 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.1.0, 1.1.1, 1.1.4)
No matching distribution found for bluepy==1.1.2 (from magicblue)_

Installing bluepy manually it will install the latest version, bluepy==1.1.4, which is not valid neither for installing magicblue!

I found bluepy==1.1.2 package (https://pypi.python.org/packages/f1/fa/4830ec2ab95baa0201151bf18d5c031d94c520bd05ffdf692573a5261fe3/bluepy-1.1.2.tar.gz).

Check before if you have another version installed:

_$ pip3 show bluepy
Name: bluepy
Version: 1.1.4
Summary: Python module for interfacing with BLE devices through Bluez
Home-page: https://github.com/IanHarvey/bluepy
Author: Ian Harvey
Author-email: website-contact@fenditton.org
License: UNKNOWN
Location: /usr/local/lib/python3.5/dist-packages
Requires:_ 

Uninstall this version and install the version needed: $ sudo pip3 uninstall bluepy==1.1.4 ……….. ~/Downloads/bluepy-1.1.2 $ sudo python setup.py install ………..

Check again the bluepy version:

_~/Downloads/bluepy-1.1.2 $ pip3 show bluepy
Name: bluepy
Version: 1.1.2
Summary: Python module for interfacing with BLE devices through Bluez
Home-page: https://github.com/IanHarvey/bluepy
Author: Ian Harvey
Author-email: website-contact@fenditton.org
License: UNKNOWN
Location: /usr/local/lib/python3.5/dist-packages
Requires:_ 

Now you shouldn’t have any problems for installing the magicblue app:

$ _sudo pip3 install magicblue
Collecting magicblue
  Using cached magicblue-0.5.0.tar.gz
Requirement already satisfied: bluepy==1.1.2 in /usr/local/lib/python3.5/dist-packages (from magicblue)
Collecting webcolors (from magicblue)
  Downloading webcolors-1.7.tar.gz
Building wheels for collected packages: magicblue, webcolors
  Running setup.py bdist_wheel for magicblue ... done
  Stored in directory: /root/.cache/pip/wheels/b1/0e/86/32ddc8557ac629da596beedcd947fdc33229ac7533b29ba93b
  Running setup.py bdist_wheel for webcolors ... done
  Stored in directory: /root/.cache/pip/wheels/4a/bb/ba/464319914f0bfb826beb0955bbb29d7188a18368ea226a758d
Successfully built magicblue webcolors
Installing collected packages: webcolors, magicblue
Successfully installed magicblue-0.5.0 webcolors-1.7

$ sudo magicblueshell 
Magic Blue interactive shell v0.5.0
Type "help" for a list of available commands
> list_devices
Listing Bluetooth LE devices in range for 300 seconds. Press CTRL+C to abort searching.
ID    Name                           Mac address 
--    ----                           -----------_ 

I hope this help somebody ;-D

Betree commented 6 years ago

Thanks for sharing this, I'm sure it will help a lost googler in the future ;)

I keep the issue open to remind me I must upgrade the project to bluepy 1.1.4 which is supposed to fix #11

StevenLooman commented 6 years ago

Pull request #43 (also) upgrades to bluepy==1.1.4.

Betree commented 6 years ago

Closing this as new release include StevenLooman #43 PR which includes bluepy 1.1.4