Philips Hue Matlab Driver
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 https://www.meethue.com/api/nupnp
- 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
Ref: https://www.developers.meethue.com/documentation/getting-started
notes:
- Communication with the Bridge to write is done via a ML central sumbmission, urlread2, by Jim Hokanson: https://nl.mathworks.com/matlabcentral/fileexchange/35693-urlread2
- 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: http://steveyo.github.io/Hue-Emulator/
(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: https://www.developers.meethue.com/documentation/supported-lights
- 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".
Citar como
Massimo Ciacci (2024). Philips Hue Matlab Driver (https://www.mathworks.com/matlabcentral/fileexchange/63606-philips-hue-matlab-driver), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
- MATLAB > Graphics > Images > Convert Image Type >
Etiquetas
Agradecimientos
Inspirado por: urlread2
Inspiración para: colorStudioMax: ColorBrowser+dictionary, colorBlind correct
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
Philips_HUE_ML_Driver_v1_5
Philips_HUE_ML_Driver_v1_5/PHUE_Connect
Philips_HUE_ML_Driver_v1_5/PHUE_Connect/BridgeTools
Philips_HUE_ML_Driver_v1_5/PHUE_Connect/BridgeTools/convert
Philips_HUE_ML_Driver_v1_5/PHUE_Connect/BridgeTools/convert/calc_XYZ_sRGB_MatrixForTriangleGamut
Philips_HUE_ML_Driver_v1_5/PHUE_Connect/BridgeTools/urlread2
Versión | Publicado | Notas de la versión | |
---|---|---|---|
1.5.0.0 | url = 'https://www.meethue.com/api/nupnp'; became invalid, using new url:
|
||
1.4.0.0 | List available lamps, and select the first one. |
||
1.3.0.0 | Changed errors to warnings with error-Codes
|
||
1.2.0.0 | - Added check for Matlab version >= 2014b, and related error (webread was introduced in 2014b)
|
||
1.1.0.0 | - Added screenshot
|
||
1.0.0.0 |