Philips Hue Matlab Driver

版本 (390.2 KB) 作者: Massimo Ciacci
A tool to connect to Philips Hue Bridge and drive the lamps from Matlab.
137.0 次下载
更新时间 2020/5/25


This driver set consists mainly of the following items:
(1) Philips_HUE_CONNECT(verbose)
Communicate with a Philips Hue bridge to talk to the Hue personal wireless LED lights.
- Finds the Hue Bridge using
- Checks if user previously paired with bridge, if not a pairing procedure is started.
- Upon completed connection with the Hue-Bridge, user will get an appID, stored to a mat file userNameWQuotes.mat" for later use.
- Returns the url to the first found light attached to the bridge : urlLIGHT_State
- Communication with the Bridge to write is done via a ML central sumbmission, urlread2, by Jim Hokanson:
- By editing one switch internally, one can choose to work with a Hue Emulator instead of the real Hue Bridge. This helps debugging possible issues. It helped me tremendously.
get it here:
(2) set_Lamp_RGB(urlLIGHT_State, RGBint, GAMUT)
- Changes color of lamp using RGB triplet in [0..255].
- GAMUT: A,B,C: depends on what lamp you have, ref:
- Makes use of other functions such as RGBint_2_xy_Philips_Hue
(3) set_Lamp_HSV(urlLIGHT_State, HSVpc, mode, GAMUT)
Changes color of lamp using HSV
- HSV = triplet in [0..360],[0..100],[0..100]
- mode = direct | convert
direct: ignores hw color mappings and maps hues linearly : 0-65535 onto [0-360]
convert: uses the provided GAMUT and resorts to set_Lamp_RGB, after internal conversion.
- GAMUT, only used in mode = convert
In the near future I will combine this with a color browser tool, earlier released, "colorStudioMax".


Massimo Ciacci (2024). Philips Hue Matlab Driver (, MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2016b
Windows macOS Linux
Help CenterMATLAB Answers 中查找有关 Convert Image Type 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!







版本 已发布 发行说明

url = ''; became invalid, using new url:
url = ''

List available lamps, and select the first one.

Changed errors to warnings with error-Codes
Improved interface and testBench

- Added check for Matlab version >= 2014b, and related error (webread was introduced in 2014b)
- testbench now shows what color is going to be sent to the lamp.

- Added screenshot
- Updated testbench (test_Philips_HUE_Connect_n_Set_Colors): longer pause before lamp read-back to wait for hue value to be updated after setting xy.