Help With Rule to Cycle Power to Tablet

Since I recently switched form ST to Hubitat I am trying to get rid of Webcore pistons and use rule machine. I am having trouble figuring it out and was looking to see if I could get some help with a Rule. I would like to cycle the power to my table on or off every 3 hours so it is not constantly charging. How can I get an equivalent of this piston into RM? I am not sure where to begin, if someone could post an example I would appreciate it.

If all you want to do is toggle the switch every three hours, then a simple rule like this should work:

Rule Machine screenshot: periodic trigger with 'toggle' action

This trigger was created using the "Periodic Schedule" trigger capability and the "every n hours" option. The built-in "Toggle..." action in Rule Machine will turn a switch on if off or off if on, though you could also create conditionals to check manually if you prefer (like you did in webCoRE). The toggle action is under the "Control Switches, Push Buttons" dropdown for actions.

1 Like

Is it an Android tablet? If so and you are willing to spend $4 on the Tasker app, you can turn off a smart switch when tablet's battery reaches a certain amount and back on when battery's charge drops to a specified level. Let me know if you want more details.

2 Likes

I use Tasker on my wall mounted tablet too. I also use pushbullet and an addon for Tasker that watches for a Pushbullet notification with certain text to run an action in tasker and another addon that clears the notification (so they don't pile up). This allows me to turn the tablet screen off when the hub mode goes into night or away mode and the screen back on when the hub is in day or evening mode.

Thanks @bertabcd1234, this rule should work. I will try it out.

@stephen_nutt I am using an Fire HD8. I found this app called tasker in the amazon app store, but I do not think it is the same one you are referring too. https://www.amazon.com/Latencot-Tasker/dp/B08BJFGCRC/ref=sr_1_1?crid=2NSJ2XK4NHSWP&dchild=1&keywords=tasker&qid=1614263571&refinements=p_n_feature_fifteen_browse-bin%3A21205155011&rnid=9408304011&s=mobile-apps&sprefix=tasker%2Cmobile-apps%2C170&sr=1-1

Nope that is definitely NOT it. I don't have any Fire products so I do not know if Tasker runs on them. This is the app in the Play Store:
image