[MTCB Software Development] talalalal:
Background:

- Presently there doesn't seem to be a method of relaying information from our Android head units to OEM Instrument cluster displays (turn directions, speedcam alerts, OBD/Torque info, callerid, message alerts, etc.).

[IMG="VW Instrument Cluster Display - Next Turn"]http://i75.photobucket.com/albums/i297/dna007/IMAG0123-1.jpg[/IMG]

- I've begun working on a system to relay and display such information from an android head unit to the instrument cluster display.

- As I have little/no development experience I've built current functionality using Tasker and associated plugins (Notification Listener, AutoRemote, etc.).

How it Works:

1. Turn by Turn Directions:

- When navigating with Google Maps a persistent notification is created in the notification drawer. This notification updates with simplified navigation information (next turn direction, distance to next turn, additional description [e.g. turn right onto random street], time/distance to destination, estimated arrival time).

-> The Tasker plugin 'Notification Listener' is able to track and extract information from this notification in real time.

-> A Tasker task utilises pattern matching to determine the main navigation action (Right Turn, Left Turn, Straight, Merge, U-Turn, Roundabout, etc.).

-> According to the pattern matching, IF then ELSE statements initiate additional actions, splitting the notification text to set the relevant parts of the text into different variables.

-> These variables are either directly displayed in a Tasker Scene, or their contents alter other elements (visibility of scene elements, Turn Icons).

-> One variable dictates the Turn Icon displayed in the Tasker Scene. For Example: When a right turn is detected by pattern matching, a variable is set to the file path of a right turn icon image. The same variable is changed according to the next turn direction. A single image in Tasker is set to display the image of that variable (and thus shows the next turn icon).

Current Development Status:

WORKING

a. Recognises and shows: - When no destination is entered in Google Maps - Message to continue onto a road to begin journey - Right & Left Turn icons - Straight icon - U-Turn icon.

b. Distance to next turn.

REQUIRED

a. Icons and messages to indicate: - Roundabout exits - Merge onto... - Arrival notification - Other unusual turn/navigation notifications.

b. Time to destination (I tried to integrate this but the extra split operation seemed to to increase lag in display of more important information such as distance to the next turn). I'm sure there's a good workaround for this.

c. Additional turn information text (e.g. turn right onto random street). This is an easy task, will implement soon.

d. Improvement of navigation information update frequency - Presently when there are frequent updates (e.g. when approaching a next turn at high speed the distance to next turn changes more frequently) there can be a minor lag between the next turn information in google maps (and notification) and its display in the Tasker Scene. Generally it's working fine though.

2. Speed Camera Alerts:

- Speed Camera information is loaded onto an app called 'Speed Trap Pro' (found on Play Store).

--> A Tasker plugin named 'Auto Speed Trap' alters Tasker variables (Distance to Camera, Camera type, etc.) when approaching a Speed Camera (GPS based).

--> A Tasker task is set to recognise when user is approaching a Speed Camera and temporarily change the image path of the turn indicator to a Speed Camera icon in the Tasker Scene (until speed camera is passed). Distance to the Speed Camera is also displayed.

WORKING

All implemented.

REQUIRED

Text showing distance to the next speed cam does not update frequently enough/smoothly.

3. Music Player Information:

- When a song is changed on the head unit, artist and song information can be temporarily shown in the area that usually shows next turn text (e.g. instead of 'turn right onto random street' it would show 'Led Zeppelin - Stairway to Heaven').

WORKING

Working.

REQUIRED

Could be developed to scroll song information when either the Artist or Song name is too long to fit on the screen.

4. Caller ID:

- This should display the caller ID of incoming calls (in the same area as the music player information).

- I'm not sure whether this information could be drawn directly from the head unit or if it would have to be relayed from the user's phone to the instrument cluster display client (described below).

- This can rely on Notification Listener and AutoRemote.

- when incoming call —> center media control answers.

NOT IMPLEMENTED

5. Message Alerts:

- This should display contact information and message text for new messages (SMS, Whatsapp, etc.).

- should save last 5 messages (only received during driving) —> allow scroll through under messaging tab —> allow reply (long press center button).

- Similar challenges to Call ID.

NOT IMPLEMENTED

6. OBD Information:

- This would draw real time vehicle information from a bluetooth OBD dongle and display it on the cluster display (e.g. 0-60 times, fuel consumption, etc.).

- Torque is a great Android app that interprets information from OBD data.

-> Presently there is no dedicated Tasker plugin for Torque, or other OBD apps, however a solution might be found in Torque's API:

http://torque-bhp.com/wiki/PluginDocumentation

-> Preferably Torque OBD information would be updated in real time.

7. Radar Detector Integration:

- I own a Valentine V1 Radar Detector. The Valentine V1 is able to connect to Android over Bluetooth (SPP).

- There is an API. It would be nice to integrate radar detection alerts into the Tasker Scene’s UI (like with regular speedcam alerts).

