CoRE - Get peer assistance here with setting up Pistons

I’m trying to set up a piston that watches the status of my Kodi machine and when it’s playing it dims lights. When paused I would like the lights to ramp back up. For the life of me I can’t figure out how to get the status of Kodi into core. Could anyone please help?

Try IF Contact sensor temperature changes as test then send $currentEventValue.

1 Like

Unfortunately, if I understand it correctly, this is an attribute of the smart bulb and not CoRE. When you set the level or change the color of a bulb, they turn on.

Was afraid that may be the case.

Thanks

1 Like

Is there a way to set CoRE so that it will only apply the color change (or any other applicable attribute) if the light is already turned on? Having that flag would at least help.

I see a restriction that will only execute the action if ALL switches are on or off, but what we need is a check at the individual level…so if you are setting the color of 20 lights, only those that are currently on will be affected.

You can add the condition IF Light is on?

How can I do that if I’m setting multiple lights? That would be a real PITA to write a separate test for each light, especially if you often add or remove lights from that piston.

Another issue that i encounter my piston do not fire:

If motion is detected, then turn “ON” virtual switch. but if in the case someone manual OFF the physical switch, but the virtual switch still remain as “ON”, so next time when that same motion device detected again, it won’t fire the switch to be “ON”, unless state is “OFF”.

Do i need to use special virtual switch for CORE? or is there any setting i can force piston to turn ON/OFF no matter what current state is?

Happy New Year everyone!

Any thoughts on this?

The more I try things it seems I am unable to to get CoRE to take any action on the condition of power not fluctuating for a period of time. In other words, I just want to send a simple SMS text if the washing machine hasn’t turned on in the last 30 minutes if a vswitch is turned on. Is this possible? Seems no matter what I try I can’t get this to work.

1 Like

I’m trying to set up a piston that watches the status of my Kodi machine and when it’s playing it dims lights. When paused I would like the lights to ramp back up. I’ve tried numerous things but still can’t get it to fire.

You are mixing triggers and conditions on top of usig the ELSE IF piston. When mixing triggers (full dots) with conditions, only the triggers cause reevaluations of states. And an ELSE IF piston only evaluates the second condition set when the first one is found to be false. In your case, the power needs to change for any evaluation to occur, however your else if requires that no power change happened, hence the conflict.

Try using something like:

IF
   VSwitch is on
   AND
   Power is greater than 3W
THEN
   Using location... (cancel on piston state change)
      Wait 30 minutes
      Send notification "clothes are done, please remove"

While it may not do all you need, it should get you started. Point is, you schedule the notification in advance and cancel/postpone it whenever the condition changes.

Also, be aware that power may be reported very very often and for very small changes. Say 0.3W, then 0.2W, etc. You want to find the idle power consumption and go a little above that to set your threshold. If you are lucky and your dryer does not cycle power a lot during a drying cycle (should be straight forward for dryers - on then off) you should be able to pull it off. Change the 3W to an amount that fits your dryer.

Check that Kodi events are actually fired. Also, mind the case, is the status Playing with capital P or lower case p? The check is case sensitive.

Trying to create my first piston, and I’m having problem to set delay time.

I like to have light that turned on after lock unlocked to turn off again after 5 minutes.
In the delay off setting value is set in ms so I need to set in 300000ms but
the maximum value accepted is 59999.

Any ideas what I’m doing wrong?

Thanks

Instead of using delay use wait.
So.
All in one action.
Wait 5 minutes.
Turn Off.

2 Likes

Thanks, I will give it a try. I am curious why something like this won’t even work work?

IF
Dryer Outlet was less than 10W for at least 60 minutes
THEN
Using location…
Send notification “clothes are done”

Even this is not working!

Thank you!

Check the power reporting. It may be that it never stays that low long enough? Power is one of the very noisy/chatty attributes around

It hasn’t changed since yesterday and this simple rule is evaluating as true. Does my ST hub need restarting?

Try restarting the plug? But that answers your question. Regardless of how a rule evaluates, the evaluation only happens when events occur. No events, no evaluations. No evaluations, no actions…

So, is it possible to make a virtual switch and just do this? So that if a vswitch is turned on it triggers a timer?
If vSwitch is On
then
if nothing happens for 60 minutes
send SMS text