Switch type in HTTP binding not updating status

Right, I explain that in my reply too.

Autoupdate will “predict” the new state of an Item based on a received command and update the Item with that prediction. Later on, when the end device (in this case the web API call) changes the binding updates the Item with the “real” state. When the device reports back new states, it’s a good idea to turn off autoupdate (metadata on the Item). This avoids that flapping.

Not really.

I think the combination of the onValue/offValue and the state transformation is causing problems. When you use those properties, they operate both ways. When you send the command ON it gets converted to {“name”:“TURN_ON_CMD”}. When {“name”:“TURN_ON_CMD”} is returned by the device it gets converted to ON before sending it to the Item, independent of the transform.

I do not know the order of operations either. It looks like it does the transform first and then applies the onValue/offValue and since those don’t match anything returned by the transform it fails and ignores the message.

1 Like