Python Plugin : Xiaomi Philips LED Ball Lamp Topic is solved
Moderator: leecollings
-
- Posts: 15
- Joined: Friday 01 February 2019 7:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
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
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
-
- Posts: 27
- Joined: Saturday 12 January 2019 11:48
- Target OS: Windows
- Domoticz version: 4.9701
- Contact:
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
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
-
- Posts: 15
- Joined: Friday 01 February 2019 7:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
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
Traceback (most recent call last):
File "MyBulb.py", line 11, in <module>
import miio.philips_bulb
ImportError: No module named miio.philips_bulb
-
- Posts: 27
- Joined: Saturday 12 January 2019 11:48
- Target OS: Windows
- Domoticz version: 4.9701
- Contact:
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
Did you install python-miio library? Please read this guide https://python-miio.readthedocs.io/en/l ... overy.html
-
- Posts: 15
- Joined: Friday 01 February 2019 7:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
Yes, I have installed. I have used the Bulb, but the token has changed, since I have to add again the hardver
-
- Posts: 27
- Joined: Saturday 12 January 2019 11:48
- Target OS: Windows
- Domoticz version: 4.9701
- Contact:
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
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.
https://github.com/deennoo/domoticz-Xia ... p/tree/dev
This version is faster.
-
- Posts: 2
- Joined: Sunday 17 February 2019 12:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
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
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
-
- Posts: 27
- Joined: Saturday 12 January 2019 11:48
- Target OS: Windows
- Domoticz version: 4.9701
- Contact:
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
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..
-
- Posts: 16
- Joined: Monday 20 February 2017 15:24
- Target OS: Linux
- Domoticz version: 4.11597
- Location: Hungary
- Contact:
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
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?
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?
-
- Posts: 27
- Joined: Saturday 12 January 2019 11:48
- Target OS: Windows
- Domoticz version: 4.9701
- Contact:
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
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
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
-
- Posts: 6
- Joined: Thursday 30 April 2020 15:13
- Target OS: NAS (Synology & others)
- Domoticz version: 2020.1
- Contact:
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
@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).
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).
running on DSM 6.2.2-24922 Update 4 @ Synology DS216j
Zigbee2mqtt @ CC2531 USb stick
2 * xiaomi mijia temperature sensor
Xiaomi Philips E27 LEDbulb
NefitEasyServer
Dashticz v3
Zigbee2mqtt @ CC2531 USb stick
2 * xiaomi mijia temperature sensor
Xiaomi Philips E27 LEDbulb
NefitEasyServer
Dashticz v3
-
- Posts: 6
- Joined: Thursday 30 April 2020 15:13
- Target OS: NAS (Synology & others)
- Domoticz version: 2020.1
- Contact:
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
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:
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
running on DSM 6.2.2-24922 Update 4 @ Synology DS216j
Zigbee2mqtt @ CC2531 USb stick
2 * xiaomi mijia temperature sensor
Xiaomi Philips E27 LEDbulb
NefitEasyServer
Dashticz v3
Zigbee2mqtt @ CC2531 USb stick
2 * xiaomi mijia temperature sensor
Xiaomi Philips E27 LEDbulb
NefitEasyServer
Dashticz v3
-
- Posts: 748
- Joined: Saturday 27 February 2016 12:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: NL
- Contact:
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
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?
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?
Hans
Re: Python Plugin : Xiaomi Philips LED Ball Lamp
Hello, I try to use this plugin and I have an error
On master Domoticz say :
On console when I type "python ./MyBulb.py 192.168.0.90 fc6e962c38a7ae378fe164acc278f556" I have this response:
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:
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?
On master Domoticz say :
Code: Select all
Get status failed: Command '['./MyBulb.py', '192.168.0.90', 'fc6e962c38a7ae378fe164acc278f556']' returned non-zero exit status 1.
Code: Select all
<PhilipsBulbStatus brightness=100 color_temperature=1 delay_off_countdown=0 is_on=True power=on scene=0>
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
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?
Who is online
Users browsing this forum: No registered users and 1 guest