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 or making a Paypal contribution here: paypal.me/SupportTMC

New cell phone app: Tesla Tattler --- works on all cell phones

Discussion in 'Roadster: Technical' started by scott451, Feb 7, 2011.

  1. scott451

    scott451 KWH-PWR#1349Sprt,S Sig#96

    Joined:
    Apr 2, 2009
    Messages:
    251
    Location:
    Palo Alto
    #1 scott451, Feb 7, 2011
    Last edited: Jul 22, 2011
    Now that Doug_G and TomSax are handling the log parser effort, I wanted to share my next effort...

    The Tesla Tattler! (Thanks to Peggy Jones for the name)

    This is the fourth generation of my tesla monitoring system.

    V1 ran on a HP netbook with Verizon WWAN card attached to talk to a web server to post updates.
    V2 was never really stable due to a bug in the linux pl2303 driver.
    V3 ran on a china clone of a Keil MCB1768 + USB GPRS modem.
    V4 (this version) runs on "off the shelf" ARM9 hardware. It uses phone SMS text messages for control.


    Design constraints:
    1. Must work on all cell phones (not just iPhone or android)
    2. Small market -- only +1500 tesla world wide. With 10% attach rate, that's only 150 users.
    3. Cost target < $500.
    4. Must work with both 1.5 and 2.x roadsters.
    5. Should be easy to use.

    Based on the above constraints, the hardware must be "off the shelf" (at a higher cost). It must include a GSM modem because the Roadster 1.5 does not have one. Due to the small market, it is not feasible to develop an app for each phone type. Therefore, the UI must be based on SMS text messages. T-Mobile has a $15/mo unlimited SMS plan. To keep the SW development tool costs down, it will be Linux based.

    Tattler hardware:

    Linux ARM processor w/CAN controller, 2GB SD card, +12 pwr supply. GPRS GSM modem. Includes a cable that plugs into the Roadster Diag connector. The Tattler can be self installed behind the passenger seat headrest or professionally installed inside the driver side door jam.

    Price: $499
    Expected shipping date, September 2011


    Here are some of the supported features:
    attachment.php?attachmentid=1863&d=1306998401.gif

    The command structure is designed to be simple and SMS/T9 friendly. E.g. "charge stop", "stop charge", and "stop" are the same.

    Attached below are pictures from the various commands. Commands are in green, car responses are in grey. (this is not an iPhone app, it works on any phone that can send text messages).

    IMG_0621.PNG IMG_0617.PNG IMG_0618.PNG
    IMG_0616.PNG IMG_0619.PNG IMG_0620.PNG


    Disclaimer: This device sends and receives CAN messages on the tesla CAN0 bus. I don't work for tesla, nor have any friends that do. I'm just passionate about Tesla's products and understanding how they work. The Tattler is the result of my own analysis of my 2008 roadster and discussions with (and CAN data from) other owners. Ideally, I belive I've written the tattler code so that it could be integrated in to the existing VMS Linux applications and make use of the internal GSM modem in the roadster 2.x

    Yes. It should work with any SMS text capable phone.
     
  2. doug

    doug Administrator / Head Moderator

    Joined:
    Nov 28, 2006
    Messages:
    15,914
    Location:
    Stanford, California
    Great stuff! Curious what you're doing for security. Looks like you're using a PIN code for the Unlock command. Does the command SMS have to come from a recognized phone number?
     
  3. scott451

    scott451 KWH-PWR#1349Sprt,S Sig#96

    Joined:
    Apr 2, 2009
    Messages:
    251
    Location:
    Palo Alto
    #3 scott451, Feb 7, 2011
    Last edited: Jun 10, 2011
    Some commands are privileged (like gps location) and are only sent to the owner's phone(s). Other command responses, if enabled, are sent to the requesting phone. BTW the tattler app does not know the car PIN code. It just passes it on the PIN sent via SMS to the VMS and reports the results. The unlock command can be sent from any phone, but requires the PIN to unlock (just like the VDS). That way if you lock your keys and cell phone in the trunk by putting the jacket you were wearing (with both) in the trunk, you can use your friend's cell phone to unlock your car.
     
  4. Jaff

    Jaff Active Member

    Joined:
    Aug 15, 2010
    Messages:
    3,007
    Location:
    Grimsby, Canada
    #4 Jaff, Feb 7, 2011
    Last edited: Feb 8, 2011
    Looks like a great app Scott...can't help you debug as the extent of my computer knowledge is limited to turning on my laptop.

    When you're done with the debug though, I'd definitely be interested.
     
  5. dpeilow

    dpeilow Moderator

    Joined:
    May 23, 2008
    Messages:
    8,572
    Location:
    Winchester, UK
    I'm intrigued by V2 - running on the vehicle with just a USB modem sounds like a neat solution.
     
  6. scott451

    scott451 KWH-PWR#1349Sprt,S Sig#96

    Joined:
    Apr 2, 2009
    Messages:
    251
    Location:
    Palo Alto
    It's less about debug and more about getting smart/passionate people to help support the non-tech users. I did this once before when I developed the R5000-HD. The ten early adopters were instrumental in identifying a couple of key features and supporting the growing user base. They were also a good defense against folks kicking up FUD (because they were users not developers).
     
  7. Fuzzylogic

    Fuzzylogic EU Sport 359 & S94

    Joined:
    Jun 23, 2009
    Messages:
    336
    Location:
    The Netherlands
    Very cool!
    If allowed (don't think i have more then 88 post), i'm in!
     
  8. suxxer

    suxxer ElektroVolt

    Joined:
    Dec 15, 2010
    Messages:
    294
    Location:
    Zurich, Switzerland
    Awsome.

    I first have to get my own CAN-Bus (aka. Roadster) at the end of the month (hopefully). Then I can finally test my clone of Fuzzylogics device (which is currently waiting for action).

    But I would love checking your tattler-unit out too (if allowed - I'm working hard on my 88 posts...9 to go...) ;)
     
  9. donauker

    donauker Member

    Joined:
    Sep 5, 2006
    Messages:
    755
    Location:
    Pennsylvania
    Excellent work! Count me in.
     
  10. Jaff

    Jaff Active Member

    Joined:
    Aug 15, 2010
    Messages:
    3,007
    Location:
    Grimsby, Canada
    Sorry, improper vernacular on my part. :redface:

     
  11. vfx

    vfx Well-Known Member

    Joined:
    Aug 18, 2006
    Messages:
    14,792
    Location:
    CA CA
    How about a demo in Newport this weekend?
     
  12. Zorba

    Zorba Member

    Joined:
    Jan 11, 2011
    Messages:
    180
    Location:
    Belgium
    That is one great app :) keep up the good work!
     
  13. scott451

    scott451 KWH-PWR#1349Sprt,S Sig#96

    Joined:
    Apr 2, 2009
    Messages:
    251
    Location:
    Palo Alto
    Yes. If I make it up there. I'll try but, I was snowboarding in Utah this weekend, so I'm a little behind on some of the weekend projects...
     
  14. eeenmachine

    eeenmachine Member

    Joined:
    Jan 30, 2011
    Messages:
    36
    Awesome work! As an iPhone developer it pains me to see the Volt and others with this kind of functionality but not the Roadster. Can't wait to see it in person on the Julian rally.
     
  15. vfx

    vfx Well-Known Member

    Joined:
    Aug 18, 2006
    Messages:
    14,792
    Location:
    CA CA
    ok 6 rsvps so far (tues)
     
  16. dwegmull

    dwegmull 2013 Model S 85

    Joined:
    Oct 8, 2009
    Messages:
    238
    Location:
    Redwood City, California
    Nice! WHich HW are you using? I have a bunch of ARM based development boards at work, so I might already have something suitable... I can probably make my own adapter cable as well. Would you consider such an arrangement?
     
  17. dsm363

    dsm363 Roadster + Sig Model S

    Joined:
    May 17, 2009
    Messages:
    18,235
    Location:
    Las Vegas, NV
    Tesla says that they're focusing on the Model S right now so limited engineering resources are available to the Roadster. That's supposedly the main reason there isn't an official Tesla app.

    Scott451: Awesome job on the app. I'm glad there are people working on it. Have you tried contacting Tesla so see if they can at least provide you with some assistance or documentation that may help your development? That way they can have it released unofficially and with minimal effort on their part since you're doing all the hard work. Thanks.

    Could this in theory work with the built in GSM modem in the 2.0 and 2.5 cars?
     
  18. dwegmull

    dwegmull 2013 Model S 85

    Joined:
    Oct 8, 2009
    Messages:
    238
    Location:
    Redwood City, California
    I wonder how it will be until a car manufacturer opens its own app store... Hopefully TM would be first!
     
  19. scott451

    scott451 KWH-PWR#1349Sprt,S Sig#96

    Joined:
    Apr 2, 2009
    Messages:
    251
    Location:
    Palo Alto
    #19 scott451, Feb 9, 2011
    Last edited: Feb 9, 2011
    The problem with the app is once you write an iPhone app, then you have to write a Android app, then blackberry/RIM, etc...

    I wrote to JB 18 months ago telling him how much I loved my car! I also asked him if there were any "Standards" that documented the CAN bus messages on the Roadster. He said there weren't but that there might be something available under NDA and he asked me to check back in a few weeks when the SW teams would be less swamped. I followed up a couple of times, but never heard anything back from JB. It worked out for the better because now anything I discover about the logs/CAN bus/HW I can release without any NDA restrictions.

    Yes. I designed it with that in mind (see V2 above). The app could be compiled to run on the VMS hardware, but a few issues would need to resolved:
    1. Some mechanism is needed to negotiate access to the GSM modem, as my app monitors incoming SMS continuously.
    2. It's not clear to me if two programs can open /dev/CAN0 at the same time and not end up stealing messages...
    3. Need to understand the impact of my app on the total memory (32MB) in the VMS. The parser is yacc/lex so it is a memory hog...
    4. If it runs on the car it must be MISRA checked. My app is lint clean, and I've started on MISRA...

    That being said, it probably simpler to keep it separate. What I really need is a way to control states within the VMS. Specifically to turn on/off, heat/cool the HVAC system. My app can do whatever the VDS can do, but the VDS can't control the HVAC. Once there is some good buzz from people using the Tattler, I'll try and contact Tesla again...
     
  20. dsm363

    dsm363 Roadster + Sig Model S

    Joined:
    May 17, 2009
    Messages:
    18,235
    Location:
    Las Vegas, NV
    Thanks. Would you mind if I e-mailed my Tesla sales rep and mentioned your project? Maybe they'll contact someone willing to help you.
     

Share This Page