• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Putting Tablet to sleep and wake up with http command

Corremans

Lurker
Hi all,

I have been searching theforums , but I don't think this has been asked allready.

I have a wall mounted tablet for using in my home automation. Is there a possibility via tasker to put the tablet to sleep and wake up via a http command? ( I can send http request/command via my homeautomation to a specific IP adress).

Thanks,
Cor
 
The tablet is going to go to sleep after the timeout you have set, which should be about 30 seconds, so why worry about it? If you're concerned with every liittle bit of battery usage, use Greenify.
 
Sorry I wasn't clear what I want.

The tablet is mounted on a wall and is always on and connected to the mains, so no worries about the battery.

But, when I go to sleep , I hit the "sleep" button on my home automation, than lots of things happen, security on another level , lights off, heating lower etc..
Now I also want to include the tablet to go into sleep mode , since no one will be watching it. In the morning when I wake up , I hit the "wake up "button" on my home automation device. Again lots of things happen in the house. Now I want the tablet to have the screen on again.

My home automation can easily send http commands to an IP adress.

Any possibility to do this?

Thanks,
Cor
 
When the tablet screen or buttons haven't been touched for the screen timeout duration, the tablet goers to sleep. That's just how Android works. There's no additional sleep mode you can put it in. About the only "deeper sleep" it can be in than deep sleep would be an external device to disconnect the battery from the rest of the tablet, which would completely power it down. (But would itself have to be powered to receive the "wake the tablet up" command in the morning.)
 
In Tasker on my Droid Maxx I can adjust the awake time with the Display Timeout action.

I normally toggle between 30sec and 10min. It will accept very short and very long times (like 2sec and 8hr).

For this application set it very short at night and back to normal in the morning?

... Thom
 
Lock Screen will shut off the screen. You said "include the tablet to go into sleep mode", which isn't the same as shutting off the screen. You can lock the screen, set the screen timeout to 1 second (it may default to 15 seconds, depending on the device) or just let it time out normally. But it goes to sleep when the OS puts it to sleep (which isn't just shutting off the screen, it's putting it into a VERY low power mode).
 
@ Rukbat; I can not use the screen time out , because I want to watch the screen always when I am awake (it shows my security cameras). When I go to bed , I want to automate something to have less power consumtion. For now I press the the "lock screen" button and when I wake up , I unlock the device.

Since I have quite an extensive homeautomation setup I would like to automate this as well .

So my question is , is there a way to remotely for example by means of a http command or something suitable , to dim, or lock , or shut off , or ??? the device and the same for bright , unlock, wake up the device.

external device to disconnect the battery from the rest of the tablet, which would completely power it down. (But would itself have to be powered to receive the "wake the tablet up" command in the morning.)
That is not a bad idea , I can insert a relay which shut off the power to the device , than only run untill the battery is dead. But when I switch the relay on again ..... I don't think the device will power up again.

@ Thom: I work/sleep on irregular times , so a schedule won't work with me.

thanks,
Cor
 
I work/sleep on irregular times , so a schedule won't work with me.

Even simpler ... a task that toggles 1 second or normal timeout ... like ...

tlaTimeoutOneTen
A1: If [ %DTOUT ~ 60 ]
A2: Display Timeout [ Secs:0 Mins:10 Hours:0 ]
A3: Else
A4: Display Timeout [ Secs:0 Mins:1 Hours:0 ]
A5: End If

... Thom
 
So my question is , is there a way to remotely for example by means of a http command
You can't send HTTP "commands", the tablet has to read HTTP from a web server. What you want is that the car's speed determines how far down the gas pedal is pushed. It works the other way.

to dim, or lock , or shut off , or ??? the device and the same for bright , unlock, wake up the device.
Shutting off the device requires tht you press the power button to wake it up. Since it's shut off, you can't send it a command to wake up - it's off, so it won't see the command. You can shut off the screen. The tablet will sleep (which isn't the same as the screen being off) when the operating system tells it to sleep. Sending a command wakes it up, you can't send a command to sleep. It has to be awake to receive the command.

I can insert a relay which shut off the power to the device , than only run untill the battery is dead. But when I switch the relay on again ..... I don't think the device will power up again.
You can't send a command to a device that's turned off. SOME device has to be running to receive a command. The only way to totally turn the tablet off is to remove the battery (which is difficult with a tablet.) Then you have to be the "device" that's awake to turn it back on after you put the battery back in.

The best you can do is a lock screen command in Tasker, which will turn the screen off. After a few minutes, the OS will put the phone to sleep (which isn't the same as being off).
 
We are getting there ... So i am looking in tasker to "lock screen" is there also an option to "unlock" the screen?

Than for the remote controll part for my home automation. I stumbled across this app:
https://play.google.com/store/apps/details?id=com.joaomgcd.autoremote


from wherever you are by sending push notifications to your phone and reacting to them in Tasker or AutoRemote standalone apps!
How I understand it , I can send a push notification ( via my home automation) , taskercan reacts on that with a "lock screen" .....right?

Half of the puzzle solved than .....
Is it possible to have the device "unlocked/ operational/ awake" whatever it is called again?

Thanks
 
We are getting there ... So i am looking in tasker to "lock screen" is there also an option to "unlock" the screen?
Lock screen and check the invert box.

Than for the remote controll part for my home automation. I stumbled across this app:
https://play.google.com/store/apps/details?id=com.joaomgcd.autoremote


How I understand it , I can send a push notification ( via my home automation) , taskercan reacts on that with a "lock screen" .....right?
I've never played with Autoremote, so I on't know.

Is it possible to have the device "unlocked/ operational/ awake" whatever it is called again?
If a Tasker trigger comes in, it wakes the phone up. You don't wake it or put it to sleep, the operating system does that. Sending Tasker a notification (maybe an SMS or an email even) should wake it up. That probably won't unlock the screen, though - you'll have to do an inverted screen lock when you receive the notification.
 
ok.... WhenI will be home next week I will play a bit with tasker and this autoremote and report it here.

thanks for the help so far,
Cor
 
Some weeks later , and getting very close.

tThere is an app and plugin for my home automation and android device.
"autovera", when there is a status change , tasker can respond on it .

What would be the options to save the most amount of energy and lifetime of the tablet during nighttime when everybody is sleeping?

For the moment I was able to set the dimming level to 0 , which is not black, you can still see stuff on the screen. It is a start , but maybe there are better options.

I also tried "lock" but this shows a keypad to unlock the screen. ( very helpfull for future ideas :-) )

What else would be a good idea , maybe a bitmap with only black pixels?
Maybe there is a way to simulate the button which is on the right of my galaxy tab3, which makes the screen completely black, when I press it again the screen comes on again ( I have set the option to insert a code to unlock to off).

Thanks for all the help,
Cor
 
I use AutoRemote from my home automation system (HomeSeer) to send a command to Tasker on my wall tablet to turn the screen ON whenever it sees motion in the Kitchen where the tablet is (I use motion detected by an ELK alarm system motion detector to notify HomeSeer which then notifies my tablet via AutoRemote/Tasker)

I use recurring Tasker events on my tablet to count down a timer. When timer expires, Tasker blanks screen. Every time HomeSeer sees motion and sends command to Tasker, it not only activates the screen, but resets the timer to its max.

tenholde
 
Back
Top Bottom