Skip to content

MrGreensWorkshop/ArduinoPico_RasPiPicoW_AlexaEnabledSmartDevices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Amazon Alexa enabled smart devices with Raspberry Pi Pico W

GitHub issues GitHub forks GitHub stars GitHub license Support me on GitHub Sponsors Support me on Patreon Tip me via Ko-fi


Alexa-enabled devices with Raspberry Pi Pico W

Introduction

This project helps you create your custom voice controlled smart devices for Amazon Alexa with Raspberry Pi Pico W. You can make Amazon Alexa voice controlled lights, devices etc. It also includes features like Wifi Config manager and Firmware update over Web interface for ease of installation. Start controlling your devices with Amazon Alexa and Raspberry Pi Pico W today!

Thank you for considering supporting my work!

Background

There was an open source project called FauxmoESP which emulates lights and plugs for Amazon Echo devices using ESP microcontrollers. Back in the day, I used to use this library with ESP8266 to make Alexa enabled devices. So I ported to Raspberry Pi Pico W and added some features that I think were necessary.

Features

  • Fauxmo Belkin Plug for Raspberry Pi Pico W (ported from: FauxmoESP v2.4.4)
  • Fauxmo Philips Light for Raspberry Pi Pico W (ported from: FauxmoESP v3.4)
  • Config Manager
    • Wifi and device settings over Web interface
    • Firmware update and FileSystem upload feature with HTTP basic authentication
  • Examples
    • DimmableSmartLight
      • On/Off control and brightness control of a Led
    • SmartLight
      • On/Off control of digital output
    • FauxmoPhilipsLight_Basic
      • Basic example of Fauxmo Philips Light (On/Off)
    • FauxmoBelkinPlug_Basic
      • Basic example of Fauxmo Belkin Plug (On/Off)

Release (example.zip)

I put Config Manager and Fauxmo to corresponding sample folders so that you can open and compile projects easily. I've also included precompiled binaries for Raspberry Pi Pico W, for examples with Config Manager.

<examples>/
│
├── DimmableSmartLight
│   ├── <Config Manager>
│   └── src
│       └── <FauxmoPhilipsLight>
├── SmartLight
│   ├── <Config Manager>
│   └── src
│       └── <FauxmoPhilipsLight> (interchangeable with FauxmoBelkinPlug)
│           (If you want to change it, replace src folder with FauxmoBelkinPlug_Basic/src)
├── FauxmoPhilipsLight_Basic
│   └── src
│       └── <FauxmoPhilipsLight>
└── FauxmoBelkinPlug_Basic
    └── src
        └── <FauxmoBelkinPlug>

Compilation

  1. Make sure you watch the video at the top of the page.
  2. Install Arduino IDE 1.8 or 2.0 to your OS.
  3. Install Raspberry Pi Pico Arduino core.
  4. Install AsyncTCP_RP2040W library.
  5. From the latest release, download the "examples.zip" under the Assets, and unzip.
  6. Open one of the examples in Arduino IDE.
  7. Select the board from, Menu > Tools > Board > Raspberry Pi RP2040 boards > Raspberry Pi Pico W.
  8. Select your Wifi region from, Menu > Tools > WiFi Region.
  9. To compile and get the binary, click Menu > Sketch > Export compiled Binary and your binary will be exported to opened example folder.

Running

  1. Build this test circuit for Raspberry Pi Pico W

Amazon Alexa enabled smart device test circuit for Raspberry Pi Pico W

  1. Get the binary
    • You can compile examples and get the binary as explained above.
    • Or you can use precompiled binary files inside of each example folder if applicable.
  2. Put the Raspberry Pi Pico W into bootloader mode by pushing bootsel button, while plugging to your computer.
  3. Copy the ".uf2" file to your Raspberry Pi Pico W's storage.

Current Status

Raspberry Pi Pico W

Arduino core AsyncTCP_RP2040W Fauxmo Gen Works
v2.6.0 v1.1.0 Fauxmo Belkin Plug v1.0.0 1,2 OK
v2.6.0 v1.1.0 Fauxmo Philips Light v1.0.0 1,2 OK

ESP8266

Arduino core ESPAsyncTCP Fauxmo Gen Works
v2.3.0 v1.1.2 Fauxmo Belkin Plug v1.0.0 1,2 OK

Fauxmo Philips Light should be supported all three generation of Amazon echo devices. Since I only have first and second generation Amazon Echo devices, I didn't test with third generation devices. Please let me know if you have third generation devices and if it's working. If you don't know which device you have, please check this page.

Fauxmo Belkin Plug only works with Gen 1,2 because to work with Gen 3, TCP port must be fixed to 80.

Documentation

Check out the video at the top of the page.

Credits

I want to thank all projects that gave me an opportunity to make this project possible. Please consider to support these projects too.

  • FauxmoESP This is a library for ESP8266/ESP32-based devices that emulates Philips Hue lights and thus allows you to control them using this protocol, in particular from Alexa-powered devices like the Amazon Echo or the Dot.
  • Raspberry Pi Pico Arduino core Raspberry Pi Pico Arduino core, for all RP2040 boards.
  • AsyncTCP_RP2040W library Asynchronous TCP library for Raspberry Pi Pico W with CYW43439 WiFi.

You Can Support My Work

Creating projects like this takes a great amount of time. Much appreciated if you consider supporting me so that I can continue projects like this and creating new contents for everyone.

  • You can support me on GitHub Sponsors (monthly or one time)
  • You can be one of my patrons on Patreon (monthly)
  • You can tip me via Ko-fi (one time)

Contribute

Pull Requests are welcome. Please check the instructions in the Issues and Pull Request templates.

License

As it says in the MIT license, you can use my code anywhere as long as you include the license and copyright notice.

Copyright (c) 2022 Mr. Green's Workshop https://www.MrGreensWorkshop.com

Other Licenses

This project incorporates libraries written below. Without these libraries, I couldn't make this project possible.

Library file(s)
FauxmoESP v3.4, Copyright (C) 2016-2020 by Xose Pérez, 2020 by Paul Vint. FauxmoESP is distributed under the terms of the MIT License. FauxmoBelkinPlug
FauxmoESP v2.4.4, Copyright (C) 2016-2018 by Xose Pérez. FauxmoESP is distributed under the terms of the MIT License. FauxmoPhilipsLight