Webcore Piston Help

Could some one possibly give me a hand with a Webcore piston, been trying all day but can only get it to work by making 2 seperate pistons which i'm trying to avoid.

So I would like for my 2 door locks to be checked for their status between 9:30pm and 5:30am and if any is unlocked i would like the system to speak which lock is unlocked I know I have to use a variable but i don't know which one to use to make it speak which particular lock it is that is unlocked. any and all help as ussual is greatly appreciated and thx in advance for any help.

Are you set on WebCoRE for this? This would be easy to do with Hubitat's built-in Notifications app (or also Rule Machine, but I'm assuming you're using WebCoRE to avoid that). Regardless of how you do it, it sounds like you really want to subscribe to the lock's locked/unlocked events (a condition in WebCoRE or a trigger in Rule 4.0--or just choose the appropriate locks in the Notifications app, fill out the rest of the options, and it will do everything for you).

I'll have to bust out my test WebCoRE instance if you're set on this, or we'll have to wait for someone else. Just thought I'd point out that you don't really need it for this in any case.

Yes Iā€™m transitioning all of my rules over to Webcore so that they can be backed up and I can keep everything together in 1 app and place.

A great resource for building webcore pistons is the webcore forum. There are a few users who enjoy helping others build their pistons. Plus there are lots of example pistons you can search through.

I don't see the advantage of keeping everything in one app (I'd use whatever app is best suited to the purpose), but Hubitat apps will get backed up as part of the nightly database backup, which you can also manually create and download any time. So will WebCoRE pistons for that matter, being just apps as far as the hub is concerned. I can still figure something out for you here if no one gets there first, but again just checking that you aren't going this path unnecessarily. :slight_smile:

1 Like

yes I know the apps will backup but the routines will not with webcore my routines are backed up, I am currently redoing my whole house layout so I have to set my c-4 c-5 and c-7 back to factory I have 69 routines if somehting happens and I have to redo the hubs again webcore will make things easier on me then RM will with RM I would have to retype every routine. Don't want to head down that road again so i would like to keep all of my routines in one place under 1 roof as it will.

Try this

Ok thank you much

"Routines" aren't a Hubitat concept, so I'm not sure what you mean, but it sounds like maybe that's a general term for apps/automations of any kind, including Rules or pistons or perhaps just exclusively one or both of those. The reality here is the same, as all are just apps: they'll be backed up. You will have to replace devices in any apps (including rules), which I happen to find easier in non-Rule apps, but the reality here is also the same for webCoRE: you'd have to replace the device in all pistons, too (and add/change the authorized devices in the webCoRE app). Again, not trying to derail you, but I'd say everything is on about equal footing here. :slight_smile: (Except that a device can be swapped with just a click or two in the Notifications app, for example, which I'd consider easier than either webCoRE or RM, but your preferences may vary.)

That being said, I think this should do what you want:

(the "Unknown Device 8" is your notification device, like your Hubitat Mobile App Device or whatever you're using for this; if you're used to ST, do not choose "Location" for this)

This will send a notification any time either of the locks are unlocked but only between your specified times. You don't really need to use any variables here besides webCoRE's built-in ones for the current device (and current attribute, which I used, though hard-coding "unlocked" would also work here since that's the only time this will be executed).

Note that if they are unlocked outside the specified time and then the current time becomes that time and they are still in that state, nothing will happen. You could add additional actions to handle that here if you want--the piston provided above by another poster appears to do that part, but only that part.

Ok Thank you much for the help, yes i could have been clearer with my ask for help. usually most of my routines start out as just easy ones but then over time they get more complicated thats the only reason why i'm moving them to webcore I have routines that I just gave up on trying in RM because when I did them they just didn't work or wouldn't work no matter how I changed it. but again thank you for the assistance.

Again not to steer you in a different direction that you want, but this automation would be pretty easy for someone familiar with RM to create and should work fine. If it doesn't, then there could be another problem (e.g., maybe your Mobile App Device isn't working for notifications--and that's a problem you'd have anywhere, including webCoRE, with this device, so something you should fix). Just want to make sure you aren't trying something different only to run into the same problem.

PS - If you're interested, Rule 4.0:

Trigger: Lock 1, Lock 2 any unlocked

Actions:

IF (Time is between 9:30 PM and 5:30 AM) THEN
  Notify "%device% is %value%"
END-IF

And the Notifications app would be even easier, but I know you've heard that from someone before... :slight_smile:

I get that! When I used ST, I had nearly every automation on webCoRE since my needs also usually started simple and ended up there or with a custom app anyway. Easier to just start there! And the difference was usually minimal since most SmartApps were cloud-dependent anyway, as all custom SmartApps like webCoRE also were. On Hubitat it's nice that any of the solutions I mentioned will run locally (except the webCoRE IDE, which there's even a solution for if that's important to you). Was definitely a pain when the ST cloud went down, though--one of many reasons I moved on. :slight_smile:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.