I am currently using a webcore piston with hard-coded wait timers that control a pair of Z-Wave ball valves. The valves control the water flow to my hose bibs for some sprinkler heads. I run the pistons via a virtual switch that is turned on/off through actiontiles. Most of time, using the hard-coded wait values are fine, but sometimes I would like to run them for a certain amount of time that isn’t already predefined. What I would like to do is to just tap a virtual switch on with a prompt that says something along the lines of “How long?”. Then the value entered would go into a variable which I could use for the wait timer before I turn the valves off. Are there any current implementations to do this?
Is it possible to set variables in webcore from an interface?
I can see this being done via Tasker, if you’re an Android user. Tasker can prompt for input and that input can be sent to WC via a webcall with the input as payload.
Proof of concept…
Variable Query prompts for a number, saved into %numberInput
This is step 3 of the HTTP POST where the URL is the piston’s external URL. Under Data/File is the data you want to send.
The piston that receives the info from Tasker… saved the data sent by Tasker to taskerInput
variable or just use $args.numberInput
directly.
Would there be a way to tie this into something that can be accessed from an actiontiles panel? I don’t mind setting the variable by itself but I’ve tried to keep it as simple as possible for the wife.
Very nice @eibyer. You can also use Tasker 'Scenes" if you want to create a few set times instead of using a keyboard to type in a number. (such as (15, 30, 60, etc)
You could create a few Momentary Buttons, and link them to ActionTiles. When pressed, webCoRE can act upon a set (predetermined) time period, depending on which button you just pressed. That will be easier that creating an additional popup asking for duration.
What I mean is, each Momentary Button could be programmed to a certain length of time. For example, pressing ButtonA would set it for 5 minutes. Pressing ButtonB could be for 15 minutes etc. You could create additional buttons for each length of time.
Ah, I was thinking of something a little different. Have one button that will increase the time when pressed X amount of times in, say, 30 seconds. So if I press the button 3 times within 30 seconds, set the variable to 15 minutes. Similar to an “add +30 seconds” button on a microwave, I suppose. Could I output the variable value to something that would let me display that in actiontiles?
Definitely possible, but a LOT of work will be involved to create that method. You originally asked for simplicity, which is why I suggested picking a few ‘normal’ durations, and just go from there.
The Tasker idea above may be your best bet if the device with ActionTiles is Android.
I was aiming for simplicity in the usability of it. The complexity of the piston doesn’t bother me that much. I have a button right now that just turns them on indefinitely, then I set an alarm on my phone for a certain amount of time and shut them off when the alarm goes off. The less buttons the better though
Ahh ok, I understand better now. The thing is, it is very tricky to ask webCoRE to keep track of how many times a certain button is pressed within a time period, and then once the time has expired, do something different depending on how many times it was pushed. It is not impossible, but I am not responsible for any grey hair you acquire in the process.
You could possibly use one of the modified devices that has settable values like a temperature tile or a lux tile. The drawback is the bottom of the tile will probably display the units, but if you can get over that, then it’s an option.
Here’s an example…
You have not mentioned if your device is Android, but if it is, here is a tutorial video showing Tasker scenes to create a variable for timers. In his example, he sends the results to his phone’s alarm, but the same concept can be used to send the variable to webCoRE via a http GET.
I am using android (kindle fire tablets), but am really trying to stay away from using tasker since it doesn’t really have an integration with actiontiles. Also, the tablet setup takes like an hour of piece and I’m planning to get a few more since they’re so cheap. Would hate to add to the process even though it’s supposed to be a one time thing.
Fair enough, I will not suggest Tasker again (in this thread, LOL)
One possible workaround using ActionTiles, is to use my Momentary Button idea posted above, but only have ONE tile (Panel Shortcut) showing on your main page. When clicked, it could load another Panel in AT that lists a few time slots. This way, only ONE tile is taking up space on your main Panel, and when you want to manually turn on the water, you simply touch the Panel Shortcut. From the new page, you can have a few (pre-programmed) times listed. (5m, 10m, 15m, 30m, 45m, 60m etc) When you touch one of those, a command can be sent to webCoRE, and you can return to your main panel.
Just an idea.