Hi all,
TLDR: is there any way to read thing metadata and use it in a rule (with good old rule dsl)?
Bridge hue:bridge:someid "Hue Bridge" @ "Some Room" [
ipAddress="IPADD",
userName="USERTOKEN"
] {
...
}
rule "somerule"
when
Channel "hue:0820:someid:90:dimmer_switch_event" triggered
then
sendHttpPutRequest("http://$IPADD/api/$USERTOKEN/groups/1/action", "text/plain", "{\"on\":false}")
end
Note: The button is part of Deconz network, not Hue.
Background: I’m trying to dim down all my hue lights by an event that came from outside the hue network. The official app contains a button to do disable all lights, but I could not find a corresponding endpoint in the API so I guess, they just disable the lights for each group. The Hue binding has group capabilities, but neither sendCommand nor postUpdate seems to work to send a disable command. Hardcoded IP/token in the rule works fine, but having metadata in any other place than thing definition just feels wrong
- Platform information:
- Hardware: Pi 4b
- OS: Raspbian 64bit
- Java Runtime Environment: whatever comes with the official docker image
- openHAB version: 3.1.0