Trigger route sync from Device

Completed

Comments

42 comments

  • Avatar
    Andreas Boiselle

    @ali: Hi, Any news on this?

    1
    Comment actions Permalink
  • Avatar
    Ali

    Andreas, this is currently not on immediate plans. We are still developing and improving the route management, as you will see changes in the next releases.

    0
    Comment actions Permalink
  • Avatar
    Edgar Karel

    Hi Ali,

    Can you give this more priority?

    There are already 28 votes for this feature. 

    1
    Comment actions Permalink
  • Avatar
    Ali

    Hi Edgar, I will be sure to share this feedback with the Product team internally. Additionally, it would also help the community if you share your feedback with them directly through the form attached on the Software release emails.

    0
    Comment actions Permalink
  • Avatar
    Martijn

    Has anyone tinckered a script to login and call the ‘Sync Routes’ function?
    I’m sick of this manual sync, and hope to automate this when my Karoo connects to my WiFi.

    0
    Comment actions Permalink
  • Avatar
    Martijn

    I made a simple bash-script to refresh the routes. You can call it from cron, or something.

    ```
    #!/bin/bash

    function jwt_decode(){
    jq-R'split(".") | .[1] | @base64d | fromjson'<<<"$1"
    }

    # get the token from the Dahsboard Loginpage
    -H 'Accept: application/json; charset=UTF-8 ' \
    -H 'Content-Type: application/json' \
    --data-raw '{"grant_type": "password", "username": "<YOUR_USERNAME>", "password": "<YOUR_PASSWORD>"}' | jq '.access_token')

    # get the userid from the jwt token
    userid=$(jwt_decode $token | jq '.sub')

    #to remove the double quotes from the token string
    token=`sed -e 's/^"//' -e 's/"$//' <<<"$token"`

    #to remove the double quotes from the userid string
    userid=`sed -e 's/^"//' -e 's/"$//' <<<"$userid"`

    #Refresh the routes
    -H'Accept: */*'\
    -H'Accept-Language: en-US,en;q=0.9,nl;q=0.8'\
    -H"Authorization: Bearer $token"\
    -H'Connection: keep-alive'\
    -H'Content-Type: application/json'\
    --data-raw'null'\
    --compressed
    ```
     
     
    Or something
    0
    Comment actions Permalink
  • Avatar
    Ali

    Hi All,  "Sync" option on the Karoo 2 was added in the past release. You can find it by clicking on the 3 dots under the routes app. This helps sync starred and pinned routes from 3rd party services connected on the Dashboard.

    2
    Comment actions Permalink
  • Avatar
    Martijn

    Woop woop!! This is great!!

    0
    Comment actions Permalink
  • Avatar
    Michael Tabolsky

    😍

    0
    Comment actions Permalink
  • Avatar
    Anna Ronkainen

    Just as we figured out a workaround, Hammerhead finally implements a solution as well. Interesting timing, but well done all the same!

    (I still have Martijns script running in my crontab, not planning to remove it but I guess I could change the frequency to just 3 times per day...)

    0
    Comment actions Permalink
  • Avatar
    Andreas Boiselle

    Finally :-) Party On!

    0
    Comment actions Permalink
  • Avatar
    Tim Hamer

    Great stuff

    0
    Comment actions Permalink

Please sign in to leave a comment.