Lights not turning off


#1

1) Give a description of the problem
Piston not firing

2) What is the expected behavior?
Id like the lights to come on just before sunset and turn off at 1030

3) What is happening/not happening?
Lights arent turning off

4) Post a Green Snapshot of the pistonimage

5) Attach any logs (From ST IDE and by turning logging level to Full)
Sorry, no logs.


#2

I would change this to.
IF
Time is between 15 mins before sunset and 22.30
THEN
WITH
Bulbs 1, 2 etc
DO
Turn On.
ELSE
Turn Off.


#3

I think Im missing something, because when I select the “IF”, I dont see the option for a timer. I can select the variable “string $time” but then I dont see where I can say “between”.


#4

Check this post out for how to get logs. There isn’t any evident reason why this wouldn’t work.

https://community.webcore.co/t/how-to-get-the-quickest-answers/1315?u=c1arkbar


#5

When you click on the IF in the new window you will see physical devices. Click on that and you will get 5 options.
One of which is virtual device.
Click on that and you now have a new set of options instead of your physical devices.
Select time.
You can now select between.
Put your values in here.


#6

I would have never thought that “Time” was a virtual device! Thank you for pointing that out to me! Ill be sure to update this post tonight/tomorrow morning after this thing fires properly!

THANK YOU!


#7

I know what you mean. There are lots of options tucked away.
The above suggestion is how I run my porch light.
I know what @c1arkbar means though.
Both triggers should do what you want.
Just FYI about the logs.
IF you get issues in the future, when you look at your piston, scroll down and you will see logs.
Click full and then paste the logs IF you have issues with other pistons.


#8

Thanks. Unfortunately Im not at home to actually test these and verify their status.

Im very slowly trying to convert my CoRe pistons to WebCore, and am struggling.

All of this is way above my head. I had someone hold my hand for the complex pistons I have in Core, but want to learn this so I dont bother the forums for what would be a very simple task for someone more seasoned than me.

For example, I know there are seasonal lighting pistons that people have posted, but they are either way too complex for me to comprehend, or do way more than Im looking to do, so Im trying to build my own.

I dont want to convolute this thread, but if you have time to discuss via PM, it would be greatly appreciated.


#9

Don’t worry about posting in the thread. This is your topic to figure out how things work and that’s great. The information here can then be searched by someone else in your same boat. So the more information widely available for searching the better.


#10

Okay then!

Building off the lights on 15 minutes before sunset (original post), once the lights are on, I want the following to happen based on month. Im not looking for color switching once on or strobe effects (want to be mindful of drivers possible medical conditions).
If the lights are already on, based on month, set to on, wait (hue bridge involved, a wait was recommended), set level, set color.

Then back to the original piston, at 1030, the lights will turn off.

Will this thing even work as its written?


#11

I think it should work. You don’t need to do the else if else if else if. Those can all be separate if statements. The else ifs were needed in CoRE. No longer the case now.

You could also use an advanced statement, switch/case. Where you would set the switch as the current month and then it would check all the cases (the months you want to do something) and then complete your actions. Lots of ways to achieve a goal.


#12

So if this would work, could it be possible to merge the 2 pistons together and if the months are anything BUT the 3 months I have identified, the lights would be a standard color of my choice? I know I’m not calling for a color in the original piston, but obviously Id add the level and color set, to that liston.

Im seeing that a lot of things that were used/needed in CoRe arent working in WebCore, as it relates to some of the other pistons Im trying to recreate…which left all my lights on this morning, and the house in “Home” mode.


#13

And can I move the “Else Ifs” to a new “Else” statement? Trying to do this, only allows me to move the condition of the statements “With…and Do”


#14

You certainly could create a light manager piston. That encompasses everything you want to do with lights.

Also you are gonna want to make completely new if statements


#15

Baby steps. Baby steps. Ill focus on getting my sunset lights to come on first, then verify that they change colors and levels, then turn off at the defined time.

Once those work, Ill continue to convert my good bye, hello, good night, good morning, etc… from CoRe, and then try to get deeper into things.


#16

That is the best way to do it. Build things up.


#17

@c1arkbar

Can you review these one more time? I started to move the “else ifs” to “Else”, and it created the “if” anyways. Does it affect anything if I leave it as an “Else If”?

I added the color and level, that way, if the month ISNT identified in the piston above, theyll default to white and 100%.

In my dashboard I now see the countdown timers next to these 2 pistons, which makes me believe they will trigger correctly at the determined time.

Do you see anything wrong in these?


#18

Else ifs will work. And this looks like it should execute properly.

I was referring to changing from this:

If xxx
Then
Xxx
Else if xxx
Then
Xxx
Else if xxx
Then
Xxx
Else
End if

To something along these lines:

If xxx
Then
Xxx
End if
If xxx
Then
Xxx
End if
If xxx
Then
Xxx
End if

They will both do the same thing but example one is how it had to be done in CoRE. With webcore example 2 is able to be accomplished.


#19

Im tracking you! So daunting to recreate all these as new “If” statements.

So, if these fire off properly, could I just add (copy) the whole “If” statement for the “Season of Lights” piston, to the bottom of the “…sunset” piston, and move the “Else…turn off” to the end of the newly added content?


#20

I would kind of work it into it more than just sticking it at the bottom. Something like:

If (condition for lights to be on)
Then
If (month conditions)
Then
(All your ifs/actions for the months)
End if
Else (this is where the lights shouldn’t be on)
Turn off
End if