簡介:
Yeelight 結合全色溫全色域LED照明
在提供基本的照明功能的基礎上更提供了通過智能手機遠程開關燈,調節色彩,亮度的功能。
Yeelight還可以讓用戶自己定義延時開燈和延時關燈等功能。
Yeelight實現了即聯即用的功能,無需額外的網關和配件,將燈泡擰到燈口里面,打開開關,即可使用Yeelight。
通過手機上的藍牙功能連接到燈泡既可以實現對燈泡的顏色亮度等的控制。
除了基本的調光調色外,Yeelight還提供了音樂彩虹,流動時光,以及情景模式等功能。
參數:
產品名稱:Yeelight LED燈泡(彩光版)
產品型號:YLDP06YL
產品接口:E26 / E27
光通量:800 流明
產品色溫:1700K-6500K
使用壽命:約 25000 小時
無線連接:Wi-Fi IEEE 802.11 b/g/n 2.4GHz
額定輸入:100V-240V~50/60Hz
額定功率:10W
代碼:
獲得智能燈的ip地址:
CMDString:= 'M-SEARCH * HTTP/1.1'+' '+'HOST: 239.255.255.250:1982'+' '+ 'MAN: ' + '"ssdp:discover"' +' '+ 'ST: wifi_bulb' ; IdUDPClient1.Broadcast(CMDString,43210); ListBox1.Items.Add(IdUDPClient1.ReceiveString());
開關燈:
if CheckBox1.Checked then Self.ClientSocket1.Socket.SendText('{"id":0x00000000035ddcdf,' + '"method":"set_power","params":["on"]}'+#13#10) else Self.ClientSocket1.Socket.SendText('{"id":0x00000000035ddcdf,' + '"method":"set_power","params":["off"]}'+#13#10) ;
設置燈顏色:
var Color: TColor; R, G, B: integer; rgbcolor:Integer; begin Color := Self.ColorBox1.Selected; R := Color and $FF; G := (Color and $FF00) shr 8; B := (Color and $FF0000) shr 16; rgbcolor:=R*65536+G*256+B; Self.ClientSocket1.Socket.SendText(' {"id":0x00000000035ddcdf,"method":"set_rgb","params":['+IntToStr(rgbcolor)+', "smooth", 500]}'+#13#10) end;
設置燈亮度:
Self.ClientSocket1.Socket.SendText('{"id":0x00000000035ddcdf,"method":"set_bright","params":['+IntToStr(Self.TrackBar1.Position)+', "smooth", 500]}'+#13#10)
參考資料:
http://www.yeelight.com/download/Yeelight_Inter-Operation_Spec.pdf