CoRE - Get peer assistance here with setting up Pistons

Great question. I have that question too.

Hi guys Iā€™m hoping you can help me I think Iā€™m in the right place.
Iā€™m trying to create a piston for weekday mornings to turn on certain devices , disable home monitor status and then turn off 2 of the devices (lamps) a hour later.
I want it to be triggered by my motion sensor in the hall.
Iā€™m not having much luck with the one i tried , this is whatā€™s set at the moment.
Piston 1
Piston mode
simple
IF
Motion sensor changes
THEN
Using room lamp,kitchen lamp,tv &plug
First turn on
Only on weekdays
Custom time 6-7am
Using location
Set home monitor status to disable.
And then i wasnā€™t sure on how to set it to turn off the 2 lamps a hour later ,
I did add something into the else section but it kept turning everything of and on.
Cheers

Put the condition (Date and Time) and trigger (Changes To) in the IF and then using the When True (Which acts like a Then) Do the following separate 3 actions

Basic Piston in Expert Mode (Could also use a Basic Piston in Standard Mode ā€œinstead of When True use the Then sectionā€)

IF
Add Group
Add Conditions
Motion Sensor Changes to Active
AND
Date and Time IS

Action 1
When True (Group)
Using location
Set home monitor status to disable

Action 2
When True (Group)
Using room kitchen lamp,tv &plug
First turn on

Action 3
When True (Group)
Using lamp
First turn on
Wait 2 Hours
Turn Off

Basic Piston in Expert Mode
Add Condition
If Motion Sensor is Active
When True
Turn on Under Cabinet

OR (Used as a separator)

Add Condition
If Motion Sensor Stays Active for 1 Minute
When True
Turn on Overhead Lights
Cancel on Piston State Change

OR

Add Group
Add Conditions
If ā€œAnyā€ Lights XXX are On
And
Motion is Inactive
When True (Group)
Using Lights XXX
Wait 1 Minute
Turn Off
Cancel on Piston State Change

Thanks a lot for that @rontalley
Iā€™m still new can you confirm you mean create a new piston with these fields or add these to mine.
Iā€™m going to try this after work thanks

Just create a new Basic Piston and set it up as described above. You will have to go into CoRE settings and turn on Expert Mode to get the good stuff. :slight_smile:

1 Like

Ah right thanksā€¦
Is that why I keep getting pop up a saying not authorised

Not sure about the not authorizedā€¦ Expert Mode just exposes hidden functions.

Hi all :slight_smile:

Iā€™m trying to figure out how to do something simple, but canā€™t figure out how :frowning:

Iā€™d like a motion sensor when tripped, first save the level of the light to a local or global store, then turning the light to 100%. When thereā€™s no motion detected for 1 minute, restore the lights to their previous level.

I think the problem is that I can capture the level, the lights turn on to 100 % but if thereā€™s motion in the time the lamp is at 100%, the global store will be set to 100% which keeps the light from returning to heir original value?

Is anyone using a similar setup and wanting to share his piston for that?

Tnx!

Would love some assistance with my humidity sensor. Iā€™ve searched this thread for references but most seem to have used a fixed percentage. What Iā€™d like to do, however, is something like the following:

IF (
  BATHROOM_FAN turned on OR
  (
    BATHROOM_RELATIVE_HUMIDITY raises 5% since last reading (@bathroomReading) AND
    BATHROOM_LIGHT is on
  )
) THEN (
  BATHROOM_FAN turn on UNTIL
  ( BATHROOM_FAN turned off OR
    ( BATHROOM_LIGHT turned off AND
      ( 30m has passed AND
        BATHROOM_RELATIVE_HUMIDITY falls to <2% of @bathroomReading )
    )
  )
)

Anyone have any guidance?

More like a job for webCoRE?!

First post here and new CoRE user so be gentleā€¦I am trying to set up a piston to get the house ready for bedtime by dimming the recessed lights to 40%, then turning all lights off after 15 minutes. However, I am running into an issue with dimming. When using the ā€œfade toā€ task with a 5 second duration, instead of a smooth fade the brightness ticks up (or down) by 1/5 increments every second. I am using GE in-wall Z-wave smart dimmers. What am I doing wrong, or is this a hardware limitation?

CoRE simulates the fade and due to the way it works it cannot do anything better than that. webCoRE should perform better at such fast dimming. If the device implemented the fade itself, it would have been smoother, but it does notā€¦

What web request parameters do I need to use to get CORE to mimic a browser request? When I send this URL to my AV receiver through my browser, it works

http://192.168.X.X/MainZone/index.put.asp?cmd0=PutZone_OnOff%2FON&cmd1=PutZone_InputFunction%2FCD&cmd2=PutMasterVolumeSet%2F-35.0&cmd3=aspMainZone_WebUpdateStatus%2F&ZoneName=ZONE2

