GitHub: https://github.com/debsahu/TheButton Things we want to achieve: Low on power consumtion: ESP8266 is OFF when the button is not pressed debsahu/ESP_External_Interrupt Portable: Uses 18650 battery, lasts years Talks to Home Assistant: debsahu/HARestAPI
Idea: Control components on Home Assistant directly from ESP8266. Implementation: Develop an Arduino Library that can be used in various projects without the requirement of setup of a MQTT sensor + automation on HA. This uses RESTful API commands (link). Arduino HARestAPI Library: https://github.com/debsahu/HARestAPI
Idea: Did you ever want to use ESP8266 to communicate to Home Assistant directly? Implementation: Here we use a color sensor to read colors and change a RGB light in Home Assistant to the color observed. Arduino Code: Link RGB Lights connected to Home Assistant McLighting: https://github.com/toblum/McLighting
Idea: Use ESP8266 to talk to Twitter Get User Data or Tweet or Search Twitter Display the data on a Dot-Matrix display Implementation: I created an Arduino library to talk to Twitter using its Web API made for ESP8266. There are other approaches like using a bearer token arduino-twitter-api, but comes with limitations in terms of not being able to send tweet. This Arduino library TwitterWebAPI can both search/read and post tweets. All the instructions and usage of library is described on my GitHub library page https://github.com/debsahu/TwitterWebAPI
Idea: If there is smoke, smoke alarm detects it ESP8266 detects this digital signal from smoke detector, connects to WiFi and sends data to a MQTT server Esp8266 turns itself OFF Implementation: Try to find where on the smoke detector is the 3.3V digital signal when it detects smoke Lets look at Kiddie RF-SM-DC Third pin from top corner seems to send out 3.3V signal to speaker when it detects smoke Lets connect our previously created ESP8266 circuit that wakes from external interrupt. Configure Home Assistant to process MQTT message and send notifications. Source code for this idea can be found on my GitHub: https://github.com/debsahu/Internet_Fire_Alarm
Idea: Keep ESP8266 on OFF mode as default External 3.3V signal (can be short or long) arrives and turns ON ESP8266 ESP8266 wakes up and keeps itself awake until a task is perfomed Send MQTT data to server Put ESP8266 back to power OFF state Implementation: ESP8266 is in OFF state, GPIO0 is low 3.3V signal arrives externally, GPIO0 and CH_PD are high, turn ON ESP8266 First thing ESP8266 does is turns GPIO0 to high, which means CH_PD remain high. So ESP8266 remains ON until GPIO0 is high GPIO12 is used to read value of external interupt If there is 3.3V external interrupt, GPIO is high and a MQTT message is sent as “Signal Received” or “ON” and keep ESP8266 ON until 0V signal is received. If there is 0V external interrupt, GPIO0 goes low and MQTT message is sent as “Signal Vanished” or “OFF” and turns OFF ESP8266 Source code for this idea can be found on my GitHub https://github.com/debsahu/ESP_External_Interrupt/ This circuit diagram has been derived from here.
Wouldn’t it be nice to know if your dog’s water bowl is empty? Let us build a sensor that measures the water level every 5 minutes. This value is sent to MQTT server and Home Assistant automation takes care of the rest. This sensor connects to MQTT and Home Assistant. See dogsensor.yaml for adding this to HA. Assumes that one has set up various notification sensors available in HA. Things needed: 3D Printed Case 18650 Battery ESP8266 12E Rain Water Level Sensor Arduino Code Github: https://github.com/debsahu/DogWaterSensor
Let’s say that you don’t have your smartphone around and someone mentions you on twitter. Wouldn’t it be nice to have a display that automatically reads your twitter mentions and show it on a scrolling display? So let’s build a internet controlled (IoT) dot-matrix display that does this for us using an ESP8266. The plan to accomplish this is as follows: Someone mentions us on twitter (in my case @debsahu) IF This Then That (IFTTT) tracks these mentions and posts this data on Adafruit.io (MQTT Broker) An ESP8266 connects to Adafruit.io and shows this data on a Dot-Matrix display We can’t control who mentions us on twitter, so we move to the second step in our plan to configure IFTTT and Adafruit.io. To setup a data feed (MQTT topic) on Adafruit.io, Goto “feed” and “Create New Feed” Provide a unique name for the feed like “twitter-calls”, this means the MQTT topic that we need to subscribe to is “feed/twitter-calls” To setup IFTTT to connect to twitter and Adafruit.io, Connect your twitter and Adafruit.io account to IFTTT by logging in and giving proper permissions Create a new applet For “this“: Select “twitter” and “New mention of you” For “that“: Select “Adafruit” and “Send data to Adafruit.io”. Remember to select the correct topic created above and a message template using ingredients that suits your need. As a part of the third step in our plan, we need to subscribe to our MQTT topic and display this data on a Dot-Matrix display. Hardware Wemos D1 mini (ESP8266) link Max7219 Dot Matrix Display here Software Setup Arduino IDE to be able to program an ESP8266 (Instructions on how to do this is here as well as in the video below). Install Adafruit_MQTT and MAX7219 Dot-Matrix display libraries Upload the code found here on your ESP8266 Make these following connections between Max 7219 display and Wemos D1: VCC -> 5V GND -> GND DIN -> D7 CS -> D8 CLK -> D5 That’s it, now you should be able to see your latest twitter mentions on your Dot-Matrix displays.
Building electronics is one of my hobbies and I have in the recent year developed this skill to a point that I can help inspire others to make these things that make our day to day activities easier. Activities as simple as turning on and off lights using the internet (or using voice via siri/alexa/google voice) will help save energy and make our lives more easy aka… automated. My MCU of choice will be ESP8266 which costs as low as $3 which operates at 80 MHz, equipped with WiFi and up to 8 GPIO pins. I own a few NodeMCU v1.0 and Wemos D1 mini that I will use for almost all of my projects. I have a tons of ESP8266 (micro-processors with WiFi capability), relays, displays, motion sensors, led strips etc that I can assemble to make a functional product. There will be two aspects to this, Hardware building encompassing soldering and planning circuits Software (Arduino IDE) to take care of all this hardware functioning properly. I will spare some time and build one product at a time, documenting it by videos and post the details over here. Some project examples will be something in the lines of internet controlled light switch or motion sensor based home automation or home security using laser trap or animations on a LED strip etc.