使用 Philips Hue API V2 激活房间或区域的场景

问题描述 投票:0回答:1

我已经阅读了文档和指南,但我找不到在 v2API 中激活场景的方法。场景上的 PUT 命令似乎会更改场景,而 group_lights 没有调用场景的命令。 我哪里漏掉了???

philips-hue
1个回答
0
投票

如果您有场景ID,那么您可以使用:

curl --location --request PUT 'https://{bridgeIp}/clip/v2/resource/scene/{sceneId}' \
--header 'Content-Type: application/json' \
--header 'hue-application-key: {appKey}' \
--data '{"recall":{"action": "active"}}'

请参阅此处的 API 参考:https://developers.meethue.com/develop/hue-api-v2/api-reference/#resource_scene__id__put

示例如下:https://github.com/jaaufauvre/philips-hue-auto-config

© www.soinside.com 2019 - 2024. All rights reserved.