Iā€™ve tried POST/form and POST/json but both are ignored by the receiver when the piston fires (confirmed it fires in the logs). Any ideas?

Browsers generally perform GET requests. URLs typed in the address bar are always GETs. That is a GET request with a query string (everything following the ? is called querystring). Try with a GET and FORM content type (you are not passing anything else anyway)

1 Like

CoRE simulates the fade and due to the way it works it cannot do anything better than that. webCoRE should perform better at such fast dimming. If the device implemented the fade itself, it would have been smoother, but it does notā€¦

Thanks for your quick response! I just installed webCoRE and it looks great! Although I donā€™t see the fade to as an option. I presume certain actions are still under development?

1 Like

Thanks for the sanity check. Tried changing all requests to GET/Form but still not seeing any activity received.

I shortened the URLs for troubleshooting - these same URLs work in Chrome.

Confirmed requests are sent via logs:

2bdb2807-160c-4585-ba38-f2ed6e024a41  9:52:24 PM: info ā•‘ā•‘ā–‘ā–‘ Executing virtual command httpRequest (2ms)
2bdb2807-160c-4585-ba38-f2ed6e024a41  9:52:24 PM: info ā•‘ā•‘ā–‘ā–‘ Sending internal web request to: 192.168.X.X/MainZone/index.put.asp?cmd0=PutZone_InputFunction%2FCD
2bdb2807-160c-4585-ba38-f2ed6e024a41  9:52:24 PM: info ā•‘ā•‘ā–‘ā–‘ Sending internal web request to: 192.168.X.X/MainZone/index.put.asp?cmd0=PutMasterVolumeSet%2F-60.0
2bdb2807-160c-4585-ba38-f2ed6e024a41  9:52:24 PM: debug ā•‘ā•‘ā–‘ā–‘ Processing command task [taskId:3, time:1493085143362, idx:3, marker:1493085143574, created:1493085143459, ownerId:1, data:[p:[[d:http://192.168.X.X/MainZone/index.put.asp?cmd0=PutMasterVolumeSet%2F-60.0, t:text, i:0], [d:GET, t:enum, i:1], [d:FORM, t:enum, i:2], [d:null, t:variables, i:3], [d:false, t:bool, i:4], [d:null, t:text, i:5]]], type:cmd]
2bdb2807-160c-4585-ba38-f2ed6e024a41  9:52:23 PM: debug ā•‘ā•‘ā–‘ā–‘ Processing command task [taskId:2, time:1493085143362, idx:2, marker:1493085143574, created:1493085143432, ownerId:1, data:[p:[[d:http://192.168.X.X/MainZone/index.put.asp?cmd0=PutZone_InputFunction%2FCD, t:text, i:0], [d:GET, t:enum, i:1], [d:FORM, t:enum, i:2], [d:null, t:variables, i:3], [d:false, t:bool, i:4], [d:null, t:text, i:5]]], type:cmd]

Screeny of the pistonā€¦ some junk actions greyed out at the bottom.

Hey Ed, appreciate your thoughts here. I tried your configuration and it seems to have a problem. If you open a door for 5 seconds, then close it, the piston state will change to false before the vSwitch is opened. I tinkered for quite a while tonight and think I have a working solution.

I created a latching piston that activates on changes to open. Then the second half does not change to true until the vSwitch is open and the actual switch is closed. Then it adds 10 seconds and closes. Seems to work with quick open/close as well as remaining open longer (until actual switch is closed + 10 seconds). Check it out:

Hi @rontalley
Thanks for the help I set that up last night and it kicked in this morning :slight_smile:
Do you know how I can set it to only run the piston once first thing in the morning after 6am ?
As it is now Iā€™ve set it to detect movement between 6-7am then to turn off the lights but the problem is us going up and down the stairs starts the 2 hour delay again to turn the lamps off
Thanks

Sure! Hereā€™s how I do it. Couple of things you need to add to the Piston:

  1. Using an OR separator, Create the following Condition:
    If Date and Time Happens at Midnight, (Everyday)
    When True
    Set Variable (Number) {count} = 0 ā€œDonā€™t use the { } when naming the variables. The name can be whatever name you likeā€

  2. Add the condition AND Variable {count} is less than 2 to the original Group above
    IF
    Add Group
    Add Conditions
    Motion Sensor Changes to Active
    AND
    Date and Time IS
    AND
    Variable {count} is less than 2

  3. Add another When True action to the original Group above
    When True
    Using Location
    Set Variable as Number {count} + 1

What this all does is first at Midnight everyday, it resets the variable count to 0. Then when the conditions are met above, it adds 1 to the count, i.e {count} 0+1=1; 1+1=2; 2+1=3 and so on. So since the arguments states that the variable {count} must be less than 2, anything greater than 1 will not work therefore allowing you to determine how many times the Piston runs per day!

Might be an easier way to do this but thatā€™s my way and it works.

Hereā€™s an example: