DroneMobile Component

Dronemobile is an internet-enabled car starter.

It has functionality for locking, unlocking, starting, opening the trunk, as well as two auxiliary controls.
It also has sensors to check if the car is running, locked, vehicle GPS location, and the temperature inside the vehicle.

I’m not 100% sure this would be possible as I don’t think they have an API but it would be wonderful to be able to schedule my car to start automatically if it’s below a certain temperature outside before I have to leave for work. It would also be nice to see the status of the vehicle from my HASS dashboard and integrate some automations. (Automatically lock doors at X time if vehicle is at home and not running, etc.)

I agree!! Would be nice to have car start and garage door crack open.

also would like to be able to do this. i see they support alexa and google but bringing it into home assistant would be great.

I just got mine installed and have captured many of the relevant api requests. I’m pretty terrible at building Home assistant integrations, but am willing to help anyone with the requests that they would need, and the auth flow to interface with DroneMobile.

I’d really like to emulate the functionality of the DroneMobile module with an esp8266 communicating with the remote start module. I’d like to be able to have the esp read the battery voltage from the remote start module and trigger a remote start if the battery voltage is low.

Can you share?
I’m looking at purchasing one, and I want to know if I should spend the $60 for a ‘donor’ remote hooked to an esp or if we can send http requests

I have the requests, and I verified that I could authenticate, retrieve information about my cars and the modules installed in them, and execute commands to lock, unlock, open the trunk, remote start, etc. The thing is, I really suck at Python (having never used it before), and I’m not sure exactly how to codify the authentication flow, as you authenticate through AWS Cognito, then use the returned token in a request to another URL to get information about the system, and then use that same token and device ID from the previous request to issue HTTP POST calls to trigger actions on another URL.

The basic idea is to send a POST request to https://cognito-idp.us-east-1.amazonaws.com/ with these headers:

and this body:

In the response, you will get an Access Token, an ID Token, and a Refresh Token. Use the ID Token in subsequent requests.

Make a GET Request to https://api.dronemobile.com/api/v1/user to get User Information, or a GET request to https://api.dronemobile.com/api/v1/vehicle?limit=100 to get vehicle information. On both requests, you need to add a bearer token to the header of the request. This token will be the ID token you received previously.

In the vehicle request, you will need to get the device key of the vehicle you want to interface with. You will this for the next calls.

Finally, make a POST request to https://accounts.dronemobile.com/api/iot/send-command In the header, you need to add “x-drone-api” as a key and your ID Token as the value.

Also, add a body to the request that looks like this (JSON):

The Device Key is the value from the previous request for vehicles. The commands that I know of are:
“trunk” - Opens the trunk
“location” - Returns Current Latitude and Longitude of the Vehicle
“remote_start” - Starts the vehicle
“remote_stop” - Stops the vehicle
“arm” - Locks/Arms alarm on vehicle
“disarm” - Unlocks/Disarms alarm on vehicle

Now, I just need help figuring out how to make this into a Home Assistant Plugin. :wink:

2 Likes

It should be noted here, however, that being able to send http requests for DroneMobile will require a remote start system with the LTE module, and a subscription to their service. If you don’t do that, I am pretty sure the only way to do this would be to use a donor key and an esp.

1 Like

Im gonna spend the $30 to add the functionality. for $5/mo not really a big deal. may still do the donor the api is for at work. idk. I’ll look at the requests tho. I’m no zuckerberg, but I’m sure I could at least come up with something…

If you pre-pay for 5 years during your month trial after it’s installed, it’s 2.99 a month. That’s what I’m doing.

1 Like

Even better.
Is the bearer token and client id static?
Any clue on the expiry for the refresh token? Maybe some clue in the cookies?

As far as I can tell, Client ID is static. I think that ID tells AWS Cognito what app is trying to authenticate. I think it could change at any time, though, depending on if DroneMobile decides they want to change it.

The tokens returned from that first call have an expiration of 3600 in the response, so 1 hour:

The bearer token is the same as the IdToken returned in that first call, so it does expire and does change. After an hour, you can use the refresh token in your call to get a new IdToken.

Oh ok missed that.
seems simple enough to work with the data. I won’t be able to do much until I get my unit, waiting for the car to be delivered… lol.
I could maybe whip up at least the skeleton, but won’t be able to do a whole lot in the way of testing w/o creds. I should have some free time tomorrow morning before work, I’ll give it a start.
I am not sure what is needed to make it a plug-in, but I can likely get something in the way of working code for someone else to work with, or I can investigate the procedure.
I’ll post results when I get some where.

Nice, sounds good. Let me know if I can help at all.

1 Like

@bjhiltbrand,
I assume if you lock, start, unlock with the FOB, the drone app will update with the status.
any chance you could sniff that traffic for me?
Might give me an insight on how to handle the webhooks(if there are any) for state updating.

Thanks

I’ve done all my sniffing from the webpage so far. I’ve never sniffed an app before. But, you are correct, there is an update in the app when you use the fob to control the car. I’ll see what I can do and get results back to you.

After playing around with it and starting a capture session, I realized that the app does not automatically update status of a vehicle. You have to refresh the page (which sends a POST request to https://api.dronemobile.com/api/v1/iot/command with the bearer token in the header and a body that has a command of “DEVICE_STATUS” - I hadn’t seen that one before) to get the app to refresh and display up-to-date information. It does not look like there is a push system. I’ll leave the packet sniffer running throughout the night to see if there is a heartbeat in the app.

Any updates on this? I know nothing about coding but I’d be willing to be a test dummy if you get something working, I’ve tried DroneMobile through assistant relay but it’s flaky at best and usually google doesn’t respond to the commands.

Haven’t had the time to get into the code. Sorry about that.
L.S.S. the hardware is here, but due to severe incompetence, my “new” car is not. So I have yet to even boot up the RS module. And I have been futzing about with a few other projects that unfortunately have taken “emergency” precedence… I’ll peek back if/when I have any updates. Not looking great with the holidays coming. /sigh

UPDATE:
Car is here, remote start is in and working. Unfortunately, It is getting dark so I need to finish the buttoning up tomorrow so I don’t have wires laying around everywhere. I also want to tape everything up before I start farting around with the API (no fires here! :upside_down_face:).

I’ll report back when I make some progress. Cheers!

Ok, so I’m a bit of a novice with sniffing.
@bjhiltbrand mind holding my hand a bit here?
I was able to successfully auth and get user and vehicle info, but I haven’t been able to send any of the commands.
I tried wireshark, but I don’t think I am even pulling anything from Drone… I tried filters but I haven’t seen anything that looks remotely important to our goal. :sweat_smile:

edit: nevermind, I’m an idiot… was going about it the whole wrong way… fml… moving forward…