[RELEASE] Dimmer Sync

Dimmer Sync
A simple app to keep any number of slave dimmers in sync with a single master dimmer (ON/OFF and level).

This isn't the first app I've made, but it is the first app I've shared externally (so be kind). I borrowed a lot of code and layout ideas from @Cobra and @bptworld. So thanks to both of them for that!!!

Features:

  • Parent/Child App structure
  • Ability to pause any child apps
  • Slave dimmer(s) turn ON/OFF when master dimmer is turned ON/OFF
  • Slave dimmer(s) level is/are sync'ed to master dimmer level as part of ON event
  • Slave dimmer(s) are sync'ed to master dimmer level whenever master level is changed
  • ON/Dim Restrictions per mode (slave light always turns off with master, regardless of mode, to prevent 'orphaned' slave dimmers remaining on)
  • Configurable offset on slave level versus master level

Installation:

  1. Install Parent app code in Hubitat
  2. Install Child app code in Hubitat
  3. Add user app to Hubitat
  4. Open app, select DONE.
  5. Add child apps as needed

App can be found on my GitHub

V1.0.0 - 12/31/2018 - Initial Version
V1.1.1 - 01/15/2019 - Added restrictions per mode
V1.1.2 - 01/28/2019 - Made revision to restrictions per mode, fixing an issue identified
V1.2.0 - 02/26/2019 - Added slave offset variable/ability to have a fixed level offset from the master level

3 Likes

The debug for your off event is backwards. Looks like a copy/paste issue.

	if(evt.value == "off"){
		LOGDEBUG("OFF Check True")
		slaveDimmer.each{
			LOGDEBUG("Turning ON " + it)
			it.off()
		}
	}

Shouldn't Turning ON be Turning OFF? Otherwise it looks great!! Good work!!!

1 Like

LOL. Oops. Copy/paste miss. Thanks, I'll fix it.

EDIT: Fixed. I didn't bother revving up the version # since it was a small typo.

1 Like

FYI. Updated to v1.2.0.

1 Like

@JasonJoelOld Thank you for creating this app!

I see this app uses a single dimmer to echo commands to its slaves. I would like to sync the status of any of x dimmers based on change of any of them. i.e. dimmer1 turns on, turn on dimmer2 and dimmer3. if dimmer2 turns off, turn off dimmer1 and dimmer3. Same with set levels. Thoughts?

Also, noticed this in my logs:
app:3322019-03-07 10:39:46.559 am errorgroovy.lang.MissingMethodException: No signature of method: user_app_Botched1_Dimmer_Sync_Child_67.delayBetween() is applicable for argument types: (java.util.ArrayList, java.lang.Integer) values: [[null, null], 500] on line 169 (masterONOFFHandler)

The only way you can get that error is if you have something selected in the slave dimmers section that was either deleted, or can not be found.

Might want to try clearing whatever is selected in the slave dimmer config and re-selecting them. If that doesn't work, remove the child and re-make it.

To make any dimmer control any other dimmer in the group you should probably just make a GROUP in HE, and do it with an RM rule with a trigger that says light a level OR light b level OR light c, etc. and then have the rule set the dimmer level of the group.

My app Switch Bindings will do exactly what you're looking for!

1 Like

Forgot about that one! Good call!

Perfect! Now if my devices would just REPORT instead of having their changes drop somewhere... I'd be all set. But that is a topic for multiple hubs :wink:

1 Like
  • V1.3.0 - 04/27/2019 - Added Enable/Disable with External Switch. Only the Child App needs to be updated.

