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
Start a Discussionhttps://teslamotorsclub.com/tmc/tags/

Chat Bot in beta for Model S and Model X

Discussion in 'Model S: User Interface' started by reaveley, Mar 20, 2017.

  1. reaveley

    reaveley Member

    Joined:
    Mar 20, 2017
    Messages:
    6
    Location:
    UK
    Hi everyone, I'm a newbie here so sorry up front if I'm posting this in the wrong channel.

    I'm a Model S P85D owner and decided to write a chatbot to control the car using the Telsa API (struggled for a bit as I didnt realise this forum exists and has lots of people with knowledge on the API!!!).I've built a chat bot which is currently integrated with Facebook Messenger, Telegram and Amazon Alexa. I'll be adding to Skype soon and maybe other platforms such as Kik if there's interest.

    The Facebook chatbot is available now and the Alexa skill is currently going through testing. I'm really after some people who want to beta test and play about with the chat bot as I'm the only person I know with a Tesla. There's lots of functionality but I haven't been able to test the sunroof as I don't have one (who needs on in the UK, we don't have sun!)

    Anyway the Facebook page can be found at ElonBot | Facebook

    It's called ElonBot and to get started you just have to send it a message and take it from there. Try typing help to get some idea of what it can do.

    I'd appreciate any feedback anyone has. You may find the site is down at times as I'm uploading new versions but it should be available most of the time.

    Thanks and any questions please ask

    Richard
     
    • Like x 2
  2. BerTX

    BerTX Active Member

    Joined:
    May 2, 2014
    Messages:
    1,779
    Location:
    Texas/Washington
    Okay. What is a chat bot? What can it do? What does it have to do with Facebook? Why would I ask Facebook a question? Why don't you give us a clue what it is before asking us to try it? How do I load it, or is it something that loads? Does it run on my phone or on the car screen? How does it get info to the API? Do I have to give it my Tesla password?

    Tired of typing.
     
    • Helpful x 1
  3. reaveley

    reaveley Member

    Joined:
    Mar 20, 2017
    Messages:
    6
    Location:
    UK
    Thanks for the response. I posted this late last night and missed out the whole section on how you actual use it, sorry! Let me answer your questions.

    A chat bot is a program that you can communicate with through conversation. It attempts to work out what you are saying and then controls functions on the Tesla based on that.

    To use it you can go to this Facebook Page ElonBot | Facebook and press the Send Message button. If you want to try it without connecting to your car just type ‘hello’ then type ‘use virtual car’

    You’ll then be able to chat to it using Facebook messenger either on your phone using the Messenger app or on your desktop using the web browser and going to Facebook messages.

    Example:
    FBExample001.png FBExample002.png FBExample003.png


    At the moment you can do the following:
    • Where is the car
    • Is the charge port open / closed
    • Open the charge port
    • Whats the battery level
    • How much charge is left
    • Is the car charging
    • Whats the charge range set to
    • Whats the charge limit
    • Is the car plugged in
    • Set the charge range to 65%
    • Set charge to max
    • Set charge to standard
    • Start charging the car
    • Stop charging the car
    • Is the air con on / off
    • Whats the temperature set to
    • Set the air con to 25
    • Turn on the air con /climate control
    • Turn off the climate control / air conditioning
    • Is the drivers door open / closed
    • Is the frunk open
    • Is the trunk open
    • Honk the horn
    • Flash the lights
    • Lock the car / Unlock the car
    • Is the car locked
    • How far can I travel
    • How many miles on my battery
    • Open the sunroof
    • Close the sunroof
    • Is the sunroof open / closed
    • Set the sunroof to 40%
    • How hot is the card / Whats the temperature inside the car
    These are just examples of how you can type. It uses a natural language processor and artificial intelligence to try and figure out what you mean and will also learn the more people use it.

    If you want to connect to your real car then type use real car and say hello. Press the button called ‘Connect My Tesla’. To use it you’ll need to sign up to create an account (using Auth0). We need this to store information such as the car you are talking to and for some of the extra functionality coming out (see below).

    ConnectTesla.png

    Next you’ll need to enter your Tesla account email and password. I use this to get an access token from the Tesla servers. We don’t store your password, it’s only used to get the token and then discarded after that. The token is stored in an encrypted format using industry standard 2048 bit keys, stored in Azure KeyVault.

    Why did I build it? It was something I did in my spare time as I’ve taken a recent interest in AI / NLP and wanted a project that I could apply it too. Since I’ve got a Tesla and read up about the API I thought it would be fun to do.

    Why would you use it? It’s just another way to interface / interact with your car. I personally use some of the various apps available it such as Remote S but I also wanted something for when I’m at my computer at work and don’t have my phone available. The other benefit is that I don’t need to download an app and so I can use it on any device / computer that I can access Facebook.

    It’s not going to be for everyone but I think it can be handy in some scenarios.

    I’ve also got it working with Alexa (I’ve also seen a couple of the other guys on this forum have done something similar), and the next steps for me will be adding in scheduling so you’ll be able to say

    - Can you turn on the AC tomorrow morning at 7:30

    - Check every night at 9:00 and let me know if the car is plugged in

    I’ve got it understanding and extracting the time /data information but need to implement the actual scheduling part.

    Any other questions please ask

    Richard
     
    • Informative x 1
  4. Jaymc5

    Jaymc5 Member

    Joined:
    Aug 27, 2016
    Messages:
    13
    Location:
    Port Orchard, WA
    This seems cool, would love to try the voice activation when available.
     
  5. BerTX

    BerTX Active Member

    Joined:
    May 2, 2014
    Messages:
    1,779
    Location:
    Texas/Washington
    Does look interesting. Thanks!
     
  6. reaveley

    reaveley Member

    Joined:
    Mar 20, 2017
    Messages:
    6
    Location:
    UK
    I'll let you know when it passes certification!
     
  7. reaveley

    reaveley Member

    Joined:
    Mar 20, 2017
    Messages:
    6
    Location:
    UK
    #7 reaveley, Apr 3, 2017
    Last edited: Apr 3, 2017
    I've updated the chatbot and released the Alexa app to support multiple vehicles. You can change the car by typing (or saying to Alexa) 'select car' and it will come back with a list of available cars

    upload_2017-4-3_21-47-1.png

    Great if you have more than one car :D However, since I don't it would be nice if someone could test it please!

    You can find the Alexa app here

    https://www.amazon.com/dp/B06XQX2XJG/

    and the chatbot here

    ElonBot

    At the moment I'm adding in scheduling, so you can ask 'Turn on the climate control tomorrow morning at 8:00am'

    The current skills you can ask Alexa are

    - Where is my car
    - How much battery is left
    - Is the charging port open
    - Open the charging port
    - Is the car charging
    - Start charging the car
    - Stop charging the car
    - Set the charge level to 60%
    - Set the charge level to maximum range
    - How much charge is left
    - Is the car plugged in
    - What is the charge range
    - What is the temperature inside the car
    - Is the air con off
    - What's the temperature set to
    - Set the temperature to 22 degrees
    - Turn on the air con
    - Turn off the climate control
    - Is the car driving
    - Is the car parked
    - What speed is the car travelling
    - Flash the lights
    - Honk the horn
    - How far are you
    - Is the car locked
    - What's the current range of my car
    - How many miles left on my battery
    - How many miles have I gone
    - Open the sunroof
    - Is the car hot
    - Change car
    - Select car
     
  8. domibot

    domibot New Member

    Joined:
    May 6, 2017
    Messages:
    1
    Location:
    Belgium
    This is sooooooo great.... Nice use of chatbots. I like messenger and Amazon Echo uses!
     
  9. larmor

    larmor Active Member

    Joined:
    Oct 27, 2014
    Messages:
    1,362
    Location:
    Irvine, CA
    Great idea. How about: find the nearest McDonald's near my destination. Plot multi segment trips and errands and see if I need a charge in between.
     
  10. timvracer

    timvracer Member

    Joined:
    Mar 5, 2017
    Messages:
    173
    Location:
    Los Gatos, CA
    Very nice work!!
     

Share This Page