Toys are nearly out of the pram


#1

Hi all,
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 ?
Cheers!


#2

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.


#3

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.


#4

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.


#5

My FGS-223 driver should create child devices. Enable debug logging on the device and try tapping on "Save Preferences" and watch the logs.


#6

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...

Cheers!


#7

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...

dev:1132019-02-12 10:54:07.719 debugSwitchBinaryReport: SwitchBinaryReport(value:255) : Endpoint: 2

dev:1132019-02-12 10:54:06.933 debugUnhandled event MeterReport(meterType:33, precision:1, scale:2, size:2, meterValue:[0, 0])

dev:1132019-02-12 10:54:06.196 debugSwitchBinaryReport: SwitchBinaryReport(value:0) : Endpoint: 1

dev:1132019-02-12 10:54:06.131 debugSwitchBinaryReport: SwitchBinaryReport(value:0) : Endpoint: null

dev:1132019-02-12 10:54:05.916 debugSwitchBinaryReport: SwitchBinaryReport(value:255) : Endpoint: 2

dev:1132019-02-12 10:54:04.914 debugSwitchBinaryReport: SwitchBinaryReport(value:255) : Endpoint: 1

dev:1132019-02-12 10:54:04.842 debugSwitchBinaryReport: SwitchBinaryReport(value:255) : Endpoint: null

dev:1132019-02-12 10:54:04.219 debugSwitchBinaryReport: SwitchBinaryReport(value:0) : Endpoint: 2

dev:1132019-02-12 10:54:03.952 debugUnhandled event MeterReport(meterType:33, precision:1, scale:2, size:2, meterValue:[0, 0])

dev:1132019-02-12 10:54:03.215 debugSwitchBinaryReport: SwitchBinaryReport(value:0) : Endpoint: 1

dev:1132019-02-12 10:54:03.133 debugSwitchBinaryReport: SwitchBinaryReport(value:0) : Endpoint: null

dev:122019-02-12 10:53:46.576 infoLiving Room Sensor is inactive

dev:1132019-02-12 10:53:30.990 debugparse description: zw device: 08, command: 3202, payload: 21 32 04 77 00 00 C1 00

dev:1132019-02-12 10:53:28.445 infoFibaro Switch was turned on [digital]

dev:1132019-02-12 10:53:28.400 infoSwitchBinaryReport value: 255

dev:1132019-02-12 10:53:28.394 debugparse description: zw device: 08, command: 2503, payload: FF C1 00

dev:1132019-02-12 10:53:28.063 debugrefresh

dev:1132019-02-12 10:53:27.996 warnconfigure...


#8

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

dev:1142019-02-12 11:16:11.392 debugSwitchBinaryReport: SwitchBinaryReport(value:0) : Endpoint: 2

dev:1142019-02-12 11:16:10.729 errorjava.lang.NullPointerException: Cannot invoke method split() on null object on line 644 (childOn)

dev:1142019-02-12 11:16:10.711 debugchildOn(null)

dev:1142019-02-12 11:16:09.195 debugMeterReport: MeterReport(meterType: 1, precision: 1, scale: 2, size: 2, meterValue: [0, 0], rateType: 1, deltaTime: 0, previousMeterValue: [68, 28]) : Endpoint: 1

dev:1142019-02-12 11:16:08.493 debugSwitchBinaryReport: SwitchBinaryReport(value:0) : Endpoint: 1

dev:1142019-02-12 11:14:29.192 debugFibaro Double Switch 2 FGS-223 parameter '29' with a byte size of '1' is set to '0'

dev:1142019-02-12 11:14:28.196 debugFibaro Double Switch 2 FGS-223 parameter '28' with a byte size of '1' is set to '0'

dev:122019-02-12 11:14:27.262 infoLiving Room Sensor is inactive

dev:1142019-02-12 11:14:27.188 debugFibaro Double Switch 2 FGS-223 parameter '59' with a byte size of '2' is set to '3600'

dev:1142019-02-12 11:14:26.186 debugFibaro Double Switch 2 FGS-223 parameter '58' with a byte size of '2' is set to '3600'

