This Plugin goal is to drive Playbulb / Mipow Bluetooth Bulbs via Domoticz, using BTLE connection (using usb BTLE dongle or RPI3 BTLE Feature) : http://www.playbulb.com/en/index.html
This Plugin Support :
- Garden (fw : BTL400M_1.9) - Candle (fw : BTL300_v5 et 6) - Rainbow (fw: BTL300_V5) - Color (fw : BTL100c_v6) - Comet - Smart - Sphere - Spot (fw:BTL203M_V1.6) - Solar
You can find your FW version using Plybulb X Android or iOS APP, after connecting to the bulb and going to config page
You need to get bulb Bt Mac adresse, For this on a ssh connection run :
sudo hcitool lescan
Then a list of btle device in range of your Dongle will appear, just pic the one you need, playbulb device give there name easily, here for a garden :
71:9A:4B:15:AC:E6 PLAYBULB garden 71:9A:4B:15:AC:E6 (unknown) 71:9A:4B:15:AC:E6 PLAYBULB garden 71:9A:4B:15:AC:E6 (unknown) 71:9A:4B:15:AC:E6 PLAYBULB garden 71:9A:4B:15:AC:E6 (unknown) A4:C1:38:65:0D:01 uaz6wGda A4:C1:38:65:0D:01 (unknown)
Don't forget to disconnect your phone from the bulb once all information is getting, bulb doesn't allow 2 connections on the same time.
Then you have to install python environnement for Domoticz :
sudo apt-get install python3-pip libglib2.0-dev pip3 install bluepy
then as bluepy isn't on working dir for Domoticz, copy it
sudo cp -r /usr/local/lib/python3.4/dist-packages/bluepy/ /usr/lib/python3.4/ or sudo ln -s /usr/local/lib/python3.4/dist-packages/bluepy /usr/lib/python3.4/bluepy
Create a Mipow dir :
mkdir /home/user/domoticz/plugin/mipow where user is the user name used for domoticz that mean for a rpi user with raspbian : /home/pi/domoticz/plugins/Mipow
and paste plugin.py for this zip file : https://github.com/zaraki673/MiPow-PlayBulb/
Finally restart domoticz :
sudo service domoticz.sh restart
Goes to Hardware, create a new and search for Mipow/playbulb
- Input your Device MAC Adresse, - Choose your Bulb - Your HCI device (which dongle have to be use to connect domoticz to your bulb)
You have 2 more option :
Activate Status: who keep connection between Domoticz and the bulb: - set on False, you can controle bul with booth Domoticz and Mobile APP, - set on True give exclusivity to Domoticz.
Debug : show debug info on Domoticz Log.
Device will be created on not used device tab, just add it by cliking the the green arrow.
My bulb FW isn't on the list, can't controle it ? yes you can ! (need more works on it)
Let's speak about it on this topic : http://www.domoticz.com/forum/viewtopic.php?f=28&t=16843