Thursday, November 9, 2017

Getting temperature from ESP8266 over MQTT with Amazon Alexa

With the help of the platform now I can get room temperature or outside temperature with just an ESP8266 and a temperature sensor like DHT22 or DS18B20 or BMP280.

The Alexa is questioning the server that will ask my local broker that will publish a message the the ESP8266 to ask the temperature for my room. The values for temperature and humidity will travel the other way around to Alexa, that is so nice and is letting me know about them.

On you will find also a demoapp ( source code on git) for a plug, but you can convert it easy to other IoT device. Also there is a mobile application in Google Play named Homy4( source is on git) that connects to the and allows you to turn on/off the plug device from demoapp.

Let me know what you think and what modules do you want to integrate on, on Alexa, ESP8266  and on the mobile application.

Everything is done encrypted and authenticated against 2 servers, so the entire communication is secured.

I will publish soon this skill to Amazon so any of you can have it. Just use the demoapp from and adapt it to send temperature. Maybe will be a good option to create also a demoapp for the temperature, not only for a plug.

The final box is small and compact. I've choose the DS18B20 since it can be integrated well in the box I have. To bad that there are not some enclosures for wemos D1 or nodeMcu which are most popular boards on the market. A printed 3D one it is an option, but takes time and I don't know if they can be produced in a large number.

Final box with eNVi - Alexa thermometer

So now the eNVi-T is up and running in 3 rooms. Next will be an air quality module and maybe an thermostat.

Total cost:10 euro.


  1. Very nice post, but what is the advantage over thingspeak?

    1. I don't need a phone or a laptop to check what is temperature in every room from my house. Just ask Alexa. I can also build a thermostat and command it with my voice. "Alexa increase temperature with 2 degrees for the next two hours."