Time To Live not working in Eventghost

Discussion in 'EventGhost' started by Henrik, Apr 4, 2016.

  1. Henrik

    Henrik New Member

    Joined:
    Mar 3, 2016
    Messages:
    9
    Likes Received:
    0
    First of all - I LOVE AUTOREMOTE!!!!! Best app I have :)

    However, I cannot get Time To Live to work via the Eventghost plugin when sending notifications.

    It works perfectly when using the URL directly in the browser (testing: turning flight mode on and sending a message with TTL set to 50 seconds and then turning fligthmode off again after 10-20 seconds to see if I recieve the message). It also works fine using the Eventghost Message action.....

    However, when using Time To Live in Eventghost Notification TTL does not work. I have tried two different approaches:

    1. Using the Autoremote registering action and set the TTL to 50 - with no luck.

    2. Setting time to live directly in an action. However, the setting in TTL to 50 seconds does not seem to get saved - when I open the Eventghost action after setting TTL the TTL field is empty again?

    Any thoughts?
     
    Last edited: Apr 4, 2016
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,481
    Likes Received:
    805
    Glad you like the app :)

    Unfortunately the TTL setting is only used for GCM (push messaging) which is not the case for EventGhost which uses a simple direct connection. Sorry for not making that clearer in the app!
     
  3. Henrik

    Henrik New Member

    Joined:
    Mar 3, 2016
    Messages:
    9
    Likes Received:
    0
    Thank you for swift reply.

    Could a workaround be to just COPY/PASTE the URL (with TTL), and send the URL via Eventghost?

    Question: how come TTL works when sending a message (not notification) via Eventghost?
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,481
    Likes Received:
    805
    TTL is a feature of GCM which sends push messages through the cloud. The message is kept in google's servers for as long as the TTL value is, and is discarded if that time is up. Hope this clarifies it.
     
  5. Henrik

    Henrik New Member

    Joined:
    Mar 3, 2016
    Messages:
    9
    Likes Received:
    0
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,481
    Likes Received:
    805
    oohh! I thought you meant that you wanted to send messages TO EventGhost with a ttl parameter :D Yes, that should work!
     
  7. Henrik

    Henrik New Member

    Joined:
    Mar 3, 2016
    Messages:
    9
    Likes Received:
    0
    Thanks :p

    How come the TTL doesent work when I use an Eventghost Action to send the notification to my android phone?
     
  8. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,481
    Likes Received:
    805
    there it should work. doesn't it work? You said that you solved it right?
     
  9. Henrik

    Henrik New Member

    Joined:
    Mar 3, 2016
    Messages:
    9
    Likes Received:
    0
    Yes, I solved it using the python script - but the "standard" notification action in EG still doesnt work with TTL...
     
  10. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,481
    Likes Received:
    805
    Oh, I see, sorry! :)

    That's a bug in the code! Just looked at it and fixed it.

    If you now check for updates it should update itself.

    Hope this helps!
     
  11. Henrik

    Henrik New Member

    Joined:
    Mar 3, 2016
    Messages:
    9
    Likes Received:
    0
    Just updated to version 1.991005 manually (and restarted Eventghost) but it does not seem to work. When I save an event with the TTL it stays saved (in contrary to before) but in the testing I still dont get the message.

    I have tried different approaches:
    1. Making a new action with TTL 80000
    2. Registering my device with TTL 80000
    3. Both of the above

    Am I maybe doing anything wrong?
     
  12. Henrik

    Henrik New Member

    Joined:
    Mar 3, 2016
    Messages:
    9
    Likes Received:
    0
    If it helps I have tried to copy in the command below (copied it as python):

    eg.plugins.AutoRemote.SendNotification(u'APA91bHkXXXXXXXXXXXXXXqsyYM5', u'Henrik', u'Test', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'', u'86000', u'', u'')

    ;)
     
: TTL, time to live

Share This Page