Sonoff wifi switch control with ESP Easy and Node Red

  Рет қаралды 81,597

Csongor Varga

Csongor Varga

Күн бұрын

Пікірлер: 96
@HunTomiBp
@HunTomiBp 4 жыл бұрын
1-2 hete keresem a megoldást, hogy hogyan tudnék saját egyedi eszközöket a Home Assistans-hez kapcsolni... ÉS VÉGRE megvan a megoldas!!! NAGYON KÖSZÖNÖM A VIDEÓT! Üdv.: Tamás, Stockholmból
@jarchdm
@jarchdm 3 жыл бұрын
Thank you for the in depth video on how to set up esp easy not many tutorials on this out there
@PCman50
@PCman50 7 жыл бұрын
Thank you so much for the detailed video. I just ordered 4 Sonoff WiFi Switches and can't wait to reprogram them and use them in my existing Home Automation setup.
@csongorvarga
@csongorvarga 7 жыл бұрын
I also ordered another 5, but lost in the Christmas parcel maze. I am planning to release a few more videos on the subject. I also want to explore what is possible using local logic (in the rules). I think that could also open up possibilities for simple automation without a central "controller" (node-red, home automation, openhab, etc.).
@kahon82
@kahon82 7 жыл бұрын
Köszönöm! Nem rég vágtam bele a lakás automatizálásba és nagy segítséget nyújtanak a videóid.
@sunnysidegardeners7163
@sunnysidegardeners7163 6 жыл бұрын
Hi Csongor Varga, Great video and well explained. I would like to know if the Alexa Local Node in Node-Red will work with this setup? Thanks
@csongorvarga
@csongorvarga 6 жыл бұрын
I will try to integrate Google Home with Node Red. I think the way Google Home works is that is passes over the recognized words in text. That should be easy to understand (take out parts of the sentence to identify what you want to which and to which state). But again, did not work on this yet.
@Frisky0563
@Frisky0563 7 жыл бұрын
it's me once again have you tried this POW sonoff module it reads power consumed have you looked at these? Can we use it with ESP Easy? I wouldn't mind connecting to my air conditioner. thank you for your video series I have learned so much from your work Don
@csongorvarga
@csongorvarga 7 жыл бұрын
Actually, the POW module was also on my bucket list of things to get, but it has not happened yet. ESP Easy supports a set of sensors, and I have no idea if it would work with POW or not. There is no circuit diagrams online to do some research beforehand. And after flashing the original firmware, there is no way of going back (as far as I know).
@Oxynaut
@Oxynaut 8 жыл бұрын
And also, on the switch I set the following: Pull UP = activated, Inversed = activated, Switch Type = Switch, Switch Button Type = Push Button Active Low. Then in Node-red you wire the MQTT from the Sonoff directly into the UI switch, without additional functions etc.
@csongorvarga
@csongorvarga 8 жыл бұрын
I also want to explore adding rules in the ESP, so the button press can be handled locally. I have to spend a bit more time on this topic. My sonoff works just fine, but sometimes so not turn on or off the lights.
@mikewurlitzer5217
@mikewurlitzer5217 6 жыл бұрын
Thank you very much for all the effort you put in these videos. This one has enabled me to flash ESP Easy onto a Sonoff and using Pete Scargill's "The Script" I have finally got Mosquitto at least running but never connecting on Node Red. Today I started from scratch with the latest version of Raspian [stretch] and loaded it on a RPi3 then ran "The Script" and everything minus Node Red connecting to Mosquitto seems to work. If I use an MQTT input node on Node-Red and set the server to node-red@RPi's IP address:1883 all I ever get after Deploying is "Disconnected" If however I use the same address but port 1880 [which is wrong] I at least get a "Connecting" message but never connects. I have tried using localhost:1883 and 127.0.0.1:1883 and nothing but "disconnected" message for the MQTT node. I verified via SSH that the mosquitto server is running but beyond that, I fall off my Linux knowledge cliff Only "the script" was ever able to get mosquitto to load cleanly as using any other method on the web gave me various dependencies missing
@csongorvarga
@csongorvarga 6 жыл бұрын
Sorry, your message was held in spam until now. I have to admit I don't know. I think when you put 1880 it says connecting because it is waiting for a response which never gets, and on 1883 it gets rejected automatically. On my MQTT, I have a username and password. Did you do that too? Go to /var/log/mosquitto/mosquitto.log and see if you see some error messages there. It looks like Node-Red's connection to the MQTT broker is rejected for some reason.
@mikewurlitzer5217
@mikewurlitzer5217 6 жыл бұрын
Thank you very much for taking the time to reply. I usually copy and paste login/password credentials to save typing and minimize errors but it seems the source document I was using to copy these credentials contained a non-printable character which caused every attempt to fail in Node-Red/MQTT. My bad!!!!! I got Node-Red running with MQTT and even had the dashboard running on my Android phone. Yay. Then the very next day, without any edits, the Sonoff's response to any command would take about 30 seconds. Even when using my browser to look at the configuration pages, it would take 30+ seconds from page to page. I reflashed the Sonoff with both the R120 build and the latest build but now the Sonoff will no longer connect to my home network. Everything up to the point of it attempting to connect works.
@csongorvarga
@csongorvarga 6 жыл бұрын
I am waiting for my Sonoff as well to test it, but check out the new 2.0 version of ESP Easy. I have seen some people fixed their Sonoff by going to the new 2.0 firmware. Also try "esptool -cp COMx ce" (before attempting to flash again). This erases the flash on the ESP chip. That may also help removing traces of settings, earlier program in the memory. I am just guessing at this point, I did not have the chance to test it myself. Or switch to ESPurna. These are all my tips at this point.
@aldomansueto2739
@aldomansueto2739 5 жыл бұрын
Hi, love your videos. I have a question for you, if I flash can I control the Sonoff with the Smart Life app for Alexa. Thanks and keep up the good work.
@csongorvarga
@csongorvarga 5 жыл бұрын
I don't know the Smart Life app, but I would say probably not. But there is Alexa integration in eWelink as well.
@aldomansueto2739
@aldomansueto2739 5 жыл бұрын
@@csongorvarga Thanks for the quick reply, but no I don't like eWelink. When I used it with Alexa it doubled all my switches and plugs and the Sonoff loses connection with the app when and if you're lucky that it paires.
@robp2175
@robp2175 7 жыл бұрын
Could you tell me where you bought the header to fit these? Could you give me the exact size/spacing of the header? I am somewhat new at this so I appreciate any help you could provide. Great video. Thank you.
@csongorvarga
@csongorvarga 7 жыл бұрын
Thanks, it is called "0.1 inch pitch single row male pin header". Just put it into ebay and pick one with the most purchases. Get the straight version (pins not bent). Size does not matter, it can be cut between the pins. (links are not allowed in comments).
@jakobmosburger2737
@jakobmosburger2737 7 жыл бұрын
Great Video. Good explaination. Question: I bought for my rollo a SonOff Dual Unit. I flashed the unit and I would like to switch the relais via MQTT. I tried all GPIOs but it doesnt work. Any idea?
@csongorvarga
@csongorvarga 7 жыл бұрын
I am not sure to be honest. I don't have a dual, but after a quick Google, I can see that it is a bit different even with the use of the button to go to flash mode. What if you use ESPurna or Tasmota firmware which all have specific code for Sonoff Dual? There is a long thread here, not sure if it has the info you need: www.letscontrolit.com/forum/viewtopic.php?t=2869
@jakobmosburger2737
@jakobmosburger2737 7 жыл бұрын
Csongor Varga I still flashed the Unit. You are right its moore complicated
@mustafaaljumaili6279
@mustafaaljumaili6279 5 жыл бұрын
The putty not work after flashing the firmware , any advice please??
@markjohnson4577
@markjohnson4577 5 жыл бұрын
Looks like this will not work with the newer sonoff's - I am hoping someone will post a new procedure :)
@zoltanm1
@zoltanm1 7 жыл бұрын
Köszönöm válaszod. wifi ok.ping ok. ma magpróbálom újratelepíteni a rpi-t hátha...de menni kellene. már próbáltam espeasy fw és arduinoval is...igen nálam is gondok vannak 2-3 esp egymásoz közel nem ok...
@Oxynaut
@Oxynaut 8 жыл бұрын
Hi there. If I connect a debug output to the MQQT input from the Sonoff it keeps sending "1" and then "0" and then "1"... It keeps doing this forever. Have you had the same problem? By the way. The "Star" you are referring to is calles "Hash"
@csongorvarga
@csongorvarga 8 жыл бұрын
Oxynaut oh yes, hash. back to your problem, I have no idea. What is the topic of the message. Maybe that help in understanding it. Also you can ask the ESP Easy forum.
@jacksat2252
@jacksat2252 7 жыл бұрын
Hashtag to be compleet :-)
@n3glv
@n3glv 7 жыл бұрын
Hash is the symbol, hashtag is from social media.
@balintradocz
@balintradocz 7 жыл бұрын
Klassz tutorial! Eddig te vagy az eslő magyar, aki foglalkozik a témával youtube-n. Esp32-vel foglalkozgattál már?
@csongorvarga
@csongorvarga 7 жыл бұрын
+Balint Radocz Kosz, meg nem volt szerencsem ESP32-hoz. Szerintem ebben az alkalmazasban felesleges a vegpontra nagyobb teljesítményű eszközöt telepiteni. A rele vezerlest es a mqtt kommunikaciot a 8266 is elvegzi. Sot ahhoz tul kezdo vagyok hogy en direktbe irjak ra programot ezert is hasznalom az ESP Easyt. De ha lesz ESP32-re egy NES emulator akkor epitek egy sajat kezi jatekgepet.
@James_Cook_Explorer
@James_Cook_Explorer 4 жыл бұрын
That's was very useful. Thank you!
@nishiter
@nishiter 7 жыл бұрын
thanks it was all interesting...is there a way we can use sonoff on Google Home?
@csongorvarga
@csongorvarga 7 жыл бұрын
I don't know yet. I have a Google Home, but I have not gotten into learning more about Google Home, or api.ai.
@nishiter
@nishiter 7 жыл бұрын
i am looking to connect home and sonoff since long not able to find any method 😫😫😫😫
@csongorvarga
@csongorvarga 7 жыл бұрын
api.ai is the platform for developing for Google Home.
@Frisky0563
@Frisky0563 7 жыл бұрын
Hi Csongor love your video series. question can I write a rule to send a event to Matt broker? I loved the rule video you did can you do some more of them?
@csongorvarga
@csongorvarga 7 жыл бұрын
Don Biederman I don't know what a Matt broker is. As long as it is a simple http command it is possible. These are all the things I could think of in terms of rules.
@Frisky0563
@Frisky0563 7 жыл бұрын
how to you send a mqtt message to control a gpio output pin /systemname/gpio/???
@csongorvarga
@csongorvarga 7 жыл бұрын
yes, //gpio/ and payload is 1 or 0. So in my case /Sonoff1/gpio/12 and message 1 to turn the relay on.
@zoltanm1
@zoltanm1 7 жыл бұрын
Nagyon jó videó...grat.. Sajnos nekem valamiért nem komunikál egymással a node-red és az esp....node-red rpi3-on fut... nem jövök rá miért nem látják egymást...már mindennel próbálkoztam, rúter tűzfal...vagy talán valami nincs feltelepítve raspberry-re...esetleg valami ötlet...megköszönöm...
@csongorvarga
@csongorvarga 7 жыл бұрын
Mit jelent hogy nem kommunikál? Gondolom egy Wifin vannak, Rpi-ről lehet pingelni a esp IPjét... Nekem hasonló problémám nem volt. Viszont azért látom hogy ezek az esp eszközök azért nagyon karcosak. Most van 5 Sonoff egymás mellett, egyiket látom, másikat nem. Mármint a wifi-re felmennek, de sokszor a honlapjuk nem válaszol. Másik hogy a wifi antenna ami ezekben az esp-kben van, rosszabbak mint a legocskább mobiletelefon. Főleg nálunk ahol beton falak vannak, ha másik szobában vannak mint router, már akkor észreveszem hogy sokkal lassabbak. Szóval elsőként próbáld a router mellett vagy közel beüzemelni. Ellenőrizd hogy kapott IPt, fent van a hálózaton. Hálózati feszültség nélkül kapcsold rá a programozót és Putty-ban nézd milyen státusz üzenetek jönnek át a soros porton keresztül. Ott lehet kiküld valami hibaüzeneteket is. Most hirtelen ennyi jutott eszembe.
@davidkristof
@davidkristof 6 жыл бұрын
Szia Csongor, tudsz abban segiteni hogyan kell sonoff tasmota-t domoticz-be hozzáadni?
@csongorvarga
@csongorvarga 6 жыл бұрын
Sajnos nem, sosem hasznaltam domoticz-t
@dickolij1394
@dickolij1394 3 жыл бұрын
is there a sketch of the interfacing with the programmer?
@csongorvarga
@csongorvarga 3 жыл бұрын
ESP Easy is downloadable as a bin file and you flash that on the Sonoff basic.
@dickolij1394
@dickolij1394 3 жыл бұрын
@@csongorvarga is it true to make the connection TX-RX or should it be RX-RX
@csongorvarga
@csongorvarga 3 жыл бұрын
TX-RX and RX-TX. But if you do it wrong nothing will happen, you will not break the unit.
@Frisky0563
@Frisky0563 7 жыл бұрын
Hi can I flash a NodeMCU 12e to try espeasy? can you build a json message with rules or ??
@csongorvarga
@csongorvarga 7 жыл бұрын
Yes, ESP Easy works with any ESP8266 based boards including NodeMCU. And no, you cannot build a json message.
@galex81
@galex81 7 жыл бұрын
hi!!! following your tutorial, I need an help, firmware is flashed properly (report same message of your video at the end) but after connected using Putty, pressing button on Sonoff something appears into the Putty terminal...what could be wrong?
@AliG.G
@AliG.G 7 жыл бұрын
same here flash worked fine but I tried putty and another terminal software and none of them gives me any return so i cannot connect to esp_0 wifi networking because its not showing up.
@galex81
@galex81 7 жыл бұрын
today I was finally able to flash and see some result, try flashing your sonoff from arduino Ide using ESP8285 board instead of 8266, this worked for me.
@TomTom-rd3iy
@TomTom-rd3iy 7 жыл бұрын
had same problems before with no SSID - flashing methode will not work anymore with new sonoff. you have to use ESP8266 Flasher, 115200, 1 Mbit, 40 MHz and IMPORTANT - SPI-Methode must be DOUT. works fine ^^
@csongorvarga
@csongorvarga 7 жыл бұрын
Thanks for the update. All my Sonoffs from about 1 year ago, but I have some new ones being ordered.
@Kevin-wy1gb
@Kevin-wy1gb 6 жыл бұрын
Thanks!! This is working for me !
@markjohnson4577
@markjohnson4577 5 жыл бұрын
I am trying to flash the newer sonoff's to use in node red using ESP8266 but not sure of the procedure - any chance you can walk us through it?
@Oxynaut
@Oxynaut 8 жыл бұрын
All sorted. Had "Wifi Status Led" on GPIO-0 for some reason. Üdvözletek délafrikábol.
@csongorvarga
@csongorvarga 8 жыл бұрын
Oxynaut good catch
@MrHandsomejackuk
@MrHandsomejackuk 6 жыл бұрын
Hi Csongor, its me again.... :-( where you put the server name in your mqtt node in nodered, you used a nodered@192 etc etc, i have my mqtt on a cloudmqtt server it says its connected under the mqtt node, but i dont get any messages flowing in the debug, i have pressed deploy and theres no errors there...... i get messages coming through on my tasmota console though why did you use nodered@192.168.1.80 is that the ip of you raspberry pi or whatever you running nodered on...? i have raspberry pi running my nodered..
@csongorvarga
@csongorvarga 6 жыл бұрын
Yes, I have the MQTT broker running on the same IP as Node Red. When you are on the MQTT settings page, click on the edit button and you get into the MQTT broker configuration. You can change that local ip to your clouldmqtt domain and set the userid and password on the Security tab.
@MrHandsomejackuk
@MrHandsomejackuk 6 жыл бұрын
hmmmm i have done that already on my sonoff, in tasmota, and can control my sonoff through the web interface, and through my android device I also have raspberry pi running nodered, and have mosquitto on the pi.. I have not setup mosquitto mqtt broker on the pi, as already have a cloud mqtt broker setup in nodered and it shows connected in nodered.... do you think my mqtt broker needs the same ip as my nodered ? maybe i need to setup my mosquitto........
@MrHandsomejackuk
@MrHandsomejackuk 6 жыл бұрын
could you try something for me ? if you have a cloudmqtt broker could you try setting that up in nodered and see if it works...? i beginning to wonder maybe cloudmstt dont work on nodered...
@csongorvarga
@csongorvarga 6 жыл бұрын
I am pretty sure that node-red does not need to be on the same IP as the broker. If you phone and Sonoff can connect the cloudmqtt, your node-red should as well. I don't have an account, so I cannot test it.
@MrHandsomejackuk
@MrHandsomejackuk 6 жыл бұрын
ok no prob i will research it better later... strange though it shows connected in nodered... i assume you using mosquitto ?
@spectralcodec
@spectralcodec 7 жыл бұрын
Great video!
@MartynCole
@MartynCole 6 жыл бұрын
To erase the device flash you could try: esptool --port com2 erase_flash That erases everything with my nodemcu modules.
@csongorvarga
@csongorvarga 6 жыл бұрын
I was not recommending this as my version of esptool was crashing in Win10. I will try to get a newer version which works ok. I also want to test the process of downloading the firmware, but again by version of esptool does not seem to do it.
@morpheuz2006
@morpheuz2006 8 жыл бұрын
very good explanation :D
@csongorvarga
@csongorvarga 8 жыл бұрын
Thanks a lot. It was a long video, but I am glad it makes sense.
@SolenergyMex
@SolenergyMex 7 жыл бұрын
gracias
@Frisky0563
@Frisky0563 7 жыл бұрын
there is a schematic on there site www.itead.cc/wiki/images/5/52/Sonoff_POW_Schematic.pdf
@csongorvarga
@csongorvarga 7 жыл бұрын
I swear I looked at it in the past, and I did not see this before. So with my limited knowledge it appears that the voltage and current sensor is an HLW8012 chip. Looking at ESP Easy, it does not support that chip at the moment. But if you Google HLW8012 the first hit from Tinkerman who explains his work on the Sonoff POW with custom firmware. Have a read through that article.
@Frisky0563
@Frisky0563 7 жыл бұрын
Thanks I'm reading that over now.
@brit1066
@brit1066 7 жыл бұрын
Do you think that you MIGHT explain what PUTTY is? I am sure that many people will not know.
@Andokaaa
@Andokaaa 5 жыл бұрын
´´Im using this application F.I.N.G. :D Csongor easily say fing app :D
@Frisky0563
@Frisky0563 7 жыл бұрын
my phone did that I mean mqtt lol
How to flash Sonoff to ESP Easy firmware
17:46
Csongor Varga
Рет қаралды 187 М.
Controlling everything with Node-RED dashboard via MQTT
13:36
techiesms
Рет қаралды 82 М.
ЛУЧШИЙ ФОКУС + секрет! #shorts
00:12
Роман Magic
Рет қаралды 23 МЛН
Triple kill😹
00:18
GG Animation
Рет қаралды 17 МЛН
СОБАКА И  ТРИ ТАБАЛАПКИ Ч.2 #shorts
00:33
INNA SERG
Рет қаралды 2 МЛН
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 275 #shorts
00:29
Control Node Red with voice from Google Now
21:45
Csongor Varga
Рет қаралды 26 М.
eWeLink API  in action with NodeRED
8:28
NotEnoughTECH
Рет қаралды 25 М.
Raspberry Pi Node-RED Tutorial with Modbus & MQTT
13:38
Kurt Braun
Рет қаралды 220 М.
ESPEasy Settings for Sonoff Devices in an Openhab2 installation
18:12
Blair Thompson
Рет қаралды 40 М.
How to flash ESPurna firmware to Sonoff Basic
23:34
Csongor Varga
Рет қаралды 36 М.
ESP/ESP Easy Monitoring
23:56
Csongor Varga
Рет қаралды 60 М.
#127 Home Automation without coding: Sonoff , MQTT,Alexa, Nod-Red
15:35
Home automation over WiFi using WeMos ESP8266
15:00
bitluni
Рет қаралды 656 М.
Share One Internet Connection With Two Private Networks Thorough
1:31:42
ЛУЧШИЙ ФОКУС + секрет! #shorts
00:12
Роман Magic
Рет қаралды 23 МЛН