Add mechanism to deploy the alexa-voiceagent credentials 15/23415/1
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Sat, 14 Dec 2019 01:27:43 +0000 (02:27 +0100)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Wed, 18 Dec 2019 14:40:07 +0000 (15:40 +0100)
Allow a pre-loaded version of the alexa voiceagent configuration.

Bug-AGL: SPEC-3054

Change-Id: I65e0c1fd253d2d21e33c052477a0aeb397b8eb11
Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-config/AlexaAutoCoreEngineConfig.json.in [new file with mode: 0644]
meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-config_1.0.bb [new file with mode: 0644]
meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-service_git.bb

diff --git a/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-config/AlexaAutoCoreEngineConfig.json.in b/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-config/AlexaAutoCoreEngineConfig.json.in
new file mode 100644 (file)
index 0000000..9ead489
--- /dev/null
@@ -0,0 +1,184 @@
+{
+  "deviceInfo":
+  {
+    "clientId":"@@ALEXA_CLIENTID@@",
+    "deviceSerialNumber":"@@ALEXA_SERIALNUMBER@@",
+    "productId":"@@ALEXA_PRODUCTID@@"
+  },
+  "libcurlUtils":
+  {
+    "CURLOPT_CAPATH":"/etc/ssl/certs"
+  },
+  "miscDatabase":
+  {
+    "databaseFilePath":"./miscDatabase.db"
+  },
+  "certifiedSender":
+  {
+    "databaseFilePath":"./certifiedSender.db"
+  },
+  "alertsCapabilityAgent":
+  {
+    "databaseFilePath":"./alertsCapabilityAgent.db"
+  },
+  "notifications":
+  {
+    "databaseFilePath":"./notifications.db"
+  },
+  "settings":
+  {
+    "databaseFilePath":"./settings.db",
+    "defaultAVSClientSettings":
+    {
+      "locale":"en-US"
+    }
+  },
+  "aace.storage": {
+    "localStoragePath": "./sample-aace.db",
+    "storageType": "sqlite"
+  },
+  "aace.vehicle": {
+    "info": {
+      "make": "Amazon",
+      "model": "AACE",
+      "year": "2018",
+      "trim": "aac",
+      "geography": "US",
+      "version": "1.2.3",
+      "os": "sample-aace",
+      "arch": "sample-aace",
+      "language": "en_US",
+      "microphone": "SingleArray",
+      "countries": "US,GB,IE,CA,DE,AT,IN,JP,AU,NZ,FR"
+    },
+    "operatingCountry": "US",
+    "currentLocation": "36.1363,-115.1513"
+  },
+  "aace.audio.input": {
+    "voice": "Default"
+  },
+  "aace.audio.output": {
+    "tts": "Speech-High",
+    "music": "Speech-Low"
+  },
+  "aace.wakeword": {
+    "enabled":@@WAKEWORD@@
+  },
+  "aace.cbl": {
+    "enabled": true
+  },
+  "aace.localmediasource": {
+    "enabled":false,
+    "sources": {
+        "bluetooth":false,
+        "usb":false,
+        "fmRadio":false,
+        "amRadio":false,
+        "satelliteRadio":false,
+        "lineIn":false,
+        "compactDisc":false
+    }
+  },
+  "aace.localvoicecontrol": {
+    "enabled":false,
+    "socketRootDirectory":"/var/"
+  },
+  "aace.localskills": {
+    "aace.carcontrol": {
+        "enabled": false,
+        "cannedzones": [
+            {
+                "name" : "zone.all",
+                "enabled": true,
+                "climate": {
+                    "syncController": false,
+                    "recirculationController": false
+                },
+                "airconditioner" : {
+                    "modes": {
+                        "AUTO": true,
+                        "ECONOMY": false,
+                        "MANUAL": false,
+                        "MAXIMIUM": false
+                    }
+                },
+                "heater" : {
+                    "minimum": 60.0,
+                    "maximum": 80.0,
+                    "precision": 1.0,
+                    "unit":  "FAHRENHEIT"
+                },
+                "fan" : {
+                    "minimum": 0.0,
+                    "maximium": 10.0,
+                    "precision": 1.0
+                },
+                "vent": {
+                    "positions" : {
+                      "BODY": true,
+                      "MIX":  false,
+                      "FLOOR": false,
+                      "WINDSHIELD":  false
+                    }
+                },
+                "window" : {
+                    "defrost": true
+                },
+                "light" : {
+                    "type": "LIGHT",
+                    "colors" : {
+                        "WHITE": true,
+                        "RED": true,
+                        "ORANGE": true,
+                        "YELLOW": true,
+                        "GREEN": true,
+                        "BLUE": true,
+                        "INDIGO": true,
+                        "VIOLET": true
+                    }
+                }
+            },
+            {
+                "name" : "zone.back.driver",
+                "enabled": false
+            },
+            {
+                "name" : "zone.back.passenger",
+                "enabled": false
+            },
+            {
+                "name" : "zone.driver",
+                "enabled": false
+            },
+            {
+                "name" : "zone.first.row",
+                "enabled": false
+            },
+            {
+                "name" : "zone.fourth.row",
+                "enabled": false
+            },
+            {
+                "name" : "zone.front",
+                "enabled": false
+            },
+            {
+                "name" : "zone.passenger",
+                "enabled": false
+            },
+            {
+                "name" : "zone.rear",
+                "enabled": false
+            },
+            {
+                "name" : "zone.second.row",
+                "enabled": false
+            },
+            {
+                "name" : "zone.third.row",
+                "enabled": false
+            }
+        ]
+    }
+  }
+}
diff --git a/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-config_1.0.bb b/meta-speech-framework/meta-aac/recipes-apis/alexa-voiceagent-service/alexa-voiceagent-config_1.0.bb
new file mode 100644 (file)
index 0000000..f3a6af9
--- /dev/null
@@ -0,0 +1,38 @@
+SUMMARY = "Alexa service binding default configuration to connect to Alexa"
+DESCRIPTION = "Alexa alexa-voiceagent-service binding configuration files"
+HOMEPAGE = "https://github.com/alexa/alexa-auto-sdk/tree/master/platforms/agl/alexa-voiceagent-service"
+SECTION = "apps"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+SRC_URI = "file://AlexaAutoCoreEngineConfig.json.in"
+
+inherit allarch
+
+do_compile () {
+
+    if test x"${ALEXA_CLIENTID}" == x"" ; then
+       bbfatal "ALEXA CLIENTID not defined in your environment e.g. conf/local.conf"
+    fi
+
+    if test x"${ALEXA_SERIALNUMBER}" == x"" ; then
+       bbfatal "ALEXA SERIALNUMBER not defined in your environment e.g. conf/local.conf"
+    fi
+
+    if test x"${ALEXA_PRODUCTID}" == x"" ; then
+       bbfatal "ALEXA PRODUCTID not defined in your environment e.g. conf/local.conf"
+    fi
+
+}
+
+do_install () {
+    #replace
+    sed -e "s/@@ALEXA_CLIENTID@@/${ALEXA_CLIENTID}/" -e "s/@@ALEXA_SERIALNUMBER@@/${ALEXA_SERIALNUMBER}/" -e "s/@@ALEXA_PRODUCTID@@/${ALEXA_PRODUCTID}/" ${WORKDIR}/AlexaAutoCoreEngineConfig.json.in > ${WORKDIR}/AlexaAutoCoreEngineConfig.json
+
+    # install
+    install -D -m 644 ${WORKDIR}/AlexaAutoCoreEngineConfig.json ${D}${sysconfdir}/xdg/AGL/AlexaAutoCoreEngineConfig.json
+}
+
+RPROVIDES_${PN} += "virtual/alexa-voiceagent-config"
+