Hi all
I am running openhabiab on resp pi 4.
I have a Yeelight ceiling lamp. The lamp is configured and works well with the yeelight mobile app.
I want to bind it into the OH.
I followed this guide: https://www.openhab.org/addons/bindings/yeelight/
But the light has not discovered in the inbox.
I tried to manually bind it, but it asks for device ID which I don’t know from where to bring it (searched in the mobile app).
If I remember correctly you need to enable developer mode in the app to get the device ID.
Per the doc’s:
To control Yeelight devices with this binding, you need to connect the device to your local network at first with the Yeelight app. This app is available in the iOS AppStore and on Google Play.
Then you need to activate LAN control mode by enable Developer Mode in device settings, after which it will become discoverable by openHAB.
Hi
Of course that I activated Lan control (I didn’t needed to enable developer mode)
As I wrote the device is working well with the app.
The binding just finds nothing.
If I have windows I must install Linux for windows? just to connect to the device?
can’t I do it inside the openhabian terminal? the resp Pi and the device on the same network.
The device ID will look something like 0x000000000321a1bc in your case it’s the 0x00000000xxxxxx with the x’s being whats marked out in the screen shot.
Yes, I found the workaround how to use and control my ceiling20 which is offline in yeelight binding.
It is quite simple approach to use python script via execommand. executeCommandLine(“python /home/openhabian/pyscript/ceilingON.py”, 1500)
from yeelight import Bulb
bulb = Bulb(“192.168.0.101”)
bulb.toggle()
save it as ceilingON.py
use it in some rule:
rule “Mijia & Aqara Wireless Switch”
when
Channel “mihome:sensor_switch:158d000xxxxx:button” triggered
then
var actionName = receivedEvent.getEvent()
switch(actionName) {
case “SHORT_PRESSED”: {
executeCommandLine("python /home/openhabian/pyscript/ceilingON.py", 1500)
}
case "DOUBLE_PRESSED": {
}
case "LONG_PRESSED": {
if (ZIDOO.state == OFF) {
ZIDOO.sendCommand(ON)
}
else {
ZIDOO.sendCommand(OFF)
}
}
case "LONG_RELEASED": {
//<ACTION>
}
}