ESP32 and Alexa Voice Controls

  • 163 Views
  • Last Post 04 November 2023
Chris posted this 04 November 2023

My Friends,

Toying around with Voice to Environment Control, the ESP32 and Alexa, is very easy to get some things going!

I have been using the Library: ESPAlexa

The example is clear and precise:

Espalexa is designed to be as simple to use as possible.

First, you'll need a global object declaration and a prototype for the function that Espalexa will call when the device is changed:

#include <Espalexa.h>
void firstDeviceChanged(uint8_t brightness);
Espalexa espalexa;

 

You then want to actually add the callback function (one for each device)

void firstDeviceChanged(uint8_t brightness) {
  //brightness parameter contains the new device state (0ff,255n,1-254immed)
  //do what you'd like to happen here (e.g. control an LED)
}

 

In your setup function, after you connected to WiFi, you'd want to add your devices: 

espalexa.addDevice("Alexa name of the device", firstDeviceChanged);

 

The first parameter of the function is a string with the invocation name, the second is the name of your callback function (the one Espalexa will call when the state of the device was changed) You may also add a third uint8_t parameter that will specify the default brightness at boot.

Below the device definition in setup, add:

 

espalexa.begin();

 

Finally, in the loop() function, add:

espalexa.loop();

 

And that's it!

Ref: ESPAlexa

 

Very cool and very easy! Simple coding and simple examples to follow!

The ESP32 is a really nice, reasonable well priced Microcontroller!

 

Small and powerful!

Here is a very good video, showing you hoe easy this is:

 

Although there are some limitations here, it appears some of these limitations may be by design, from a security point of view from Alexa programming side.

Best Wishes,

   Chris

Order By: Standard | Newest | Votes
FringeIdeas posted this 04 November 2023

That's some Tony Stark stuff there. When will the suit be ready? 😁 Kidding. But it is amazing, over the past decade or so, what has become available to the consumer for hobby electronics. Cool stuff!

Marcel

  • Liked by
  • Chris
  • Augenblick
Chris posted this 04 November 2023

Hey Marcel,

Aye, it sure is cool!

Best Wishes,

   Chris

  • Liked by
  • FringeIdeas
  • Augenblick
We're Light Years Ahead!
Members Online:
What is a Scalar:

In physics, scalars are physical quantities that are unaffected by changes to a vector space basis. Scalars are often accompanied by units of measurement, as in "10 cm". Examples of scalar quantities are mass, distance, charge, volume, time, speed, and the magnitude of physical vectors in general.

You need to forget the Non-Sense that some spout with out knowing the actual Definition of the word Scalar! Some people talk absolute Bull Sh*t!

The pressure P in the formula P = pgh, pgh is a scalar that tells you the amount of this squashing force per unit area in a fluid.

A Scalar, having both direction and magnitude, can be anything! The Magnetic Field, a Charge moving, yet some Numb Nuts think it means Magic Science!

Message from God:

Hello my children. This is Yahweh, the one true Lord. You have found creation's secret. Now share it peacefully with the world.

Ref: Message from God written inside the Human Genome

God be in my head, and in my thinking.

God be in my eyes, and in my looking.

God be in my mouth, and in my speaking.

Oh, God be in my heart, and in my understanding.

Your Support:

More than anything else, your contributions to this forum are most important! We are trying to actively get all visitors involved, but we do only have a few main contributors, which are very much appreciated! If you would like to see more pages with more detailed experiments and answers, perhaps a contribution of another type maybe possible:

PayPal De-Platformed me!

They REFUSE to tell me why!

We now use Wise!

Donate
Use E-Mail: Chris at aboveunity.com

The content I am sharing is not only unique, but is changing the world as we know it! Please Support Us!

Thank You So Much!

Weeks High Earners:
The great Nikola Tesla:

Ere many generations pass, our machinery will be driven by a power obtainable at any point of the universe. This idea is not novel. Men have been led to it long ago by instinct or reason. It has been expressed in many ways, and in many places, in the history of old and new. We find it in the delightful myth of Antheus, who drives power from the earth; we find it among the subtle speculations of one of your splendid mathematicians, and in many hints and statements of thinkers of the present time. Throughout space there is energy. Is this energy static or kinetic? If static, our hopes are in vain; if kinetic - and this we know it is for certain - then it is a mere question of time when men will succeed in attaching their machinery to the very wheelwork of nature.

Experiments With Alternate Currents Of High Potential And High Frequency (February 1892).

Close