Enable the logs on the piston. Try once with trace and once with debug, don’t remember which one says it (I think the debug does). If an event comes in that doesn’t change anything (ie. Old state matches new state) it ignores it with some exceptions to account for momentary buttons and touch. If you see anything in the logs about a duplicate event, let me know and I will provide a way to disable that optimization.
@CAL7, please look at the post above regarding the logging of your pistons. Hopefully that will help you out.
First, thank you to @ady624 and @johnconstantelo
This is using John’s DTH at: GE 3-speed Fan Control DTH
Here are the debug and trace logs from my test piston. The switch was OFF to start (and the whole time). Each set of logs shows two OFF button presses. (FYI… The middle set of 6 lines are what was thrown on the logging just from the change in CoRE from debug to trace log mode.) I don’t see anything about duplicate events.
DEBUG
debug ╔═══ Done in 269ms
debug ║░░░ Scheduling actions for condition #-1. State did NOT change.
debug ║░░░ Primary IF block evaluation result is false
debug ║░░░ Scheduling actions for condition #1. State did NOT change.
debug ║░░░ Setting non-matching device list to []
debug ║░░░ Setting matching device list to []
debug ║░░░ Condition evaluation interrupted due to interaction method mismatch. Event is programmatic, expecting Physical.
debug ║░░░ Event eligibility for the primary IF block is 2 - ELIGIBLE (triggers required, event is a trigger)
debug ╚═══ Received a primary block device event
debug ╔═══ Done in 207ms
debug ║░░░ Scheduling actions for condition #-1. State did NOT change.
debug ║░░░ Primary IF block evaluation result is false
debug ║░░░ Scheduling actions for condition #1. State did NOT change.
debug ║░░░ Setting non-matching device list to []
debug ║░░░ Setting matching device list to []
debug ║░░░ Condition evaluation interrupted due to interaction method mismatch. Event is programmatic, expecting Physical.
debug ║░░░ Event eligibility for the primary IF block is 2 - ELIGIBLE (triggers required, event is a trigger)
debug ╚═══ Received a primary block device event
SWITCH FROM DEBUG TO TRACE
trace ╔═══ Task processing took 138ms
trace ║░░░ Removing any existing ST safety nets
trace ║░░░ Rescheduling time triggers
trace ╚═══ Processing tasks (v0.2.13a.20160812)
trace ║ Subscribing to events from Back Porch Fan for attribute switch, handler is deviceHandler
error ║ ERROR: Error evaluating condition: java.lang.NullPointerException: Cannot get property 'physical' on null object
TRACE
trace ╔═══ Task processing took 45ms
trace ║░░░ Removing any existing ST safety nets
trace ║░░░ Rescheduling time triggers
trace ╚═══ Processing tasks (v0.2.13a.20160812)
trace ╔═══ Event processing took 137ms
trace ╚═══ Processing event switch for device Back Porch Fan with id 1e65a5d1-cf16-4c53-b49f-c9dbcd35b683, value off, generated on Mon Aug 15 02:11:18 UTC 2016, about 267ms ago (v0.2.13a.20160812)
trace ╔═══ Task processing took 40ms
trace ║░░░ Removing any existing ST safety nets
trace ║░░░ Rescheduling time triggers
trace ╚═══ Processing tasks (v0.2.13a.20160812)
trace ╔═══ Event processing took 52ms
trace ╚═══ Processing event switch for device Back Porch Fan with id 1e65a5d1-cf16-4c53-b49f-c9dbcd35b683, value off, generated on Mon Aug 15 02:11:09 UTC 2016, about 262ms ago (v0.2.13a.20160812)
Can you please find the events corresponding to the logs in the Device > List events? Do they show type = physical in the details page?
Thank you
I just installed a GE fan control switch and attempted to add this code. When applying through the IDE, I get:
No signature of method: script_text_.metadata() is applicable for argument types: (script_text_$_run_closure1) values: [script_text_$_run_closure1@_text_] Possible solutions: getMetadata(), getState(), setState(java.lang.Object), metaClass(groovy.lang.Closure
Where alphanumeric strings are replaced with _text_ as I’m not sure if they’re linked to me directly or not. Is this something that I have somehow screwed up through ST’s interface?
thanks!
It sounds like you’re installing it as a smart app. This is a device handler. Click on the device handler tab and new device handler. Follow the directions for that.
@johnconstantelo Does yesterday’s update make any changes to the isPhysical reporting?
Hi Charles, no not yet. The change ensured that if the switch was physically used to adjust the fan speed that the DH caught it and updated the phone app with the right speed.
Greetings. First post after lurking and ready for a while.
I’ve installed a few custom SmartApps with success. I am trying to implement this Fan Device Type code but your links are giving me a 404 error. Any clue what the issue is?
Thanks
I am trying to implement this Fan Device Type code but your links are giving me a 404 error. Any clue what the issue is?
Use the first link in the post you just created. That one works. The second link was really just for testing, and is no longer there as you found out. I’ll edit my post above to remove that link. Thanks for the heads up.
Use the first link in the post you just created. That one works. The second link was really just for testing, and is no longer there as you found out. I’ll edit my post above to remove that link. Thanks for the heads up.
Thank you sir. Got it.
Charles, I’d assume this is where isPhysical, as well as isStateChange is missing:
private dimmerEvents(physicalgraph.zwave.Command cmd) {
def value = (cmd.value ? "on" : "off")
def result = [createEvent(name: "switch", value: value)]
if (cmd.value && cmd.value <= 100) {
result << createEvent(name: "level", value: cmd.value, unit: "%")
}
return result
}
the createEvent(name: “switch”…) part…
Hi John,
I pulled down the code and used it for a GE ceiling fan switch, however the low/medium/high button do not change the fan speed.
I am on a version 1 hub - might that affect the operation of the fan switch?
The on/off functions, the notice says changing fan speed setting to …
But the fan does not switch speed.
Any Suggestions?
- A better functional Device Type for Z-Wave Smart Fan Control Switches, particularly the GE 12730 device.
- Updates:
-
- 02-18-2016 : Initial commit
- 03-11-2016 : Due to ST’s v2.1.0 app totally hosing up SECONDARY_CONTROL, implemented a workaround to display that info in a separate tile.
- 08-14-2016 : Completely changed the code to use ST’s updated DH for “dimmer switch”. Did not reimplement “adjusting” state.
- 08-28-2016 : Made some cosmetic changes, and fixed the low/med/high reporting to properly reflect any physical adjustment at the switch.
I think I had this once. Been a while since then. If I remember right the values for low,med,high didn’t get set right.
I was seeing an error in live logging. (I think) when I tried to change speeds. I went in the ide and the values (wish I was home to look at it) for the speeds were blank. Possibly I clicked edit on the ide and entered the default values and it worked after that.
I can look when I get home if you haven’t figured it out by then or possibly someone else can provide a little more detail?
I realize this is vague. Without seeing the actual ide screen it’s hard to remeb. When I say edit I believe that was when I had opened the details up about that specific device. Down towards the bottom.
EDIT: Okay I got home and got on the computer. You need to log into the IDE. Select the fan from your device list. A page will open up with details of that device. Scroll down until you see preferences area.
Click Edit
then on the next page fill in the fields with the appropriate numbers.
Select save and it should work now.
If you have this data already then it’s obviously something else.
I tested this before I posted my edit by removing the numbers. The fan turns on / off but you can not change the speed. Put the numbers back and it works again.
With the latest DTH, I’m not getting any isPhysical report from CoRE.
With the BIG CAVEAT that I am rummaging around in areas I know nothing… I tried changing the createEvent line by adding isPhysical:true and isStateChange:true, thusly:
From:
result << createEvent(name: "level", value: cmd.value, unit: "%")
To:
result << createEvent(name: "level", value: cmd.value, unit: "%", isPhysical:true, isStateChange:true)
No difference (i.e. no physical switch change detected.)
It took me 9 months, but I finally got my GE ceiling fan switch installed. It works perfect with Alexa, but the boss is not happy with the % thing to change the fan speed.
I’ve successively installed 2 custom device types in the past, so I’m not totally ignorant of the process. ( But it took me about 4 beers to do each one.) 
I would appreciate some basic hints on how to get this custom device type up & running for Alexa use.
I could be wrong, I’ll check when I get home. When I installed this I could not tell Alexa to set fan to low, med, high. I still have to tell her a level.
This DTH gave me low, med,high buttons in the smartthings app. Vice a slider.
I will test it when I can.
Has anyone had a GE Fan switch just totally STOP working (Not just falling out / off the network), but dead as a doornail ,no power to unit ?
I have had mine for 8 months and 3 days ago… it just "broke"
Showing inactive in the IDE - is able to receive commands but of course NOTHING happens.
Any ideas? I have heard of zwave failing with the zwave - but the actual switch would work as a "dumb " switch if you toggled at the wall unit. This does NOTHING … am I overlooking something simple?
Thanks!
No blue led or nothing? Is a breaker tripped? Try pulling the airgap switch to see it that wakes it up. Could just be a bad device.

