Whole house fan timer need to be created


#1

Need a piston for a fan timer for multiple times in 1 hour increments ie 1hr 2hr 4hr 8hr times.

When I press a shortcut in IOS shortcuts I expect the fan to turn on to the corresponding time and count down to zero and the fan turn off. Similar to the physical timers from Home Depot

I have know idea how to start making this piston


#2

I would probably pass arguments at the end of the External URL.

  • Create a piston in webCoRE.
  • Take note of the External URL
  • Each shortcut can have a different argument added to the end of the URL

For example, the External URL for the piston may be:
https://api.smartthings.com/api/token/123abc/smartapps/installations/456def/execute/:789abc:
You can add an argument (?FanTimer=one) to the end of the URL. Such as:
https://api.smartthings.com/api/token/123abc/smartapps/installations/456def/execute/:789abc:?FanTimer=one

The four shortcuts can all have slightly different endings:

  • ?FanTimer=one
  • ?FanTimer=two
  • ?FanTimer=four
  • ?FanTimer=eight

Then, back inside that piston, you can structure it something like this:

IF {$args.FanTimer} is 'one'
Then With Fan   (TCP set to Never)
    Turn on
    Wait 1 hour
    Turn off
END IF

IF {$args.FanTimer} is 'two'
Then With Fan   (TCP set to Never)
    Turn on
    Wait 2 hours
    Turn off
END IF

IF {$args.FanTimer} is 'four'
Then With Fan   (TCP set to Never)
    Turn on
    Wait 4 hours
    Turn off
END IF

IF {$args.FanTimer} is 'eight'
Then With Fan   (TCP set to Never)
    Turn on
    Wait 8 hours
    Turn off
END IF

Basically, each of the shortcuts triggers the same piston, but depending on the end of the URL, it only activates one of the IF blocks.


#3

For best results, the piston should have absolutely no triggers in it.
Once it is saved, you should see this up top:

This means the piston will only fire when someone clicks on the shortcut.


#4

Also, to make testing quicker, you can reduce X hours down to X minutes during the testing phase…


#5

I’m sorry I have know idea what this would look like in the piston. This is my first piston.


#6

If you don’t mind waiting 15 hours or so, I have a bit of freetime tomorrow…


#7

No problem. It can wait. It will give me time to work on simpler pistons.
Thank you.


#8

Sure thing… Glad to be able to help!


#9

Today’s your lucky day… I was able to whip this up for you while my meal was cooking.
(tested, and working like a champ!)

You will still have to manually create the shortcuts with the proper endings as mentioned in my earlier post.
(pushing Test will not do anything)

You can read a bit more about External URL’s here.


#10

It didn’t work.
I made the shortcuts to the shortcuts to URL and the didnt work nothing happend.
here is the piston

this is the URL to the one hour timer.

https://graph-na04-useast2.api.smartthings.com/api/token/b5ccf456-f381-44b3-98fc-2d9d2dc6d98e/smartapps/installations/55a82278-9917-46a1-848a-77a54e046fbd/execute/:5a0ec2bfc3c7ea753babfb9247db1c7a:?FanTimer=one

here is the log
8/26/2019, 3:46:08 PM +16ms
+0ms ╔Received event [Home].test = 1566848768013 with a delay of 2ms
+87ms ║RunTime Analysis CS > 21ms > PS > 46ms > PE > 21ms > CE
+90ms ║Runtime (40398 bytes) successfully initialized in 46ms (v0.3.10f.20190822) (89ms)
+91ms ║╔Execution stage started
+100ms ║║Comparison (dynamic) null is (string) one = false (1ms)
+102ms ║║Condition #2 evaluated false (6ms)
+103ms ║║Condition group #1 evaluated false (state did not change) (7ms)
+110ms ║║Comparison (dynamic) null is (string) two = false (2ms)
+112ms ║║Condition #10 evaluated false (5ms)
+113ms ║║Condition group #9 evaluated false (state did not change) (6ms)
+119ms ║║Comparison (dynamic) null is (string) four = false (2ms)
+120ms ║║Condition #18 evaluated false (5ms)
+122ms ║║Condition group #17 evaluated false (state did not change) (6ms)
+129ms ║║Comparison (dynamic) null is (string) eight = false (2ms)
+131ms ║║Condition #26 evaluated false (4ms)
+132ms ║║Condition group #25 evaluated false (state did not change) (7ms)
+137ms ║╚Execution stage complete. (46ms)
+138ms ╚Event processed successfully (138ms)


#11

That log is from you pushing Test, which does nothing in this piston.

Try double clicking on the shortcut you created, and posting a new log


#12

here is the shortcut


#13

strange i click on the 1hr URL on my laptop and this is whats happens

it says fantimer 2


#14

“Fan timer2” is the name of the piston you created


#15

Yeah your right


#16

It doesn’t work on my phone but it worked on the laptop


#17

I don’t have an iPhone to test… Can you verify the shortcuts are identical?

Maybe an Apple fan can chime in


#18

working now.
It was my phone.
Thanks so much MCmore.
Im off to make my next piston a virtual thermostat for the same fan.


#19

I’m happy to see you got this piston working? Are you using any other devices for controlling you can? I currently get notifications that my local weather is within my preset parameters and it announces on Alexa that the weather is right to open the house. Then the fan turns on automatically when i open five windows. It then turns of the thermostats. When windows are then closed it turns off the fan when less than 3 windows are open. It turns the thermostats back on when all of the windows are finally closed. Oh yeah it also turns off the fan of the local weather changes to outside of my parameters.

For all of this i have contracts on every window and I’m using the netatmo personal weather Stratton. But it also works with the ST weather tile.

I love all the cool stuff we can do with our home automations


#20

I like the fact that you get an announcement over your speakers. I am currently getting a texted that tells me that conditions are right to open the windows. Is there away to get s speaker in my house to announce things like Alexa? Since my home is a Google/ST home I dont think google can be made to announce things like that I tried to make a announcement every-time the front door opened but it fail to work. I wish I can buy a speaker that can do that and play music in ST.