Page 2 of 3

Re: Amazon Echo integration

Posted: Sat Dec 31, 2016 12:44 pm
by Jedlacks
The Leaf does not have WiFi, so I do not believe it would be easy for it to communicate with the Echo.

Re: Amazon Echo integration

Posted: Wed Jan 04, 2017 12:03 pm
by jhovell
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

Re: Amazon Echo integration

Posted: Wed Jan 04, 2017 12:07 pm
by jhovell
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.

Re: Amazon Echo integration

Posted: Wed Jan 04, 2017 8:36 pm
by Mdhawley
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!

Re: Amazon Echo integration

Posted: Wed Jan 04, 2017 11:01 pm
by mayo
Count me in, I very interested!

Re: Amazon Echo integration

Posted: Thu Jan 05, 2017 10:55 am
by jhovell
@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

Re: Amazon Echo integration

Posted: Thu Jan 05, 2017 10:53 pm
by Bigboler
This would be great, and I will be happy to pay to add this skill to Alexa

Re: Amazon Echo integration

Posted: Fri Jan 06, 2017 7:58 am
by powersurge
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"........

Re: Amazon Echo integration

Posted: Fri Jan 06, 2017 10:56 am
by jhovell
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.

Re: Amazon Echo integration

Posted: Sun Jan 08, 2017 9:15 pm
by derkraut
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%