AutoCast AutoCast-Speak to google home works only if Phone is awake

Discussion in 'AutoApps' started by Tipa Cristian, Aug 31, 2017.

  1. Tipa Cristian

    Tipa Cristian New Member

    Joined:
    Aug 31, 2017
    Messages:
    18
    Likes Received:
    0
    Hi,
    #1 I have a profile where I want to use AutoCast to send a text for speak to GoogleHome (using Autocast-Speak). If phone is awake (display turned on) everything works fine. If phone display is off, I can never hear that text on GoogleHome.
    Phone is Galaxy S6 edge.
    I checked my battery settings on the phone to make sure doesn't restrict Tasker or AutoCast from running in background.

    #2 Another issue is that if I execute a profili/task which issues an Autocast-Speak to my GH, after execution finishes, I see on my phone notifications a notificaiton from Autocast saying "Casting..". This stays there forever if I don't tap on it. If I try to ask my GH to play soome music msic will start and will stop in few seconds with a beep sound after it (and here I am guessing that Autocast does something I don't understand). If i click the Autocast notification on my phone to make it go away, music plays fine on my GH (if I ask GH to play music)
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Hi!

    1. Is this maybe related to this issue?
    2. You can make it go away with the AutoCast App action :)
    Hope this helps!
     
  3. Tipa Cristian

    Tipa Cristian New Member

    Joined:
    Aug 31, 2017
    Messages:
    18
    Likes Received:
    0
    1. Don't think its related to my case. In my case the profile is triggered and almost everithing inside it works fine except autoCase (I remind that AutoCast only doesn't get triggered when phone is with screen off);
    2. I already tried AutoCast App action. The notification is still there on my phone. And asking google to play music gets stopped after few seconds followed by that beep. I added delays before calling AutoCast App with no help
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Thanks again.

    1. Do other plugins work with the screen off?
    2. Did you setup the AutoCast APp action to stop the service? Can you please export your task's description (not xml) so I can take a look? Long-click the task in Tasker->export description Thanks in advance
     
  5. Tipa Cristian

    Tipa Cristian New Member

    Joined:
    Aug 31, 2017
    Messages:
    18
    Likes Received:
    0
    1. Yes, other plugins work fine;
    2. Here is the task. When task is running, I can hear the beeps, but autovoice does not send anything to GH. Sometimes if I turn on my phone's display withing few minutes after the failed execution, my GH speaks the text

    The Spreadsheet Query works in the below task (I tested it by comparing resulting value with a number and playing a beep on specific value). Also I have other tasks that use AutoContacts and those work fine while phone has screen closed.
    Code (Text):
    Calculate Spendings (5)
    A1: [X] Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
    A2: Beep [ Frequency:8000 Duration:1000 Amplitude:50 Stream:3 ]
    A3: [X] AutoCast App [ Configuration:
    Starting AutoCast
    Cast Device: Kitchen Home Timeout (Seconds):300 ]
    A4: [X] AutoCast Speak [ Configuration:Device: Kitchen Home
    Text: calculating Timeout (Seconds):60 ]
    A5: Spreadsheet Query [ Configuration:Query SpendingsTracker Timeout (Seconds):20 ]
    A6: Wait [ MS:0 Seconds:3 Minutes:0 Hours:0 Days:0 ]
    A7: Beep [ Frequency:6380 Duration:1000 Amplitude:50 Stream:3 ]
    A8: AutoCast Speak [ Configuration:Device: Kitchen Home
    Language: en-US
    Text: In last 30 days you spent %row1cells() Timeout (Seconds):60 ]
    A9: Wait [ MS:0 Seconds:7 Minutes:0 Hours:0 Days:0 ]
    A10: AutoCast App [ Configuration:
    Stopping AutoCast
    Cast Device: Kitchen Home Timeout (Seconds):300 ]
     
    Last edited by a moderator: Sep 1, 2017
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Thank you. Can you please let me know if you somehow blocked or didn't whitelist Google Play Services or AutoCast on your device? Thanks!
     
  7. Tipa Cristian

    Tipa Cristian New Member

    Joined:
    Aug 31, 2017
    Messages:
    18
    Likes Received:
    0
    I don't know how to do that (neither block nor whitelist). So, whatever was the default, it should be set now also....
    I would like to remind that everything works fine while phone is awake.
    I checked under battery settings to see if any application is restricted from working in background, and none is set there.
    I even added all AutoApp related applications (AutoApp, Tasker, Autocast, AutoContacts, AutoVoice) under the battery section "Unmonitorred apps" where "These apps can use as much power as they want and App power monitor will not do anything to stop them". No difference.
     
  8. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
  9. Tipa Cristian

    Tipa Cristian New Member

    Joined:
    Aug 31, 2017
    Messages:
    18
    Likes Received:
    0
    I don't plan to downgrade my Android on my phone but, as I said before might not be related. This compalins that Tasker profiles not being triggered. My profile is triggered, but just an action in my Task doesn't get fired. Any other plugin seems to work fine. Just Autocast seems to not work...
     
  10. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Ok, so you can confirm that other plugin actions work correctly with the screen off? Thanks again
     
  11. Tipa Cristian

    Tipa Cristian New Member

    Joined:
    Aug 31, 2017
    Messages:
    18
    Likes Received:
    0
    Yes, I am 100% that other plugins work fine with screen off.
     
  12. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Can you please try another plugin action that requires a network connection to work? Do you have plugins that need it? Sorry, just trying to figure out why this would happen...
     
  13. Tipa Cristian

    Tipa Cristian New Member

    Joined:
    Aug 31, 2017
    Messages:
    18
    Likes Received:
    0
    Np. I already tried it. I am using some spreadsheet plugin that connect to my google drive account and retrieves some value from a spreadsheet. That one works fine (I even use it in the same task/profile with autovoice). The spreadsheet plugin retrieves a value. I changed my task to beep if value equals 123. Then I play in spreadsheet from my computer and change that value, triggering the Tasker plugin with Google home voice command. When I set in spreadsheet value to other than 123, no beep is played. when I set it to 123, I can hear the beep fine. Which means that this plugin works fine.
    The task itself should speak this spreadsheet value on my google home device using Autocast (and as U know already, it does it only if my phone is awake)
    Even if instead of the value I try to make it speak a static (constant) value, same issue happens.
     
  14. Tipa Cristian

    Tipa Cristian New Member

    Joined:
    Aug 31, 2017
    Messages:
    18
    Likes Received:
    0
    Here is again the profile and the logs:
    Profile:
    Profile: Join Spending Tracker (11)
    Event: Join Received Push [ Configuration:Text Filter: Calculate Spendings ]
    Enter: Calculate Spendings (5)
    A1: [X] Wait [ MS:0 Seconds:5 Minutes:0 Hours:0 Days:0 ]
    A2: Beep [ Frequency:8000 Duration:1000 Amplitude:50 Stream:3 ]
    A3: [X] AutoCast App [ Configuration:
    Starting AutoCast
    Cast Device: Kitchen Home Timeout (Seconds):300 ]
    A4: [X] AutoCast Speak [ Configuration:Device: Kitchen Home
    Text: calculating Timeout (Seconds):60 ]
    A5: Spreadsheet Query [ Configuration:Query SpendingsTracker Timeout (Seconds):20 ]
    A6: Wait [ MS:0 Seconds:3 Minutes:0 Hours:0 Days:0 ]
    A7: Beep [ Frequency:6380 Duration:1000 Amplitude:50 Stream:3 ]
    A8: AutoCast Speak [ Configuration:Device: Kitchen Home
    Language: en-US
    Text: In last 30 days you spent %row1cells() Timeout (Seconds):60 ]
    A9: Wait [ MS:0 Seconds:7 Minutes:0 Hours:0 Days:0 ]
    A10: AutoCast App [ Configuration:
    Stopping AutoCast
    Cast Device: Kitchen Home Timeout (Seconds):300 ]

    Tasker logs:
    20170905 16.31.07 P Instant ID11 Join Spending Tracker
    20170905 16.31.07 E Start ID0:0.0 TaskService
    20170905 16.31.07 T Running ID5 Calculate Spendings
    20170905 16.31.07 A Disabled ID5.1 Calculate Spendings.Wait
    20170905 16.31.08 A OK ID5.2 Calculate Spendings.Beep
    20170905 16.31.08 A Disabled ID5.3 Calculate Spendings.com.joaomgcd.autocast\n***\n*!&$*;com.joaomgcd.autocast.activity.ActivityConfigApp
    20170905 16.31.08 A Disabled ID5.4 Calculate Spendings.com.joaomgcd.autocast\n***\n*!&$*;com.joaomgcd.autocast.activity.ActivityConfigSpeak
    20170905 16.31.08 A OK ID5.5 Calculate Spendings.com.uitcon.spreadsheettaskerplugin\n***\n*!&$*;com.uitcon.spreadsheettaskerplugin.activities.QueryActivity
    20170905 16.31.14 A OK ID5.6 Calculate Spendings.Wait
    20170905 16.31.15 A OK ID5.7 Calculate Spendings.Beep
    20170905 16.31.15 A OK ID5.8 Calculate Spendings.com.joaomgcd.autocast\n***\n*!&$*;com.joaomgcd.autocast.activity.ActivityConfigSpeak
    20170905 16.31.23 A OK ID5.9 Calculate Spendings.Wait
    20170905 16.31.23 A OK ID5.10 Calculate Spendings.com.joaomgcd.autocast\n***\n*!&$*;com.joaomgcd.autocast.activity.ActivityConfigApp
    20170905 16.31.23 T ExitOK ID5 Calculate Spendings
    20170905 16.31.23 E Stop ID0:0.0 TaskService

    Autocast logs:
    HTTP Server:
    2017-09-05 16:31:23.218 Stopping server
    2017-09-05 16:31:15.672 Starting server
    Casting:
    2017-09-05 16:31:15.650 Service started

    ___________________

    With my phone screen open, the Autocast - Casting logs look like this:
    version 1.0.25

    OS Build NRD90M.G925FXXS5EQG2
    OS Code 24
    Device SM-G925F
    Manufacturer samsung
    Product zeroltexx

    HTTP Server - 2017-09-05 16:38:31.537 - Stopping Server
    Casting - 2017-09-05 16:38:31.497 - New AutoCast App Status: {"eventType":"timeupdate","request":{"type":"RequestReceiverEvent"}};
    Casting - 2017-09-05 16:38:30.552 - New AutoCast App Status: {"eventType":"timeupdate","request":{"type":"RequestReceiverEvent"}};
    Casting - 2017-09-05 16:38:29.950 - New AutoCast App Status: {"eventType":"playing","request":{"type":"RequestReceiverEvent"}};
    Casting - 2017-09-05 16:38:29.394 - New AutoCast App Status: {"eventType":"timeupdate","request":{"type":"RequestReceiverEvent"}};
    Casting - 2017-09-05 16:38:28.238 - RequestSetValues sent
    Casting - 2017-09-05 16:38:28.221 - New AutoCast App Status: {"eventType":"connected","request":{"type":"RequestReceiverEvent"}};
    Casting - 2017-09-05 16:38:24.403 - found
    Casting - 2017-09-05 16:38:24.395 - found
    HTTP Server - 2017-09-05 16:38:24.359 - Starting Server
    Casting - 2017-09-05 16:38:24.340 - Service started
     
  15. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Ok, thanks for confirming that. So we can rule out network blocking.

    What about Google Play Services blocking while the screen is off? That's the service responsible for finding your cast devices.
    Do you think you could have something that's blocking that?
     
  16. Tipa Cristian

    Tipa Cristian New Member

    Joined:
    Aug 31, 2017
    Messages:
    18
    Likes Received:
    0
    Don't know... If U could tell me how to check it, I will check and let U know.
     
  17. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Hmm, is your device rooted?
     
  18. Tipa Cristian

    Tipa Cristian New Member

    Joined:
    Aug 31, 2017
    Messages:
    18
    Likes Received:
    0
    nope
     

    Attached Files:

  19. uluf

    uluf New Member

    Joined:
    Sep 13, 2017
    Messages:
    1
    Likes Received:
    0
    Hi,

    it seems like i have a similar problem here. I have a Tasker profile set up which triggers autocast to play a mp3 file on my google home after getting a command from autoremote.
    When the phone display is on, it plays after about 2 seconds, no issues.
    When the screen is off, nothing plays until i turn on the screen
    .
    Other plugins which use network connections work fine, wake on lan and autoremote had no problems.
    I tried 2 different phones with miui and different aosp based custom roms, some of them rooted, tasker and autocast whitelisted on any battery saver apps etc.

    My google app is the latest beta, i don't have any other of the mentioned bugs in the g+ post, everything else works fine.
     
  20. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Maybe google somehow updated the Google Cast SDK in Google play services to not allow for this :( What version of Android and Google Play services do you have? Thanks!
     

Share This Page