Announcement

Collapse
No announcement yet.

Tasker - Proximity sensor to activate screen

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Tasker - Proximity sensor to activate screen

    Do any of you guys use Tasker to activate the screen on an android device?

    my wish is to use android tablets and old android phones as HSTouch screens and to use tasker to make sure that HStouch is running and also use tasker to activate the screen when you are close to the screen.
    also I would like to dim the screen to "off" after some time.

    do any of you have similar setups? If so, how do you make this happen?

    br
    Toby

    #2
    I use Tasker and AutoRemote to keep the screen turned ON whenever there is motion in the Kitchen.

    I use motion detected events from motion detectors attached to my ELK alarm system but you could use any motion detector output available to HS.

    Tasker on the tablet counts down and blanks the screen when it reaches zero. AutoRemote sends notice from HS every time there is motion in the kitchen, causing Tasker on the tablet to reset the count down variable and turn on the tablet if the screen is off.

    Let me know if I can supply more detail.

    tenholde
    tenholde

    Comment


      #3
      That's a very interesting approach and I would love if you could share some more details. I already have a motion detector in the room that's attached to homeseer.

      Comment


        #4
        Here is the event that runs whenever ELK detects motion in the Kitchen:





        Here is the script that the Event runs:

        Code:
        Class SendToTablet
            Public Sub Main(ByVal Parms As Object)
                Dim p, rc As String
                Dim BaseUrl As String = "http://autoremotejoaomgcd.appspot.com/sendmessage?key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&message="
                p = Parms.ToString
                'hs.WriteLog("SendToTablet", p)
                rc = SendPush(BaseUrl & p)
                If rc <> "OK" Then
                    hs.WriteLog("SendToTablet", "Bad RC from SendPush: " & rc)
                    hs.WriteLog("SendToTablet", "URL: " & BaseUrl & p)
                End If
            End Sub
        End Class
        Note: you have to substitute your personal autoremote url for the one with the xxxxxxxxxxs.


        The tablet has a Tasker Profile that looks for the AutoRemote string "KitchenMotion" sent by the event via the script. The tasker profile runs a task that (1) Uses the Secure Settings plugin to set Screen Bright Manual ON (2) Set SleepCounter variable to 15

        There is a startup profile that runs a task that sets SleepCounter variable to 15

        There is a timed profile that runs every 2m that: (1) decrements variable SleepCounter by 1 (2) checks variable SleepCounter, and if <1 then (a) Set SleepCounter to 15 (b) do a System Lock (screen off)


        That's all there is to it.

        tenholde
        tenholde

        Comment


          #5
          Thanks!

          This works just perfect. Thanks!

          I now have my motion detector activate the touch screens in the office and kitchen. And I also figured out how to use the proximity sensor to activate it by touch in the bedroom.
          Last edited by Toby; May 5, 2014, 03:21 AM.

          Comment


            #6
            Tenholde, anyway to get that script to run in HS3??

            getting a error:
            Compiling script C:\Program Files\HomeSeer HS3\scripts\SendToTablet.vb: 'SendPush' is not declared. It may be inaccessible due to its protection level.

            Thanks.
            Bryan
            Software/Hardware: Win10 Pro, HS 3 Pro, HS Touch, Echo, Edgeport/4, Z-Net w/88 Devices, Insteon PLM w/19 Devices, Nest, GC-100-6, W800RF32A, WS-2080 Weather Station (KMADRACU10)
            Plug-in/Scripts: Alexa API, BLBackup, BLGData, BLLED, BLLock, BLRF, BLTVGuide, Blue Iris, BLUPS, Current Cost 3P, DirectTV, FitbitSeer, Insteon, Nest, Pushover 3P, Random, Restart, Tasker, UltraGCIR3, UltraWeatherWU, Z-Wave

            Comment


              #7
              I'll try to look at it today
              tenholde

              Comment


                #8
                Originally posted by TechHA View Post
                Tenholde, anyway to get that script to run in HS3??

                getting a error:
                Compiling script C:\Program Files\HomeSeer HS3\scripts\SendToTablet.vb: 'SendPush' is not declared. It may be inaccessible due to its protection level.

                Thanks.
                Did you ever get this working?
                Originally posted by rprade
                There is no rhyme or reason to the anarchy a defective Z-Wave device can cause

                Comment


                  #9
                  Never did get this working. I've since forgotten about it. Too many other things on my plate setting up HS3. Would still be interested in it if someone could get it to work though.
                  Bryan
                  Software/Hardware: Win10 Pro, HS 3 Pro, HS Touch, Echo, Edgeport/4, Z-Net w/88 Devices, Insteon PLM w/19 Devices, Nest, GC-100-6, W800RF32A, WS-2080 Weather Station (KMADRACU10)
                  Plug-in/Scripts: Alexa API, BLBackup, BLGData, BLLED, BLLock, BLRF, BLTVGuide, Blue Iris, BLUPS, Current Cost 3P, DirectTV, FitbitSeer, Insteon, Nest, Pushover 3P, Random, Restart, Tasker, UltraGCIR3, UltraWeatherWU, Z-Wave

                  Comment


                    #10
                    Originally posted by TechHA View Post
                    Never did get this working. I've since forgotten about it. Too many other things on my plate setting up HS3. Would still be interested in it if someone could get it to work though.
                    You can probably do it with my Pushover plugin, Tasker can connect to the Pushover app and if it matches a title/message/URL it can then fire a task off (which could wake the screen), unfortunately I can't test the wake screen on my device but I think it should work OK.

                    Comment


                      #11
                      Originally posted by mrhappy View Post
                      You can probably do it with my Pushover plugin, Tasker can connect to the Pushover app and if it matches a title/message/URL it can then fire a task off (which could wake the screen), unfortunately I can't test the wake screen on my device but I think it should work OK.

                      Could you please elaborate on this a little more or point me in a direction where I could discover more? I'm not trying to control the screen of my phone but the volume. When I'm home turn it off but only if the Mrs. is home. That kind of thing.
                      Originally posted by rprade
                      There is no rhyme or reason to the anarchy a defective Z-Wave device can cause

                      Comment


                        #12
                        Originally posted by S-F View Post
                        Could you please elaborate on this a little more or point me in a direction where I could discover more? I'm not trying to control the screen of my phone but the volume. When I'm home turn it off but only if the Mrs. is home. That kind of thing.
                        It is only likely to save time if you already use the Pushover plugin but this is basically it.

                        1) Load up Tasker
                        2) Click and create a new profile, click Event
                        3) Click Plugin and 'Pushover Notification'
                        4) You then click Configuration and it has a page of title/message/app name/url matches
                        5) Your choice as to what you want to use, I would suggest a message because message is not optional in Pushover whereas a title is.
                        6) In the message field you could use 'volumeoff' as your message match
                        7) Add an action to turn the system volume off
                        8) Create another event to turn the volume back on perhaps with the message name 'volumeon'
                        9) Send messages from HS to the device (specify a device name), suggest silent and with lowest priority - as long as you send the right message text then the volume should turn off and on.

                        That is a rudimentary method of controlling a phone from HS but it is a bit of a workaround, works fairly instantly though.

                        Comment


                          #13
                          I use Tasker with HS and Pushover much as mrhappy to cause a web cam app showing our front door to open when someone rings the doorbell. By the time I pull the phone from my pocket and unlock it, I can see who is there.

                          Comment

                          Working...
                          X