CoRE - Get peer assistance here with setting up Pistons

@ady624

So will this work? It’s a simple piston. I haven’t tested it yet, but if it works completely this one piston just replaced 7 latching pistons.

I honestly have always tried to stay away from variables…

Don’t see why it shouldn’t, though that OR group can be replaced with a “changes” condition. With an on true action.

1 Like

Actually it can’t. it’s there because all of them announce arrival, but ONLY the kids announce departure.

Oh, sorry, I assumed the list of devices was the same…

1 Like

@ady624: perfect!! :smile:

New question: is it possible to set the coolingSetpoint of a thermostat to the value of a variable? I am able to compare the value of the coolingSetpoint to a variable in the condition, but not able to set it to a variable in the action.

The case for this one is to prevent my son from turning down the thermostat below {minimumCoolingSetpoint}

Use the Load attribute from variable task

So, I now have my various lights pistons setup and everything is working well.

However, I do have a scenario where I need to respect, and respond to, the manual control that sometimes happens. For example, in the bathroom, sometimes my kids flick the wall switch because they forget, or we needed it off totally for some reason and so it was off, or someone toggled it (off/on) in order to achieve full brightness, (which is what seems to happen when someone toggles a wall switch on bulbs connected through the Hue bridge).

So anyway, when this happens, the first IF resolves false:

● Sensor Bathroom motion changes to active AND
(◦ Lights Bathroom switch is off OR
◦ Variable {autoBathroomLights} (as boolean) is true)

So far, so OK…

So I was considering different ways to make this happen within the BUT IF section in order to then slip into the ‘normal’ task execution flow of the piston again. Something like this:

(● Sensor Bathroom motion changes to inactive
◦ Variable {autoBathroomLights} (as boolean) is true)

OR

(● Sensor Bathroom motion changes to inactive [(I want to add a period of time here too: “inactive for 5mins”] AND
◦ Lights Bathroom switch is on)

THEN:

…follow normal turn-off routine. Question: will the TCP get in the way at all here?

What I’d like to ask is, what is the recommendation here to achieve this? I also considered using another piston to include this piston in order to decouple the new logic. I’d like to get some help on the architecture before I totally butcher my piston.

So I wanted to auto run my dimmer bedside Hue and set a fail-safe to run ‘Goodnight’ incase we forget for any reason.

I setup a couple of Virtual Switches and hooked IFTTT up to switch them when we set our Jawbones to sleep mode. Will this work? I was unsure about the ‘changes to’ or whether I should use something else to determine when the Jawbones enter sleep mode?

1 Like

I think I may have found a bug, should I put it on Github, or PM, or report it here?

Whenever I time-bound a piston, it I get the NaN in the dashboard:

I’d love this feature!!

I think I may have worked it out, will this work?

Good morning. That bug should have been fixed in both the classic and experimental dashboards, I will check the classic one. Could you please switch to the experimental one and tell me if time restrictions are properly displayed there? Thank you

Fixed in experimental - hey this one looks cool!

So, playing with this, and it doesn’t see to work, can anyone see what might be wrong with it? The 2nd part of the OR statement in the BUT IF section is evaluating true, (both blue), however the THEN part doesn’t seem to fire… Any advice would be much appreciated.

I think I’ve just realised where I’m going wrong. Initially the object of this architecture was to: turn on and off the lights based on motion, but don’t turn them off I’ve turned them on manually

And now I’m trying to modify it to turn off even if the piston has not turned it on - duh! This contradicts my initial design and hence causing confusion!

I think I’ll have to work out how to approach the ‘manual switch on timeout’ in another way… perhaps with an independent piston…

Hi all, Sorry if this has been asked before. I’ve been trying to search the answer in the Core wiki and on here, but haven’t been able to figure these things out.

  1. Is it possible to include the device name in the push message? Would this be using variables?
  2. Is it possible to alert only once every minute(s), hour(s) etc…? I have an alert that I used to limit in rule machine, but I can’t figure out how to do this in CoRE.

CoRE rocks by the way! I really like the UI. I do often get an error saying that I need to complete required fields when all are complete, but its a minor thing.

I believe that there are System Variables which define the $currentEventDevice that might be of use…

Great, so I can just add that variable to my message? I’ll give it a shot. Thank you.

Here is an example from several posts up

Hi, can someone help me convert these rules from Rule Machine to the CoRE pistons?

This is what I had in Rule Machine, the user bamarayne, helped me a great deal:

Rule one: lights on at sunset
Condition - time between sunset and 10pm
Rule - time between sunset and 10pm
Actions for true: dim corridor lights: 10%

Rule two: capture/restore lights
Condition - private Boolean: this rule: false
Rule - private Boolean: this rule: false
Action for true - Capture: corridor lights, Set private Boolean: rule three: false
Actions for false - restore captured bulbs, set private Boolean: rule three: true, turn off the virtual override switch

Rule three: arrival lights
Conditions - private Boolean: this rule: false
Rule - private Boolean: this rule: false
Actions for true - dim corridor lights: 99%, set private Boolean: rule two: true - delay 10 minutes
Actions for false - leave blank

Rule four: trigger - someone arrives
Trigger actions - presence sensor arrives (any)
Actions - set private Boolean: rule two: false
Action - Turn on Virtual Override Switch
Restrictions - only between two times: sunset and sunrise
Switch to disable rule: Virtual Override Switch