Autos Okay, Google, Start the Jeep

Gen1us

VCP
Se incorporó
16 Octubre 2012
Mensajes
1.358
upload_2015-8-21_9-20-0.png


Wizardpc (como se hace llamar este personaje) compró un Jeep que tenía incorporado una alarma Avital 3100L la cual reemplazó por otra y fue donde decidió realizar este ingenioso hack.

Reemplazo la actual Avital 3100L por una 5103L, al momento de la instalación encontró que venía con un cable extra, que al ser conectado a tierra, podía arrancar el auto.

Todo lo que necesitó fue una Rasperry Pi 2 y unas cuantas líneas de código (Ver Spoiler).







The Raspberry Pi is an amazing 35 dollars mini-computer. It allows you to do everything you could do with a regular Linux computer (Connecting to the internet, watching videos, launching applications, ...) but also to interact with the world surrounding it, just like an Arduino. That's why I qualify it as a mix between a computer and a micro-controller.
That's also why I chose it for this project. I'm going to show you how to control LEDs with your Raspberry Pi. Firstly directly from the Raspberry Pi itself, then from any device in your house like your Smartphone or your tablet.

Here is a very good example of what you can achieve after reading this Instructable: http://www.instructables.com/id/Web-Controlled-8-Channel-Powerstrip/. Thanks to Rleddington for his amazing project.

Update: French version here