dev:1142019-02-12 11:14:25.184 debugFibaro Double Switch 2 FGS-223 parameter '57' with a byte size of '2' is set to '100'

dev:1142019-02-12 11:14:24.180 debugFibaro Double Switch 2 FGS-223 parameter '55' with a byte size of '1' is set to '10'

dev:1142019-02-12 11:14:23.202 debugFibaro Double Switch 2 FGS-223 parameter '54' with a byte size of '1' is set to '20'

dev:1142019-02-12 11:14:22.170 debugFibaro Double Switch 2 FGS-223 parameter '53' with a byte size of '2' is set to '100'

dev:1142019-02-12 11:14:21.181 debugFibaro Double Switch 2 FGS-223 parameter '51' with a byte size of '1' is set to '10'

dev:1142019-02-12 11:14:20.166 debugFibaro Double Switch 2 FGS-223 parameter '50' with a byte size of '1' is set to '20'

dev:1142019-02-12 11:14:19.196 debugFibaro Double Switch 2 FGS-223 parameter '44' with a byte size of '2' is set to '600'

dev:1142019-02-12 11:14:18.174 debugFibaro Double Switch 2 FGS-223 parameter '43' with a byte size of '1' is set to '1'

dev:1142019-02-12 11:14:17.173 debugFibaro Double Switch 2 FGS-223 parameter '42' with a byte size of '1' is set to '3'

dev:1142019-02-12 11:14:16.171 debugFibaro Double Switch 2 FGS-223 parameter '41' with a byte size of '1' is set to '2'

dev:1142019-02-12 11:14:15.172 debugFibaro Double Switch 2 FGS-223 parameter '40' with a byte size of '1' is set to '3'

dev:1142019-02-12 11:14:14.170 debugFibaro Double Switch 2 FGS-223 parameter '20' with a byte size of '1' is set to '2'

dev:1142019-02-12 11:14:13.167 debugFibaro Double Switch 2 FGS-223 parameter '18' with a byte size of '2' is set to '5'

dev:122019-02-12 11:14:12.721 infoLiving Room Sensor is active

dev:1142019-02-12 11:14:12.167 debugFibaro Double Switch 2 FGS-223 parameter '17' with a byte size of '2' is set to '50'

dev:1142019-02-12 11:14:11.247 debugMeterReport: MeterReport(meterType: 1, precision: 1, scale: 2, size: 2, meterValue: [4, 90], rateType: 1, deltaTime: 0, previousMeterValue: [190, 0]) : Endpoint: 1

dev:1142019-02-12 11:14:11.219 debugFibaro Double Switch 2 FGS-223 parameter '16' with a byte size of '1' is set to '0'

dev:1142019-02-12 11:14:10.161 debugFibaro Double Switch 2 FGS-223 parameter '15' with a byte size of '1' is set to '0'

dev:1142019-02-12 11:14:09.150 debugFibaro Double Switch 2 FGS-223 parameter '13' with a byte size of '2' is set to '5'

dev:1142019-02-12 11:14:08.591 debugSwitchBinaryReport: SwitchBinaryReport(value:255) : Endpoint: 1

dev:1142019-02-12 11:14:08.160 debugFibaro Double Switch 2 FGS-223 parameter '12' with a byte size of '2' is set to '50'

dev:1142019-02-12 11:14:07.156 debugFibaro Double Switch 2 FGS-223 parameter '11' with a byte size of '1' is set to '0'

dev:122019-02-12 11:14:06.725 infoLiving Room Sensor is inactive

dev:1142019-02-12 11:14:06.292 debugMeterReport: MeterReport(meterType: 1, precision: 1, scale: 2, size: 2, meterValue: [0, 0], rateType: 1, deltaTime: 0, previousMeterValue: [191, 0]) : Endpoint: 1

dev:1142019-02-12 11:14:06.167 debugSwitchBinaryReport: SwitchBinaryReport(value:0) : Endpoint: 1

dev:1142019-02-12 11:14:05.444 debugSwitchBinaryReport: SwitchBinaryReport(value:255) : Endpoint: 1

