Beiträge von chriscat

    Sadly I had to remove the widget from my iPhone as I kept hearing the car every 10 minutes or so. the sound the car usually makes when we lock it.


    After stopping the widget the sounds stopped. After adding it back on my iPhone one hour later, the sound came back immediately.


    The weirdest part is that all along the widget was on iPad too and there is no problem there

    Ah, my bad, Sorry. Actually multiple users are not supported yet. Only one user with multiple cars.


    This is because I store the credentials and tokens for the user inside a file in iCloud Drive in order to cache them. This way I can reuse the tokens as long as possible without having to log in again.


    Please do the following:

    • delete all your Smart widgets from the home screen (to stop them running automatically every few minutes)
    • go to your iCloud Drive Scriptable folder (e.g. in the Files app) and delete the file smart-credentials.json
    • setup one script/widget again and see if it works (it should!)

    After that you can set up another car but it has to be the same user! All scripts/widgets use the same user tokens as of now.

    I wonder if with this method it means we don't have to fear to setup also on iPad and Macbook in addition to iPhone, with same credentials. Because iCloud sync the file between devices.


    When you said "setup one script/widget". Do you mean one script per widget? I like it better if I plan to re-use it on more devices.


    I can get only one working at a time. one or the other.


    After a few tries, it seems it's the lastest car I used on the app. it would mean it's impossible to avoid this issue. I would be able to get only the one I used last in the app for each user


    IMG_62E2C592F6CA-1.jpeg    IMG_23023BDD0FD9-1.jpeg


    Basically you don't need one user per car in order to setup multiple widgets as long as your single user has access to all cars.


    So there are two options for you (I'd prefer the first):

    1. leave the script as it is (from github) and set up the parameters only in the widget configuration: username;password;vin (works as long as there is no semicolon in your password)
    2. set up the script multiple times in Scriptable (with different names) and hard code your user, pass and vin in each script (line 21-23) - in this case, leave the widget params empty in the configuration!

    I tried with both solutions. Neither worked. I suspect my users are blocked but I still can connect into the app


    Using twice the same user, I thought it might explain why i had credentials error. You said one account can connect only once so I tried with 2.

    It worked for the first car. But when I added a 2nd car, it never worked and the 1st started failing too.


    I’ll give it a couple of hours and see again. Maybe just a temporary block because I logon onto the app to share the cars.

    chriscat

    When I got the car in late April, it worked for a few months without a problem. But yes, obviously they broke this functionality somehow. Really frustrating, so many bugs! :rolleyes:


    If you set up the widget on your homescreen by just using the parameters, you can setup multiple widgets simply by using different vins - no need to touch the script at all. So it's both more secure and more flexible.

    Thanks. actually the trick was just to use the VIN for the 2nd car. I was looking for an index.


    I created a 2nd API user so that I could get 2 widgets at the same times.


    Do we have to wait for a while after we connected in the app with that user to accept the sharing? I lost access also to the 1st one which worked before.

    IMG_1827.jpeg

    Thanks for your feedback. I realized in your screnshot that the current position of your car seems to be unavailable. As far as I know, this happens if the user didn't accept the terms and conditions checkboxes - or when the car forgot about it and logged you out.
    Could you please double check if you can see the position of your car in the official Hello Smart App when logging in with the same user you used for the script?

    I will add a more pleasing output in case this happens (instead of undefined). :)

    do you mean you can generally see the position of your cars in Germany?


    It's a big complain in France, we rarely can see the location of our smart #1. It worked well in July, the first month, then stopped one day for everyone. We see it from time to time, particularly if we are driving it.


    Next time we can see the location of the car for a few minutes I will let you know if the widget is not showing it.




    Would you be able to point me at the line to change in order to target my 2nd and 3rd car? I will try to have 2 widgets showing at the same time. one for each car.

    I'm not seeing any obvious place in your Javascript with a position.


    Edit: was obvious, I just had to use a different VIN

    .

    6. Vergess de hessische Handkäs mit Mussig, de Äbbelwoi und die Grie Soß ned :D


    Sorry chriscat we are just kidding ;)

    How come Google translator can’t help? 😂


    I went to Germany in March to try a Smart #1 when it was not yet available in France and UK.


    Welcome was so great I’m now converted to German Beers and have 3 smart#1 🍺

    I’m a Frenchman living in UK most of the time. I have 3 smart #1 on my app.


    1. French Premium

    2. French Pro+ (my mother, but I recorded it on my account as owner)

    3. British Premium


    Happy to beta test in this complicated environment and to contribute to translations if you are interested.


    My spouse is a professionnel iOS/swift developer and I’m a DevOps Engineer.


    Really good looking screenshots so far!