Help with new DH for Aust 3 Gang light switch - catchall included


(George) #1

I need some help with creating a DH for this product: http://3asmarthome.com/zigbee-smart-dimmer-switch
It’s a 3 gang light switch. No dimmers (despite the link above).

I have the device paired with ST. I’ve been using this DH for a week or so: KUDLED - UK 1/2/3 Gang Switch

I can turn all three lights on and off via the ST app. However, if I turn turn the actual light switch on, it is NOT updated in the ST app. I’m not sure how to figure out the inclusters and outclusters. The endpoints are 13, 12 and 11. I’m using 3 virtual switches (simulated) and binded the 3 switches to the 3 virtual light switches using the kudled smart app above.

I have re-paired the device to get the catchall, and these are below.

Catchall
zbjoin: {“dni”:“BF8A”,“d”:“00124B000CB562D2”,“capabilities”:“8E”,“endpoints”:[{“simple”:“12 0104 0002 00 04 0000 0005 0004 0006 01 0000”,“application”:"",“manufacturer”:“Feibit Inc co. “,“model”:“FB56+ZSW1IKJ1.7”},{“simple”:“11 0104 0002 00 04 0000 0005 0004 0006 01 0000”,“application”:””,“manufacturer”:“Feibit Inc co. “,“model”:“FB56+ZSW1IKJ1.7”},{“simple”:“10 0104 0002 00 04 0000 0005 0004 0006 01 0000”,“application”:””,“manufacturer”:"Feibit Inc co. ",“model”:“FB56+ZSW1IKJ1.7”}],“parent”:“FFFF”,“joinType”:255}

Raw Description
12 0104 0002 00 04 0000 0005 0004 0006 01 0000

These are the errors in the log when I turn the actual light switch on and off at the switch.
groovy.lang.MissingMethodException: No signature of method: script15076185314711992021779.zigbeeCommand() is applicable for argument types: (java.lang.String, java.lang.String) values: [6, 2]
Possible solutions: zigbeeCommand(java.lang.Object, java.lang.Object, java.lang.Object)

Another error is this: ava.lang.NullPointerException: Cannot get property ‘sourceEndpoint’ on null object @ line 202
The second is line 202 of the Kudled DH


Light Switches - Potential UK Options
Nue 3 Gang Smart Switch to Virtual Switches
(George) #2

@simic

Any help appreciated! I’m using your DH for this product, as a base.

@netsheriff any help appreciated.


KUDLED - UK 1/2/3 Gang Switch
#3

The 3asmarthome 3 gang switch is a HUI Feibit 3 gang switch.
3asmarthome is going to send me a dimmer to try but I dont have it yet.

I have fixed my bodgy Device Handler for this switch that is based off Smartthings Switch Template and Andy’s KUDLED 3 gang switch. After the September 19 App update my original modded Device Handler turned my lights into Christmas Tree lights :o(

Anyway, changed a few things and all seems to be fine again - can’t guarantee what happens if the Smartthings App is updated again. Maybe OK if it is a December update as you might get free flashing Christmas lights ;o)

I found that the switch works better with 3 complete simulated switches. Anyway, for me it updates in the phone app and IDE if you use Alexa or GH or the actual switch itself to turn the switches on or off. Don’t really quickly turn them from off to on and back off again though as it needs time to process each on and off so everything updates. Don’t blame me if your house burns down or a black van turns up out side your place as my hack code is pretty dodgy…

You need both the Device Handler and SmartApp together to get this 3 gang switch to go.

GC it would help if you could provide the end point IDs for the 1 and 2 gang switches to edit for the DH and SmartApp as I only have a 3 gang switch atm. I am assuming the End Point IDs are 12.

SmartApp Binder for HUI Feibit Zigbee 3 gang switch

Device Handler for HUI Feibit Zigbee 3 gang switch


Australia - Tired of waiting
Light Switches - Potential UK Options
(George) #4

Thanks thanks thanks for this. However, i am getting the same errors. I get the error in a different spot to the Kudled DH, but it’s the same error

ava.lang.NullPointerException: Cannot get property ‘sourceEndpoint’ on null object @ line 213

@netsheriff are you sure that when you press the physical light switch that it updated the app?? My app (with your DH & Smartapp does not update). Exactly the same as the previous Kudled DH and Smartapp.

What version is your ST hub? Mine is 018.00022

Any other suggestions anybody? I guess my question is what does the bolded error mean? I get it when I press any three of the physical light switches - on or off?

It seems strange because I can turn all three lights on or off via the app. I am befuddled. .


(Andy Chan) #5

U have to carefully debug the catch-all as u physically press the switch and insert into the if/else part of the code that parses the catch-all as it comes in.

For my use case, I don’t bother anymore. Coz syncing the state of the app button is not important to me…

I turn off/on lights based on lighting smartapps. Or rules or via Alexa…

And these interactions do not depends on the GUI bieng correctly updated. The actions just send a hard on/off command regardless of whatever state the switch is in at the moment.

Hence it’s more of a cosmetic issue to me.

To add to the woes of syncing states, for some catch-all, st just swallow it up and return me on/off:1 without the endpoint ID. That was the case for aqara and atsmart switches. Withiut the endpoint Id . I won’t even know which switch to update the state.


(George) #6

I appreciate the help, but I’m not getting a catchall in the logs when I press any of the 3 physical light switches.

All I get is the bolded error above. java.lang.NullPointerException: Cannot get property ‘sourceEndpoint’ on null object @ line 213


(George) #7

I would go with what you are saying - not worrying about the cosmetic issue, however, I’m trying to get a routine with Google Home to turn off all the downstairs lights, and it will only turn the lights off that it knows are on. it doenst turn off the lights that have been turned on via the light switch.


