My First Piston


#1

1) Give a description of the problem
Asking for advice on my first piston

2) What is the expected behavior?
Between sunset and sunrise, if I am home and then front door is open, the light turns on, it should then wait 2 minutes, check if the door is now closed - if it is turn the light off, if its still open wait another 2 minutes and repet.

3) What is happening/not happening?
(PUT YOUR INFO HERE)

4) Post a Green Snapshot of the piston!
image


#2

First try not to nest ifs. They should be their own execution.

Second inside the first if. Set your restrictions there. Only when presence is home and time is between sunset and sunrise.

Third your last if will not trigger because there is not a comparison to exicute when true or false


#3

Thanks, I think I’m going to redo this one anyway so I’ll follow your advice.

On a separate note, do you know why I cant display tiles?


#4

Something like this


#5

As far as tiles, I generally haven’t gotten into them. However if you go into settings and then select catagories, I believe there is a drop down for how you want your pistons displayed on the dashboard, including tiles


#6

Thats almost what I want,

I want so if its between sunset and sunrise and someone is home, when the door opens the light comes on, and then waits 2 minutes, checks if the door is closed and then turns the light off if its closed, or leaves it on if its open and then checks again in another 2 minutes.

As for tiles, I’ve done that but I still cant see anything


#7

Why the wait 2 minutes?

Edit this as needed.
Really not a need to wait to check if closed, as it willl trigger the turn off portion when the door closes. However by adding the 2 minute wait there it will give anyone to have time to exit or get settled.


#8

Thank you, that is what I’m looking for (I think)

Thanks :):grinning:


#9

For now you can display tiles on your main screen. I have separate pistons that drive tiles rather than integrating them into my lighting control pistons. If this is something you’d like help setting up, let me know:


#10

How do I get started even creating a tile?
I would love to have one that shows who is currently present in the home?


#11

I’m not at the house now but I’ll throw together a quick one you can start with later today. Like pistons, they can become addicting to keep adjusting! Lol


#12

Thanks, much appreciated.

Tell me about it, I’ve only had this a few days and I cant stay away :slight_smile:


#13

I can’t get it to post from my phone but if you import code 83ig it is a very basic start.

To see the tile, in webcore go to settings, click on categories, then create a Presence Tile category or whatever you want to call it. Using the drop down menu to the right of it, select which size tile you want to display (default will not show a tile at all).

When you’re saving your piston, choose the new category you made, then check out your new home page!


#14

I’ll import it when I get home and see what it can do.

Thanks for this.


#15

I tried this and it is not showing. Selected large tile and it just colapses the category on dashboard and says category name (1)

I really want to understand how to use the gauges and change them for various devices


#16

It’s set to trigger on events so it won’t update until someone leaves or arrives. Then it’ll stay updated.

I changed the code a bit too, found more icons… Not sure which you imported but try 83ig if you got to it before I edited my post above.

To force an update just change the “on events” to something you can make happen on demand like turning on a light.


#17

Thanks for this, is this just one tile for all sensors, or will it do multiple tiles?


#18

One tile for each of the 4 status combinations. You’ll need to create 2 more IF statements to cover the scenarios when only one person is home. I can’t figure out copy and paste on my phone.

I can complete those when I get home in about 3 hours if you need a hand with them.


#19

Ohh,

What I’m trying to do is have tiles for each person, that says if they’re Home or Away.


#20

That’s easy to do too. How many people? I’ll set something up when I get home.