![CLICCA QUI PER LA GUIDA IN ITALIANO](https://github.com/Ferrazzi/CarBox-Companion/raw/main/Assets/ita.png)
IF YOU LIKE, BUY ME A COFFEE TO SUPPORT THE APP DEVELOPMENT
Tap here to download the latest version of CarBox Companion.
CarBox Companion is a voice assistant for in-car box devices (like Carlinkit, Ottocast, etc.) and Android car radios that allows you to perform actions usually done by touching the infotainment screen with voice commands.
YOU DON'T HAVE STEERING WHEEL CONTROLS TO ACTIVATE THE ASSISTANT??? A widget has been added to CarBox Voice to be placed on the launcher and a floating button that allows you to open the assistant with a touch so you can use voice commands.
The system consists of two main applications, CarBox Companion and CarBox Voice. During installation, you will be asked to install an additional application: AutoInput available on Google Play for free with limitations or for a fee in the full version. I recommend purchasing it to avoid various limitations in the use of the various commands that CarBox Companion executes.
CarBox Companion needs to be installed on the phone to be used in combination with the car box or Android car radio, it serves as a receiver for the master application CarBox Voice which must be installed on the car box or Android car radio.
-
Once CarBox Companion is installed on the phone, simply open it and you will find yourself on the LOGIN screen. If you already have an active account, log in, otherwise create one by tapping the appropriate button. After registering and logging in correctly, you will proceed to the second screen for the installation of the AutoInput application and the CarBoxPlugin plugin.
-
After all this is done, you can press the NEXT button to go to the permissions configuration screen.
-
Enable all permissions by tapping the various buttons and press the BACK button.
-
Now we finally arrive at the CarBox Companion configuration screen.
-
By tapping the Select Box 1 and Select Box 2 buttons, a window will open allowing you to select the Bluetooth connection of the First CarBox or the Second CarBox, if you have another one in another car. It is mandatory to select the Bluetooth connection because it is used to enable not only the tethering function but also the exchange of information for correct functionality. Enable the switch on the right, this is used to enable tethering automatically when the box is detected to be turned on, so as to provide internet connection without having to do it manually.
-
Enable the switch for voice command activation if you want to activate box functions towards the phone, such as making calls.
-
Enable the switch for automatic parking notifications, this is used to receive a notification when the Bluetooth connection to the phone is interrupted and therefore the box is turned off, assuming the car is parked. A notification will be displayed in the notification panel with parking information, a map with coordinates that can be opened with Google Maps, and possibly the ability to enter a note, for example, the parking spot number at the mall.
-
Exit CarBox Companion.
-
For making calls, the contacts on the Companion device must be synchronized with the voice device. I recommend enabling sharing via Google account since it is used on both devices.
-
At this point, we have finished configuring the CarBox Companion part and we can continue to configure CarBox Voice.
CarBox Voice needs to be installed on the car box or Android car radio.
-
Once CarBox Voice is installed on the box, simply open it and log in with the registered credentials from CarBox Companion.
-
We have finished configuring the entire system, only activating the voice assistant when pressing the car's physical button is left.
To do this, I'll give an example with Carlinkit since I own this:
-
Open the box settings and go to Navigation Configuration and set any app other than the navigator for Navigation App Configuration, and do the same for Navigation Widget Setting in Launcher.
-
Still in the settings, go to Other Settings and set CarBox Voice Assistant.
Activating permissions from Windows or Mac
-
After installing and configuring all applications, you can proceed with the guide to activate ADB permissions for writing secure settings. This is necessary to enable tethering automatically when the box is detected to be turned on, so as to provide internet connection without having to do it manually, and for AutoInput to allow various actions normally not allowed without rooting the phone.
-
Enable developer mode on the phone settings: Go to Android settings -> About phone -> Software information and look for
-
Build number. Tap it several times until developer mode is activated.
-
Enable USB Debugging: Go to Android settings -> and look for Developer options. Inside this menu, enable the USB debugging option.
-
Install ADB on your PC: Check here for a quick way to do it.
-
Connect the device to the PC: Connect your device to the PC and check your phone. You should see a message asking you to allow debugging of the phone by the PC. Accept it.
-
Open the command prompt from the folder containing the downloaded files from the link to the voice Install ADB on your PC and extracted. To do this, press the Windows key and type cmd. When the prompt opens, type cd followed by the folder where you downloaded ADB.
-
Grant permission: Open a command line on your PC and enter the necessary commands (one at a time)
-
If using Windows:
- adb shell pm grant com.joaomgcd.autoapps android.permission.WRITE_SECURE_SETTINGS
- adb shell pm grant com.joaomgcd.autoinput android.permission.WRITE_SECURE_SETTINGS
-
If using Mac:
- ./adb shell pm grant com.joaomgcd.autoapps android.permission.WRITE_SECURE_SETTINGS
- ./adb shell pm grant com.joaomgcd.autoinput android.permission.WRITE_SECURE_SETTINGS
-
-
Note:
On MIUI devices, you may need to open developer options and enable USB Debugging (Security Settings) (and the Turn off monitoring setting)
Activating permissions from android
-
ARDUINO command
- Executes an Arduino command set in the commands list accessible from CarBox Voice in the Settings screen.
-
OPEN app name
- Opens the requested application, for example, OPEN YOUTUBE to open YouTube.
-
GOOGLE ASSISTANT
- Launches Google Assistant
-
CALL CONTACT contact name
- Calls a contact available in the phonebook, for example, CALL CONTACT JOHN SMITH initiates the call from the paired phone.
- The new internal contact book allows you to select all the numbers within the searched contact. When the list of the searched contact is displayed, if you press and hold one of the numbers present in the same contact, you can add it to favorites so that it is displayed as the first in the list the next time it is searched.
-
CALL NUMBER phone number
- Calls a phone number, for example, CALL NUMBER 1234567890 initiates the call from the paired phone.
-
COMMANDS
- Opens the screen with all available commands in CarBox Voice.
-
SETTINGS
- Opens the settings screen.
-
MAPS GO TO address
- Opens GPS navigation with GoogleMaps to the set address, for example, MAPS GO TO 123 Main Street.
-
SPOTIFY song name or artist name
- Opens Spotify with the requested song search, for example, SPOTIFY song name or artist.
-
TASKER command
- Executes a tasker command set in the commands list accessible from CarBox Voice in the Settings screen.
-
YOUTUBE video name
- Opens YouTube with the requested video search, for example, YOUTUBE LIGABUE.
-
WAZE GO TO address
- Opens GPS navigation with Waze to the set address, for example, WAZE GO TO 123 Main Street.
To set up custom commands using Tasker on CarBox Voice, you first need to enter the CarBox Voice settings. Press the Tasker Commands button, and the screen with the list of available created commands will appear. Press ADD to add a new command. In the various text fields to be filled in, add in sequence:
- In the Enter name box:
- Enter a name of your choice this will be the name and command of the action, e.g. when Tasker is said to CarBox Voice, the next command will be the name of the action and therefore what is entered in this field.
- In the Enter description box:
- Enter a description of your choice for the action this will be visible in the actions list below the name and is useful to remember what that particular action does.
- In the Enter action box:
- Enter the actual action command here that Tasker will receive, for example com.carboxvoice.send.command.
- In the Enter variable box:
- Enter here the name of a variable of your choice that Tasker will receive along with the command, for example text.
- In the Enter text box:
- Enter here a text that will be used to fill the variable set above and that Tasker will receive, for example, received.
Once all the fields are filled, press SAVE to save the action and return to the actions list. Now, you just need to configure Tasker to receive the action we created.
Install and open Tasker from the box if it's the first time you open it, it will follow the application's guided setup. After completing all the setup and Tasker is ready to use, configure the reception of our action created on CarBox Voice.
- Go to PROFILES and tap the + button at the bottom right.
- Tap CREATE and select from the visible menu item Event.
- In the text box Filter, search for intent and tap on the item Receive Intent.
- In the action text box, you need to enter the action created on CarBox Voice, so in our case com.carboxvoice.send.command, and go back.
- Tap New Task and give a name to the new task created to enter the task creation page.
- At this point, let your imagination run wild to create any command you need. I'll make a very simple example where upon receiving a vocal command, a message will be displayed on the screen with the text of the variable set.
- Press the + button at the bottom right.
- Search for Flash in the filter text box and press the Flash button.
- In the Text text box, enter the variable created in the action with the % symbol in front; in our case, it will be %text.
- Return to the PROFILES screen and make sure the profile is activated with the switch next to the profile name.
After all the configuration is done, when CarBox Voice is opened and Tasker is said, and the name of the action is pronounced, Tasker will display a popup with our variable on the screen. By modifying this small example, you can create automations of any kind, from opening the automatic gate vocally if domotized to various actions that Tasker can perform on the box.
To set up custom Arduino commands on CarBox Voice, you first need to enter the CarBox Voice settings. Press the Arduino Commands button, and the screen with the list of available created commands will open. Press ADD to add a new command. In the various text fields to fill in, add in sequence:
- In the Enter name box
- Enter a name of your choice; this will be the name and command of the action, e.g., when CarBox Voice is told Arduino, the command will be the name of the action, and thus what is entered in this field.
- In the Enter description box
- Enter a description of your choice for the action; this will be visible in the action list below the name and is useful for remembering what that particular action does.
- In the Enter action box
- Enter the actual action command here that Arduino will receive, for example, TestCommand.
- Select your Arduino's Bluetooth from the list.
Once all the fields are filled out, press SAVE to save the action and return to the action list. Now, you just need to configure Arduino to receive the action we created.
- Download the file Arduino_Template it's an example of what the Arduino sketch looks like that receives the command from CarBox Voice.
- Modify the code to your liking, compile it, and write the firmware to Arduino.