espressif / esp-va-sdk

Espressif's Voice Assistant SDK: Alexa, Google Voice Assistant, Google DialogFlow
Other
290 stars 82 forks source link

MQTT over WebSocket #106

Open klisevich opened 4 years ago

klisevich commented 4 years ago

Hi! We want to use ESP-VA-SDK as a code reference for developing a demo for ESP-Vaquita board appliance. In our project we want to utilize AWS Signature version 4 and MQTT over WebSocket functionality to connect to AWS IoT Core. Are there possible ways for us to substitute ais_mqtt_init() with custom ais_mqtt_over ws_init() function while preserving voice assistant functionality?

chiragatal commented 4 years ago

Can you explain your use-case a bit more? Is it something that can't be supported with the existing implementation?

klisevich commented 4 years ago

Can you explain your use-case a bit more? Is it something that can't be supported with the existing implementation?

Hi @klisevich Any reason for using MQTT over Websocket? SDK could send MQTT packets over TCP sockets directly to IoT core.

Sure! The point of this demo is to replace MQTT protocol with MQTT over WebSocket protocol. As AIA works over the MQTT protocol, it requires managing security certificates when used over TLS. This can create considerable friction in the provisioning procedure. MQTT can use the WebSocket protocol as a transport and it allows for a significantly simpler authentication procedure. We going to utilize pre-signed URL scheme used by AWS for opening the connection over WebSocket. It would be cool if you add to the SDK an option to work with MQTT over WebSocket protocol. Unfortunately, we couldn't find any information regarding MQTT over TCP support from AWS.