dev:1142019-02-12 11:14:05.193 debugFibaro Double Switch 2 FGS-223 parameter '9' with a byte size of '1' is set to '1'

dev:1142019-02-12 11:14:04.193 debugMultiChannelAssociationReport MultiChannelAssociationReport(groupingIdentifier:1, maxNodesSupported:1, reportsToFollow:0, nodeId:[])

dev:1142019-02-12 11:14:02.071 debugCurrent value of parameter 29 is unknown

dev:1142019-02-12 11:14:02.070 debugCurrent value of parameter 28 is unknown

dev:1142019-02-12 11:14:02.067 debugCurrent value of parameter 59 is unknown

dev:1142019-02-12 11:14:02.066 debugCurrent value of parameter 58 is unknown

dev:1142019-02-12 11:14:02.065 debugCurrent value of parameter 57 is unknown

dev:1142019-02-12 11:14:02.063 debugCurrent value of parameter 55 is unknown

dev:1142019-02-12 11:14:02.062 debugCurrent value of parameter 54 is unknown

dev:1142019-02-12 11:14:02.060 debugCurrent value of parameter 53 is unknown

dev:1142019-02-12 11:14:02.048 debugCurrent value of parameter 51 is unknown

dev:1142019-02-12 11:14:02.047 debugCurrent value of parameter 50 is unknown

dev:1142019-02-12 11:14:02.046 debugCurrent value of parameter 44 is unknown

dev:1142019-02-12 11:14:02.044 debugCurrent value of parameter 43 is unknown

dev:1142019-02-12 11:14:02.042 debugCurrent value of parameter 42 is unknown

dev:1142019-02-12 11:14:02.041 debugCurrent value of parameter 41 is unknown

dev:1142019-02-12 11:14:02.039 debugCurrent value of parameter 40 is unknown

dev:1142019-02-12 11:14:02.038 debugCurrent value of parameter 20 is unknown

dev:1142019-02-12 11:14:02.028 debugCurrent value of parameter 18 is unknown

dev:1142019-02-12 11:14:02.026 debugCurrent value of parameter 17 is unknown

dev:1142019-02-12 11:14:02.025 debugCurrent value of parameter 16 is unknown

dev:1142019-02-12 11:14:02.024 debugCurrent value of parameter 15 is unknown

dev:1142019-02-12 11:14:02.022 debugCurrent value of parameter 13 is unknown

dev:1142019-02-12 11:14:02.021 debugCurrent value of parameter 12 is unknown

dev:1142019-02-12 11:14:02.020 debugCurrent value of parameter 11 is unknown

dev:1142019-02-12 11:14:02.018 debugCurrent value of parameter 10 is unknown

dev:1142019-02-12 11:14:02.007 debugCurrent value of parameter 9 is unknown

dev:1142019-02-12 11:14:01.968 debugAdding MultiChannel association group 1

dev:1142019-02-12 11:14:01.961 debugConfiguring Device For SmartThings Use

dev:122019-02-12 11:13:53.352 infoLiving Room Sensor is active

dev:122019-02-12 11:13:50.154 infoLiving Room Sensor is inactive

dev:122019-02-12 11:13:32.836 infoLiving Room Sensor is active

dev:122019-02-12 11:11:53.696 infoLiving Room Sensor is inactive

dev:122019-02-12 11:11:37.731 infoLiving Room Sensor is active

dev:102019-02-12 11:11:27.621 debugSensorMultilevelReport: SensorMultilevelReport(precision:1, scale:0, sensorType:4, sensorValue:[0, 0], size:2, scaledSensorValue:0.0)

dev:102019-02-12 11:11:27.537 debugSensorMultilevelReport: SensorMultilevelReport(precision:1, scale:0, sensorType:4, sensorValue:[0, 0], size:2, scaledSensorValue:0.0)

dev:122019-02-12 11:11:09.900 infoLiving Room Sensor is inactive

hub:12019-02-12 11:10:32.315 infoZ-Wave device "Fibaro Switch" excluded and removed.


#9

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.


#10

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.


#11

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!