ESP32 Alexa Smart Speaker

BuddyCasino
Posts: 230
Joined: Sun Jun 19, 2016 12:00 am

ESP32 Alexa Smart Speaker

Postby BuddyCasino » Tue Aug 01, 2017 7:44 pm

Finally found the time to release it. It still has quite a few bugs, but it works.
You can now ask Alexa stuff with an ESP32.

Heres the code: https://github.com/MrBuddyCasino/ESP32_Alexa

The documentation still needs a lot of work. Hope its not too cryptic.

hassan789
Posts: 32
Joined: Thu Jun 29, 2017 2:15 am

Re: ESP32 Alexa Smart Speaker

Postby hassan789 » Fri Aug 11, 2017 3:31 am

BuddyCasino, impressive and amazing! Very nicely modularized.
This is a great project to learn HTTP/2

I see you have two different clients to manage http2 sessions, one using mbedTLS and the other using BearSSL with asio.

Few comments and questions:
1. Your asio/registry seems complex... almost like a cooperative scheduler. Was there no simpler alternative, such as FreeRTOS tasks? I am guessing you did this due to using BearSSL?

2. Did you try http2 via cURL? The Alexa documentation seems to recommend this route...

Thanks

BuddyCasino
Posts: 230
Joined: Sun Jun 19, 2016 12:00 am

Re: ESP32 Alexa Smart Speaker

Postby BuddyCasino » Fri Aug 11, 2017 7:17 am

Thanks. I would have been happy to have such nghttp2 examples, glad someones finds it useful. Took weeks to get it right.

At first I used FreeRTOS tasks, which was simple and clean but I needed deep stacks and that consumed too much memory. So unfortunately I had to make an event loop and get into callback hell. Its not even evented, its just busy polling.
That could be improved by making it evented and introducing proper state machines, but at that point I was exhausted.

EDIT:
> 2. Did you try http2 via cURL

I didn't try that because I suspect that it will exceed my memory limits. I might be wrong though. Also I wanted to learn the HTTP/2 protocol and how evented I/O works.

mayuresh
Posts: 2
Joined: Mon Jun 12, 2017 6:23 am

Re: ESP32 Alexa Smart Speaker

Postby mayuresh » Wed Aug 23, 2017 3:08 am

This is a really awesome work.
Do you have a SPI RAM connected to your setup/ if so, whats the size?
Also, would this code work on ESP 32 WROOM which has just 520KB RAM?

BuddyCasino
Posts: 230
Joined: Sun Jun 19, 2016 12:00 am

Re: ESP32 Alexa Smart Speaker

Postby BuddyCasino » Wed Aug 23, 2017 5:20 am

It works with the stock Wroom module, no extra RAM required.

Who is online

Users browsing this forum: No registered users and 2 guests