[DEPRECATED Thread: visit community.webcore.co for assistance] webCoRE - Piston Design Help (ask your fellow members for assistance)

Try the “stays” trigger.

If
   Switch stays on for 1 hour
Then
  Using switch
    Do
      Turn off
End if

Thank you, Chris, my impression is that that is exactly how I set up my piston, but it doesn’t work - it seems as if the piston requires a trigger?
I don’t think I can use the “stay” condition in the case of Hue lights, because I’m sure one should test for “level” and not “on/off” in case of Hue lights, and if “stay” is used, the level will have to be a specific number to return a “true” value?

A random of a random…

So I am big into color (see my thread above about the kitchen). Now that I understand randoms and things I am starting to make color pistons that, hopefully, will change and transition light colors based upon varying RGB gradients. To do this I would like to create a series of global variables that are expressions so I can use them throughout the house.

I then set these to run as a While Loop so that any of the colors within the global variable will be changed out (see below)

The question is: how can i randomly select from these global variables AND make certain the result is simply not 1 color?

For example:

@Color1 = {random(1,2,3,4)}
@Color2 = {random(5,6,7,8)}

What would I use when running a piston to set randomly @color1 or @color2****

If
     Switch 1 turns on
Then
     While
         Switch 1 is on
     Do
         Set Color = ????
        Wait Random . . . 
End While
End If

If in my example I used @Color1 as the variable the loop would continuously choose either 1, 2, 3 or 4 until switch 1 turns off.

BUT

I want my result to choose either of 1, 2, 3, 4 or 5, 6, 7, 8. In other words I do not want the loop to choose 1, then 8.

Get my drift?

Can someone tell me why my active pistons list shows “true” next to most them and one shows “false”?

The one that shows “false” has this repeating message in the log

Piston waited at a semaphore for 10875ms

The others show no messages.

Hi all, I’m looking if someone can assist automating a light - should be simple right :slight_smile:

If room door contact sensors open - turn on room light. (someone enters room from door being shut)
If door was already open then turn light on when door is closed. (someone enters room from open door and closes it behind them)
If door remains open for TImer1 then turn off light. (someone has opened door to check something but doesn’t shut it behind them)
If door closes within Timer1 turn on light until Timer 2 has elapsed (someone has entered the room and intends on staying for X amount of time)
Then when door is opened and then closed again then turn off light, or turn off light when timer2 is elapsed if door is then left open.

Or something similar.

People have a habit of leaving the toilet door open, so smart lighting app isn’t cutting it. That said I’m sure a motion sensor would eliminate the issue altogether :slight_smile: :slight_smile:

Cheers

Adrian

1 Like

Bingo, there is a breaking point of building automation and bying a piece of hardware. Think about construction time (logic, actual implementation and testing) vs cost of a motion sensor. :smile:

Been there done that…And even though webCoRE can do essentially anything you want, you’ll find a scenario that you didn’t account for…

4 Likes

Yes its very true, smartthings motion is circa £30 :slight_smile: Us Scots are well known to have tight purse strings though. Just working with what i have for now. It worked fine up to a point, that if the door is open and closed after each use then the automation from smart lighting is adequate, it fails when people don’t follow that. Im not coming into it blindly, i have tried playing about with it in core and webcore but not to any success.

See my updated post, is that one more scenario that you didn’t account for. Like someone is in the bathroom and you just need your tooth brush and poof, the lights go off…

Im also having similar issues in another multi purpose room, id like to have separate timers for say when someone has a quick shower when there is plenty of motion actions, but then another timer when someone is in the bath and perhaps less active. I have found the bathroom to be the most complex due to the amount of scenarios

Apologies on the repost here, but I think I got lost in the shuffle. Hoping someone can point out where I am going wrong here…

So, my wife wanted a ‘Welcome Home’ greeting for the house like what happens in ‘back to the future 2’. So, I have one setup in CoRE for myself and my wife (different greetings) but in webCoRE I wanted to take it a step further. The issue I had with the CoRE greeting is that it would repeat every time you opened the door from the garage within the 5 minute window of returning home, so unloading groceries it would go off again and again. This time in webCoRE I decided to add a global variable so that it would only play once. Sadly I have 2 problems. First, for some reason the message never plays, even though the first piston DOES correctly trigger. (No audio is heard from the speaker, and is configured the same was as in CoRE.) The second is the other piston to reset the variable never fires, which is odd since the first one does fire. Odds are I am going about this all wrong, so I am totally open to a completely different way of doing this.
First piston;
execute
if
Any of Front Door’s or Garage Entry’s contact changes to open
and
Matt Freestone’s S6’s presence changed in the last 3 minutes
and
{@Matt_Welcome} is false
then
with
Kitchen Speaker
do
Speak text “Welcome home master Freestone! Benevolent Dictator, magnificent ruler!” and resume;
end with;
Set variable {@Matt_Welcome} = true;
end if;
end execute;
2nd piston;
execute
if
{@Matt_Welcome} changes to true
then
Wait 5 minutes;
Set variable {@Matt_Welcome} = false;
end if;
end execute;

True but the samsung ones are a little sleeker at fitting in. Although i do have a few of those pricey ones from Aeon Labs the square ones…i find them quite ugly, and i don’t like the green led that triggers every time you activate it, in a bathroom they kind of sort of look like a camera pointing at you.

I have a Fibaro “eye” in my shower, talking about a one-eyed cat blinking at you every time you hop in the shower, that’s creepy :slight_smile:

1 Like

Speak test has an issue, use speak and restore/resume…


@Matthew_Freestone EDIT , never mind, you are using resume. Make sure you add a value for the volume,

Yep you beat me to it :slight_smile: Any idea why my other piston never even fires off? And I exactly mirror’d it from CoRE, and it ran just fine in CoRE for doing the audio…

Are you sure you’re not missing the volume level in webCoRE but you have one in CoRE ?

@c1arkbar, @bobbles with your two recommendations I got it :slight_smile:
Changed the subscriptions to only relate to the Sensors, and extended Stay and removed the wait.

Thanks

1 Like

I do actually have a volume setting in my CoRE piston, but I’ve been told with the Samsung R1 speakers that if you remove the volume override it fixes the speaker cutting off the message. I can try adding the volume override back in though and see, so good point.

Any idea why the second piston never fires?

1 Like

I think I’ve read somewhere that variables cannot be used as triggers. But don’t quote me on that. :slight_smile: Plus there were some issues with global var, which not sure if Adrian fixed it, just yet…

Is there a better way for me to resolve the issue? Basically within that 3 minute change window I don’t want it repeating the message over and over and over each time the door is opened, but want it to only fire off once per presence change. (Otherwise, brining in groceries for example you end up hearing it like 10 times…)

Global vars do provide events to subscribe to. Locals don’t as they only change during a piston run. Infinite loops would not be cool.

1 Like