1. Attachments are working again! Check out this thread for more details and to report any other bugs.

Canbus sniffing / Automation

Discussion in 'Gen 3 Prius Accessories and Modifications' started by HawtDogFlvrWtr, Feb 11, 2015.

  1. HawtDogFlvrWtr

    HawtDogFlvrWtr Junior Member

    Joined:
    Apr 11, 2011
    15
    10
    0
    Location:
    Partlow, VA
    Vehicle:
    2010 Prius
    Model:
    Five
    So i'm in the process of using the techstream software, an odb2 splitter and sniffing software to build an automated raspberry pi system for my Prius. My hope is that I can remotely start, lower windows, turn on lights, detect vehicles (radar equipped), and other awesome stuff that's available in the Prius that I own. I also plan on adding a camera in the cluster and create some facial recognition additions with opencv that can tell who's in the car with me and greet them.

    Think.... Kit or Jarvis. I'm going to have it completely control the heating and cooling, as well as other aspects.

    I'll use this thread to update things as I'm working on it.... My hope is that I can create a custom raspbian version to release for others who want to leverage the same features. I still need to see everything that's exposed via the bus before I can comment on everything i'm capable of doing. The nice thing is, the techstream software has the ability to test each aspect of the car so I can sniff the line as it's testing each piece, and simply replay them later.. that is, if toyota didn't add checks and balances to prevent this from happening.

    If anyone has already sniffed certain features like rolling windows down, can you please provide the Can address information for me in this thread. will save me work looking up the 100+ addresses for what I want to do :)
     
    #1 HawtDogFlvrWtr, Feb 11, 2015
    Last edited: Feb 11, 2015
    Dylan Doxey likes this.
  2. BigBear2010

    BigBear2010 Member

    Joined:
    Feb 7, 2014
    156
    65
    0
    Vehicle:
    2010 Prius
    Model:
    II
    So are u good at computer programming?
    Sound fun
     
  3. Ank

    Ank Junior Member

    Joined:
    Jan 5, 2015
    20
    5
    0
    Location:
    San Francisco, CA
    Vehicle:
    2011 Prius
    Model:
    Four
    Nice. Why a pi, though? If you're looking for an off the shelf controller, wouldn't an Arduino work out better? Although, since power requirements are not an issue, I suppose a Pi would be fine too.

    I am going to have to watch this thread!
     
  4. Ank

    Ank Junior Member

    Joined:
    Jan 5, 2015
    20
    5
    0
    Location:
    San Francisco, CA
    Vehicle:
    2011 Prius
    Model:
    Four
    Oh, never mind my arduino comment - I forgot that you mentioned using opencv libraries.
     
  5. mrbigh

    mrbigh Prius Absolutum Dominium

    Joined:
    Sep 6, 2005
    3,686
    699
    2
    Location:
    Long Island, NY
    Vehicle:
    Other Electric Vehicle
    I like the idea and will keep an eye on this thread....
     
  6. HawtDogFlvrWtr

    HawtDogFlvrWtr Junior Member

    Joined:
    Apr 11, 2011
    15
    10
    0
    Location:
    Partlow, VA
    Vehicle:
    2010 Prius
    Model:
    Five
    @BigBear2010, Yup

    @Ank, Yea... the idea is to voice control everything... simply saying set temperature 74, and it happens based replaying can responses that it knows, as well as changing stations via voice and ultimately, letting you know the closest and cheapest gas stations when your fuel is low. I've found several fuel station api's with prices (they aren't updated that regularly, but who knows). I have many things I want to do for this, but my short list is:

    • Because the Pi will be running all the time, if the temperature in the car is hot and weather says there is no rain for the day, lower the windows a few inches. If weather report changes after a determined time, start the car, roll them back up, and shut off.
    • remotely tell the Prius to start from the web on cold days, or hot days depending (setting AC or Heat from the web also)
    • Turn on seat warmers if those aren't analog (not sure yet as I've not sniffed that info yet).
    • Create a web api and frontend that it uploads my driving stats after each trip and displays on a map (like the android software does, but on the web)
    • Install a camera in the vehicle and do facial recognition so it understands who's in the car and sets climate stuff accordingly for the driver of the vehicle.
    • Ability to determine new passengers and capture their name and photo for later recognition.
    • Notify me when i'm accelerating to fast or braking to fast.

    and many more.
     
    #6 HawtDogFlvrWtr, Feb 11, 2015
    Last edited: Feb 11, 2015
  7. BigBear2010

    BigBear2010 Member

    Joined:
    Feb 7, 2014
    156
    65
    0
    Vehicle:
    2010 Prius
    Model:
    II
    I have an ideal project using arduino but i stuck on programming, can u help me
     
  8. HawtDogFlvrWtr

    HawtDogFlvrWtr Junior Member

    Joined:
    Apr 11, 2011
    15
    10
    0
    Location:
    Partlow, VA
    Vehicle:
    2010 Prius
    Model:
    Five
    It will have to wait until after this project is up and going but sure
     
  9. HawtDogFlvrWtr

    HawtDogFlvrWtr Junior Member

    Joined:
    Apr 11, 2011
    15
    10
    0
    Location:
    Partlow, VA
    Vehicle:
    2010 Prius
    Model:
    Five
    So I started doing some basic testing. Took me about 20 minutes to find the door unlock location. Tested rolling windows down, headlights, locking and unlocking, as well as horn and a few other things. I recorded most of them which can be viewed on my google drive link here (click the redirecting... text):

    Redirecting...

    I'll do the sniffing later, but it doesn't look like it's going to be that big of a deal to make it happen. Once sniffed and i've confirmed replay, i'll work on the python raspberry backend that does all the work. I'll configure a rest API thats auth based which will allow me to unlock the doors remotely and do other things. While i was testing, I couldn't find a way to start the engine. There is a section for the remote start ECU, but I don't have that in my car. I'm going to manually sniff the ignition switch call and perhaps the brake press call so that I can hack something together for starting the car.
     
  10. mrbigh

    mrbigh Prius Absolutum Dominium

    Joined:
    Sep 6, 2005
    3,686
    699
    2
    Location:
    Long Island, NY
    Vehicle:
    Other Electric Vehicle
    To do this function of the remote starter you will need a fob near by or a ByPass module from a 3 party supplier like DEI or others.
     
  11. HawtDogFlvrWtr

    HawtDogFlvrWtr Junior Member

    Joined:
    Apr 11, 2011
    15
    10
    0
    Location:
    Partlow, VA
    Vehicle:
    2010 Prius
    Model:
    Five
    @mrbigh,

    Good point. I forgot about that!
     
  12. fbongiovanni

    fbongiovanni New Member

    Joined:
    May 1, 2017
    3
    0
    0
    Location:
    Philadelphia, PA
    Vehicle:
    2005 Prius
    Model:
    Base
    How did this turn out? And does the Pi control everything through the Techstream or the Canbus?