bwssytems / ha-bridge

Home automation bridge that emulates a Philips Hue light system and can control other systems such as a Vera, Harmony Hub, Nest, MiLight bulbs or any other system that has an http/https/tcp/udp interface. This is a compact impl to run on small format computers. This is impl started from this project https://github.com/armzilla/amazon-echo-ha-bridge.
Apache License 2.0
1.45k stars 199 forks source link

Harmony dimming Shelly #1289

Open Janky0 opened 3 years ago

Janky0 commented 3 years ago

I use HA Bridge at my Rasperry. I can turn on/off my Shelly with my Harmony but Dim only work on Dim Butto on HA Bridge and not on my Harmony

http://192.168.178.50/light/0?brightness=${intensity.percent}

bwssytems commented 3 years ago

Set this item to true in the Bridge Control Tab "Trace State Changes" and then do a dim from the harmony and post your log.

HonestJohn61 commented 3 years ago

Hi, I have a similar problem with Hue. I've done what you requested and here are the logs. The first change at 13:51 is done from the HA Bridge to turn the brightness up to full and the second from the Harmony at 13:53 to dim.

Any help with this would be much appreciated. Thanks

06-26-2021 13:51:35.989 INFO Tracestate: hue state change requested: 0a1c9847b7c84042b95fecf15cc83bfb from 192.168.11.79 body: {"bri":255} com.bwssystems.HABridge.hue.HueMulator
06-26-2021 13:51:35.990 INFO Tracestate: Calling dim as requested: 255, inc: null com.bwssystems.HABridge.hue.HueMulator
06-26-2021 13:51:35.990 INFO Tracestate: Decode Json for url items: [{"item":"http://192.168.11.28/api/KKSL0MJTEsJSR9Z-Qo0JoE3oCn-oJnu9VjrpaES9/groups/1/action","type":"httpDevice","httpVerb":"PUT","httpBody":"{\"bri\": ${intensity.byte}}","contentType":"application/json"}] com.bwssystems.HABridge.hue.HueMulator
06-26-2021 13:51:35.990 INFO Tracestate: Calling Home device handler for type : httpDevice com.bwssystems.HABridge.hue.HueMulator
06-26-2021 13:53:13.881 INFO Tracestate: hue state change requested: 8cc53d96456f4ae68206d0736cf37ffa from 192.168.11.23 body: {"xy":[0,0],"on":true,"bri":229} com.bwssystems.HABridge.hue.HueMulator
06-26-2021 13:53:13.882 INFO Tracestate: Calling on-off as requested: true com.bwssystems.HABridge.hue.HueMulator
06-26-2021 13:53:13.882 INFO Tracestate: Decode Json for url items: [{"item":"http://192.168.11.28/api/KKSL0MJTEsJSR9Z-Qo0JoE3oCn-oJnu9VjrpaES9/groups/1/action","type":"httpDevice","httpVerb":"PUT","httpBody":"{\"scene\": \"W7dqNDwGgv2a7RZ\"}","contentType":"application/json"}] com.bwssystems.HABridge.hue.HueMulator
06-26-2021 13:53:13.882 INFO Tracestate: Calling Home device handler for type : httpDevice com.bwssystems.HABridge.hue.HueMulator
06-26-2021 13:53:13.955 INFO Tracestate: Calling color as requested. With Color Data mode: XY, data: [0.0, 0.0] com.bwssystems.HABridge.hue.HueMulator
06-26-2021 13:53:13.955 INFO Color url not available for state change, lightId: 101, userId: 8cc53d96456f4ae68206d0736cf37ffa, from IP: 192.168.11.23, body: {"xy":[0,0],"on":true,"bri":229} com.bwssystems.HABridge.hue.HueMulator
HonestJohn61 commented 3 years ago

Hi, I thought this setting should ensure it ignores the "on": true instruction that comes through from the Harmony:

On when Dim is present (Always uses on with a dim request otherwise it will ignore a given on was well. This is overidden by onFirstDim.) false
HonestJohn61 commented 3 years ago

SOLVED! Reading the Tracestate logs, it was clear that the following two settings are needed to make this work properly for me. Hope this also solves your issue @Janky0

Dim only when On present (If dim is present and the on request is present, the on request will not be sent. This is overriden by the above settings.) true
Send dim when color request present and dim present true
HonestJohn61 commented 3 years ago

Oh, and this setting too:

On with First Dim (If the device is not on in the ha-bridge state, it will send on instead of the dim.) true