DIY Arduino ESP8266 Smart Power Strip | Tutorial # 19

Поділитися
Вставка
  • Опубліковано 2 жов 2024
  • ESP8266 Home Automation
    In this tutorial, you will learn how to control power strip or surge protector with Alexa using ESP8266 and solid state relay.
    Prerequisites
    Install following libraries
    github.com/bbl...
    github.com/tza...
    Project Source Code at GitHub
    github.com/nas...

КОМЕНТАРІ • 38

  • @lezbriddon
    @lezbriddon 2 роки тому

    alexa discovery has changed over the alexa generations and json has changed so this tutorial is now ''not the best''

  • @dougbittner7438
    @dougbittner7438 6 років тому

    Netmedias
    , Great code. I have everything working but Alexa will not discover the new devices. The Arduino serial monitor shows that I am connected to my local WIFI and the switches we added.

  • @anthonygregson719
    @anthonygregson719 6 років тому

    I'm using a NodeMCU with a 5 volt mechanical relay board instead of Solidstate relays. When I power up some of the relays turn on (some only dimmly lit) and I have to disconnect the 5 volts to the relay board, then press reset on the nodeMCU then reconnect the 5 volts to get things working properly. Does anyone know how to overcome this start-up problem.

  • @not_zizou
    @not_zizou 5 років тому

    Hi i love your project and im trying to re do it im from argentina ans i have the esp8266stack tcp ip anthen lwip ap+sta thats the one i could get and also only could find the normal 2 reles here will i be able to do it ? Thank you for your time and great vidros

  • @OSD07
    @OSD07 6 років тому

    Respected Sir it is good project
    but i get following error please help me sir
    Arduino: 1.8.5 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 115200, 4M (3M SPIFFS)"
    Build options changed, rebuilding all
    sketch\UpnpBroadcastResponder.cpp:70:22: warning: character constant too long for its type [enabled by default]
    if(request.indexOf('M-SEARCH') > 0) {
    ^
    sketch\UpnpBroadcastResponder.cpp: In member function 'void UpnpBroadcastResponder::serverLoop()':
    sketch\UpnpBroadcastResponder.cpp:70:32: warning: large integer implicitly truncated to unsigned type [-Woverflow]
    if(request.indexOf('M-SEARCH') > 0) {
    ^
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\WiFiManager-master\WiFiManager.cpp: In member function 'void WiFiManager::setupConfigPortal()':
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\WiFiManager-master\WiFiManager.cpp:146:71: error: no matching function for call to 'ESP8266WebServer::on(String, std::_Bind_helper::type)'
    server->on(String(F("/")), std::bind(&WiFiManager::handleRoot, this));
    ^
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\WiFiManager-master\WiFiManager.cpp:146:71: note: candidates are:
    In file included from C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\WiFiManager-master\WiFiManager.h:17:0,
    from C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\WiFiManager-master\WiFiManager.cpp:13:
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:79:8: note: void ESP8266WebServer::on(const char*, ESP8266WebServer::THandlerFunction)
    void on(const char* uri, THandlerFunction handler);
    ^
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:79:8: note: no known conversion for argument 1 from 'String' to 'const char*'
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:80:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction)
    void on(const char* uri, HTTPMethod method, THandlerFunction fn);
    ^
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:80:8: note: candidate expects 3 arguments, 2 provided
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:81:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction, ESP8266WebServer::THandlerFunction)
    void on(const char* uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn);
    ^
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:81:8: note: candidate expects 4 arguments, 2 provided
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\WiFiManager-master\WiFiManager.cpp:147:81: error: no matching function for call to 'ESP8266WebServer::on(String, std::_Bind_helper::type)'
    server->on(String(F("/wifi")), std::bind(&WiFiManager::handleWifi, this, true));
    ^
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\WiFiManager-master\WiFiManager.cpp:147:81: note: candidates are:
    In file included from C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\WiFiManager-master\WiFiManager.h:17:0,
    from C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\WiFiManager-master\WiFiManager.cpp:13:
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:79:8: note: void ESP8266WebServer::on(const char*, ESP8266WebServer::THandlerFunction)
    void on(const char* uri, THandlerFunction handler);
    ^
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:79:8: note: no known conversion for argument 1 from 'String' to 'const char*'
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:80:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction)
    void on(const char* uri, HTTPMethod method, THandlerFunction fn);
    ^
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:80:8: note: candidate expects 3 arguments, 2 provided
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:81:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction, ESP8266WebServer::THandlerFunction)
    void on(const char* uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn);
    ^
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:81:8: note: candidate expects 4 arguments, 2 provided
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\WiFiManager-master\WiFiManager.cpp:148:83: error: no matching function for call to 'ESP8266WebServer::on(String, std::_Bind_helper::type)'
    server->on(String(F("/0wifi")), std::bind(&WiFiManager::handleWifi, this, false));
    ^
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\WiFiManager-master\WiFiManager.cpp:148:83: note: candidates are:
    In file included from C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\WiFiManager-master\WiFiManager.h:17:0,
    from C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\WiFiManager-master\WiFiManager.cpp:13:
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:79:8: note: void ESP8266WebServer::on(const char*, ESP8266WebServer::THandlerFunction)
    void on(const char* uri, THandlerFunction handler);
    ^
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:79:8: note: no known conversion for argument 1 from 'String' to 'const char*'
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:80:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction)
    void on(const char* uri, HTTPMethod method, THandlerFunction fn);
    ^
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:80:8: note: candidate expects 3 arguments, 2 provided
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:81:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction, ESP8266WebServer::THandlerFunction)
    void on(const char* uri, HTTPMethod method, THandlerFunction fn, THandlerFunction ufn);
    ^
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:81:8: note: candidate expects 4 arguments, 2 provided
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\WiFiManager-master\WiFiManager.cpp:149:83: error: no matching function for call to 'ESP8266WebServer::on(String, std::_Bind_helper::type)'
    server->on(String(F("/wifisave")), std::bind(&WiFiManager::handleWifiSave, this));
    ^
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\WiFiManager-master\WiFiManager.cpp:149:83: note: candidates are:
    In file included from C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\WiFiManager-master\WiFiManager.h:17:0,
    from C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\WiFiManager-master\WiFiManager.cpp:13:
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:79:8: note: void ESP8266WebServer::on(const char*, ESP8266WebServer::THandlerFunction)
    void on(const char* uri, THandlerFunction handler);
    ^
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:79:8: note: no known conversion for argument 1 from 'String' to 'const char*'
    C:\Users\SSSSD\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer\src/ESP8266WebServer.h:80:8: note: void ESP8266WebServer::on(const char*, HTTPMethod, ESP8266WebServer::THandlerFunction)
    void on(const char* uri, HTTPMethod method, THandlerFunction fn);
    ^
    :\Users\SSSSD\AppData\Local\Ardu

    • @netmedias7657
      @netmedias7657  6 років тому

      Alexa Osd You need to select board type "Generic ESP8266 Module" in Arduino IDE and flash it. It is not NodeMcu. Good luck.

  • @ugs2023
    @ugs2023 5 років тому

    I'm using NodeMCU V3, I'm able to connect it to as Acces Point with my Android Phone, but I don't see manage router option, even I tried to connect through Desktop but no success, unable to open page 192.168.4.1, unable to configure WiFi through AP Mode, Please Help.

    • @netmedias7657
      @netmedias7657  5 років тому

      Look for your IP in Arduino serial monitor. You have different IP assigned to your device. It is dynamic IP.

  • @Ezanity
    @Ezanity 6 років тому

    dam i was gonna do this as i can hardly get 1 in the uk. will most definitely be watching all your vids man and try this myself

    • @netmedias7657
      @netmedias7657  6 років тому

      Ezanity Gaming You can still do it no one is going to stop you my friend. 😊

  • @fouadhj9046
    @fouadhj9046 6 років тому

    Dear Malik
    please find below the error message. i hope if you can hepl.

  • @seancunningham6785
    @seancunningham6785 5 років тому

    Now That Json is ver 6.x Do you have an updated script? I get a compiling error

    • @netmedias7657
      @netmedias7657  5 років тому

      Use the older version until I have an update. It will be a while. thanks

  • @DrexProjects
    @DrexProjects 6 років тому

    I bought 3 power bars to do the same thing. I wanted 5 plugs to be separately controlled in each one. But when I opened it they were 2 strips like yours. Not individual ones. And they are all encased in a plastic cover inside also. Maybe I will see if I can take off the plastic covers over the connectors and see if I can cut the plugs into separate lines. Thanks for the great find on the code. That should save time. Thanks for the videos.

    • @netmedias7657
      @netmedias7657  6 років тому

      Drex Projects I was going to cut them and attach a relay for each plug, but it would make a very lengthy tutorial.Good luck with your project and thank you for your feedback.

  • @SunilDatta
    @SunilDatta 6 років тому

    Nassir, I have been trying to connect Echo Plus with NodeMCU V3, but have not succeed yet. Alexa fail to discover devices. The codes work perfectly with Echo dot. Do you have any idea or suggestion that I can try?

    • @netmedias7657
      @netmedias7657  6 років тому

      Sunil Datta Login to your Alexa account and remove the devices and try to discover it with Echo plus again.

    • @SunilDatta
      @SunilDatta 6 років тому

      Netmedias I have already done this. Amazon says that the issue is because echo plus comes with inbuilt hub. I can see echo sending reply setup.xml on alexa response. But it appears that alexa is expecting a different response. Now I want to know if you have ever tried the codes on echo plus and if there is something you want me to try.

    • @netmedias7657
      @netmedias7657  6 років тому

      Sunil Datta I have not tried it on echo plus. I may buy one and test it out.

    • @SunilDatta
      @SunilDatta 6 років тому

      Netmedias NP, thanks for your reply.
      &
      You are making good tutorials. I Expect you will continue making such tutorials. Thanks.

  • @dinaranam7764
    @dinaranam7764 6 років тому

    Love your project! I will try it

  • @TheTrueVergil
    @TheTrueVergil 6 років тому

    Great channel Man! :D

  • @rolojunk
    @rolojunk 6 років тому

    Great videos!

  • @inhVanChung
    @inhVanChung 6 років тому

    You do it by creating skills for Alexa, please!

    • @netmedias7657
      @netmedias7657  6 років тому

      No need for a skill

    • @inhVanChung
      @inhVanChung 6 років тому

      Why is "Wemo switch" on Alexa Smarthome? And how to change it. Thank you so much!