All I want is is my Fibaro Double Switch to do what it's told.
I have a driver and two sub-simulated devices.
I can control them fine via the network.
I CANNOT get my head around the simple rule of a virtual switch to behave properly in order to control them. It must just be a thought process, but SO many options are missing and adding Rule Machine Rules is like Manic f**ng Miner - I can't just edit and change I have to start afresh everytime.
My want is simple:
To be able to control the Simulated Switches, S1 and S2.
EG: Currently If a simulated switch is on and I turn it off at the wall the simulated switch remains on - so I can't turn it back on without turning it off first.
What the heck is 'best practice way' of dealing with this ?
If you want to keep doing what you're doing but are OK with using a custom app instead of Rule Machine, this app was more or less designed for that purpose and should work: [RELEASE] Virtual Device Sync, but I think you'll have to let it re-create the virtual devices for you, so you'll lose whatever automations you may have set up with the existing ones. That being said, you should also be able to make a couple rules in RM per switch and make this work, but the app should be much easier.
But it seems like the best solution to me is to just not use virtual devices and instead use a driver that properly creates the child devices. Then you don't need virtual devices at all; the two channels of the "real" device are exposed as two separate Hubitat devices (grouped in the UI under the parent, but you can name them whatever you want). I don't have this particular switch and don't know if Hubitat will do that for you with any stock driver (guessing not if that didn't happen for you). If this is the switch you have, this community-created driver might work, however: [RELEASE] Fibaro FGS-222 Double Relay Switch - Driver [EDIT: This does not appear to create child devices as I incorrectly assumed.]
That definitely seems like the better way to do this to me.
I've read this a million times. No disrespect meant. I have 4 X FGS-223
I have to use the virtual device sync along with the FGS-222 relay switch driver from Robin. And I do. But the issue is that is is a uni-directional one time sync. The virtual Switch Remains 'OFF' If I physically flip it.
Hubitat doesn't do child channels.
Eric's Driver (erocm123) along with the Child Metering Driver doesn't seperate anything at all. That is to say I can only turn off and on s1 and s2 en-mass. He does implement toggle switches right though and his dimmer HE is perfect.
Ack, you're right. I don't have that device so I've never used the driver, and I just figured it would create child devices like most drivers for such devices do now. Hubitat does support mulitchannel Z-Wave devices (this driver is a bit older and I can't remember exactly when that feature was implemented), but they're best (IMHO) used with drivers that create child devices for the channels instead of forcing you to use virtual switch and "sync" workarounds. Hopefully someone who has used this device can chime in with what they've done that has worked well for them.
My FGS-223 driver should create child devices. Enable debug logging on the device and try tapping on "Save Preferences" and watch the logs.
Hello! When I add the driver no child devices are created, no errors in the log either..
2019-02-12 07:44:55.831 debugParsed Crc16Encap(checksum:65535, command:13, commandClass:96, data:[1, 1, 50, 2, 33, 50, 4, 39, 0, 0, 141, 187]) to [['descriptionText':Kitchen Double Switch: Crc16Encap(checksum:65535, command:13, commandClass:96, data:[1, 1, 50, 2, 33, 50, 4, 39, 0, 0, 141, 187])]]
The main on / off operates both lights, when I try the child button I get this error:
errorjava.lang.NullPointerException: Cannot invoke method split() on null object on line 641 (childOn)
Hence me resorting to the relay driver and your device sync app...
Here is the log after deleting all but your FGS-223 driver and child driver and re-adding to Zwave - it is recognised as a single switch, changing to your 223 driver doesn't create child devices...
More Logs: This time I changed the driver to match the inclusters fingerprint of my (UK) double switch and it was found correctly, but didn't create child devices nor offer any feedback:
2019-02-12 11:16:12.190 debugMeterReport: MeterReport(meterType: 1, precision: 1, scale: 2, size: 2, meterValue: [0, 0], rateType: 1, deltaTime: 0, previousMeterValue: [245, 211]) : Endpoint: 2
OK.. well... It sprang into life! Not really sure how or why... but here are the steps I took:
Created a new driver prefixed with debug and removed all your line comments to enable more debugging. I also removed the last edit you made to disable the "zw MultiChannel" capability.
I then configured, polled, refreshed and generally just clicked around.
I then re-disabled the Multichannel capability and the Child devices immediately appeared!
The mind boggles.
Yeah, I only have the child device creation in the updated() method right now so they only get created if you click "Save Preferences". You may have missed that in my last post.
Ahh since Debug is enabled by default, extras in groovy file non-withstanding, I never did invoke update, save for when I was hoplessly when desperate.
Thank you for you awesome endeavors!