The electronic part is nothing special, it's only 8 LEDs with their protecting resistor. The only hard part is to connect the LEDs to the good pin on the Raspberry Pi. Indeed, I'll be using later a library called Wiring Pi made by Gordon Henderson (You can visit his website at: http://wiringpi.com/) and the pin's numbers used in this library aren't the same than the ones on the Raspberry Pi. See this page for matches: http://wiringpi.com/pins/ (just be careful about your Raspberry Pi revision, the pinout isn't exactly the same). I'll be using Wiring pins 0 to 7.
Concerning the resistors, they should be 270Ω but since I don't have this precise value, I'm using 560Ω resistors (LEDs are just less bright).
Finally, I've made two schematics to make it simpler. The first one (with the complete Raspberry Pi) is showing you the real pins as they are shown on the board. The second one is a simplified version, it's showing you only the useful pins and their matches in the Wiring Pi library (GPIO Wiring number/Actual number on the board).



En su teléfono instaló Tasker y realizo una tarea asociada a Google Now con las palabras "Start the Jeep", el video a continuación:




El proceso completo bajo el spoiler

Okay, Google. Start the Jeep!
By wizardpc on August 15, 2015, at 3:52 pm
So this happened:


Now let me tell you how I got all that to work.

Hardware:
Raspberry Pi 2 w/Case
16GB Micro SD Card
TP-LINK TL-WN722N Wireless N150 High Gain USB Adapter
5db Antenna
SainSMart 4 Channel Relay Module
Wire Jumpers
2A Car Charger
Avital 5103L Remote Start Car Alarm

Software:
Tasker
AutoVoice and the unlock code
Raspbian
WiringPi
Apache
PHP

The high-level workflow goes like this:

  • Activate Google Now on my Note 4 by saying, “Okay, Google”
  • Send Google Now the command “Start the Jeep”
  • AutoVoice intercepts the command and kicks off a Tasker task
  • Tasker launches Chrome with the URL that corresponds to a PHP page on the Pi
  • That PHP page calls the WiringPi library and sets a GPIO pin to out mode, then activates that pin for 2 seconds and deactivates it
  • The relay card accepts the GPIO signal and energizes one of the relays for that 2 second interval
  • The relay is connected to the Remote Start Activation wire on the Normally Open side of the relay and the Jeep’s Ground on the common terminal, so when the relay is energized, the Remote Start Activation wire is grounded
  • The alarm recognizes that the Remote Start Activation wire is grounded, and kicks off the black-box-to-me remote start process.
Unfortunately, I don’t have it working with my Samsung Gear Live Android Wear watch yet, but I’m confident I’ll get that figured out.

It’s important to note here that I wrote exactly 6 lines of code here, and two of those lines were the PHP opening and closing tags. This is not a project that requires a lot of that kind of expertise. Familiarity, yes, but not expertise.

The Remote Start
When I bought my Jeep, the previous owner had installed an Avital 3100L car alarm. I’ve had a few cars with remote start, so when the alarm started flaking out on me, I replaced it with an Avital 5103L Remote Start Car Alarm. The reason why I went with that remote start is, frankly, because it shares a harness with the 3100L. I didn’t want to have to re-wire the door locks, starter kill, dome light, etc. if I didn’t have to. Plus it was only like $80. Now that I’ve had it for a while, I know I should have spent the extra $30 and gotten the two-way pager model.

Avital is a DEI brand–like Viper, Clifford, and Python. DEI sells an internet-connected alarm add-on module for like $170 plus $70 a year. As of mid-August 2015, their “new version 4.0–coming early 2015″ is still not ready yet. My point is that my Avital alarm has a wire that, when grounded, activates the remote start capabilities of the unit.


This is good, because now we can use this dedicated, purpose built hardware to accomplish the most difficult part of all this: Actually starting the Jeep!

Now, my Jeep is a 98. It’s old. It doesn’t have factory security or any fancy RFID keyfob. DEI has modules that can bypass those things, but they cost extra. Installing a remote start is not for the faint of heart, especially in a newer vehicle with 37 different kinds of security. Remote Starts essentially hotwire the car, and automakers have spent the last decade or so trying to make it very, very difficult to do that.

The Raspberry Pi 2
I finally broke down and bought one after Barron plugged it on GBVC EP27. And yes, it was my plan all along to use it for this purpose since I knew about that remote start activation wire.

In addition to my home wifi network, my employer provides a guest wifi network that I can have the Pi connect to. I haven’t gotten this part fully worked out yet, but the plan is to have the Pi connect to my OpenVPN instance at home and route the commands through that. I don’t want other people on the guest network to be able to randomly start my Jeep during the day
simple-smile.png


In order to make sure the Pi can actually reach the guest network, I bought a TP-LINK TL-WN722N Wireless N150 High Gain USB Adapter specifically because it has an external antenna connector. I also bought a 5db Antenna, but I’m not sure that’s actually getting me anything. Fifteen years ago I had a little magnet-mount 2.4ghz antenna specifically designed for WarDriving with an Orinoco card and I hope to find something like that. It was a great little antenna.

The Relay Card
The GPIO pins on the Pi can only handle a very tiny amount of current. It may be possible to set up the Pi in such a way that the relay card is necessary, but the card was only a few dollars and I can use the other relays for other things, like rolling down my windows or turning on my rear defrost.

In order to avoid the possibility of frying either the Pi or the Alarm brain, I got the relay card to isolate the two.

The card can be powered by the 5v line on the Pi 2. I’m not sure if I’d want to power all 4 relays simultaneously for an extended period of time, but for my purposes this is fine. One thing to note is that my card activates a relay if it is receiving a 0 on the GPIO line, not a 1. I had to compensate for that.

The Pi Software
I’m not going to lie: I totally followed this fabulous Instructable to get me to a point where I could hit a single page and activate a relay for 2 seconds. I didn’t do steps 5 or 6 because it wasn’t necessary for me.

Here is the entirety of the code that I wrote for this project:

<?php
system ( "gpio -g mode 4 out && gpio -g write 4 1");
system ( "gpio -g write 4 0");
sleep ( 1 );
system ( "gpio -g write 4 1");
?>

That’s saved as RemoteStart.PHP. Hit http://your.pi.ip/RemoteStart.PHP and BOOM! Relay fires for 2 seconds:


Hard, eh?

The Android Software
I bought Tasker about a year ago because everyone says it’s awesome and I had $10 of Play credit to use. As part of this project, I also installed the AutoVoice plugin for Tasker, and then bought the unlock code because it was $1.34 and in order to use the 7 day trial version, the developer wanted me to sign up with an account on some gaming site. Eff that. Take my money.

Now, I thought that AutoVoice was to make this work with my Android Wear, but I was wrong. This is to make this work with regular Google Now.

The AutoVoice page on Play has a pretty good video tutorial so I’ll refer you to that for how to set up the AutoVoice portion.

For Tasker, you want to set up a Task and call it “Start the Jeep” or whatever. Add a “Net” action for “Browse URL” and put your URL in there. Hit the play button to test it: Your default browser should open and go to that page. If not, something’s not right.

On the Profiles tab, create a new Event Profile. Select Plugin->AutoVoice->Recognized. Do the Speak Filter thing they demonstrate in the video tutorial and say “Start the Jeep.”
The Enter Task dialog will pop up. Select the task you created.

NOW THIS IS VERY IMPORTANT! You have to actually activate Tasker! I didn’t at first and was angry–AutoVoice was showing a popup (sprite) saying that it recognized my “Start the Jeep” command, but then it wasn’t doing anything! If you don’t have a lightning bolt icon in your system bar up top, Tasker is not active.

Test it out!

Putting it all together
So now that all the pieces and parts are working, we put it all together in Proof-of-Concept form:


And everything should work…as long as you’re connected to your network.



 

0Soporte

Old School Gamer
Se incorporó
11 Agosto 2015
Mensajes
745
La raja! ajajajaja, lo encuentro util en las mañanas cuando no encuentras las llaves, también como corta corriente
 

Miguelwill

I am online
Miembro del Equipo
MOD
Se incorporó
23 Febrero 2004
Mensajes
12.403
Excelente , con eso la voz se transforma en la llave
También quizás sirva para desbloquear los seguros o hacer un llamado de emergencia disimulado al decir el arranque de otra forma

Enviado desde mi XT1058 mediante Tapatalk
 

galansinchance

enajenao
Se incorporó
3 Enero 2006
Mensajes
7.425
Maravilloso el RPI, BBB y Arduino, lo mejor es que los 3 trabajan sobre C (los dos primeros con linux), por lo que es super versátil y actualmente puedes hacer prácticamente lo que se te ocurra..
 

tglaria

InExperto
Se incorporó
10 Febrero 2005
Mensajes
9.753
Maravilloso el RPI, BBB y Arduino, lo mejor es que los 3 trabajan sobre C (los dos primeros con linux), por lo que es super versátil y actualmente puedes hacer prácticamente lo que se te ocurra..
Los dos primeros trabajan con un SO más que con C.
Mr refiero a que tienen consola y puede controlar usando python tb.
 

galansinchance

enajenao
Se incorporó
3 Enero 2006
Mensajes
7.425
Sip, he corrido aplicaciones en Java ahí y andan súper bien!!


Enviado desde mi iPhone utilizando Tapatalk
 
Subir