- Alternatively there is an app called YaV1 that can serve heads up alerts.

7. USER INTERFACE:

- Bluetooth or CANBUS steering wheel controls can be used to navigate the interface.

(e.g. http://www.satechi.net/index.php/satechi-bluetooth-button-series-media-button).

- These would be remapped to Tasker tasks to run different actions according to which screen is in view.

- Below is my proposed UI/UX:

- The interface requires implementation/ improvement and can be adapted for your particular cars.

8. SECOND DISPLAY SOFTWARE:

- All previous functions are presently running locally (i.e. on the device on which Google Maps Navigation/ Music Playing/ Calls/ Messages are taking placed [the head unit]).

- This information must be relayed to the console display.

- My present plan is to relay this information to a second android phone/client.

-> This could be done using the Tasker plugin 'AutoRemote'. AutoRemote is able to send Tasker variables from one device to another. This can work over Bluetooth, a local WIFI network, or online.

- It is important to devise this system in a way that will minimise latency between triggering of notifications on the Headunit or user phone, and their appearance on the instrument cluster display. This is particularly important for navigation information.

-> In order to achieve this, as few as possible variables should be sent from the head unit. Any actions that increase the number of the variables should take place on the client device rather than the head unit.

There are 2 ways in which this can be implemented (regarding navigation turn directions):

a. Google maps notifications can be extracted by the head unit, set as Tasker variables and sent to the client Android's Tasker over Bluetooth/Wifi.

-> Split actions will be applied on the client device.

-> The scene will run on the client android according to resultant variable information.

ADVANTAGES: - Less requirements from the client device.

DISADVANTAGES: - Latency may not be acceptable.

b. When a destination address is set in Google Maps its coordinates are set in a log file (I think! If not then the address can be processed into coordinates by a geocoder). These coordinates can be sent from the head unit to the client Android and set to launch Google Maps navigation on the client with the same destination as the head unit.

ADVANTAGES: - Many less variables will need to be sent by AutoNotification - Latency should be far lower.

DISADVANTAGES: -The client device will need to have a functioning GPS, to be positioned in a place where it functions (less obstructions), and to have a functioning internet connection.

THOUGHTS: I would tend towards option B.

SYSTEM MAP:

Below is a proposed system map. One potential problem is that there are multiple devices (OBD + Radar detector + Head Unit > Client Connection (AutoRemote)) connecting to the same device over the same Bluetooth profile (SPP). This doesn’t work for all devices - will have to test to find out.

An alternative method would use a 3g WIFI Modem to provide data to the devices and to transfer data over Autoremote. This would free the Head Unit > Android Client connection from relying on the SPP Bluetooth Profile. The OBD dongle could then be connected to the Head Unit, and the Radar detector connected to the Android Client.

8. SECOND DISPLAY HARDWARE:

- Once head unit information has been transferred and processed into a Tasker Scene on the Android client, it needs to be displayed on the instrument cluster display.

-> This can be implemented in 2 ways:

1. Replace the existing instrument panel display with a small display that can connect to an android phone/raspberry pi over MHL/Slimport/HDMI/VGA.

-> This is the smallest display I could find with a tested HDMI input. It is larger than the OEM cluster display on a VW so may cause problems:

http://www.buydisplay.com/default/er-tftv043-4

2. Output CanBus Information to the existing display (seems like it may be possible using this adaptor:

https://www.kickstarter.com/projects/etx/canbus-triple-the-car-hacking-platform).

THOUGHTS: I have decided to implement option A. This is not the smoothest solution as it requires replacement of instrument cluster display, but as I don't have any development experience, this is simply what I am able to achieve.

Where Do We Start:

1. Let me know your thoughts on the project.

2. I've attached Tasker project files and icons:

a. Import Tasker Project: https://dl.dropboxusercontent.com/u/4719739/Car_Present.prj.xml

b. Download icons onto your device: https://dl.dropboxusercontent.com/u/4719739/icons.zip

c. Change 'DIRECTIONWATCH' and 'SPEEDCAMIMAGE' variables: Set 'Notification Listener' Task variables to Right, Left, Straight, U-Turn icons, ' No Destination' to a vehicle icon of your choice (mine is for VW), 'Speedtrap' to the Speedtrap icon and 'Cancel Speedtrap' to the blank PNG. link the location you place each of the attached icons (different turns, vehicle logo, speedtrap, blank png for cancel speedtrap).

Install the following apps and Tasker plugins:

- Notification Listener: https://play.google.com/store/apps/details?id=com.balda.notificationlistener&hl=en

- Speed Trap Pro - optional if you want speed camera alert: https://play.google.com/store/apps/details?id=com.balda.speedtrappro

- Auto Speed Trap - as above: https://play.google.com/store/apps/details?id=com.balda.autospeedtrap

d. Launch the task 'Scene'.

e. Enter a destination and begin navigation in Google Maps.

- Let me know how it works.

- Feel free to discuss and chip in however you can.