Python Plugin : Xiaomi Philips LED Ball Lamp Topic is solved

Python and python framework
Post Reply
deennoo
Posts: 942
Joined: Wednesday 10 December 2014 14:06
Target OS: Linux
Domoticz version: beta
Location: Bordeaux France
Contact:

Python Plugin : Xiaomi Philips LED Ball Lamp

Post by deennoo » Tuesday 13 November 2018 23:50

Hello There

I'm starting a new plugin, for some Xiaomi Philips Wifi Device.

All main work come from Kofec and his plugin for Xiaomi Air Purifier : https://github.com/kofec/domoticz-AirPurifier

I just spend some time to adapt it for the E27 Bulb aka Xiaomi Philips LED Ball Lamp aka Philips ZhiRui E27 bulb.

That a first version, With 3 Widgets

ON/OFF
Brightness
White Temp
Capture.PNG
Capture.PNG (28.17 KiB) Viewed 274 times

You Can drive the Bulb directly from Domoticz and from MiHome APP (set refresh to 1 minute to have best update)

Know Issue :
- Restarting the plugin create a segmention Fault, you need to restart your domoticz
- Plugin doesn't know if your bulb are Online or not

Next evolutions are :

Using Native Domoticz CCCW Widget
Using set_brightness_and_color_temperature(brightness, cct) command avaiable on Python-miio

You can Grab it : https://github.com/deennoo/domoticz-Xia ... ree/master
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / ESP8266 / MQTT / BLE
http://domo-attitude.fr

deennoo
Posts: 942
Joined: Wednesday 10 December 2014 14:06
Target OS: Linux
Domoticz version: beta
Location: Bordeaux France
Contact:

Re: Python Plugin : Xiaomi Philips LED Ball Lamp

Post by deennoo » Friday 16 November 2018 0:29

v0.1.1 is out

Adding ability to use 4 Scenes already present In the Bulb
Capture.PNG
Capture.PNG (41.45 KiB) Viewed 241 times
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / ESP8266 / MQTT / BLE
http://domo-attitude.fr

deennoo
Posts: 942
Joined: Wednesday 10 December 2014 14:06
Target OS: Linux
Domoticz version: beta
Location: Bordeaux France
Contact:

Re: Python Plugin : Xiaomi Philips LED Ball Lamp

Post by deennoo » Saturday 17 November 2018 16:48

switching to beta branch allow you to use cccw widget

https://github.com/deennoo/domoticz-Xia ... /MyBulb.py
Capture.PNG
Capture.PNG (31.41 KiB) Viewed 221 times
just missing now :
on/off from this widget
refresh this widget from bulb status
using native python-miio module to by pass MyBulb.py
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / ESP8266 / MQTT / BLE
http://domo-attitude.fr

arek156
Posts: 8
Joined: Wednesday 10 January 2018 20:24
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Poland
Contact:

Re: Python Plugin : Xiaomi Philips LED Ball Lamp

Post by arek156 » Sunday 18 November 2018 18:53

Hello
Great script, just how to generate a token?


N1co
Posts: 8
Joined: Thursday 26 January 2017 16:49
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python Plugin : Xiaomi Philips LED Ball Lamp

Post by N1co » Sunday 09 December 2018 0:16

arek156 wrote:
Sunday 18 November 2018 18:53
Hello
Great script, just how to generate a token?
I cannot get this to work.
I checked the miio2.db on my android phone but the token of the light bulb is empty.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest