[DEPRECATED THREAD: visit community.webcore.co for assistance] WebCoRE - Example Pistons

Thank you! I really appreciate the feedback and example.

1 Like

Thanks! I know there are some suggestions in the help thread so I’ll head over there next. :slight_smile: I’ve been waiting all day to get back to this.

Hi @ahndee,

Didn’t seem to help, unless I didn’t apply the change correctly which is very likely

Do you have an updated Piston that I could import? Might be easier


Rick

1 Like

Been hesitant to switch mines over from CoRE. I see you’ve done the work so I will just copy yours! Looks very similar to what I have in CoRE.

You know what they say about Great Minds :slight_smile:

I’ve been modifying it quite frequently to allow different types of notifications I.E flashing lights, push notifications, voice notifications. I will update the public version once I’ve added more testing

Andreas, replace the \\| with | or |

it appears the expression parser is replacing [ and ] with [ and ] respectively, making that \[ be required. I’ll see if I can fix it, even though it may not need fixing. There are certain characters that need escaping at webCoRE level, [ ] { } so those need to be written as [ to begin with.

It helped some - you no longer see the \n :wink:

The other part is still the same for me - I’ll try @ady624’s suggestion next

Thanks - I’ll try | instead of \\| and see what it does tonight (thanks for the edit :wink: I was a little confused by your original suggestion).

Back when ActionTiles was SmartTiles I created an app that let me use virtual switches to control the FanMode and TheromStatMode. This in turn was helpful when Alexa came around and I could set individual mode states.

I have been going through my IDE to find apps that I can convert to webCoRE. My Thermo-App was the current one I converted over.

I am still deciding to keep the Setpoints separate or eventually merge them with my Thermo-webCoRE piston. Or even having full control in one piston and create another one to show PistonState of the Thermostat itself, but for now, this is my Thermostat Modes controller.

I still like buttons for individual commands and this keeps them in sync.

Also if someone has a better method, I would appreciate a piston code share.

Ok - got it to work using \| (| didn’t work and got the same result as \\|).

Thanks!

I updated the piston in the original posting - either adjust the replace() to match what is in that screen shot or import again. The updated piston now correctly removes all formatting from the push notification.

This was a helpful start.

I modified the piston to turn a bunch or lights on and off, but I’m planning to use it for a group of locks and rollup doors.

Does ST time out? Because one of my devices is very stubborn and it stays on? any ideas on dealing with that issue? The problem is that you can’t hit the all lights on/off button again without turning all on and then hopefully off.

The second part of piston, monitor’s the individual lights for status? Are you away of any DTH types that separates out the switch status from the indicator status?

Without digging into the piston code there is a solution to stubborn lights. You can use a for or while loop.
In your action for turning lights off add the loop. Then a turn off command with a wait. The wait is very important.

@c1arkbar does the wait go after the turn off command? Is 5 seconds enough of a wait?

Wait placement doesn’t matter. Just so long as it is in there. And yes 5 seconds is good

1 Like

I have this simple piston running & want to add wait 10 min. & turn off. For the life of me I can not figure it out any help
Thanks Mike

below the turn on add a wait then turn off

Hi there. Was just wondering if it is possible to capture power usage and push that information to fuel stream to show a daily graph of usage. If it is at all possible, has anybody done something like this?

Not sure if it’s a bug or just something i’m doing wrongly. I’m getting an error when setting up my LIFX bulb

  • " Set LIFX lights matching Bulb1 to color ‘Antique White’ level 100% in 30 minutes"

The error i’m seeing from the logs are:-

Error executing virtual command [].lifxState: (41ms) groovy.lang.MissingMethodException: No signature of method: static physicalgraph.developer.ColorUtilities.findByName() is applicable for argument types: (java.lang.Integer) values: [5500] Possible solutions: findByName(java.lang.String)
PARAMS ARE [d073d513f720, null, Antique White, 100, null, 1800000]

Please reserve this thread for working examples to share with others. Not pistons that need help. If you need help, please go to the assistance thread.:sunglasses:

2 Likes