(note, since my accounts got mixed up/changed I can't update the original post any more)

@JasonJoel, I'm looking at this and wondering if it will solve my current situation.

The setup:
I have one large Kitchen/Dining/Living room. I have the approximately 25 lights broken up into 5 groups in HE. Cabinet lights, Kitchen, Island, Dining, and Living. I also have group that encompasses all of them (because HE is doing a HORRIBLE job with handling a group of groups, allowing me to sync the on/off state of each). I have a single virtual dimmer that adjust from 50% to 100% over 30 minutes before sunrise, and back down at sunset. I am running into issues where the level change on the virtual dimmer is causing the lights to turn on because they weren't all turned off, etc due to the grouping

What I want:
I want to be able to have the virtual dimmer move as it wishes, and the lights to turn on at the correct level, whether they are turned on as a single group, or the large group. When the lights are on, I want them to adjust accordingly when dimming starts.

Does your app do this on it's own, or will I need to do additional RM/WATO/Virtual Dimmers, etc?

Thanks for the help, and the great app,
Jon

I have tried both Dimmer Sync and Switch Bindings and they both react the same way (using Homeseer HS WD200+ Dimmers. When you move one dimmer, the other starts to follow but then comes back to the original position or sometimes goes half way when it should dim to full. Sometimes they sync but rarely. Even using only the master Dimmer (when configured that way) it rarely works.

Any other solutions to get 3 way dimming using 2 WD200+ ?. I know I could use the compagnion WA100+ but I would lose the LED lights and other functions.

Thanks !

All I can say is to try it.

No idea there. Dimmer sync works perfectly with my GE dimmers, master and slave. I don't have any homeseer devices.

I will try to see what the code is using to sync the dimmers, there is another way to control these.

One thing I thought I would mention, is I do know the app will not work correctly using devices repeated through hub connect or hub link. So keep that in mind.

I'm using only one hub, a C5.

I'm also using CodaHQ's driver for DW200+ dimmers, maybe that's the problem,

It is possible that if the master dimmer is reporting intermediate level % AS IT IS DIMMING/RAISING (which a good dimmer and/or driver should NOT do) that could throw things out of wack as there would be way too many messages too fast to keep up with/repeat to the slaves... Causing wacky slave dimmer behavior (who knows which of the level% messages it received while the master was moving?).

If that is happening you should be able to see it in the system logs for the master device (may have to have debug logging on). It may be possible to work around that in the app code, though - but it would require injecting a delay into things before it sends the new level to the slaves to ensure the msater is done dimming/raising.

I enebled the logs, here is what came out of raising one dimmer to 76 (manualy at the switch)
Does that help ?

ClearPauseShow Past Logs

search

dev:9292019-09-25 14:22:33.657 debugParse returned [[name:switch, value:on], [name:level, value:76, unit:%]]

dev:9292019-09-25 14:22:33.654 infoLevel for Lampe is 76

dev:9292019-09-25 14:22:33.651 infoSwitch for Lampe is on

dev:9292019-09-25 14:22:33.647 tracecmd: SwitchMultilevelReport(value:76)

dev:9292019-09-25 14:22:33.644 debugdimmerEvents(hubitat.zwave.Command cmd)

dev:9292019-09-25 14:22:33.636 tracecmd: SwitchMultilevelReport(value:76)

dev:9292019-09-25 14:22:33.625 debugparse(zw device: 26, command: 2603, payload: 4C 4C 00 , isMulticast: false)

dev:9292019-09-25 14:22:33.616 debugParse returned [name:switch, value:on, type:physical]

dev:9292019-09-25 14:22:33.613 debugsceneNumber: 1 keyAttributes: 1

dev:9292019-09-25 14:22:33.610 tracecmd: CentralSceneNotification(keyAttributes:1, sceneNumber:1, sequenceNumber:63)

dev:9292019-09-25 14:22:33.606 debugzwaveEvent(hubitat.zwave.commands.centralscenev1.CentralSceneNotification cmd)

dev:9292019-09-25 14:22:33.603 tracecmd: CentralSceneNotification(keyAttributes:1, sceneNumber:1, sequenceNumber:63)

dev:9292019-09-25 14:22:33.585 debugparse(zw device: 26, command: 5B03, payload: 3F 81 01 , isMulticast: false)

dev:9292019-09-25 14:22:32.304 debugParse returned [[name:pushed, value:5, descriptionText:Lampe Hold-Up (button 5) pressed, isStateChange:true], [name:switch, value:on, type:physical]]

dev:9292019-09-25 14:22:32.297 debugsceneNumber: 1 keyAttributes: 2

dev:9292019-09-25 14:22:32.294 tracecmd: CentralSceneNotification(keyAttributes:2, sceneNumber:1, sequenceNumber:62)

dev:9292019-09-25 14:22:32.290 debugzwaveEvent(hubitat.zwave.commands.centralscenev1.CentralSceneNotification cmd)

dev:9292019-09-25 14:22:32.286 tracecmd: CentralSceneNotification(keyAttributes:2, sceneNumber:1, sequenceNumber:62)

dev:9292019-09-25 14:22:32.248 debugparse(zw device: 26, command: 5B03, payload: 3E 82 01 , isMulticast: false)

dev:3532019-09-25 14:22:28.629 infoMS Bureau: motion is active

--- Live Log Started, waiting for events ---

Ok, that looks good - I don't see any issue with that. I'll think on it some more.

It may be worth turning on debug logging on the simmer sync app and see what it shows. It should show exactly what it is sending to the slave devices. That may help figure out if it is an app issue or device interaction issue.

Should be some lines like below when it moves the slave device:
Event Level Value: xyz
slaveDimmer: xyz
Master ON/OFF: on/off

Dim master from Off to 66%:

dev:9372019-09-25 20:00:37.080 errorgroovy.lang.MissingMethodException: No signature of method: user_driver_codahq_hubitat_HS_WD200__Dimmer_481.indicatorNever() is applicable for argument types: (java.math.BigDecimal) values: [1] (indicatorNever)
dev:9372019-09-25 20:00:35.467 errorgroovy.lang.MissingMethodException: No signature of method: user_driver_codahq_hubitat_HS_WD200__Dimmer_481.indicatorNever() is applicable for argument types: (java.math.BigDecimal) values: [1] (indicatorNever)
dev:9372019-09-25 20:00:35.397 errorgroovy.lang.MissingMethodException: No signature of method: user_driver_codahq_hubitat_HS_WD200__Dimmer_481.indicatorNever() is applicable for argument types: (java.math.BigDecimal) values: [1] (indicatorNever)
dev:9372019-09-25 20:00:35.054 errorgroovy.lang.MissingMethodException: No signature of method: user_driver_codahq_hubitat_HS_WD200__Dimmer_481.indicatorNever() is applicable for argument types: (java.math.BigDecimal) values: [1] (indicatorNever)
dev:8012019-09-25 20:00:34.892 infoRéfrigérateur réserve power is 131.848 W
dev:9372019-09-25 20:00:33.508 errorgroovy.lang.MissingMethodException: No signature of method: user_driver_codahq_hubitat_HS_WD200__Dimmer_481.indicatorNever() is applicable for argument types: (java.math.BigDecimal) values: [1] (indicatorNever)
dev:8012019-09-25 20:00:33.210 infoRéfrigérateur réserve power is 163.190 W
dev:8012019-09-25 20:00:31.482 infoRéfrigérateur réserve power is 845.944 W
app:8482019-09-25 20:00:30.774 debugDimmer Sync Child - Dimming Cuisine Esclave to 66
app:8482019-09-25 20:00:30.756 debugDimmer Sync Child - Master ON/OFF: on
app:8482019-09-25 20:00:30.712 debugDimmer Sync Child - slaveDimmer: [Cuisine Esclave]
app:8482019-09-25 20:00:30.687 debugDimmer Sync Child - Event Level Value: 66
app:8482019-09-25 20:00:29.627 debugDimmer Sync Child - Turning ON Cuisine Esclave
app:8482019-09-25 20:00:29.589 debugDimmer Sync Child - Turning ON Cuisine Esclave
app:8482019-09-25 20:00:29.521 debugDimmer Sync Child - ON Check True
app:8482019-09-25 20:00:29.513 debugDimmer Sync Child - Event Value: on
app:8482019-09-25 20:00:29.489 debugDimmer Sync Child - ON Check True
app:8482019-09-25 20:00:29.473 debugDimmer Sync Child - Event Value: on

Then master to 33%:

dev:9372019-09-25 20:02:19.611 errorgroovy.lang.MissingMethodException: No signature of method: user_driver_codahq_hubitat_HS_WD200__Dimmer_481.indicatorNever() is applicable for argument types: (java.math.BigDecimal) values: [1] (indicatorNever)
dev:9372019-09-25 20:02:18.822 errorgroovy.lang.MissingMethodException: No signature of method: user_driver_codahq_hubitat_HS_WD200__Dimmer_481.indicatorNever() is applicable for argument types: (java.math.BigDecimal) values: [1] (indicatorNever)
app:8482019-09-25 20:02:16.883 debugDimmer Sync Child - Dimming Cuisine Esclave to 34
app:8482019-09-25 20:02:16.863 debugDimmer Sync Child - Turning ON Cuisine Esclave
app:8482019-09-25 20:02:16.857 debugDimmer Sync Child - Master ON/OFF: on
app:8482019-09-25 20:02:16.826 debugDimmer Sync Child - slaveDimmer: [Cuisine Esclave]
app:8482019-09-25 20:02:16.803 debugDimmer Sync Child - Event Level Value: 34
app:8482019-09-25 20:02:16.794 debugDimmer Sync Child - ON Check True
app:8482019-09-25 20:02:16.787 debugDimmer Sync Child - Event Value: on
app:8482019-09-25 20:02:16.130 debugDimmer Sync Child - Turning OFF Cuisine Esclave
app:8482019-09-25 20:02:16.116 debugDimmer Sync Child - OFF Check True
app:8482019-09-25 20:02:16.112 debugDimmer Sync Child - Event Value: off

Slave to 66% : (

Master does not follow)

dev:9372019-09-25 20:03:09.199 errorgroovy.lang.MissingMethodException: No signature of method: user_driver_codahq_hubitat_HS_WD200__Dimmer_481.indicatorNever() is applicable for argument types: (java.math.BigDecimal) values: [1] (indicatorNever)
dev:9372019-09-25 20:02:23.101 errorgroovy.lang.MissingMethodException: No signature of method: user_driver_codahq_hubitat_HS_WD200__Dimmer_481.indicatorNever() is applicable for argument types: (java.math.BigDecimal) values: [1] (indicatorNever)

Slave OFF: no reaction from master
No change in log

Master OFF: slave does follow:

app:8482019-09-25 20:05:37.789 debugDimmer Sync Child - Turning OFF Cuisine Esclave
app:8482019-09-25 20:05:37.778 debugDimmer Sync Child - OFF Check True
app:8482019-09-25 20:05:37.775 debugDimmer Sync Child - Event Value: off
dev:9372019-09-25 20:05:33.931 errorgroovy.lang.MissingMethodException: No signature of method: user_driver_codahq_hubitat_HS_WD200__Dimmer_481.indicatorNever() is applicable for argument types: (java.math.BigDecimal) values: [1] (indicatorNever)