How I put Tasmota on my NodeMCU board and why I love them so much.

I love NodeMCU chips! I love that everything is already there: wifi, enough onboard memory to actually do stuff, easily programable with Arduino ide once you have a driver (driver downloads here: https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers), and my favorite part, you can power them with anything from 3.3-12 volts so lots of power supplies work for them.

I especially love the 12E or the 1.0 it is a little narrower, fits on a breadboard, super convenient!
So far the only downside is that the output is only 3.3 volts (but that is true of all of the esp8266 boards), and the pins can be a little confusing ... D4 is GPIO2 which is pulled high at boot, and will cause boot failure if something is pulling it low at boot ... just lots of stuff to remember  HMMM that feels like another article in the making, for now here's the gist:


What did I do to get it up and going?

  1. Verify prerequisites
    • Install Arduino IDE
    • Install Git
    • Install the esp8266 libraries in arduino
    • Install the NodeMCU drivers
  2. Open a terminal (I am doing this on a mac, but the stps should be the very similar on Linux) and run the following commands:
    • cd ~/Dev (my dev environment)
    • git clone https://github.com/arendst/Sonoff-Tasmota.git
    • cd Sonoff-Tasmota
    • cp -r lib/* ~/Documents/Arduino/libraries/
  3. Now we have all the "code" up to date, open the Arduino IDE
  4. Open the sonoff.ino, in the IDE, from our downloaded location <Sonoff-Tasmota>/sonoff/sonoff.ino
  5. This opens a ton of tabs we want to start with my_user_config.h
  6. Update the following items per your environment:
    • PROJECT - The name you want to give your project, this must be unique
    • STA_SSID1 - Your network SSID
    • STA_PASS1 - Your network password
  7. I also updated these since they will be standard for my devices, but these can all be updated in the interface
    • MQTT_HOST
    • MQTT_PORT 
    • MQTT_USER 
    • MQTT_PASS
    • FRIENDLY_NAME
    • TIME_DST_OFFSET
    • TIME_STD_OFFSET
    • LATITUDE 
    • LONGITUDE
    • APP_TIMEZONE - I set this to 99 since I set the DST and STD values
  8. Save
  9. Make sure you are on the right device, on the right port
  10. Flash the NodeMCU 
  11. Once it finishes and restarts
  12. locate the ip address - I use google wifi so I just looked it up there but I also have used angry IP scanner with great sucess
  13. point your browser to the ip and BAM!!!!
  14. Tap the  "Configuration" button
  15. Tap the "Configure Module" button 
  16. Select "18 Generic"
  17. Tap "Save" and when it does the NodeMCU will restart and take you back to the main menu.
WOW that was a lot of steps.
Next article will be how we use Tasmota on some specific activities.


As always, if you want some of these, please consider using my Amazon affiliate links, and if you want something else from Amazon, you can use my link and go buy that too.

The NodeMCU board I am using which is the V2: https://amzn.to/2SoLbGK
NodeMCU V3 (this was the least expensive I could find): https://amzn.to/2Sn9CVi

Comments

Popular posts from this blog

HomeAssistant via docker on a Mac

Flashing my tuya switches with tasmota