(Andy Chan) #8

Eh? Doesn’t work that way with alexa.

Why don’t u define a routine that just turn off the things u want.

And get g home call that.

St routines don’t check state. Just fire n forget.


(George) #9

Yes, I tried that from within ST, and it still didn’t work. I removed Google home and pressed the routine button. ST didn’t turn off the lights it didn’t know were on.


(George) #10

The ST routine works if ST knows the light is on. Weird. Dunno what is strange about my hub.


#11

I will take a look as soon as I get a chance.

Make sure you are publishing the DTH and use the simulator to make sure the it has actually updated and the device is using the correct Device Handler.
.
.
.

Edit:

Try this prototype Device Handler and see how you go - whats another DTH between friends :o). This is the one that I brewed that was working fine till the Sep19 App update then turned my lights into Christmas Tree lights, but with few changes it seems to be working to a certain extent.

My setup is I have set up 3 simulated switches for each Gang and then a 4th simulated switch to control all 3 simulated switches at once so I can tell Alexa/GH to turn all lights off or on at once.

The simulated switches in the App all come on and off when using Alexa/Gh or the physical switch itself.

The actual Device switch in the the phone app seems to forget to change from off to on or vice versa, but if you tap the gang buttons in the actual Device when it is say supposed to be on but is still showing off - it will then show on (the correct state) without changing the state.

So the simulated switches are all updating fine, but the actual real switch in the app is forgetting the state it is in - you need to tap it to get it to update. This does not affect the switches performance.

Yet, if you turn the gangs off and on with the actual switch (as apposed to the simulated switches) in the My Home then all the simulated switched change as well to the correct state and all seems to work fine.

There are no errors in the logs for me when using this DTH with the SmartApp Binder I posted above.

BTW when you run the simulator in the IDE after publishing this DTH you will not be able to see all the switches in the pop up window - when you click on the little cog in the first switch that you can see in the simulator. This is because the switches in this DTH are all big like the ones you get with a single light bulb. You can still turn the switches on and off in the simulator at the bottom right under Custom.

HUI ZigBee Wall Switch 3 Gang V.2.1


(Scott G) #12

Using the DH above try running live logging in the IDE, then physically turn the light on; so you can trace the error. The error suggests that “sourceEndpoint” isn’t populated in the message ST sends to parse. The first line of your parse section should print the actual parse message to the live logs before you get the error. Copy all of that here, so we can take a look.


(George) #13

Thanks for the tip, however, I’ve already tried that, and I dont get any catchall in the logs. That’s my confusion, I cant decipher what the error is. This is all I am getting in the logs.

This is what happens when I turn the physical light switch on and off.

I might try a different DH and see what the catchall. I have posted the join catchall above in the first post. Is the join catchall any different to the normal tun on/off catchall??

Edit: I’ve only just now seen the edit to Netsheriffs post. I’ll try that DH now.

Edit:2 Using the new 2.1 DH above, I’m getting the same errors.


(Scott G) #14

Unfortunately I don’t think it’s going to work. ST is pre-parsing that on/off message and doesn’t supply the endpoint it came from. The DTH is constructed as if this was fixed by ST, but I thought that was only for temp reports.

ST is not set up to work well with multiendpoint devices, especially not zigbee switches.


(George) #15

Hold the phone! With the 2.1 DH I can now see the catchall in livelogging.

[raw:0000 8001 00 00 0140 00 7697 00 00 0000 00 00 8A00F866B50C004B12009776, profileId:0000, clusterId:8001, sourceEndpoint:00, destinationEndpoint:00, options:0140, messageType:00, dni:7697, isClusterSpecific:false, isManufacturerSpecific:false, manufacturerId:0000, command:00, direction:00, data:[8A, 00, F8, 66, B5, 0C, 00, 4B, 12, 00, 97, 76]]

DID NOT PARSE MESSAGE for description : catchall: 0000 8001 00 00 0140 00 7697 00 00 0000 00 00 8A00F866B50C004B12009776

@netsheriff Just in case you didnt see this. I am now getting the catchall in the logs, with Dh 2.1


#16

Try this and see if it makes any difference.

With the V.1.4 Device Handler. See below snipit - line 213 has the sourceEndpoint == "12"
Change the 12 to a 10 and at line 219 change the sourceEndpoin from 10 to 12

See if that makes any difference.

Original code in DTH is below from lines 211 - 221

else if(description?.startsWith("on/off:")) {
	def switchValue = description?.endsWith("1") ? "on" : "off"
		if (descMap.sourceEndpoint == "12") {   
			return	[type: "switch1", value : switchValue]
    	}
    	else if (descMap.sourceEndpoint == "11") {   
     		return	[type: "switch2", value : switchValue]
    	}
    	else if (descMap.sourceEndpoint == "10") {   
 			return	[type: "switch3", value : switchValue]
    	}

BTW the phone app is Android 2.6.1 and Hub is on 000.018.00022

Phone App is what caused all the trouble for me originally.

Edit you can also try the above on line 208 and 214 in the V.2.1 DTH and see how you go.


(George) #17

From my basic reading of the catchall (that I can finally now see), is the catchall all messed up?


#18

It is not your Hub as I am now getting the same error you got above with line 213 using the V.1.4 DTH - when physically using the wall plate. It is to do with endpoint IDs so I will have to do a bit of debugging.


(George) #19

I changed the DH for the single gang switch to this DH, and I got the same errors, so hopefully we will be able to get it going. It seems to be an issue with the DH, not the device itself.

Thanks for your work on this.


(George) #20

How did you get on with an updated DH? Eagerly awaiting your work.