SmartThings Community

GE Ceiling Fan Switch Custom Device Type - Low, Med, High buttons w/no slider!

fan
dth_hvac
(Rey Rios) #117

Yes. I had to adjust the values in the script.

0 Likes

(Sean) #118

I did but it always went to low. I pulled the power tab out on the switch itself then pushed it back in and that took care of my problem.

0 Likes

(Scot Kreienkamp) #119

I only had to adjust the low value to 30.

0 Likes

(Chris) #120

I set up this device type and it seems to work fine in the ST app, but echo still sees it as a dimmer so I have to tell it a percent instead of low/med/high. Any way around this? I’d love to be able to say “Alexa, set the fan to medium” instead of “Set the fan to 50%”

1 Like

(Allan) #121

I have the exact same request…just got a Echo and it would be nice to say “Set Living Room Fan to Low” instead of randomly picking a number between 1 and 30.

-Allan

0 Likes

(Micheal ) #122

You should check out Ask Alexa…you can do that exact thing (almost with those exact words).

1 Like

(Chris) #123

Try this, if you’re using askAlexa…

Continuing the discussion from Z-Wave Smart Fan Control Custom Device Type:

Continuing the discussion from [RELEASE] Ask Alexa:

0 Likes

(Jason) #124

You could also do it with ifttt and a virtual switch. Alexa trigger living room fan low

0 Likes

(Charles) #125

@johnconstantelo I’m using your DTH (Thanks!) and have one small anomaly. I suspect it’s a limitation of the hardware, but wanted to see if you could do anything. I’m checking the isPhysical state, particularly whether it has been pressed off.

If the switch is on, it reports a physical switch off. Good.

But, if it’s already off, it does not report the physical press off. I’m trying to use this to override other actions, so it’s useful to press off an already off switch. Any chance your DTH can see this?

Thanks again.

0 Likes

#126

Hi @CAL7, I just tested both physical and through the app. All scenarios worked as expected. I was actually surprised how quick the app updated after I physically turned off or on the fan.

0 Likes

(Charles) #127

@johnconstantelo Thanks for looking at that so promptly. I’m still figuring out the nuances of ST, so I had not checked the device log; but now I see the same thing you pointed out.

The logs show that, even when already OFF, a physical press sends an OFF. So, I suppose I need to look elsewhere for a solution. You referenced “through the app” - is this the device handler status page or can you refer me to a SmartApp that you know responds to the physical press?

I’m stymied because the only apps I know of, and have tested, that differentiate between digital and physical OFF are Rule Machine and CoRE. My test case using both of those apps does not give me a response to the OFF if the switch is already off (they do if the switch is on and the physical press changes the state to off).

I would appreciate any help you can give to point my way to the next step of debugging. Tagging @ady624 in case he knows any reason that CoRE would purposefully ignore an OFF if already in an off state.

0 Likes

#128

I meant the phone app, sorry about that. The device updated in the phone app within a few seconds of physically using it.

I was able to test, and you’ll see in the screen shot below that the first entry is another physical event turning off the switch (@5:55pm) which was already off (@5:53pm):

Every time I press off on the device I get a log entry like the first one.

0 Likes

(Charles) #129

What I see in the log agrees with your test (Thanks for that, BTW). But my two test programs, with either RM or CoRE, never report the physical OFF press if the condition was already off.

(Contributing to the flakiness is that rarely, but every once in a while, a digital OFF will be interpreted as a physical OFF.)

Do you know of a SmartApp that can differentiate between digital and physical state change?

0 Likes

(Jimmy) #130

Thanks for the DTH, @johnconstantelo ! I too had to make the same changes as @rey_rios to get the speed to display correctly.

0 Likes

#131

No worries. I’m actually still using my original code with just a couple changes from others (display the transition of states, ie “turning off”), and not the one people have been tweaking above. I don’t need to adjust any parameters for low/med/high because all my fans are the same and what I hard coded for those values work perfectly fine.

0 Likes

(Charles) #132

@johnconstantelo Hi, again. I spent some more time (ref: Post #127-129) trying to diagnose my attempts to determine the physical switch press.

My issue is that if the switch is OFF, the physical press OFF does not get reported by CoRE. If the switch is ON, the physical press OFF does report. I set up a simple piston to look just for the physical press.

So, I went to the logs. Here I see that when it starts OFF, each switch off press gets one log entry. But, CoRE does not see it.

However, it is different if I physically turn on the switch (I don’t believe it matters if it’s turned on programatically or physically) before pressing the OFF. With it on, the single OFF press gives two log entries:

It would seem that the PHYSICAL press indicator only registers if it is also a change-of-state. As you pointed out in #128, each press is logged; but there is something different depending on whether it is a state change and that difference hides it from CoRE.

Is it possible for the DTH to send the notification of the switch press, whether previously on or off?

Also, tagging @ady624 to see if there is a CoRE solution.

Thank you.

0 Likes

( I hate Mondays) #133

You need to manually specify isStateChange: true in the sendEvent if you want each to register into CoRE or any other subscribed app for that matter. Otherwise, isStateChange is set automatically by ST and I believe that if new state and old state match, it is set to false. CoRE also has code to prevent duplicate messages, but it would warn you in the logs if it filters out an event. Events are not filtered if data exists in the event object (think buttons with their buttonNumber data element) or if the event value is a number (temperature, power, etc)

1 Like

(Charles) #134

@ady624 The DTH was modified by @johnconstantelo to add isStateChange:true, but CoRE doesn’t see the physical switch event if the starting state was OFF. CoRE does report it if it was ON.

If you’re willing to look into it any further, I’d be happy to send you logs or whatever would be helpful.

OTH, if this is too much of a niche problem, I’ll leave it alone. Thanks for your earlier comments - they were very helpful.

1 Like

#135

Sorry I couldn’t help too much @CAL7.

For other community members still using my DH, the code for my original DH was based off of ST’s dimmer DH, and that has changed since then. I did create a new DH using ST’s latest dimmer switch DH:

https://raw.githubusercontent.com/constjs/jcdevhandlers/master/devicetypes/jscgs350/my-ge-fan-control-switch-v4.src/my-ge-fan-control-switch-v4.groovy

0 Likes

(Don) #136

I might have been seeing something similar. Just not smart enough to know. At night I am using CoRe to set my fan speed to low at 2am. Usually it’s on med or high when we crawl in bed. Gets cool later so switch to low when we’re asleep.
Anyway I had trouble setting speed using a level. I ended up using the "triangle"loW command available in CoRe. This works every time. Buuuut smartthings and smartiles still show the fan in whatever previous state was.
Weird but I didn’t care was just a visual thing.

0 Likes