Jump to content
Automate Life
Beau

would like a new set of eyes on this code looking for ideas

Recommended Posts

Hi  All,

I have started this script to work with a zooz power pug that is on a sump pump 

I would like to be able to see the first time the script runs

then the number of times and ho often 

I like an ideas

image.thumb.png.a8b87ae3a400e53d5bcd8fe4b56b5aeb.png

Share this post


Link to post
Share on other sites

Your setting your variables at the start of your script. Each time the piston runs they will be changed to that value. Unless you want your variables set that way i would suggest not setting them there. Instead set them in the body of your piston, that way they will change as needed.

  • Thanks 1

Share this post


Link to post
Share on other sites

Hi  Larry 

How would you do it  this was my first script  i am just try to track a sump pump  run time better?

thanks beau 

 

 

 

Share this post


Link to post
Share on other sites

Here is a piston that keeps track of the number of times the switch (in your case the pump) was turned on and the last time it was turned off and turned on. This gives you the idea of how it can be done.

 

245495601_tracktimedatenumberofruns.thumb.png.faffe20dce7159ec0c763abbd040391d.png

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...