Trying to set piston state


#1

Just noticed these instructions and playing around with it, but unsure of how:

https://wiki.webcore.co/Piston_State

I’m trying to do this and want it to show current contact status of my bedroom door. Under piston state do I write it up as value, expression, etc. I tried just using device and then selecting device and contact but didn’t show anything.

Another question is that I’ve noticed in both the piston I imported and some others is the piston state text is below the piston name - is that by coincidence or can you force it to do that somehow?


#2

You can write it as an expression. Not sure about the text placement under the piston name though.

-J


#3

You can force the message to next line with an expression.

First disable automatic piston state
Then set piston state to (using expression)

And the expression needs to include \n before what your trying to set it to

For example

settings
disable automatic piston state;
end settings;

execute
Set piston state to "{‘\n hello’}
end execute;


#4

I use this in all my pistons so I don’t just see “True” or “False”. WIth my lighting pistons (example attached), I can see what my last trigger and action was.


#5

I tried your example and nothing appears for piston state alsonget an error in the log.


#6

Ok so I tried with another piston and got something to work including putting it on a new line, but is there a way to haven’t aligned to the left? It seems to be centered.

Here’s the piston.


#7

Can you share one of the pistons that is left justifying the state ?


#8

This is a piston I imported from someone else in a Facebook group and it’s justified left.


#9

I believe what you are seeing is tiles, not the piston state.


#10

Yeah, there’s really no good control over this. If the width of the dashboard is sufficient, most of the time the piston state lines will be aligned to the right of the piston name … that’s what you’re seeing in your “Security” and “Lighting” pistons. Your first “Beta” piston’s state line is too long for the dashboard display so it gets aligned to the left boarder of the display… and the line is wrapped.

Viewing the dashboard on your phone’s small screen vs. a browser being displayed on a larger PC screen will give you different results … but you’ve probably noticed this already.

EDIT: I just noticed your “Contact Grouping” 's piston state line is really one line, but breaks at a variable … dunno what’s going on there LOL :man_shrugging:


#11

Yeah I should have been more specific - it’s the contact grouping piston that’s centered trying to get justified to the left. The offline device notification piston seems to stay left no problem. I know it’s minor but just more aesthetically pleasing.


#12

I know this is an old post, but I’m curious as to what constitutes an Emergency and how you trigger it?


#13

SmartThings lets us create “Modes” for anything. (home, away, night & vacation are the usual choices, but you can make one for guests or the sabbath or anything really) They can be triggered by any piston, like this:

temp

Just put some thought in it before you make new ones because last I checked, you can only be in one Mode at a time.


#14

Thanks! I think I’m pretty familiar with the modes, but I was more curious on what kinds of things would trigger an ‘Emergency’ mode from the poster up above.


#15

That poster has not been active in awhile, although maybe he will see an email and chime in…

This is not quite the same thing, but one example I can give is what I do for my loved ones:
If any of them text me a certain code word, my phone will turn on full volume and play an obnoxious alarm.

So, for example, even if I am asleep, and my phone is in silent mode, I want to know immediately if anyone has an emergency.

Maybe he did something similar with his smart home.


#16

Hey guys, thanks for the shout out. Yea I have been dormant for sometime…kids, life and stuff lol.

The intent of emergency mode was that if my alarm went off, I would have a Z-wave relay on my alarm panel parallel to the siren (or direct if the alarm company would let me install it) that would then trigger WebCore to change my home mode to emergency. Under this case, all of my lights would turn on. I have run into few a few issues.

For one, the alarm company will not let me install relays on the control board, even though the control board supports relays and they sell the relays that work on my control board. However, they sell home automation packages at an install and monthly premium that I am not interested in. It otherwise is a great local alarm company. Stalemate!

Second, I am having reliability issues between Webcore and SmartThings that has discouraged me from going any further at the moment. Time is a premium in my life with family obligations, work obligations, scout obligations, etc. I have not pulled the plug because I have not yet found a better system that does what I want. But having outside lights still on during the day when the piston that turns them off is pretty basic is frustrating. Similar to coming home with lights off.

App load time is unreasonably long as well. I have to open my app about 2 blocks before my house to get the app loaded in time to do anything ‘manually’ and then it hangs when the phone switches from 4G to wifi.

I have a long list of things I still want to do, and the alarm/emergency mode is on the list, I have just had to change priorities.

Good luck


#17

We’re you referring to me since I’m the original poster?


#18

I responded because he quoted me and Im the author of the piston he referenced.


#19

Thanks for the responses everyone!

RE: Phone settings changes. I run Tasker on my phone so I would use it to alter my phone settings if needed. But I like that idea!

RE: Emergency mode. Makes more sense that you have an alarm panel set up. I guess it could also be used for if a fire/CO detector went off, or a water sensor tripped. I found that a lot of the built-in presence sensor-ing isn’t very timely. I use Tasker to push a mode change to ST because it’s significantly faster and more reliable.