定制 yasharrashedi/limitless-led 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

yasharrashedi/limitless-led

Composer 安装命令:

composer require yasharrashedi/limitless-led

包简介

LimitlessLED/Milight integration library

README 文档

README

The complete API of Milight/LimitlessLED/EasyBulb written in PHP. This code has been tested on Wifi Bridge V.4 and is working pretty well. Any help and bugfixes are welcome.

Note (1): There are two different channels for white and RGBW on Wifi Bridge so you can't mix white bulbs with RGBW bulbs on the same group.

Note (2): Brightness (dimming) values for RGBW bulbs are different for white and RGB modes and brightness value is saved in bulbs separately either mode.

Note (3): RGBW bulbs can't mix RGB and white colors, these bulbs only can operate in white or RGB mode so you can't set saturation. Only brightness can be set in RGB mode.

Note (4): Since Wifi Bridge V.4 the web interface for Wifi Bridge configuration has been removed and static IP can be set only from mobile app or using AT commands (currently we are working on adding PHP API for configuration and auto bridge discovery)

Note (4): Web interface is back in new firmware update. You can update the firmware and use web-based interface (by typing IP in browser) to set static IP address.

here's the link to the firmware update file: (the file has been removed from the server!)

http://www.limitlessled.com/download/LIMITLESSLED_FIRMWARE_UPGRADE_V4_BRIDGE_27Nov2014.bin

Warning: I have updated my Wifi bridge V.4 successfully to this firmware version, but you use this update on your own responsibility. Recently I've noticed, the update is breaking some incompatible Wifi bridges.

There are two methods for setting active group one for RGBW bulbs (setRgbwActiveGroup or rgbwSetActiveGroup) and for white bulbs (setWhiteActiveGroup or whiteSetActiveGroup). After setting active channel you will be able to send commands to chosen bulb group.

Bulbs only support 256 colors (not 16 millions) but there is a method for setting RGB hex strings (for example, #FF1254). This is then configured to nearest supported color. It is also possible to provide HSV colors.

Example:

<?php
require 'Milight.php';

$milight = new Milight('192.168.0.54');

$milight->rgbwAllOn();
$milight->rgbwAllSetToWhite();
$milight->rgbwAllBrightnessMax();
sleep(2);
$milight->setRgbwActiveGroup(1);
$milight->rgbwBrightnessPercent(50);
sleep(2);
$milight->setRgbwActiveGroup(2);
$milight->rgbwSetColorHexString('FF1254'); // or #FF1254
$milight->rgbwBrightnessPercent(90);
sleep(2);
$milight->whiteAllOn();
$milight->whiteAllBrightnessMax();
sleep(2);
$milight->whiteGroup1NightMode();
sleep(2);
$milight->setWhiteActiveGroup(2);
$milight->whiteWarmIncrease();
$milight->whiteWarmIncrease();
$milight->whiteWarmIncrease();

Have fun!

统计信息

  • 总下载量: 22
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 62
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 62
  • Watchers: 22
  • Forks: 21
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-10-28