Jedlacks
Posts: 92
Joined: Sun Dec 14, 2014 12:10 pm
Delivery Date: 29 May 2016
Leaf Number: 300863
Location: Kennesaw, GA

Re: Amazon Echo integration

Sat Dec 31, 2016 12:44 pm

The Leaf does not have WiFi, so I do not believe it would be easy for it to communicate with the Echo.
2015 SV QC/LED; 12 Bar; 59.7 AHr; 96% SOH; 92% Hx
Juicebox 40A

jhovell
Posts: 4
Joined: Wed Jan 04, 2017 11:51 am
Delivery Date: 04 Jan 2017

Re: Amazon Echo integration

Wed Jan 04, 2017 12:03 pm

I wrote an Alexa skill to integrate the Nissan Carwings API to Alexa. It can do things like answer the following questions

Q: Alexa, ask <my skill> if my car is charged
A: your car is charged to 50%... A complete charge will take 2 hours 30 minutes; do you want me to start charging?

Q: Alexa, ask <my skill> to turn on (or off) the HVAC
A: I'll attempt to turn on (or off) the HVAC

I haven't registered the skill with Amazon, but I certainly could if there's interest, though I don't know the legality of using the Nissan Carwings API. I'm aware there are other home automation programs out there utilizing it. But just as likely Amazon doesn't approve it or it gets shut down.

Due to the asynchronous nature of the carwings communication and the fact that developers can't call back to Alexa to notify users when an event has occurred (timers and alarms are special and only offered through Amazon) certain things that would be really userful/logical aren't currently possible with Alexa as a 3rd party developer. E.g. you can't ask Alexa to tell you when your car is done charging (or charged to a certain degree). Or more annoyingly if you just want to check your car's charge / hvac status, the exchange will be more like:

Q: Alexa, ask <my skill> do I need to charge my car?
A: My info in not up to date. Let me check, then ask me in a few minutes
<-- initiate process to get updates from car, which takes 30-60 seconds -->
< user must wait 30 to 60 seconds >
Q: Alexa, ask <my skill> do I need to charge my car?
A: your car is charged to 50%... A complete charge will take 2 hours 30 minutes; do you want me to start charging?

Right now I have status, HVAC on/off, charge on/off implemented. I haven't explored the API too thoroughly to see if there is other stuff that could be made available through Alexa.

Cheers,
John

jhovell
Posts: 4
Joined: Wed Jan 04, 2017 11:51 am
Delivery Date: 04 Jan 2017

Re: Amazon Echo integration

Wed Jan 04, 2017 12:07 pm

Sorry, by Carwings I meant Nissan Connect, or whatever the current incarnation of their API is called. I built it for my dad's car as a Christmas present. I don't actually own a LEAF so I'm a little unfamiliar with the terminology.

Mdhawley
Posts: 1
Joined: Wed Jan 04, 2017 8:33 pm
Delivery Date: 05 Jan 2017

Re: Amazon Echo integration

Wed Jan 04, 2017 8:36 pm

Jhovell do you have that code on github or somewhere? I was planning to do this and have done a terminal app with carwings but, as a software engineer, would love to not have to do anything if I can!

mayo
Posts: 33
Joined: Fri Dec 12, 2014 12:16 pm
Delivery Date: 12 Dec 2014
Leaf Number: 8715
Location: Sulphur, Oklahoma

Re: Amazon Echo integration

Wed Jan 04, 2017 11:01 pm

Count me in, I very interested!
Pearl White 2015 SL Premium (own)

jhovell
Posts: 4
Joined: Wed Jan 04, 2017 11:51 am
Delivery Date: 04 Jan 2017

Re: Amazon Echo integration

Thu Jan 05, 2017 10:55 am

@mayo @mdhawley

Great, I'll see if I can carve out some time tonight. It's not on Github yet; I'd need to do some code clean-up first. It's using AWS Lambda as a backend so you'd need to have an AWS account to host it yourself.

Cheers,
John

Bigboler
Posts: 36
Joined: Fri Mar 23, 2012 11:02 pm
Location: Vancouver BC

Re: Amazon Echo integration

Thu Jan 05, 2017 10:53 pm

This would be great, and I will be happy to pay to add this skill to Alexa

powersurge
Posts: 436
Joined: Wed Oct 21, 2015 10:24 am
Delivery Date: 06 Dec 2014
Location: Long Island, NY

Re: Amazon Echo integration

Fri Jan 06, 2017 7:58 am

OMG!

Is there anyone out there left that is willing to do things for themselves??

We are going to end up like the fat whales on the movie "Wall-e" on the ship "Axiom"........

jhovell
Posts: 4
Joined: Wed Jan 04, 2017 11:51 am
Delivery Date: 04 Jan 2017

Re: Amazon Echo integration

Fri Jan 06, 2017 10:56 am

By way of update, I was cleaning things up last night and couldn't get the car to connect. Realize my dad never did the 3G upgrade so his car is toast for Nissan Connect unless he pays $199 for a service at the Nissan dealership, and the car's lease is ending soon so he's unlikely to want to do it. As a result, I don't have an effective way to test anymore.

http://www.greencarreports.com/news/110 ... -days-left

Nevertheless, I can clean up the code & maybe with an alpha tester make sure it's still working... or open source it and someone else can give it a try.

As an aside, I build my implementation using the Alexa Custom Skill API. Though it occurred to me last night I maybe could have used the Smart Home API instead (as it comes with built in directives for on/off command requests like "Alexa turn on the X in Y") but not sure it would be a perfect fit as there wouldn't be a way to ask questions like how charged is the battery or add custom speech.

https://developer.amazon.com/public/sol ... -of-skills

Anyway, sorry for the delay, I should definitely have a lot more free time this weekend so other than the lack of a car that can connect to Nissan Connect right now should have no problem getting this set up for folks that are interested.

derkraut
Posts: 1470
Joined: Fri Jul 16, 2010 7:39 pm
Delivery Date: 14 Jun 2011
Leaf Number: 004248
Location: San Diego vicinity

Re: Amazon Echo integration

Sun Jan 08, 2017 9:15 pm

powersurge wrote:OMG!

Is there anyone out there left that is willing to do things for themselves??

We are going to end up like the fat whales on the movie "Wall-e" on the ship "Axiom"........


Right on, Powersurge! I agree with you 100%
Derkraut
Color: Cayenne SLE, ETEC trim
reserved: 5/15/2010
Leaf del. 6/14/2011
Updated on 11/7/2016, 9 bars @32.7K+mi. 100% charge: Bat temp 75.5F, Gids=195, S=96.18, C=45.32, H=48.23 Traction bat=392.0V, 12V battery =12.1V

Return to “Tips & Tricks”