Found the Double Tap bug (well it's really a device type issue), need help figuring out how to test fix in IDE


I have a GE Dimmer that I tried to use with Double Tap to no avail yesterday. This morning I took a look at the code and simulated it in the IDE and found the issue. Some devices, including the virtual device you are given to test with, do not send an event if the event is not changing the device state. So, for example, when I double-tap my switch the first tap turns it on and is sent as an event. The second tap the switch is already on therefore it is not sent as an event. I can rewrite a version of Double Tap that works by flicking the switch on/off (and I did for testing purposes and it worked fine) or vice-versa, but that’s not ideal.

I do believe there is a way to create a device type that will send an event regardless of its affect on the device state, but I could not find a way to use such a device in the IDE for testing. I am brand new at working with ST development, so does anyone with more experience know how I can go about fixing this issue? Is there a way to use custom device types in the SmartApps simulation?


After digging around I think I found the solution. I just can’t test it until I get home. I just made a custom version of the Dimmer Switch device type and changed it so that it always sends events. Well, at least I think I did :slight_smile: I’ll know for sure later.

Looks like you can’t use custom device types as virtual devices in the IDE. That would be handy :slight_smile:

(Brad B.) #3

Did it work out for you?


No. A solution hasn’t been able to be tracked down. I’ve done extensive debugging and the ST cloud reports “phantom” events that are indisinguishable from a physical event, thus rendering this app far less useful than it can be. It’s hard to tell whether this is a result of the ST cloud or the hardware device, though I suspect the cloud.