Page 3 of 3
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
Posted: Saturday 02 March 2019 8:03
by mgabor
Dear,
I have found that the token has changed, so the bulb did not work. I change the token in domoticz, but when I have added the new bulb with new token, the device does not appear in the list. In the log file I have found this.
2019-03-02 07:54:30.700 Error: Lámpa1 hardware (9) thread seems to have ended unexpectedly
2019-03-02 07:55:00.781 Error: Lámpa1 hardware (9) thread seems to have ended unexpectedly
2019-03-02 07:55:30.790 Error: Lámpa1 hardware (9) thread seems to have ended unexpectedly
2019-03-02 07:56:00.795 Error: Lámpa1 hardware (9) thread seems to have ended unexpectedly
I have done this:
update, upgrade, restart, nothing changes
What is the problem?
Gabor
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
Posted: Saturday 02 March 2019 10:50
by Samael
mgabor wrote: ↑Saturday 02 March 2019 8:03
Dear,
I have found that the token has changed, so the bulb did not work.
First of all, you have to test a new token with MyBulb.py. Run command with lamp IP and it's token
Code: Select all
MyBulb.py 192.168.10.102 89bedfa9123841a44030fd4ae2a0db09 status
What does it say?
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
Posted: Saturday 02 March 2019 16:25
by mgabor
the answer:
Traceback (most recent call last):
File "MyBulb.py", line 11, in <module>
import miio.philips_bulb
ImportError: No module named miio.philips_bulb
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
Posted: Sunday 03 March 2019 13:08
by Samael
mgabor wrote: ↑Saturday 02 March 2019 16:25
the answer:
Traceback (most recent call last):
File "MyBulb.py", line 11, in <module>
import miio.philips_bulb
ImportError: No module named miio.philips_bulb
Did you install python-miio library? Please read this guide
https://python-miio.readthedocs.io/en/l ... overy.html
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
Posted: Sunday 03 March 2019 14:44
by mgabor
Yes, I have installed. I have used the Bulb, but the token has changed, since I have to add again the hardver
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
Posted: Sunday 03 March 2019 22:03
by Samael
If someone switched to the
development branch of Domoticz, then I recommend to pick up the plugin from the
dev branch:
https://github.com/deennoo/domoticz-Xia ... p/tree/dev
This version is faster.
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
Posted: Sunday 03 March 2019 22:05
by Samael
mgabor wrote: ↑Sunday 03 March 2019 14:44
Yes, I have installed. I have used the Bulb, but the token has changed, since I have to add again the hardver
Hmm. You can change the token on Hardware tab and simply press update. No need to remove and add.
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
Posted: Tuesday 02 April 2019 20:42
by koles142
Hi,
I'm using your plugin. I can control my bulb, can change color, level light but i can't turn off the bulb from Domoticz. In my log I have:
Error: [bulb name] Call command failed: Command '['./MyBulb.py', '192.168.31.103', 'bulb token', '--scene', '0']' returned non-zero exit status 2.
When I turn off my bulb from xiaomi app i can turn on it again from Domoticz. I can do anything with bulb except the turning off. Have you any idea?
thnaks
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
Posted: Sunday 22 December 2019 22:07
by Samael
At the moment I am using a development version of the plugin with a beta version of domoticz, since it does not use the launch of an additional script to execute commands. I hope the release of stable version of domoticz will be soon..
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
Posted: Monday 30 December 2019 19:26
by fecus
First of all, thank you for your efforts.
I installed your plugin from git.
It made two devices.
The scenes device is working well.
The CCCW device requires a password. What kind of password are asking?
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
Posted: Monday 30 December 2019 22:00
by Samael
There is no any passwords and can not be. Source code is open. I assume this is related to the work environment. Currently I use Python 3.6.8.
C:\Python>pip3 list miio
Package Version
--------------------- ----------
android-backup 0.2.0
appdirs 1.4.3
asn1crypto 0.24.0
attrs 18.2.0
certifi 2018.11.29
cffi 1.11.5
Click 7.0
construct 2.9.45
cryptography 2.4.2
idna 2.8
ifaddr 0.1.6
netifaces 0.10.9
pip 19.3.1
pipenv 2018.11.26
pretty-cron 1.2.0
pycparser 2.19
python-miio 0.4.4
pytz 2018.9
setuptools 40.8.0
six 1.12.0
tqdm 4.29.1
virtualenv 16.2.0
virtualenv-clone 0.4.0
virtualenvwrapper-win 1.2.5
zeroconf 0.21.3
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
Posted: Thursday 30 April 2020 15:47
by jstruik
@Samuel
thank you so much for your effort. I accidentally bought this Xiaomi Philips LED bulb. I wanted to buy the Xiaomi ZNLDP12LM which has Zigbee support to match my xiaomi mijia temperature sensors...
Nevertheless, your plugin saved me from reverse-engineering the protocol and building a domoticz plugin myself!
In the complete process of setting up domoticz on a synology NAS, configuring Zigbee2mqtt, configuring NefitEasyServer and now configuring this LEDbulb I already spend so much hours searching this forum and this is my first message to thank you (all).
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
Posted: Wednesday 27 May 2020 22:25
by jstruik
for future reference: after the synology DSM upgrade the plugin didn't work anymore. I had to rethink the steps taken previous month
bash expects a file python3 in the /usr/bin directory. In my case (Synology DS216j), it wasn't present. With a symbolic link it worked again:
Code: Select all
cd /usr/bin
sudo ln -s /opt/bin/pyhton3.7 python3
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
Posted: Wednesday 10 March 2021 19:10
by manjh
I'm trying to get started with this bulb. First step was to learn how to reset it (5 consecutive on/off switches), and add it to Mi Home.
The reset worked, but Mi Home does not want to see the lamp.
I tried scanning without result. Then tried manually, connected to the lamp's WiFi. That worked, but still Mi Home will not connect the lamp.
Seems to me I should get this working before attempting to control the lamp from Domoticz...
Can someone give me a hint?
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
Posted: Friday 31 December 2021 10:27
by polargeex
Hello, I try to use this plugin and I have an error
On master Domoticz say :
Code: Select all
Get status failed: Command '['./MyBulb.py', '192.168.0.90', 'fc6e962c38a7ae378fe164acc278f556']' returned non-zero exit status 1.
On console when I type "python ./MyBulb.py 192.168.0.90 fc6e962c38a7ae378fe164acc278f556" I have this response:
Code: Select all
<PhilipsBulbStatus brightness=100 color_temperature=1 delay_off_countdown=0 is_on=True power=on scene=0>
So it's work on console but not in domoticz
If I switch on dev branch I dont no work in console with this error:
Code: Select all
python ./MyBulb.py 192.168.0.90 fc6e962c38a7ae378fe164acc278f556
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.7/site-packages/miio/miioprotocol.py", line 193, in send
data, addr = s.recvfrom(4096)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./MyBulb.py", line 55, in <module>
print(MyBulb.status())
File "/home/pi/.local/lib/python3.7/site-packages/miio/click_common.py", line 186, in _wrap
self._fetch_info()
File "/home/pi/.local/lib/python3.7/site-packages/miio/device.py", line 149, in _fetch_info
devinfo = DeviceInfo(self.send("miIO.info"))
File "/home/pi/.local/lib/python3.7/site-packages/miio/device.py", line 104, in send
command, parameters, retry_count, extra_parameters=extra_parameters
File "/home/pi/.local/lib/python3.7/site-packages/miio/miioprotocol.py", line 237, in send
extra_parameters=extra_parameters,
File "/home/pi/.local/lib/python3.7/site-packages/miio/miioprotocol.py", line 161, in send
self.send_handshake()
File "/home/pi/.local/lib/python3.7/site-packages/miio/miioprotocol.py", line 74, in send_handshake
raise DeviceException("Unable to discover the device %s" % self.ip)
miio.exceptions.DeviceException: Unable to discover the device 192.168.0.90
version of python-miio 0.5.9.2
Domoticz Version: 2021.1
Build Hash: 8547c5b7e
Compile Date: 2021-04-17 17:29:11
dzVents Version: 3.1.7
Python Version: 3.7.3
Someone can help me?