CoRE - Get peer assistance here with setting up Pistons

This is exactly how I feel! After a while, you just know that should be the way it works. Have to put the disclaimer out there just in case! :joy:

1 Like

I was afraid of the learning curve jumping into webCoRE when I was just getting to know CoRE but it wasn’t bad at all. I setup the same Piston in webCoRe and it’s actually working.

1 Like

Yes I had my old CoRE version of this piston set to just let the timer run out, the only thing that bothered me was that the notification would still be sent at the end of the 30 minutes, which was redundant if I had already turned the lights off manually. I’m being super anal I know. Yes I think your suggestion of another ‘IF’ after the wait has expired should do the trick, like the below. One minor quirk I just noticed, I have the Wait on the Location and I do see the red ‘N’ against the Location when editing the piston, but when viewing the piston after saving it, you’ll see that both Location and the red ‘N’ are not displayed. Is this a bug or a feature?

Do you have an example of how I would actually do this?

Let me know if anybody has any insight on this…

I have three dimmer switches on my outside lights.

At Sunset & 4 AM I run a piston to turn on my dimmers and set them to 20% and then at Midnight and Sunrise that same piston turns those lights off.

I want another piston to take lights to 75% for 10 mins when the front door opens and then return to whatever state they were previously in. Here is how its looking so far…

I’m noticing that sometimes the restore state isnt working. I’ve only been working on this for two night and it seemed to work the first night. I noticed last night that the lights never went back to the correct state. I think the difference may have been that last night the door was opened at 1 am when the lights were already off. They ended up staying at 75% until 4 AM when the turn on piston set them back to 25%.

I have a very simple requirement. This is available on Smart Lighting app too. But trying to implement it on CoRE.

  1. Turn on Light with Motion.
  2. Wait for 5 minutes and Turn off.
  3. If there is further movement need to reset time to 5 minute wait again.

Can someone give me an example to do this in CoRE.

if MOTION then
– LIGHTS on
– WAIT 5 mins
if Motion then reset 5 minute timer <<— Do not know how to do this?
– LIGHTS off
endif

If motion then
   Lights on
Else
   Wait 5 min
   Lights off
End if

That will work out of the box in webCoRE. For CoRE you need to set the TCP to cancel on condition state change for the action in the Else (this is the default for webCoRE)

1 Like

Tested and works as expected. Thank you Adrian,

Hi.
Can you please tell me what plugin is this and how to install it. I only know to create scripts (pistons) from the web interface dashboard.webcore.co . Is this another way to create pistons from the mobile app?
THX

Hi, did anyone get this to work, I need to execute URL from Core, but it doesn’t seem to work with Create web request option. I need to run something like this http://ipaddress//MainZone/index.put.asp?cmd0=PutZone_InputFunction%2FIRP

It works from browser and tasker for android, but not from core. Ideas?

Ok I think I bit more than I can chew. Here’s what I’m trying to do.

The idea is to iluminate the way to the kitchen (hallway, living room, kitchen) when someone opens a bedroom door at night.

Components:
2 open/closed sensor on two separate bedrooms
3 light dimmers

What I’d like

  • When one of the doors is opened I want the dimmers to go to 10% for about 5 minutes then turn off (This should happen only if all lights where previously off, If any of those 3 lights is already one nothing should happen).

  • If the switch is manually manipulated (for example user turns it all the way up) on any of the dimmers then the turn off timer is canceled for the three dimmers.

  • If another door is opened while the 5 minutes timer is running, reset it back to 5 min

Also, If anyone can foresee any problem or possible issues I’m not taking into consideration of if what I want to accomplish isn’t possible with listed hardware let me know how you would go about it.

Thanks in advance. I hope this piston can serve me as an example so hopefully i’m on the other side of this discussion helping others.

I was never able to get this to work on CoRE, but I can confirm it works fine on webCoRE. webCoRE is still in beta I believe, but you can still run it if you need to.

I am trying to create a piston to sequentially turn on then turn off some lights. Something like this:

turn on L1
wait random time
turn on L2
wait random time
turn off L1
wait random time
turn off L2

I’d like to do it all in 1 piston. But I have not been able to figure out how to do a sequence like this using different devices. Can anyone point me in the right direction?
Thanks.

Would this work.
Import and give it a try.
This will keep cycling round while confitions are true.

Thanks a lot, I will surely give it a try!

I am trying to make a Piston in core that will call a URL when a switch is pressed. I see that I need to have an action of ‘Make a web request’

I need to make a POST request with a JSON content type.

What I cannot figure out is where I can add a body to my request.

I need to send a body of {“keys”:“c”} as part of my request.

I am moving over from IFTTT and I was able to do this in the maker channel. I am hoping I will be able to do this in Core.

Nope, I did that, it does not work. The 2nd With does not wait for the 1st to end. All the With’s within the Do statement execute in parallel. I did find one way to do it by creating Routines for the On and Off of each light, then after a Wait doing the Execute Routine for the light that I want all within one With statement. It seems kind of clunky, and while the master control piston is one piston, I additionally need 2 routines for each light.

I hadn’t tried just thought it would work.
I’m not really sure why I picked ‘while’. :relaxed:
Change from a ‘while’ to an ‘if’.
This should work as it is ‘sync’ and therefore each block should wait for the preceding block to mature.

I would like to use CoRE to control my automower but I don’t know enough to dive in yet. I know that I can send GET requests to the server to control the mower but the server requires authentication and I don’t know how to incorporate the username and password. I’m not a programmer so I am looking for help in simple terms. Thanks much!

I can’t help with your query but I would recommend you post this in the WebCoRE thread.
It’s more powerful.