TMC is an independent, primarily volunteer organization that relies on ad revenue to cover its operating costs. Please consider whitelisting TMC on your ad blocker and becoming a Supporting Member. For more info: Support TMC

Community help needed - Underground garage & wifi summon...

Discussion in 'Model S: User Interface' started by Peter Greis, May 4, 2017.

  1. Peter Greis

    Peter Greis Member

    Joined:
    May 10, 2016
    Messages:
    45
    Location:
    Stäfa, Switzerland
    Greetings All

    I have originally raised this point with Tesla (mail to ServiceHelpEU <[email protected]>) - briefly the problem is:

    I have underground parking here in Switzerland. It is very, very common. Along with running 400v triple phase to my two parking spots, I pulled a few strands of Cat-7 ethernet cable as well. On one of those is a wifi access point, which works well. My P90D can connect to the access point without any problems.

    As far as a cellular data connection goes there is nothing (neither GSM nor LTE). As there are many tons of rebar and concrete overhead, this is to be expected.

    I would really like to be able to squeeze my Model S against the wall by using summon to back in. This is currently not possible because of the behaviour of the car. If I summon the car (connected to Wifi) it stops just after going from P to D or R. The Wifi connection drops and try to switch to cellular as soon as the car goes out of park. Tesla says this is normal.

    Several software releases ago Wifi summon worked (in one direction). My delivery guys says more emails to ServiceHelp will help the problem gain visibility.

    Thinking about potential fixes:

    1. Do not disconnect the wifi connection if there is no one in the front seat (I am assuming here that there is a system accessible pressure sensor in the seat)

    2. Re-enable summon via the fob for those of us in underground parking (which is the norm here in Switzerland). Another DS has said for liability reasons this will never be enabled here...

    3. Use direct app-to-car via Bluetooth for the summon functionality.

    Any one of these three would fix the issue; The first option is likely the best and most straight forward to implement.

    I have explored putting in an LTE repeater in the garage. The minimum I can get away with is 3,000 CHF, which is a bit more that I want to spend.

    So, for anyone in the same boat, please send an email to the address above (feel free to copy my "problem text").

    Many thanks

    P
     
  2. Broaders

    Broaders New Member

    Joined:
    May 8, 2017
    Messages:
    2
    Location:
    London
    I have a similar issue. my garage is not underground, but the mobile signal is week, so the summon feature works about 25% of the time, and often doesn't work or stops half way with connection issues.

    I was thinking of buying a booster signal box from phone operator which gives 3G signal when connected through internet... these things only cost about $100 from the mobile operator, but I need to find out what mobile network Tesla is on in the UK (I think it is O2 / Telephonica).

    Or I was keeping my fingers crossed that Summon by Keyfob will come to UK on the next software update... but sounds like there might be legal reason why they have not done it yet, so wont hold my breath.

    Mobile Booster box seems like the cheapest option - to try first. Anyone tried this yet ?
     
    • Helpful x 1
  3. MP3Mike

    MP3Mike Well-Known Member

    Joined:
    Feb 1, 2016
    Messages:
    5,669
    Location:
    Oregon
    What firmware version are you on? I thought Tesla had already fixed this. (But you do need to let it disconnect once, and then while in Drive reconnect to the WiFi. That is supposed to mark that WiFi network as one that will be used during a drive and not disconnect in the future.)

    Or maybe their fix was to let it disconnect and then reconnect a moment later which would break Summon.
     
    • Helpful x 1
  4. Peter Greis

    Peter Greis Member

    Joined:
    May 10, 2016
    Messages:
    45
    Location:
    Stäfa, Switzerland
    Currently on 17.14.23, although I have not yet tried summon on this release. I'll give it a go tonight, but I doubt it has been fixed...
     
  5. Max*

    Max* Charging

    Joined:
    Apr 8, 2015
    Messages:
    6,544
    Location:
    NoVa
    What's wrong with using the keyfob? Does Europe not have that functionality?

    Also, if you double tap the parking lever, it brings up the summon/autopark screen. So you can park it that way, but you might not be able to bring it back forward...
     
  6. MP3Mike

    MP3Mike Well-Known Member

    Joined:
    Feb 1, 2016
    Messages:
    5,669
    Location:
    Oregon
    I think both of those options are only available in the US. Almost everywhere else essentially requires a dead-man switch.
     
    • Informative x 1
  7. Peter Greis

    Peter Greis Member

    Joined:
    May 10, 2016
    Messages:
    45
    Location:
    Stäfa, Switzerland
    No, key fob in Europe is not allowed. And I just checked 17.14.23 in the garage, no go.
     
    • Informative x 1
  8. MP3Mike

    MP3Mike Well-Known Member

    Joined:
    Feb 1, 2016
    Messages:
    5,669
    Location:
    Oregon
    And you have reconnected to the WiFi after you put the car into drive?
     
    • Helpful x 1
  9. Peter Greis

    Peter Greis Member

    Joined:
    May 10, 2016
    Messages:
    45
    Location:
    Stäfa, Switzerland
    No, I am standing outside of my car, attempting to summon it from my parking space (where the drivers side is squeezed up against the wall). If I have to try to open one of the car doors, then that defeats the entire exercise...
     
  10. MP3Mike

    MP3Mike Well-Known Member

    Joined:
    Feb 1, 2016
    Messages:
    5,669
    Location:
    Oregon
    I'm saying that you have to do it at least once before that WiFi profile will get flagged to stay connected when you shift into drive. And once you have done that maybe Summon will work for you. Consider it a "setup" step.
     
    • Helpful x 1
  11. J1mbo

    J1mbo Active Member

    Joined:
    Aug 20, 2013
    Messages:
    1,133
    Location:
    UK
    I have a similar situation, except I dont have WiFi.

    Instead, on LTE, the app tells me to stand closer to the car, even if I am standing right next to it.

    I think this is a GPS issue.
     
  12. Broaders

    Broaders New Member

    Joined:
    May 8, 2017
    Messages:
    2
    Location:
    London

    GREAT !!! Problem seems to be solved - Thanks MP3Mike !!! How did you find out about that little trick ?

    I tested Summon on my X90D AP2 and my phone signal was on Zero - and Summon Worked !! So this should work for Peter too if you follow Mikes instructions :)
     
    • Like x 1
  13. MP3Mike

    MP3Mike Well-Known Member

    Joined:
    Feb 1, 2016
    Messages:
    5,669
    Location:
    Oregon
    It was something that @Ingineer let us know back when 7.0 broke things and started disconnecting WiFi when you shift into drive. I guess it worked like this for a while, and then it stopped setting the flag to let it stay connected, and then Tesla finally fixed it again.

    Tesla said the reason they did this was to make a clean transition from WiFi to LTE when you leave your house. (As people were complaining about streaming music and map loading not working as you drive away from your house as the WiFi signal gets to weak before it switches to LTE.)
     
  14. Peter Greis

    Peter Greis Member

    Joined:
    May 10, 2016
    Messages:
    45
    Location:
    Stäfa, Switzerland
    No luck on my side. Reconnected to Wifi after shifting to drive, put in back into park, then tried summon. Same thing for reverse...
     
  15. Milkfloat

    Milkfloat Member

    Joined:
    Jan 1, 2017
    Messages:
    22
    Location:
    Manchester UK
    Hi,

    I have similar problems in a parking structure - good LTE but no GPS. I can confirm the car needs
    1. Data connection WiFi or LTE
    2. Phone connected to WiFi or LTE
    3. Key fob within range
    4. GPS location for both phone / car to be close to each other.

    Loose any one and Summon stops. I think they have a deadman logic that goes
    1. Fob needs to be near car
    2. Phone needs to be near car
    (otherwise you could summon your car from the other side of the world if someone else was stood near it with a key fob.)

    Have asked Tesla for a better way to make it work - e.g. Bluetooth to prove phone is near car and key fob is too.
     
  16. Gesteur

    Gesteur New Member

    Joined:
    Jan 24, 2018
    Messages:
    3
    Location:
    Switzerland
    Hi guys,
    I also had the same problem, have an underground parking lot.
    The main problem is GPS signal which wont be available underground and tesla mobile app needs them to send to tesla servers.

    so If you have internet connection in the garage then you could create a small program to send summon commands "faking" the GPS coordinates. Basically you can read the coordinates of your car and send them in the summon request.

    Check this link for code examples by Tim.
    Add support for new Summon APIs · Issue #16 · timdorr/model-s-api · GitHub


    I created a small script in javascript using node.js that i can call via computer/phone which will issue a summon (autopark) command in an underground garage. Tested it yesterday and works great :)

    I have the teslams framework installed so I can take advantage of that to query the car for nrrded information (GPS coordinates and token) .
     
  17. Gesteur

    Gesteur New Member

    Joined:
    Jan 24, 2018
    Messages:
    3
    Location:
    Switzerland
    Hello,

    Some members have asked me to share the autopark script with them. The code has been taken from different sources like timodorr
    - Add support for new Summon APIs · Issue #16 · timdorr/model-s-api · GitHub
    and also the teslams framework from hjespers
    - hjespers/teslams

    I just put together the pieces and created hyperlinks to access the autopark functions.

    be careful while using it, I DO NOT bear any responsibility by the usage of the script, I'm not responsible if you crash your car while on autopark.

    The car will ONLY stop if you press the KEY FOB or there is an obstacle (tho I never fully trust the latter).

    Basically this script will run on a computer with node.js installed, it will open a http server listening on port 8888.
    you can access this webserver from your phone for example.

    if your computer's IP is 192.168.1.2 then you can connect from your phone opening the web browser like this:
    http://192.168.1.2:8888

    if you connect from outside your home network you will need to access your computer with public IP and probably forward the port 8888 from your router to your computer

    you will have 3 links to click. First you need to click "getInfo", so that the script will read the GPS coordinates from the car, then you can choose "forward" or "reverse".

    Be always prepared to STOP the car with the key fob.


    Code:
    #!/usr/bin/env node
    
    var teslams = require('../teslams.js');
    var request = require('request');
    // edit the ~/.teslams/config.json file to contain your teslamotors.com login email and password
    
    
    var argv = require('optimist')
    .usage('Usage: $0 -u <username> -p <password> || --token <bearer_token> \n')
    .string('token')
    .alias('u', 'username')
    .describe('u', 'Teslamotors.com login')
    .alias('p', 'password')
    .describe('p', 'Teslamotors.com password')
    .describe('P', 'HTTP Listen Port (default is 8888)')
    .alias('P', 'port')
    .default('P', '8888')
    
    var creds = require('./config.js').config(argv);
    
    argv = argv.argv;
    
    var beat;
    var cmdbeat;
    var state;
    var long,lat;
    var vid; // = vehicles.vehicle_id;
    var token; // = vehicles.tokens[0];
    
    console.log('user ' + creds.username + ' token ' + creds.token);
    
    
    var http = require('http');
    // set and check the validity of the HTTP listen port
    // the environment variable $PORT is read for deployment on heroku
    var httpport = argv.port;
    if (isNaN(httpport) || httpport < 1) {
        console.log("missing or incorrect http listen port: '" + httpport + "' using default\n");
        httpport = 8888;
    }
    
    
    
    function sendSummonCmd(cmd,token,vid){
        
        console.log('sendSummonCmd options: ' + token + ' - ' + vid);
        
        const WebSocket = require('ws');
        const ws = new WebSocket('wss://' + creds.username + ':' + token + '@streaming.vn.teslamotors.com/connect/' + vid);
        
        var is_autopark_active = false;
        var breat_freq =500;
        
        ws.on('open', function open() {
            console.log('on open');
        });
        
        ws.on('message', function incoming(event) {
             try {
                   var msg = JSON.parse(event);
                  } catch(err) {
                     console.log('Error: unable to parse autopark data');
                     return;
                    }
            var d = new Date();
            var dateLong =d.toDateString() + ' ' + d.getHours() + ':' + d.getMinutes() + ':' + d.getSeconds();
            
            console.log(dateLong + ' Received data\n' + event.toString());
            switch(msg.msg_type){               
                case "control:hello":
                    console.log('control hello');
                    breat_freq = msg.autopark.heartbeat_frequency;
                    break;
                case "control:goodbye" :
                    clearInterval(beat);
                    ws.close();
                    return;
                    break;
                case "autopark:heartbeat_car":
                    break;
                    
                case "vehicle_data:location":
                    break;
                    
                case "autopark:error":
                    console.log('Received data\n' + event.toString());
                    clearInterval(beat);
                    ws.close();
                    break;   
                    
                    
                case "autopark:status":
                    if(msg.autopark_state == "aborting"){
                       console.log('Received data\n' + event.toString());
                       clearInterval(beat);
                       ws.close();
                       return;
                       break;
                    }
                    else if(msg.autopark_state == "ready"){
                        
                      if(is_autopark_active) {
                        is_autopark_active = false;
                         clearInterval(beat);           
                      }
                      else
                      {
                        is_autopark_active = true;
                        beat = setInterval(function() {
                        var msg = {
                            msg_type: "autopark:heartbeat_app",
                            timestamp: new Date().getTime(),
                            };
                          ws.send(JSON.stringify(msg));
                       //   console.log('send heartbeat ' + JSON.stringify(msg));
                        
                        },breat_freq);
                        
                        //send summon command!
                        console.log('send JSON ' + JSON.stringify(cmd));
                       ws.send(JSON.stringify(cmd));
                      }
                    }
                    break;
                default:       
                    console.log('Received data\n' + event.toString());
            }
            
            
        });
        
        ws.on('error', function(e){
            console.log('error ' + e);
            clearInterval(beat);
        });
        ws.on('close', function(e){
            console.log('disconnected');
            clearInterval(beat);
        });
        
    }
    
    
    function parseUrl(req, res) {
        "use strict";
        
        var url = req.url;
        var msg;
     
       // var lat,long;
        var d = new Date();
        console.log(d.toDateString() + ' ' + d.getHours() + ':' + d.getMinutes() + ':' + d.getSeconds() + ' request ' + req.url);   
        switch (url) {
            
            
            case "/forward":
                msg = {
                    msg_type: "autopark:cmd_forward",
                    latitude: lat,
                    longitude: long
                };
                if(state == "online") {
                    sendSummonCmd(msg,token,vid);
                }   
                break;   
                
            case "/reverse":
                msg = {
                    msg_type: "autopark:cmd_reverse",
                    latitude: lat,
                    longitude: long
                };
                if(state == "online") {
                    sendSummonCmd(msg,token,vid);
                }
                break;
    
            case "/getinfo":
              
                teslams.vehicles( {  token: creds.token, email: creds.username, password: creds.password }, function ( vehicles ) {
                    console.log( 'got vehicles data');
                    if (typeof vehicles === "undefined") {
                        console.log("Error: Undefined vehicle");
                    } else if (vehicles.tokens === undefined) {
                        console.log("Error: Undefined token, car might be sleeping, call wakeup first using 'teslacmd -w'");
                    } else {
                        
                        token = vehicles.tokens[0];
                        vid =  vehicles.vehicle_id;  //used for streaming or summon request.   vehicle.id is used for information retrievals
                        state = vehicles.state;
                        
                        console.log('vid , token, state: ' + vid + ', ' + token + ', ' + state);
    
                        if(state == "online"){
                            teslams.get_drive_state( vehicles.id, function (ds) {
                         //   console.log('get drive state ' + ds.toString() );
                                                    
                            if (typeof ds.latitude == "undefined"){
                              console.log('something wrong');
                            }
                            if (typeof ds.latitude != "undefined" && typeof ds.longitude != "undefined"  ) {
                            long = ds.longitude;
                            lat = ds.latitude;
                            }
                            
                            });
                        }
                        
                    }
                });
              break;
                
            default:
             break;
        }
    }
    
    
    //main start webserver and listen to incoming connections
    
    
    console.log('webserver open at port ' + httpport);
      http.createServer(function (req, res) {
    
        parseUrl(req, res);
        
        res.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
        res.setHeader("Pragma", "no-cache");
        res.setHeader("Expires", 0);
        res.writeHead(200, {'Content-Type': 'text/html'});
        res.write('<html><body><table>');
                
        if(state == undefined){
            res.write('<tr><td>getinfo to check if car is online<td></tr>');               
        }
        else if(state != 'online'){
            res.write('<tr><td>Vehicle is not online, status ' + state + ', Autopark not available<td></tr>');
        }
        res.write('<tr><td>GPS coordinates (latitude/longitude)<td>' + lat + '/' + long + '</tr>'); 
        res.write('<tr><td><a href="../getinfo">/getinfo</a><td>get login data</tr>');
        res.write('<tr><td><a href="../forward">/Autopark Forward</a><td>Forward</tr>');
        res.write('<tr><td><a href="../reverse">/Autopark Backward</a><td>Backward</tr>');
        res.end('</table></body></html>');
        
      }).listen(httpport);
    
     

Share This Page

  • About Us

    Formed in 2006, Tesla Motors Club (TMC) was the first independent online Tesla community. Today it remains the largest and most dynamic community of Tesla enthusiasts. Learn more.
  • Do you value your experience at TMC? Consider becoming a Supporting Member of Tesla Motors Club. As a thank you for your contribution, you'll get nearly no ads in the Community and Groups sections. Additional perks are available depending on the level of contribution. Please visit the Account Upgrades page for more details.


    SUPPORT TMC