AutoRemote Message comes in but AR not reacting

Discussion in 'AutoApps' started by vbs, Jun 19, 2016.

  1. vbs

    vbs New Member

    Joined:
    Jun 17, 2016
    Messages:
    11
    Likes Received:
    0
    I bought AR on friday and I am desperately trying to get it to work reliably. I installed WifiLocker to get my Wifi to stay on when screen is off and I installed PushNotifierFixer to cope with that TCP timeout problem. Now the network issues seems fixed, but:

    Sometimes when I send an AR message the AR tasker profile just does not react to it. I have a tasker profile "Event -> AutoRemote" which should turn the screen on by a AR message (using SecureSettings). Message filter is "state\s.*=:=fl_tabletA33", "Use Regex" is activated.
    The message I send then to turn the screen on is "state on=:=fl_tabletA33". I use my personal URL to do so, like:
    Code (Text):
    https://autoremotejoaomgcd.appspot.com/sendmessage?target=fl%5ftabletA33%3astate&key=<myKey>&sender=FHEM&message=state%20on%3d%3a%3dfl%5ftabletA33&ttl=60
    Sometimes it works but sometimes it does not :(
    When I does not work I can actually see that the message arrived cause it appears in the AutoRemote Log. I see there:
    Code (Text):
    <date and time now> Received Message from Unknown device with this id: FHEM Text: "state on=:=fl_tabletA33" Target: "fl_tabletA33:state"
    So exactly what I sent. But in the Tasker log there is just nothing. So AR is receing the message but does not trigger tasker.
    Then I test the exact same message again and suddenly it is working.
    Please help :(
     
  2. vbs

    vbs New Member

    Joined:
    Jun 17, 2016
    Messages:
    11
    Likes Received:
    0
    I have this behavior on both devices I tested: An Allwinner A33 with Android 4.4 and a Samsung Galaxy Tab2 10.1 with CM13 (Android 6). Both show messages in the AR log that don't appear in the tasker log.
     
  3. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    I believe this is happening because of the way Tasker plugins communicate with Tasker which is via broadcasts. Broadcasts are given low priority in Android so if the device is asleep Android may postpone them. However I hadn't seen it happen in 4.4 before. Do you maybe have a battery optimizer installed on that device?
     
  4. vbs

    vbs New Member

    Joined:
    Jun 17, 2016
    Messages:
    11
    Likes Received:
    0
    Thanks for the answer! But no, I am not using any apps that manipulate energy settings. The problem happens for both mentioned devices (Android 4.4 + 6.0) and also I just have seen it on a third device (Sony Z1 Compact, Android 5.1.1). For me the messages are not even postponed they are really just gone. Cause out of frustration I did even do a factory reset (on the Allwinner A33) and then installed only the neccessary apps I need to run Taster+Autoremote, but it didn't help :(

    So you think it is a general problem for all Tasker plugins? Hm that would be sad since it would mean that Tasker-plugins are generally not reliable :(

    Sorry to say but it's crucial for me that Tasker+AutoRemote works reliably (as long as the network connection is ok ofc). Is there anything I could do or provide to help you in some way?
     
  5. RhyTech

    RhyTech New Member

    Joined:
    Jun 19, 2016
    Messages:
    5
    Likes Received:
    3
    I know nothing about logs but I noticed with AR that if the device was asleep, it still receives the broadcast and acts on it but some actions don't run. When I first ran my AR alarm clock, the trigger sent and the 'say' actions worked but loading Spotify didn't.

    What secure setting action are you using to turn the device on?
     
  6. vbs

    vbs New Member

    Joined:
    Jun 17, 2016
    Messages:
    11
    Likes Received:
    0
    I use this to turn on display: https://play.google.com/store/apps/details?id=com.intangibleobject.securesettings.plugin&hl=de

    But on my Z1 Compact I have created a Tasker AutoRemote profile that just runs a beep action on a AutoRemote message. And I have also seen (or heard) that the beep did not work, so its not neccessarily related to the display. Again I could see that the message was received in the AR log but Tasker log did not show anything (and did not run anything).
     
  7. RhyTech

    RhyTech New Member

    Joined:
    Jun 19, 2016
    Messages:
    5
    Likes Received:
    3
    Sorry I meant what's the configuration of secure settings.

    I'm new to all this really so I'm just spit balling ideas. I'm just going on the assumption that when the device sleeps, there are some more resource heavy things tasker can't initiate without the phone first being woken up by another command.
     
  8. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    @vbs does it always work if the screen is on?
     
  9. vbs

    vbs New Member

    Joined:
    Jun 17, 2016
    Messages:
    11
    Likes Received:
    0
    I will have to test that. Currently I am using it to turn on the display. But I will put the display to always-on and let it just beep on incoming message.
     
  10. vbs

    vbs New Member

    Joined:
    Jun 17, 2016
    Messages:
    11
    Likes Received:
    0
    I am not absolutely sure yet but it in fact looks like it does not happen when the screen is permanently on. Also I think the problem happens a lot less on my Galaxy Tab2 (CM13 Android 6.0) compared to my Allwinner A33 (Android 4.4).

    I might add that I have to trigger the "Fix GCM registration" in the settings about 1-2 times a day on the AllwinnerA33 since it just stops to receive messages at all. This did not happen on the Galaxy Tab2 at all yet. (not sure yet if the screen-on did influence that also)
     
  11. RhyTech

    RhyTech New Member

    Joined:
    Jun 19, 2016
    Messages:
    5
    Likes Received:
    3
    The processor most likely still spools down to save power, even with the screen still on. Try the option in SS "wake device". I think this doesn't just turn the screen on but wakes up the processor too.
     
  12. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    @vbs if you stop receiving messages altogether then that's a different problem. Your device is probably killing AutoRemote in the background somehow, making its GCM registration invalid and that's why you need to fix it.
     
  13. vbs

    vbs New Member

    Joined:
    Jun 17, 2016
    Messages:
    11
    Likes Received:
    0
    Yeah ok, but do you have any ideas concerning the original problem that AR is actually receiving the message but Tasker is not triggered?
     
  14. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    I've been getting that question a lot so I decided to put that in the FAQ. Maybe your 4.4 device has something similar to doze mode?
     
: unreliable

Share This Page