i grabbed the latest build snapshot and had some modest success with this. the rule that ended up working the best was:
import org.eclipse.smarthome.core.types.RefreshType
var Timer syncTimer = null
rule "Sync Test"
when
Item Bedroom_CeilingLight changed
then
sendCommand(Bedroom_NightstandLight,
Bedroom_CeilingLight.state.toString())
if (syncTimer != null) {
syncTimer.cancel()
}
syncTimer = createTimer(now.plusSeconds(1)) [ |
sendCommand(Bedroom_CeilingLight, RefreshType.REFRESH)
]
end
the GE dimmer is definitely a fickle beast. for whatever reason, the item gets two updates in quick succession right after the physical button is pressed and immediately released; it gets no updates at all when it is held.
the timer seems to help by preventing more than one refresh request, and also only refreshing when the dimming should be finished.
the lights now sync more quickly than they did with the scheduled refreshes, but it’s still pretty jerky. it seems like it can take a couple of seconds for the refresh request result in an update sometimes (could this be due to its low priority?)
rather than trying to keep the lights in sync as the dimming happens, i’ll probably just try to figure out when the dimming is done on the first light and send a single update the the other light. the refresh command will be helpful for that i think.
thanks @chris!