Love how you edit your videos down so they are really tight but still have all the information you need. I can't stand the TH-camrs who ramble on for ages and all you want is one piece of information buried in the waffle somewhere!
Thank you!!! That's exactly why I do it this way. I figure you want to get through it fast and decide if the stuff you need is there. If it is, you can rewind, pause, rewatch and get what you came for. Thanks for that feed back! I'll keep doing it!
Crazy thing happened today. A couple hours after this video posted I was happily replying to every comment, like I always do, when for some crazy reason TH-cam stopped accepting my comments. I looked in the creator forums and best I can determine I exceeded some max for commenting in a period of time! What kinda craziness is that! I wouldn’t have guess there’d be a limit to how much I can comment on my own videos! Anyway, sorry I didn’t reply to everyone who commented as quickly as I usually do. I’ll go back and catch up on the comments I missed during my TH-cam time-out. Thanks for your support!
Great video, thanks. Regarding the PIR switch, there is just one thing you forgot to mention, which could have saved me some time debugging: you need to do "SwitchMode2 1" in Tasmota console. Otherwise automation won't work since it sends "TOGGLE" signal by default, instead of "ON/OFF".
I have realized from watching your videos if you are going to build an item for a single sensor its cheaper to use a sonoff with a cheap extension cord from the dollar store. Definately going to use a sonoff to turn on my power supply for my led lights and then control them from the sonoff. Great videos. thanks for you help.
I was searching for an easy solution to connect sensors to Home Assistant. Aaaaand here it is! Thank you so much for this entertaining tutorial. Like always!
At this point I've Tasmotized several other ESP-based devices, including ESP8266E/F from Electrodragon, a NodeMCU and several othe Node clones. While I'm perfectly capable of simply producing custom code, Tasmota is the easy button for many project. As always, thanks for the excellent content.
Thanks! I've got your 3-way switch method wired up in my maker faire Wall of Sonoffness. I should finally get around to giving it the Zzs treatment soon! You've had 5000 views on that video! Awesome. Have you found any of those other esp boards to be especially useful or unique in any good ways?
Great Video DrZzs. I have learnt a great deal from your Videos and forums. I have just setup my first D1 Mini with DHT11 as the Temp and Humidity Sensor. I have it connected to MQTT and the Console is Reading the Temp and Humidity no problem The problem is getting HA to read the Results of Temp and Humidity. They both show up in States as "unknown" sensor.humidity unknown unit_of_measurement: % friendly_name: Humidity sensor.temperature unknown unit_of_measurement: °C friendly_name: Temperature The Console shows it is reading fine 09:00:34 MQT: tele/sonoff/SENSOR = {"Time":"2019-05-17T09:00:34","DHT11":{"Temperature":13.0,"Humidity":50.0},"TempUnit":"C"} 09:02:00 MQT: tele/sonoff/UPTIME = {"Time":"2019-05-17T09:02:00","Uptime":"0T00:26:40"} What is the Project Name? as per your video, as I think this could be the problem Any idea to help me link to HA? Thanks in Advance :)
Hi DrZzs. I have resolved this issue. I had a naming convention that worked however I changed naming (MQTT Topic) for all devices and now they are all working just fine, including the D1 Mini with Temp and Humidity. Thanks for your reply, I appreciate it greatly. Hope to watch one of your Streams soon :)
Thanks! Been trying to get PIR sensors hardwired to my Pi's GPIO pins going. When I setup the automation in HA, it would turn the lights on when motion detected but then also turn them back off when motion was detected again no matter what I did. Your example is perfect, the "turn the lights off after X" should be another automation that is triggered by the first automation, not one automation with a delay built in like I was doing it. Excellent as always, will be trying this when I get home today... Thanks!
Just got it setup...works perfect. Using these pre-made PIR sensors sired direct to GPIO www.ebay.com/itm/2x-Wired-PIR-Motion-Detector-Infrared-Intrusion-Alarm-Sensor-for-Security-System/332326172160?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m2749.l2649
Love your videos. Wnan I first stumbled upon your channel, I have thought... who is this spooky talking head, but soon realised that you are pretty charismatic character, and your channel is very helpfull. Thank you.
I close on a new house in early April. I already have a few sonoff basics controlling lights, and a low voltage sonoff controlling my garage door in the house we are leaving. Once we get into the new house, my home automation will be kicked into overdrive! I don't know if anyone has requested yet, but can you do a video using sonoff/Tasmota as an infrared remote control for Tv/surround sound? I look forward to your videos on Mondays. Keep up the good work!
Thanks! Actually that sensor kit does have an IR transmitter and receiver! I peeked briefly at the tasmota settings to make it work. I'll put it on the list and get to it eventually. In the mean time, if you want to try it before I get to it, here's the Tasmota Console commands: github.com/arendst/Sonoff-Tasmota/wiki/Commands#irremote I don't know much (yet) about exactly how to setup IR, but I'm sure those commands are the key.
Nice Job, thanks. The reason you need to install the driver is because the various ESP8266 modules have different USB to TTL chips onboard. Common ones are 230X. FTDI, and CH340 each of which requires a driver. Once you install them all, it will largely be transparent from that point forward. Likely though, you will see a different comm port for each. Also, the PIR IS actually a motion sensor. If it were not, any infrared source would trigger the output. The PIR relies on a differential measurement between two sensors and that funky segmented lens to break up the light pattern. When an infrared source is stationary, it remains constant between the two differential receivers, when something is moving, the difference is what triggers the output. i probably did not explain that well, but there are a number of videos out there that do a good job including Bigclive who devoted a video to using PIRs.
Awesome! Thanks! I'll take that NodeMCU question off the things I don't know list now! And thanks for the knowledge on the PIR. I was thinking of it kinda like a line-break sensor, and that's not really what it is at all. I'll have to check out Bigclive's video.
My "Things I don't know list" has turned into something akin to an encyclopedia... Still smaller than my wife's "Things for anthony to do" list... though so that's good...
Thanks so much!! I've been trying to get the temp to show up in HA for weeks now... you pointed out the syntax with DHT11 pointed me in the right place added my SI7021 sensor and bam! it worked... Awesome Videos!
Awesome video ! Didnt know that you can control those sensors out of the box with Tasmota! Will try this ! Keep up the good work ! Greetings from Uruguay!
Just what I was thinking; I've loaded Tasmota on a fair few Sonoffs, but never looked any further than turning a light on and off. The flexibility of Tasmota with a NodeMCU and little to no coding is stunning. Thanks for the information Dr Zzs!
Excellent! Things have gotten better with Tasmota too. I'd suggest just grabbing the sonoff-sensor.bin file and flashing that with the ESPeasy flasher. github.com/arendst/Sonoff-Tasmota/releases github.com/letscontrolit/ESPEasy/releases
DrZzs - It would be really cool to see a D1 Mini replace a old security system. Basically how to confiure the D1 to be the 8 zones a old panel would have. Most houses built in the last 20 years have contact sensors on the doors and windows. One D1 could interface them all to smarthings... for about $5.. really cool
For anyone else who comes here and struggles because this info is out of date, I have the following advice. 1) Use Tasmotizer to send the latest tasmota-sensor.bin file 2) use Tasmotizer "Send Config" button to send WiFi info. You can then connect and setup the module-info or use the same Send Config button to setup MQQT etc.
Hello and thanks so much for this...spend a late evening trying to firgure all of the errors out that I was getting, finally realizing that the instructions were out of date...learned a bunch that way, but still frustrating in the end...until I found your comment here! Thanks so much!!
Nice and informative video. Question - i connected wemos with relay and AC power accessories. i'm able to control but because of no power-backup or whatever reason if there's couple power fluctuations, it wipes out the config from the esp8266. Any ideas, how to avoid it ?
I am using a D1 mini to monitor temp, hum, bar and dew point. It operates from a battery and I need to monitor the analog pin to check the battery charge point. I use Tasmota to set up the chip and see where the analog pin is and have it assigned. My question is how do I get MQTT to see that analog pin and read it? I also need to add the deep sleep mode, on a 1-minute cycle? Thank you in advance.
thanks for the great tutorials... was wondering if you could help. Trying to get a PIR working. but it doesn't seem to update mqtt with the ON/OFF messages when there is movement. Power > 5v GND > GND OUT > D1 on d1 mini (GPIO 5) set to switch2 followed the tutorial but PIR seems to report ON every 5 min and not when there is movement (where am I going wrong) 17:02:08 MQT: tele/sonoff/INFO3 = {"RestartReason":"Software/System restart"} 17:02:08 MQT: stat/sonoff/RESULT = {"Command":"Unknown"} 17:02:16 MQT: tele/sonoff/STATE = {"Time":"2019-04-11T17:02:16","Uptime":"0T00:00:17","Vcc":3.037,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"Wifi":{"AP":1,"SSId":"WiFi","BSSId":"CC:2D:21:0B:BF:C9","Channel":6,"RSSI":72}} 17:02:16 MQT: tele/sonoff/SENSOR = {"Time":"2019-04-11T17:02:16","Switch2":"ON"} 17:02:30 CMD: switchtopic2 pir11 17:02:30 MQT: stat/sonoff/RESULT = {"SwitchTopic":"pir11"} 17:03:33 CMD: SwitchMode2 1 17:03:33 MQT: stat/sonoff/RESULT = {"SwitchMode2":1} 17:07:16 MQT: tele/sonoff/STATE = {"Time":"2019-04-11T17:07:16","Uptime":"0T00:05:17","Vcc":3.016,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"ssid":{"AP":1,"SSId":"ssid","BSSId":"CC:2D:21:0B:BF:C9","Channel":6,"RSSI":100}} 17:07:16 MQT: tele/sonoff/SENSOR = {"Time":"2019-04-11T17:07:16","Switch2":"ON"}
Great video. However note that the D1 mini is not "always in programming mode" like you suggested. The USB serial converter has circuitry in it that will reset the chip and pull GPIO0 down just before the program is sent, placing it in programming mode for you.
Awesome video! I have 2 temperature sensors connected to nodemcu running Tasmota. I get the following MQTT output from it : 03:59:42 MQT: tele/TempBasement1/SENSOR = {"Time":"2018-10-31T03:59:42","AM2301-14":{"Temperature":62.4,"Humidity":72.7},"AM2301-15":{"Temperature":65.5,"Humidity":56.1},"TempUnit":"F"} but when I create a sensor in HA to read in value_template: “{{ value.json.AM2301-14.Temperature }}” it doesn’t show up. When I only have 1 sensor connected and MQTT output is {"Time":"2018-10-31T03:59:42","AM2301":{"Temperature":62.4,"Humidity":72.7},"TempUnit":"F"} and I use “{{ value.json.AM2301.Temperature }}” then it does work just as in your tutorial. Any idea what I am doing wrong?
There's something with tasmota that limits how many sensors of certain types can be connected at the same time. I don't remember the details now but, the details are here: github.com/arendst/Sonoff-Tasmota/wiki/Expanding-Sonoffs and here: github.com/arendst/Sonoff-Tasmota/wiki/Sensor-Configuration
Thanks for the links! I didn’t know it was limited. What’s kinda funny is that Tasmota does output two sensor values on the sensor topic. One is called AM..-12 and the other AM..-14 (seems like the -## is based on the GPIO pin#) but when I use these parameters in HA they don’t get read by HA and my sensors just show blank dash on the dashboard. I figured if I just used the AM..## that the MQTT payload has it would be fine. But when I have one sensor and there is no “-12” or “-14” then it works just like in your tutorial where I just use json.AM2301.Temp... I must be doing something wrong and not reading the MQTT payload correctly or it’s limited to just one sensor output per MQTT message. Thanks again for replying - love your tutorials!
Brilliant Vid. Very informative. Relative noob to home automation and after a frustrating and abortive attempt at OpenHab moved to HA, watched your videos to get set up and all is working fine. Testing a NodeMcu with temp/Hum and a rcwl-0516 sensor using your setup above with Tasmota. Keep up the great work -- Thanks
Brilliant, thank you! That’s saved me so much time. And fantastic delivery... all the facts in an instant.... with a touch of good humour. Off to click a few of your links
Thank you for this great tutorial. I want to automate a phyiscal button press with an CD4066 IC - how can I send HIGH/LOW to GPIO 4 for example? Do I even need a IC for this?
Hi at first sorry about my English. :) I am little bit confused because, when i go back to your video $5 Sonoff + $2 parts = Best Smart Switch EVER! in this project you were using resistor and 33nf tantalum capacitor to proper function of touch button. It this current video you mention and show sonoff basic with humidity sensor (DHT11) and touch button is connect to bat without capacitor an resistor. My question is, this another way ho to connect touch button to sonoff without resistor a capacitor ? Thanks for all what you do. Have a nice day Mirek.
Yo Doc. I know this is old, but did you hook up the HC-SR501 directly to the Sonoff? I see in your video of the Sonoff hookup and the 5v but isn't that 3.3v? In another video, one person went through all kinds of steps to get the 5v. Is it really possible to drive it off the Sonoff? If you set the jumper to no repeat and timer to ~5 minutes, this would make a great walkway lighting combination. Please let me know. - Thanks
I have connected PIR sensor directly to a sonoff and it works great. I used this PIR though (not the 501) - drzzs.com/BruhPIR Can't honestly remember if I connected it to 5v or 3v. I think it was the 3v pin from the flashing pins that I used. Hope that helps. Definitely you should use that PIR from the link instead of the Big'ol 501. I had a lot of trouble with the 501 triggering randomly when it's too close to the ESP8266 chip. Good luck!
Hi, Perhaps you may be interested in this configuration. When the motion sensor is activated, a rule delays its deactivation during the set time (in my case, 30 seconds) to see it active in HA. The second rule invalidates the publication that turns off the connected led strip. SwitchMode 0 SwitchMode2 1 SwitchTopic2 PIR SwitchTopic 0 Rule1 on switch2#state=1 do backlog publish cmnd/PIR/POWER2 ON; RuleTimer1 30 endon on Rules#Timer=1 do publish cmnd/PIR/POWER2 OFF endon Rule2 on switch2#state=0 do publish stat/proyecto1/POWER "" endon Rule1 1 Rule2 1 ;-) Thanks for your work.
I don't understand that "value_json". May be that's the reason, my sensor is working, showing in tasmota page, added to HA with MQTT, but readings not showing in HA. Need help.
I cannot find 2 infos - how to set the LED number (e.g. how many is connected) and how to tell tasmota that I have RGBW leds, not only RGB... Even Tasmota wiki seems to skip anything on addressable leds topic.
Great video but I think the git has changed for the version of the sonoff-tasmota.ino. I can't find that file anywhere with the config settings on it...is there an updated way to do this? thanks
Thanks again for another educational video, I have succesfully tasmotized my D1 mini but cannot get water sensor to be recognised, have tried numerous module configurations to no avail, any ideas? .
thank you, friendly tip about text for in video links, they appear where the youtube gui overlays, so when people pause they can not be read, please paste higher up if possible, or not....thanks again.
Hi, Thank you very much for all the videos. I am learning a lot with them. In the 02:50 minute you say that nodemcu can work with 12v. This is correct? I am using 12v LED strips ( WS2811 ) but I need to lower the voltage to 5v to power the nodemcu controller.
@@DrZzs My NodeMCU boards are clones. I think if I turn it on with 12v they will burn jejeje I don't see references to 12v in the specifications. Thank you very much.
Thanks! If you're planning to do this check out the sonoff-sensors.bin version of tasmota. It's all ready to use a bunch of different sensors. github.com/arendst/Sonoff-Tasmota/releases
Do you know if it's possible to use both a reed switch(magnetic door switch) and a PIR sensor on a D1 mini at the same time? What commands would I use?
Hi, thank's for your video. I have a question: when I sept in tasmota: Generic module to create node mcu with 4 relays they work according to each other. When I turn on one of them, the other goes off. For example: if I turn on the relay 1 while the number 3 is on, the latter goes out as soon as the relay 1 goes ON. Is there any command to give in the console? Thank you
Hallo boss! How can avoid a relay turn off/on after every restart? I have 2 relays set in interlock , but every time the wemos tasmota restarts they will go on together for few than a second.... can you help me?
Thank you @DrZzs for another wonderful tutorial. On my D1 mini, however, I have two problems. Can you please help me with these? (1) When the motion has ceased, the switch doesn't revert to OFF sometimes. It stays stuck on ON until the motion is triggered again, when it toggles. (2) When restarted, the switch begins with OFF. However, when it first senses motion, it still fires OFF and a few seconds later fires ON.
... Any chance you can do a clip showing how to add a DHT22 and say a BME280 to a Sonoff Basic. (I'm planning one DHT22 on one Basic at one location and another BME280 on a 2nd Basic at the 2nd location, only reason for the BME22 is the pressure sensor, would have been nice if there was a Temp/Hum/Pressuree sensor in the packaging of a DHT22
is there a way to setup a relay like the switch like the sonoff. i have a few spare esp01.. but i dont want to power the switch and have cables to the relay. i just want to have power going to the relay like the sonoff.
You can connect a relay to the esp01 and the relay will be separated from the power to the D1mini. Is that what you mean? If you really want to make it like a sonoff where you put 120v to it and then you switch that same 120v circuit, I guess you could do that, but it would be a lot more work and probably cost more than just buying a sonoff. Besides the Esp01 and the Relay you'll also need a 120v to 5v power converter. The PS is almost the price of a Sonoff Basic: www.banggood.com/HLK-PM01-AC-DC-220V-To-5V-Mini-Power-Supply-Module-Intelligent-Household-Switch-Power-Supply-Module-p-1242358.html?p=@K220219381694201802 That's the appeal of the Sonoff. You can't buy the parts and build it yourself for less $. If you still want to do it you'll have to use the 120v to power the PS. You'll tap into the Hot line and send it to the Common pole of the relay, then a wire from the NO pole to the lights or whatever you want to switch. The neutral will also go to the PS, but then also continue on to the lights you're switching. Then with ps you can power the esp01. The ESP01 might need 3.3v instead of 5v so you'd need either a 120v to 3.3v ps or another buck converter to drop the voltage from 5v to 3.3v. The relay will need a supply of 5v in addition to the ground and the control wire from whichever pin you use from the ESP chip. Hope that helps. Good luck.
can't seem to get my PIR up and running 1. I I select "switch3" because the PIR is on D7 and I have relays on relay1 and relay2 2. after save and restart , in console I ran this command "switchtopic3 saraiyh motion" 3 . I added the binary sensor in my yaml file: binary_sensor: - platform: mqtt state_topic: "cmnd/Saraiyh_Motion/POWER3" name: "Saraiyh Motion" device_class: motion 4. I name the topic: "Saraiyh_Motion" 5. in the console when I move I can see this "19:56:52 MQT: cmnd/Saraiyh_Motion/POWER3 = TOGGLE" however, the minary sensor does not do nothing, what am I missing
I just tried "stat/Saraiyh_Motion/POWER3" and the sensor has an error .. it disappeared 21:08:24 MQT: cmnd/Saraiyh_Motion/POWER3 = OFF 21:08:24 MQT: cmnd/Saraiyh_Motion/POWER3 = ON 21:08:25 MQT: cmnd/Saraiyh_Motion/POWER3 = OFF 21:08:25 MQT: cmnd/Saraiyh_Motion/POWER3 = ON 21:08:26 MQT: cmnd/Saraiyh_Motion/POWER3 = OFF
your video show you connect the data line of the temperature sensor to pin D4 but on the Tasmota Configuration screen you choose the "D2 GPI04". Confuse which one is it? Another problem I have is my temperature sensor is DHT22 and is not listed so what can I use? How often is the temperature updated? Can we change the setting?
I must have changed my mind at some point. I don't think it makes much difference where you put the sensor. Some of the pins have specific functions and you'll get errors if you try to use them, but it won't damage anything. If you connect something to a pin and it doesn't work, just change it to a different pin and try again. And there is only one choice for the Temp DHT sensors. Choose the AM2301.
I'm trying to flash TASMOTA onto a D1 Mini Lite version, and I keep getting the error: "WPS_is_unavailable_in_this_configuration__Please_check_FAQ_or_board_generator_tool" I checked in the user_config.h file, and tried every possible option that DIDN'T involve use of WPS in the WIFI_CONFIG_TOOL section, but that's apparently not the issue. Any ideas? I'm about ready to give up on this thing. :/
ya, there were some troubles with different board managers and such so I've stopped compiling it myself. I just use "sonoff.bin" from the Tasmota github and avoid all those problems. Glad you got it working!
I wanted to be able to flash all of my configuration settings (Wifi SSID/Password, MQTT server address and creds, etc). I've never flashed a BIN file to these boards before, and I'm on a Mac, so I wasn't sure where to start with software with that. I could PROBABLY do it from the terminal, but I'd also have to go dig out a UART module out of the empire of dirt, and only God knows where any of those are at the moment. So I opted to rip out some more of my quickly vanishing hair, and just mess with it until I finally got it working. :D Jumped the gun on asking on the youtube comments. ;)
Hello DrZZs, all your video are awesome and I learn a lot with them. I use this video to create some temperature and humidity sensor over the house with some wemo d1 mini with tasmota and some DHT11, they all work nicely and home assistant integration too. The issue I have is, after sometime my wemo stop read the both value and the only way to make it read again is to remove the power and plug it back. After that it work for a while until I have to do it again. A soft restart do not work. Can you help? Thank you again for your good work
bummer. I don't know what to do about that. I guess I'd try to automate a hard reset perhaps by using a wifi smart plug for the power supply going to the D1mini. I've done that with my PiZero Cameras that need a hard restart every so often. Not a very elegant solution, but it works.
I am using the sk2812rgbw leds. I added the light entry as you posted but I am not getting the color picker? Not sure where to start to troubleshoot this.
hmmm. Show me what you have in your lights entry. I didn't get it at first, but once I added: rgb_state_topic: "stat/D1mini01/color" rgb_command_topic: "cmnd/D1mini01/color" it showed up. What version of Home Assistant are you running? I know they've had that color wheel there for a long time, so I doubt having an older version is the issue, but it could be. It only shows up when the lights are on though. Silly, but I guess make sure they're on then click the bulb and it should be there. I'll see if I can think of any other reason it wouldn't work...
Thank you for the tutorial. I'm having some issues by trying to connect a PIR and a DHT11 to a Tasmotized sonnof basic. When I connect the sensors individually they work fine but if I connect both only the DHT works. I'm running the last updated version of home assistant (0.115.4), the PIR is connected to GPIO3 and the DHT to GPIO1. I only added these lines to the binary_sensor.yaml: - platform: mqtt state_topic: cmnd/NewPir01/POWER2 name: R3 PIR device_class: motion Any lead? I out of options. Thank you in advance H.
@@DrZzs Actually I erased everything and only applied these two rules: rule 1 on switch2#state do publish Prueba/PIR/state %value% endon and rule 2 on switch2#state=1 do backlog power1 on; ruletimer1 30 endon on rules#timer=1 do power1 off endon also I've generated a binary sensor like this: - platform: mqtt name: "PIR Motion" state_topic: "Prueba/PIR/state" qos: 1 payload_on: "1" payload_off: "0" payload_available: "Online" payload_not_available: "Offline" device_class: motion That lets me show the PIR into HA, and it works very well... but as soon as I connect the DHT11 the PIR system stopped working. By the way, I didn't introduce a single line of code for the DHT11, it worked automatically. I've tried to change the SerialLog from 2 to 0 but I've got any change
@@DrZzs I made a cross-check of console log by restarting the unit with and without the DHT11, and I found these three lines are executed at the very beggining of the boot ONLY when DHT11 is NOT connect: 00:00:02 RUL: SWITCH2#STATE performs "publish Prueba/PIR/state 0" 00:00:02 RSL: Prueba/PIR/state = 0 00:00:02 RSL: stat/Prueba/PIR/SWITCH2 = {"STATE":"OFF"} Any clue how make them run also with the DHT11 connected?
Thanks for the great Video. Question: I have also a DHT 11 Sensor on a Sonoff or on a D1 mini. In both application I cannot red the Temperature in nodered. I can see the temperature in Tasmota. Do you have any idea?
Jakob Mo I know very little about node red. I just barely installed it myself. Are you using Home Assistant also? Or just Node Red? I’d say check Home Assistant and see if the temp is showing up there. Just to narrow down where the problem might be. I’d start by looking at the way node red handles payloads with multiple values. That’s what got me hung up with Home Assistant. So I can’t say more specifically what might be happening since I don’t know Node Red much at all.
Another question re: home assistant. Been using a PI3 since the day it came out, it seems to be bogging down in my new house. What is your opinion on using a dedicated pc instead of the pi?
I've only every used HA on a pi3. I haven't had any problems, but I don't think I'm asking it to work very hard. I know a lot of people use different hardware. Some real high-end users use a NUC. amzn.to/2DQx6uh That seems a little extreme to me, but they swear it's the best. I guess if money wasn't a factor I'd do something like that too. If you do change hardware you'll have to use some other installation besides hassio. home-assistant.io/docs/installation/ That introduces a lot more potential issues and things you'll have to figure out how to get working. Hassio's add-on system makes things so easy. If you're a "computer guy" then using a different install method might not be an issue. They just came out with a new pi3b+. Should be a little more powerful. Don't know if the current hassio image is 100% compatible with it yet. That's my opinion for what it's worth :) Let me know what you decide to do and how it turns out!
Can these be used to zone area around the home to work with a smart thermostats (nest) and home assistant ? If any one has done this please let me know thank you.
thanks I don't know about that specific app, but for Home Assistant the sensor entry looks something like this: Sensor: - platform: mqtt state_topic: 'tele/masterBR/SENSOR' name: 'Master Bedroom Temp' #AM2301 unit_of_measurement: '°F' value_template: '{{ value_json.AM2301.Temperature -2 }}' Hope that helps.
I have followed your steps but for some reason when I opened my arduino soft ware it does not have the multiple tabs like yours does. I have tried to find where I went wrong but I cannot seems to get to the right location. It seems that when I open the Arduino software it is just that, mean it does not say sonoff like yours does at the top. I feel like I need to open a file to work in but I cannot find sonoff.ino??
I'd recommend not using Arduino IDE anymore. There's an easier way to put Tasmota on any device. Use FlashEZ and Sonoff.bin: th-cam.com/video/KMiP9Ku71To/w-d-xo.html
Hey Dr Zzzzz, great video - I'd love you to add another video to your suite.... hassio on main system, and a second raspi with the usb stick. Have the second raspberry not have hassio on it, but raspbian (or other unix), and just the usb stick for something like zigbee and/or z-wave (or both). Then connect it to the main hassio system through mqtt. That is what I want to do, as I have a network connected from my office to main house (separate buildings, same lan) with devices in both. Thoughts? Could you do this?
Curious if you know a way to use multiple ds18b20 temp probes on the same one wire bus and get them to publish two unique MQTT topics. Any pointers on how to do that with tasmota?
DrZzs wow-super speedy response! Didn’t even see it until now. Is there a dr zzz Facebook or something where it’s easier to continue conversations that can help everyone in one spot?
Hi there your videos have got me hooked to Tasmota and Sonoff! Can I use the D1 mini and Tasmota to switch on and off 2 contacts ? Say I would want to use it to send a momentary on off pulse to an appliance switch ?
you sure can. I'm working on a project using a D1 with relays. One issue I've found so far is that the voltage output on the D1 GPIO pins is only 3.3v. That might not be enough to trigger the relay. I've got mine traveling some distance between the D1 and the relay, so the voltage drops even more. I bought a logic level shifter to boost the voltage of the signal to 5v, which should be enough. They just arrived so I haven't tried it yet. I'd say try it without the level shifter and hopefully it'll work if you aren't losing voltage over distance like I am. If you find the relay isn't triggering with the 3.3v try one of these: amzn.to/2r8gvxw Hope that helps!
This is fantastic doctor! I got sensors out the wazoo. There is a wifi repeater project on github that is pretty dope too. Do you know whether it is possible to track people based on the wifi/bluetooth beacons emitted by their phones? I would like to be notified of my neighbor's comings and goings. Not for any nefarious reasons. Sometimes they don't answer their door when I knock. This way I can announce, "I know you're home, I want to finish our discussion about home automation!" If you could point me in the right direction, that would be great. Thanks for vids
Since separate power supply, can I connect to WS2811 strip lights that use 12v power instead? Thanks for answer all my questions.. I am newbie. I plan to get back to Hass.io setup.
You can not power the d1mini from 12v. It will die. So if you have 12v lights you'll need a source of 5v for the D1mini. That can be a buck converter to change the 12v to 5v, or a separate 5v ps. The grounds need to be connected.
Great Video. Thanks Question: I have two Switches on the Sonoff. For one switch I get the Status of the switch via MQTT but not for the Second switch. Do you also have a solution so I can read two different Switches via MQTT? Thanks Jakob
Thanks Go to the Console in Tasmota, then click the second switch. You should see a couple lines pop up on the console. the one that starts with "stat" will be the "topic" for the state of that switch. It will probably be something like: "stat/sonoff/POWER2" Hope that helps
Thanks, I tried this already and defined a second switch in the Console. If I press the second button I get the same Mqtt Info from the two Button. Any idea?
Hey DrZzs, huge compliment on this and your other videos. I enjoy them very much and learnt a lot from them already. But now, I am afraid, I am stuck trying to use my WS2812 with Tasmota on a Wemos d1 mini. After I flashed the d1 mini, I set the module to Generic and set the corresponding pin to “07 WS2812”. After a reboot I got the on off button and the slider but unfortunately I am not able to control the LEDs. As soon as the d1 mini powers up all LEDs turn on on full bright white and I am not able to change it. I checked the connections, replaced wires, used another d1 mini, used a different LED strip with only 2 LEDs, powered the LEDs with an external power supply (connecting grounds), re-flashed it… no success. I am running out of ideas, any help would be appreciated. Thank you
Thanks! man, that sounds like you tried everything so far. What other info can you give me? Maybe some images of your connections and screenshots from tasmota. For easier chatting head to discord. We have a channel for LEDs too. There may be others there that can help. discord.gg/8gvF67h I'm sure we can get it working.
Thanks for the quick reply. Much appreciated. Was hoping you came across this very problem before. I am heading out of town for a couple of days now but as soon as I am back I am going to start from scratch. Hope you or the guys at discord can point me in the right direction. Cheers
@@tb8756 Did you ever get this sorted out? I am running into the same exact thing. I also tried using the same version of Tasmota as in the video and still have all white LEDs.
@@tb8756 I finally got it working!!! I had to uncomment the line that says "#define USE_WS2812_DMA" in the my_user_config.h file and then hookup my data line to the pin labeled RX on the d1 mini (GPIO3). Good luck.
@@DrZzs i believe you had no problems because you use sensors with additional smd elements on the sensor's board. i have dht22 with no board, just white piece of plastic with 4 legs, so pullup is required in my case
I am not able to get the motion sensor to work from your instruction. The Tasmota console show: "cmnd/pir2/POWER2 = TOGGLE" repeatly each time detect motion. But on the Hassio the human stick figure does not move show motion. I double check the codes several times. Set Binary sensor. Can I set it like a status show motion. Only thing not work is this motion sensor. What did I do wrong?
I finally get it to work. You forgot to mention need to execute command: Switchmode2 1 so it will toggle On and OFF. Now I need to figure out the command to delay the PIR switch for a few seconds. Any idea.
Glad you got it working. Sorry for the missed command. If you have the 501 PIR there are some adjustable pots on the board that control sensitivity and retriggering. There is also a jumper that can be moved too, but I don't remember exactly what it does. Here's some info on the adjustments you can make. learn.adafruit.com/pir-passive-infrared-proximity-motion-sensor/testing-a-pir
I use this AM312 PIR Sensor have better review smaller but on adjustment what so ever. I though on the Tasmota command you can set the delay on hold in seconds before turn back off similar to switching. Since I begin follow and watch your videos, you now are experts and not longer amateur in Sonoff and Hassio knowledges.
I'd recommend not using the Arduino IDE anymore. I'd go with the pre-compiled binary of tasmota instead. th-cam.com/video/KMiP9Ku71To/w-d-xo.html Much easier and much less likely to have errors in the process. Good luck
I'm having a tough time figuring out the answer to what I'm trying to do (similar to the video). I have a momentary push button switch and a PIR sensor attached to two different sensors as switches. Even though one is switch1 and other is switch2, they send the same mqtt topic (because "SwitchMode" changes it for all switched) and they both ending up switching the same Sonoff Basic relay. Any workaround for this?
I think for Switch2 to not switch Relay1 you have to set some other pin as Relay2. I'm not 100% sure about that, but someone else had a similar issue recently and I think that was how he solved it. Let me know if it works or not.
Yes, setting a matching Relay2 on one of the GPIO's doesn't toggle the main relay anymore! Thanks! The only caveat is that switching on Relay2 (or any relay) still toggles the onboard led. That's a problem for me because I planned to attach the led on the pushbutton to the GPIO13 pin on led and any of the GND. This would give me the inverse light on pushbutton so that when the light is off, the button is lit (and it also provides all blinking indications if something is wrong on sonoff). Now, with the Relay2 turning on the led, it turns off the button led. So right when someone comes close to want to turn on the light, it makes it invisible in the dark. New idea (using your suggestion) is to connect the pushbutton to Switch2 and the pushbutton led to Relay2. The effect is very cool because now the led only turns on for a few seconds when someone gets close to the light switch. The only downside is that I will not be able to see flickering lights on pushbutton if there is a network issue or something else wrong with the sonoff.
Eugene Pugach for sure! There are commands that change what the onboard LED does github.com/arendst/Sonoff-Tasmota/wiki/Commands LedPower and LedState. I haven’t messed with it but you might find a setting there that you like better.
The best I got was to use SwitchMode2 2 so that onboard led is always on and the pushbutton is only on when PIR is triggered >> community.home-assistant.io/t/light-switch-with-led-push-button-and-a-pir-sensor-on-sonoff-basic/57669
Hello DrZzs, First of all many many thanks for your tutorial which is very useful to me for making home automation. I have made 3 switches with basic sonoff with flashing tasmota and it's working very well. thanks again. Than I Flash tasmota on NodMCU and controlling 4 relay board, Its works but there is little problem. When I trigger, It works opposite, means when I turning ON my relay goes OFF and When I turning OFF it goes ON. So Please help me to solve this problem. My tasmota settings are below. Module type is 18.Generic D6 GPIO12 Relay1 - Relay 01 D7 GPIO13 Led1i - Relay 02 D5 GPIO14 Sensor - Relay 03 D8 GPIO15 - Relay 04 It will be very helpful to me if you can solve this problem. Sorry for my English. Thanks,
Thanks, that was some good info. I just went to copy everything over to the Arduino IDE and am having some issues. The files for tasmota changed (name wise), running into a wall at the moment.
Hi Doc! Thanks for you videos! I'm traying to flash a NodeMCU, but I can't get the extra driver turns the com port visible on Arduino software. The extra driver is installed. Any ideas?
DrZzs I could only add 4 switches on the tasmota generic type module, even having many GPIOS pins available. I couldn't read from mqtt other options in GPIOs assignment (button, relay, leds, etc) when calling Status 8 or 10 on the Console. Is that right? Maybe I shoud try the "konnected" software on my NodeMCU to control doors magnet sensors....
that has been the case, there's a max of 4 switches assignable through Tasmota. I read a post on the github that they were going to expand it, but I don't know which version that was planned for. It might not be out yet. Have you tried using the Button option? I don't know if it would work the same, but it might.
Not that I can think of right now. I know you can get analog input on the Ao pin, but what exactly the gas meter is outputting and how the D1mini/Tasmota would interpret that I can't really say.
is it possible to configure tasmota firmware wifi to an access point only so for instance i want to install in my car and access tasmota from my android device i dont want to connect to a router ?
absolutely. When you configure the wifi setup in Tasmota, just use the wifi SSID and PW of just your andriod hot-spot and don't put the one for your home wifi. You can put 2 SSID's in to Tasmota so if it can't connect to one it will connect to the other. Just in case you want it to be able to connect to both sometimes.
Hi DrZzs, I have 8 of these running to monitor refrigerators at my business to text me if one gets to warm. I'm having an issue and wonder if you have seen it before. After between 12 hours and about a week at best some of the dht22 stop sending. If I unplug just the power to the sensor and plug it back it in it instantly works again. I've searched and have seen this to be an issue for years but I can't find a solution. The second issue is when it does stop sending HA still shows the last temp it was at until I restart HA then it's a "-" Do you know what kind of code I would have to add to the .yaml file to make it default to something like 99 if it doesn't get a signal for x number of seconds? I've tried playing with "If" statements but can't figure it out.
oh man. that sucks. I didn't know the DHT22's were so unreliable. Just a thought, but do you think a reboot of the D1mini every day or so would fix that data-freeze? As for getting HA to report something else, I'm sure there's a way with an automation and I could give it a try but I'm not sure I'd have the right fix. Have you brought it up in the Home Assistant Discord channel? Try there and see if someone there has a sure fix. If not, let me know and I'll see what I can come up with.
Thanks for the reply. I tried the reboot but it won't work. You either have to disconnect the power from the D1 or the sensor to make it work. I'll try the Discord next for the other issue. I would just use DHT11's that are more reliable but they won't work for a freezer. I may end up just using a better sensor. I've heard the SHT31 is better.
@@DrZzs A couple months ago I did end up changing out 6 of the sensors to SHT31's and I have not had any more sensors issues. So only 2 out of 8 DHT22 still work. Not a good investment even if they are half the price. Maybe it was just the supplier I got them from or they just all suck. I'll never know because I'm not buying them again.
Love how you edit your videos down so they are really tight but still have all the information you need. I can't stand the TH-camrs who ramble on for ages and all you want is one piece of information buried in the waffle somewhere!
Thank you!!!
That's exactly why I do it this way. I figure you want to get through it fast and decide if the stuff you need is there. If it is, you can rewind, pause, rewatch and get what you came for.
Thanks for that feed back! I'll keep doing it!
Good point, I agree. I also like how all the needed links are labeled and posted in the video description.
I did not found nowhere else how to pull temp and humidity separately with this json. 1 day searching. You helped Enormously.
Awesome! Glad to help!
In 10 minutes you presented 10 times more information than most 20 minute videos manage to do. Thanks!
haha!
Good! That's the hope.
I've slowed it down a little lately. I had some feedback that I was going too fast.
Glad to help!
I’m not complaining - you can always pause, google, review.
OMG soooooo entertaining. No "blah-blah" no wasted time, no "droning" Thank you so much.
3 years later,
You are still the Best one for Tasmota 👍👍
Crazy thing happened today. A couple hours after this video posted I was happily replying to every comment, like I always do, when for some crazy reason TH-cam stopped accepting my comments. I looked in the creator forums and best I can determine I exceeded some max for commenting in a period of time!
What kinda craziness is that! I wouldn’t have guess there’d be a limit to how much I can comment on my own videos!
Anyway, sorry I didn’t reply to everyone who commented as quickly as I usually do. I’ll go back and catch up on the comments I missed during my TH-cam time-out.
Thanks for your support!
Probably some sort of misguided spam filter as you surmised.
Just glad it's finally fixed.
I wasn't getting notice of new comments during that time either. I was really in TH-cam jail for a day.
it's a little odd too, because I think I've made more comments today than I did before my "time-out" yesterday. oh well.
Is that because you are some sort of robot? dun dun dun truth comes out!!
they're finally on to me! I'll have to change my profile pic:
www.dropbox.com/s/9u7i6frgu909zay/picardborg.jpg?dl=0
Great video, thanks. Regarding the PIR switch, there is just one thing you forgot to mention, which could have saved me some time debugging: you need to do "SwitchMode2 1" in Tasmota console. Otherwise automation won't work since it sends "TOGGLE" signal by default, instead of "ON/OFF".
Oops. Don't know how I missed that. Thanks for bringing it up so others don't get hung up by it.
I lost so much time looking for the answer, thank you!!!
i just tried this and it still toggles the relay hmmmm
thank you, it helped
thank you for your info!
This is by far the best home automation youtube channel I have come across. You've helped my home become a lot smarter. Keep up the great work!
Wow!
Thanks!
I have realized from watching your videos if you are going to build an item for a single sensor its cheaper to use a sonoff with a cheap extension cord from the dollar store.
Definately going to use a sonoff to turn on my power supply for my led lights and then control them from the sonoff.
Great videos. thanks for you help.
Awesome! That would be a good use for it. I've been using Tasmota to control RGB LEDs for my Maker Faire display. Works great.
the affiliate links are cool and all but you need a patreon. You are worth it.
Bill Mears Thanks man. I’ll get working on that. I appreciate the feedback. Makes me feel good.
I was searching for an easy solution to connect sensors to Home Assistant. Aaaaand here it is! Thank you so much for this entertaining tutorial. Like always!
same here, i had been wondering if i could connect a sht21 to a nodemcu and now it looks like i can
At this point I've Tasmotized several other ESP-based devices, including ESP8266E/F from Electrodragon, a NodeMCU and several othe Node clones. While I'm perfectly capable of simply producing custom code, Tasmota is the easy button for many project. As always, thanks for the excellent content.
Thanks!
I've got your 3-way switch method wired up in my maker faire Wall of Sonoffness. I should finally get around to giving it the Zzs treatment soon! You've had 5000 views on that video! Awesome.
Have you found any of those other esp boards to be especially useful or unique in any good ways?
Great Video DrZzs. I have learnt a great deal from your Videos and forums. I have just setup my first D1 Mini with DHT11 as the Temp and Humidity Sensor. I have it connected to MQTT and the Console is Reading the Temp and Humidity no problem
The problem is getting HA to read the Results of Temp and Humidity. They both show up in States as "unknown"
sensor.humidity unknown unit_of_measurement: %
friendly_name: Humidity
sensor.temperature unknown unit_of_measurement: °C
friendly_name: Temperature
The Console shows it is reading fine
09:00:34 MQT: tele/sonoff/SENSOR = {"Time":"2019-05-17T09:00:34","DHT11":{"Temperature":13.0,"Humidity":50.0},"TempUnit":"C"}
09:02:00 MQT: tele/sonoff/UPTIME = {"Time":"2019-05-17T09:02:00","Uptime":"0T00:26:40"}
What is the Project Name? as per your video, as I think this could be the problem
Any idea to help me link to HA?
Thanks in Advance :)
what do you have in your configuration.yaml? My guess is the topic for yours is different from my example.
Hi DrZzs. I have resolved this issue. I had a naming convention that worked however I changed naming (MQTT Topic) for all devices and now they are all working just fine, including the D1 Mini with Temp and Humidity. Thanks for your reply, I appreciate it greatly. Hope to watch one of your Streams soon :)
Thanks! Been trying to get PIR sensors hardwired to my Pi's GPIO pins going. When I setup the automation in HA, it would turn the lights on when motion detected but then also turn them back off when motion was detected again no matter what I did. Your example is perfect, the "turn the lights off after X" should be another automation that is triggered by the first automation, not one automation with a delay built in like I was doing it. Excellent as always, will be trying this when I get home today... Thanks!
Sweet!
Mine's working like a charm. I'm going to have to add PIR's to some of my Zzonoffs now too!
Just got it setup...works perfect. Using these pre-made PIR sensors sired direct to GPIO www.ebay.com/itm/2x-Wired-PIR-Motion-Detector-Infrared-Intrusion-Alarm-Sensor-for-Security-System/332326172160?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2060353.m2749.l2649
@Joe Blow That's what I had to do too. Just crazy to me, but it works!
Very cool that you mentioned Theo Arends. I fully agree that he has done an amazing job.
And ty for yet another great video!
(Liked & subscribed)
Thanks!
I hope to meet that guy someday.
It’s funny but I miss such tutorial videos.. Live streams are great but this also had its own charm.
Love your videos. Wnan I first stumbled upon your channel, I have thought... who is this spooky talking head, but soon realised that you are pretty charismatic character, and your channel is very helpfull. Thank you.
Awesome as usual. Can't wait to try it out as soon as I get off the beach here in Florida for spring break.
Oh man. Totally jealous. At least we're having a nice early spring here in UT.
Let me know how it goes!
I close on a new house in early April. I already have a few sonoff basics controlling lights, and a low voltage sonoff controlling my garage door in the house we are leaving. Once we get into the new house, my home automation will be kicked into overdrive! I don't know if anyone has requested yet, but can you do a video using sonoff/Tasmota as an infrared remote control for Tv/surround sound? I look forward to your videos on Mondays. Keep up the good work!
Thanks!
Actually that sensor kit does have an IR transmitter and receiver!
I peeked briefly at the tasmota settings to make it work. I'll put it on the list and get to it eventually. In the mean time, if you want to try it before I get to it, here's the Tasmota Console commands:
github.com/arendst/Sonoff-Tasmota/wiki/Commands#irremote
I don't know much (yet) about exactly how to setup IR, but I'm sure those commands are the key.
Nice Job, thanks. The reason you need to install the driver is because the various ESP8266 modules have different USB to TTL chips onboard. Common ones are 230X. FTDI, and CH340 each of which requires a driver. Once you install them all, it will largely be transparent from that point forward. Likely though, you will see a different comm port for each. Also, the PIR IS actually a motion sensor. If it were not, any infrared source would trigger the output. The PIR relies on a differential measurement between two sensors and that funky segmented lens to break up the light pattern. When an infrared source is stationary, it remains constant between the two differential receivers, when something is moving, the difference is what triggers the output. i probably did not explain that well, but there are a number of videos out there that do a good job including Bigclive who devoted a video to using PIRs.
Awesome! Thanks!
I'll take that NodeMCU question off the things I don't know list now!
And thanks for the knowledge on the PIR. I was thinking of it kinda like a line-break sensor, and that's not really what it is at all. I'll have to check out Bigclive's video.
My "Things I don't know list" has turned into something akin to an encyclopedia... Still smaller than my wife's "Things for anthony to do" list... though so that's good...
hahaha!
Thanks so much!! I've been trying to get the temp to show up in HA for weeks now... you pointed out the syntax with DHT11 pointed me in the right place added my SI7021 sensor and bam! it worked... Awesome Videos!
sweet!!
Awesome video ! Didnt know that you can control those sensors out of the box with Tasmota! Will try this ! Keep up the good work ! Greetings from Uruguay!
Uruguay Cool!
Another pin in my map!
Just what I was thinking; I've loaded Tasmota on a fair few Sonoffs, but never looked any further than turning a light on and off. The flexibility of Tasmota with a NodeMCU and little to no coding is stunning. Thanks for the information Dr Zzs!
you're welcome!
So true! Tasmota is amazingly capable. I'm still finding new things it can do. Theo is a First Class Genius!
thanks - had to adjust json in my case to am2302 which it now works like a charm!
Thanks a lot for this Video. Watched it a few times now, rewinded, watched the steps i needed again. Go on like this! That's cool!
Excellent!
Things have gotten better with Tasmota too. I'd suggest just grabbing the sonoff-sensor.bin file and flashing that with the ESPeasy flasher.
github.com/arendst/Sonoff-Tasmota/releases
github.com/letscontrolit/ESPEasy/releases
DrZzs - It would be really cool to see a D1 Mini replace a old security system. Basically how to confiure the D1 to be the 8 zones a old panel would have. Most houses built in the last 20 years have contact sensors on the doors and windows. One D1 could interface them all to smarthings... for about $5.. really cool
For anyone else who comes here and struggles because this info is out of date, I have the following advice. 1) Use Tasmotizer to send the latest tasmota-sensor.bin file 2) use Tasmotizer "Send Config" button to send WiFi info. You can then connect and setup the module-info or use the same Send Config button to setup MQQT etc.
Hello and thanks so much for this...spend a late evening trying to firgure all of the errors out that I was getting, finally realizing that the instructions were out of date...learned a bunch that way, but still frustrating in the end...until I found your comment here! Thanks so much!!
Great video! Just been doing this myself and you have just resolved/answered questions I had. Thanks from me in the UK
Awesome!
Someday I'll visit the Mother Land!
Where you live looks like the place I would want to live. We call mountains what you call a bump in the road.
ha!
it's a beautiful place for sure. I live in Utah. South of Salt Lake City. The town we're in used to be called Mountainville.
You're awesome!
Thanks for all the time and effort you've put into making this video.
Nice and informative video.
Question - i connected wemos with relay and AC power accessories. i'm able to control but because of no power-backup or whatever reason if there's couple power fluctuations, it wipes out the config from the esp8266.
Any ideas, how to avoid it ?
Hi. Great video. I was wondering if I could use a MMwave sensor indstead of the Pir?
I am using a D1 mini to monitor temp, hum, bar and dew point. It operates from a battery and I need to monitor the analog pin to check the battery charge point. I use Tasmota to set up the chip and see where the analog pin is and have it assigned. My question is how do I get MQTT to see that analog pin and read it?
I also need to add the deep sleep mode, on a 1-minute cycle? Thank you in advance.
thanks for the great tutorials... was wondering if you could help. Trying to get a PIR working. but it doesn't seem to update mqtt with the ON/OFF messages when there is movement.
Power > 5v
GND > GND
OUT > D1 on d1 mini (GPIO 5) set to switch2
followed the tutorial
but PIR seems to report ON every 5 min and not when there is movement (where am I going wrong)
17:02:08 MQT: tele/sonoff/INFO3 = {"RestartReason":"Software/System restart"}
17:02:08 MQT: stat/sonoff/RESULT = {"Command":"Unknown"}
17:02:16 MQT: tele/sonoff/STATE = {"Time":"2019-04-11T17:02:16","Uptime":"0T00:00:17","Vcc":3.037,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"Wifi":{"AP":1,"SSId":"WiFi","BSSId":"CC:2D:21:0B:BF:C9","Channel":6,"RSSI":72}}
17:02:16 MQT: tele/sonoff/SENSOR = {"Time":"2019-04-11T17:02:16","Switch2":"ON"}
17:02:30 CMD: switchtopic2 pir11
17:02:30 MQT: stat/sonoff/RESULT = {"SwitchTopic":"pir11"}
17:03:33 CMD: SwitchMode2 1
17:03:33 MQT: stat/sonoff/RESULT = {"SwitchMode2":1}
17:07:16 MQT: tele/sonoff/STATE = {"Time":"2019-04-11T17:07:16","Uptime":"0T00:05:17","Vcc":3.016,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"ssid":{"AP":1,"SSId":"ssid","BSSId":"CC:2D:21:0B:BF:C9","Channel":6,"RSSI":100}}
17:07:16 MQT: tele/sonoff/SENSOR = {"Time":"2019-04-11T17:07:16","Switch2":"ON"}
it seems you have your SwitchTopic set to pir11, but not SwitchTopic2. So maybe try adjusting that
@@jrigvd7291 cool, will try it... In the end i ended up going with ESPhome and had to buy new PIR, and it works...
Great video. However note that the D1 mini is not "always in programming mode" like you suggested. The USB serial converter has circuitry in it that will reset the chip and pull GPIO0 down just before the program is sent, placing it in programming mode for you.
excellent! Thanks for clarifying.
I learned something new too!
Hello, thanks fot the tutorial, Could you help me with one doubt?: It`s possible to conect PIR sensor directly i the sonoff? Thanks in advance.
Awesome video!
I have 2 temperature sensors connected to nodemcu running Tasmota. I get the following MQTT output from it :
03:59:42 MQT: tele/TempBasement1/SENSOR = {"Time":"2018-10-31T03:59:42","AM2301-14":{"Temperature":62.4,"Humidity":72.7},"AM2301-15":{"Temperature":65.5,"Humidity":56.1},"TempUnit":"F"}
but when I create a sensor in HA to read in value_template:
“{{ value.json.AM2301-14.Temperature }}”
it doesn’t show up. When I only have 1 sensor connected and MQTT output is
{"Time":"2018-10-31T03:59:42","AM2301":{"Temperature":62.4,"Humidity":72.7},"TempUnit":"F"}
and I use
“{{ value.json.AM2301.Temperature }}”
then it does work just as in your tutorial. Any idea what I am doing wrong?
There's something with tasmota that limits how many sensors of certain types can be connected at the same time. I don't remember the details now but, the details are here:
github.com/arendst/Sonoff-Tasmota/wiki/Expanding-Sonoffs
and here:
github.com/arendst/Sonoff-Tasmota/wiki/Sensor-Configuration
Thanks for the links! I didn’t know it was limited. What’s kinda funny is that Tasmota does output two sensor values on the sensor topic. One is called AM..-12 and the other AM..-14 (seems like the -## is based on the GPIO pin#) but when I use these parameters in HA they don’t get read by HA and my sensors just show blank dash on the dashboard. I figured if I just used the AM..## that the MQTT payload has it would be fine. But when I have one sensor and there is no “-12” or “-14” then it works just like in your tutorial where I just use json.AM2301.Temp... I must be doing something wrong and not reading the MQTT payload correctly or it’s limited to just one sensor output per MQTT message. Thanks again for replying - love your tutorials!
Does tasmota support external RTC on esp8266? I would like to build a tasmota rtc relay timer that i can use offline at my woods cabin oft 12V
Brilliant Vid. Very informative. Relative noob to home automation and after a frustrating and abortive attempt at OpenHab moved to HA, watched your videos to get set up and all is working fine. Testing a NodeMcu with temp/Hum and a rcwl-0516 sensor using your setup above with Tasmota.
Keep up the great work -- Thanks
sweet!
welcome to Home Assistant!
Brilliant, thank you! That’s saved me so much time. And fantastic delivery... all the facts in an instant.... with a touch of good humour. Off to click a few of your links
Thanks! I try to be accurate and concise. More to come!
Thank you for this great tutorial. I want to automate a phyiscal button press with an CD4066 IC - how can I send HIGH/LOW to GPIO 4 for example? Do I even need a IC for this?
Lost you about 2:00 time, my sonoff.ino files look different. and I cannot follow you to the user.h as I am Win user... .any hint ? Thx
Use tazmotizer saves all the setup steps
Hi at first sorry about my English. :) I am little bit confused because, when i go back to your video $5 Sonoff + $2 parts = Best Smart Switch EVER! in this project you were using resistor and 33nf tantalum capacitor to proper function of touch button. It this current video you mention and show sonoff basic with humidity sensor (DHT11) and touch button is connect to bat without capacitor an resistor. My question is, this another way ho to connect touch button to sonoff without resistor a capacitor ? Thanks for all what you do. Have a nice day Mirek.
Waw, really good video and well documented. Congratulations !
Thanks!
Another good video Justin! Now lets put all of this together and make a sensor node on the cheap.
Thanks Andy!
I want to fill all 11 of those D1 GPIO pins. Make a real Frankensensor!
Yo Doc. I know this is old, but did you hook up the HC-SR501 directly to the Sonoff? I see in your video of the Sonoff hookup and the 5v but isn't that 3.3v? In another video, one person went through all kinds of steps to get the 5v. Is it really possible to drive it off the Sonoff? If you set the jumper to no repeat and timer to ~5 minutes, this would make a great walkway lighting combination. Please let me know. - Thanks
I have connected PIR sensor directly to a sonoff and it works great. I used this PIR though (not the 501) - drzzs.com/BruhPIR
Can't honestly remember if I connected it to 5v or 3v. I think it was the 3v pin from the flashing pins that I used.
Hope that helps. Definitely you should use that PIR from the link instead of the Big'ol 501. I had a lot of trouble with the 501 triggering randomly when it's too close to the ESP8266 chip.
Good luck!
2:56. You can also power the D1 by the 3.3v Directly.
Hi,
Perhaps you may be interested in this configuration.
When the motion sensor is activated, a rule delays its deactivation during the set time (in my case, 30 seconds) to see it active in HA.
The second rule invalidates the publication that turns off the connected led strip.
SwitchMode 0
SwitchMode2 1
SwitchTopic2 PIR
SwitchTopic 0
Rule1 on switch2#state=1 do backlog publish cmnd/PIR/POWER2 ON; RuleTimer1 30 endon on Rules#Timer=1 do publish cmnd/PIR/POWER2 OFF endon
Rule2 on switch2#state=0 do publish stat/proyecto1/POWER "" endon
Rule1 1
Rule2 1
;-) Thanks for your work.
I don't understand that "value_json". May be that's the reason, my sensor is working, showing in tasmota page, added to HA with MQTT, but readings not showing in HA. Need help.
I cannot find 2 infos - how to set the LED number (e.g. how many is connected) and how to tell tasmota that I have RGBW leds, not only RGB... Even Tasmota wiki seems to skip anything on addressable leds topic.
Great video but I think the git has changed for the version of the sonoff-tasmota.ino. I can't find that file anywhere with the config settings on it...is there an updated way to do this? thanks
Thank you for another deluxe class!!! Keep doing videos like this...
Thanks!
With great feedback like this, I sure will keep doing them!
Thanks again for another educational video, I have succesfully tasmotized my D1 mini but cannot get water sensor to be recognised, have tried numerous module configurations to no avail, any ideas? .
thank you, friendly tip about text for in video links, they appear where the youtube gui overlays, so when people pause they can not be read, please paste higher up if possible, or not....thanks again.
Hi,
Thank you very much for all the videos. I am learning a lot with them.
In the 02:50 minute you say that nodemcu can work with 12v.
This is correct?
I am using 12v LED strips ( WS2811 ) but I need to lower the voltage to 5v to power the nodemcu controller.
Check your specific NodeMCU board. Some say they accept 12vdc, others say the max is 9v or even 5v.
@@DrZzs My NodeMCU boards are clones. I think if I turn it on with 12v they will burn jejeje
I don't see references to 12v in the specifications. Thank you very much.
Awesome work! Thank you DrZzs
Thanks!
If you're planning to do this check out the sonoff-sensors.bin version of tasmota. It's all ready to use a bunch of different sensors.
github.com/arendst/Sonoff-Tasmota/releases
Do you know if it's possible to use both a reed switch(magnetic door switch) and a PIR sensor on a D1 mini at the same time? What commands would I use?
Another great video Justin! keep up the great work buddy
Thanks!
will do!
Hi, thank's for your video. I have a question: when I sept in tasmota: Generic module to create node mcu with 4 relays they work according to each other. When I turn on one of them, the other goes off. For example: if I turn on the relay 1 while the number 3 is on, the latter goes out as soon as the relay 1 goes ON.
Is there any command to give in the console? Thank you
Thanks!
It sounds like they are in "interlock" mode. "SetOption14 0" in the console might fix it.
Let me know if that doesn't do it.
Hallo boss!
How can avoid a relay turn off/on after every restart?
I have 2 relays set in interlock , but every time the wemos tasmota restarts they will go on together for few than a second.... can you help me?
Thanks DrZzz. I have a "C" wire in my thermostat. Can I still use this thermostat wiring? What do I do with the "C" wire?
The C is extra for electronic thermostats, if you don't use it then wrap it up
Thank you @DrZzs for another wonderful tutorial. On my D1 mini, however, I have two problems. Can you please help me with these?
(1) When the motion has ceased, the switch doesn't revert to OFF sometimes. It stays stuck on ON until the motion is triggered again, when it toggles.
(2) When restarted, the switch begins with OFF. However, when it first senses motion, it still fires OFF and a few seconds later fires ON.
Did find a solution to this? I have the same issue
is there any way of getting a custom firmware onto a Hisense AEH-W4E1 ac unit?
... Any chance you can do a clip showing how to add a DHT22 and say a BME280 to a Sonoff Basic. (I'm planning one DHT22 on one Basic at one location and another BME280 on a 2nd Basic at the 2nd location, only reason for the BME22 is the pressure sensor, would have been nice if there was a Temp/Hum/Pressuree sensor in the packaging of a DHT22
I can put it on the list. Not sure when I can get to it.
Hello great video... can’t you just connect the pir sensor to the sonoff gpio?
yes you sure can. I just wanted to see what Tasmota looked like on a D1mini :)
is there a way to setup a relay like the switch like the sonoff. i have a few spare esp01.. but i dont want to power the switch and have cables to the relay. i just want to have power going to the relay like the sonoff.
You can connect a relay to the esp01 and the relay will be separated from the power to the D1mini. Is that what you mean?
If you really want to make it like a sonoff where you put 120v to it and then you switch that same 120v circuit, I guess you could do that, but it would be a lot more work and probably cost more than just buying a sonoff. Besides the Esp01 and the Relay you'll also need a 120v to 5v power converter. The PS is almost the price of a Sonoff Basic:
www.banggood.com/HLK-PM01-AC-DC-220V-To-5V-Mini-Power-Supply-Module-Intelligent-Household-Switch-Power-Supply-Module-p-1242358.html?p=@K220219381694201802
That's the appeal of the Sonoff. You can't buy the parts and build it yourself for less $.
If you still want to do it you'll have to use the 120v to power the PS. You'll tap into the Hot line and send it to the Common pole of the relay, then a wire from the NO pole to the lights or whatever you want to switch. The neutral will also go to the PS, but then also continue on to the lights you're switching. Then with ps you can power the esp01. The ESP01 might need 3.3v instead of 5v so you'd need either a 120v to 3.3v ps or another buck converter to drop the voltage from 5v to 3.3v. The relay will need a supply of 5v in addition to the ground and the control wire from whichever pin you use from the ESP chip.
Hope that helps.
Good luck.
can't seem to get my PIR up and running
1. I I select "switch3" because the PIR is on D7 and I have relays on relay1 and relay2
2. after save and restart , in console I ran this command "switchtopic3 saraiyh motion"
3 . I added the binary sensor in my yaml file:
binary_sensor:
- platform: mqtt
state_topic: "cmnd/Saraiyh_Motion/POWER3"
name: "Saraiyh Motion"
device_class: motion
4. I name the topic: "Saraiyh_Motion"
5. in the console when I move I can see this "19:56:52 MQT: cmnd/Saraiyh_Motion/POWER3 = TOGGLE"
however, the minary sensor does not do nothing,
what am I missing
try "stat/" instead of "cmnd/"
I just tried "stat/Saraiyh_Motion/POWER3" and the sensor has an error .. it disappeared
21:08:24 MQT: cmnd/Saraiyh_Motion/POWER3 = OFF
21:08:24 MQT: cmnd/Saraiyh_Motion/POWER3 = ON
21:08:25 MQT: cmnd/Saraiyh_Motion/POWER3 = OFF
21:08:25 MQT: cmnd/Saraiyh_Motion/POWER3 = ON
21:08:26 MQT: cmnd/Saraiyh_Motion/POWER3 = OFF
its working now with cmnd do not know why it just started working
oh well, as long as it works!
Hi didnt you have to change the signal V logic for the led strip as they run on 5V signal?
No. They seem to work fine. But yes, if you connect them and have issues then a logic shifter would do the trick.
your video show you connect the data line of the temperature sensor to pin D4 but on the Tasmota Configuration screen you choose the "D2 GPI04". Confuse which one is it? Another problem I have is my temperature sensor is DHT22 and is not listed so what can I use? How often is the temperature updated? Can we change the setting?
I must have changed my mind at some point. I don't think it makes much difference where you put the sensor. Some of the pins have specific functions and you'll get errors if you try to use them, but it won't damage anything. If you connect something to a pin and it doesn't work, just change it to a different pin and try again.
And there is only one choice for the Temp DHT sensors. Choose the AM2301.
Sorry to ask again, I am not electronic expert. So which one is refer to the board pin D2 to the web GUI "D2 GPI04" or "D4 GPI02" choices?
I'm trying to flash TASMOTA onto a D1 Mini Lite version, and I keep getting the error: "WPS_is_unavailable_in_this_configuration__Please_check_FAQ_or_board_generator_tool"
I checked in the user_config.h file, and tried every possible option that DIDN'T involve use of WPS in the WIFI_CONFIG_TOOL section, but that's apparently not the issue.
Any ideas? I'm about ready to give up on this thing. :/
I FIGURED IT OUT!
The Boards Library version 2.4.2 has the issue. I switched it to 2.4.1 and it compiled no problem.
ya, there were some troubles with different board managers and such so I've stopped compiling it myself. I just use "sonoff.bin" from the Tasmota github and avoid all those problems.
Glad you got it working!
I wanted to be able to flash all of my configuration settings (Wifi SSID/Password, MQTT server address and creds, etc).
I've never flashed a BIN file to these boards before, and I'm on a Mac, so I wasn't sure where to start with software with that. I could PROBABLY do it from the terminal, but I'd also have to go dig out a UART module out of the empire of dirt, and only God knows where any of those are at the moment.
So I opted to rip out some more of my quickly vanishing hair, and just mess with it until I finally got it working. :D Jumped the gun on asking on the youtube comments. ;)
that's a good reason to compile your own then :)
Hello DrZZs, all your video are awesome and I learn a lot with them. I use this video to create some temperature and humidity sensor over the house with some wemo d1 mini with tasmota and some DHT11, they all work nicely and home assistant integration too. The issue I have is, after sometime my wemo stop read the both value and the only way to make it read again is to remove the power and plug it back. After that it work for a while until I have to do it again. A soft restart do not work.
Can you help?
Thank you again for your good work
bummer. I don't know what to do about that. I guess I'd try to automate a hard reset perhaps by using a wifi smart plug for the power supply going to the D1mini.
I've done that with my PiZero Cameras that need a hard restart every so often. Not a very elegant solution, but it works.
I am using the sk2812rgbw leds. I added the light entry as you posted but I am not getting the color picker? Not sure where to start to troubleshoot this.
hmmm. Show me what you have in your lights entry. I didn't get it at first, but once I added:
rgb_state_topic: "stat/D1mini01/color"
rgb_command_topic: "cmnd/D1mini01/color"
it showed up.
What version of Home Assistant are you running? I know they've had that color wheel there for a long time, so I doubt having an older version is the issue, but it could be.
It only shows up when the lights are on though. Silly, but I guess make sure they're on then click the bulb and it should be there.
I'll see if I can think of any other reason it wouldn't work...
Thank you for the tutorial. I'm having some issues by trying to connect a PIR and a DHT11 to a Tasmotized sonnof basic. When I connect the sensors individually they work fine but if I connect both only the DHT works. I'm running the last updated version of home assistant (0.115.4), the PIR is connected to GPIO3 and the DHT to GPIO1. I only added these lines to the binary_sensor.yaml:
- platform: mqtt
state_topic: cmnd/NewPir01/POWER2
name: R3 PIR
device_class: motion
Any lead? I out of options. Thank you in advance
H.
Try typing "SerialLog 0" in the Tasmota terminal. That'll turn off Rx/Tx communication.
Hope that helps!
@@DrZzs Actually I erased everything and only applied these two rules:
rule 1 on switch2#state do publish Prueba/PIR/state %value% endon
and
rule 2 on switch2#state=1 do backlog power1 on; ruletimer1 30 endon on rules#timer=1 do power1 off endon
also I've generated a binary sensor like this:
- platform: mqtt
name: "PIR Motion"
state_topic: "Prueba/PIR/state"
qos: 1
payload_on: "1"
payload_off: "0"
payload_available: "Online"
payload_not_available: "Offline"
device_class: motion
That lets me show the PIR into HA, and it works very well... but as soon as I connect the DHT11 the PIR system stopped working.
By the way, I didn't introduce a single line of code for the DHT11, it worked automatically.
I've tried to change the SerialLog from 2 to 0 but I've got any change
@@DrZzs I made a cross-check of console log by restarting the unit with and without the DHT11, and I found these three lines are executed at the very beggining of the boot ONLY when DHT11 is NOT connect:
00:00:02 RUL: SWITCH2#STATE performs "publish Prueba/PIR/state 0"
00:00:02 RSL: Prueba/PIR/state = 0
00:00:02 RSL: stat/Prueba/PIR/SWITCH2 = {"STATE":"OFF"}
Any clue how make them run also with the DHT11 connected?
Thanks for the great Video.
Question:
I have also a DHT 11 Sensor on a Sonoff or on a D1 mini. In both application I cannot red the Temperature in nodered. I can see the temperature in Tasmota. Do you have any idea?
Jakob Mo I know very little about node red. I just barely installed it myself. Are you using Home Assistant also? Or just Node Red? I’d say check Home Assistant and see if the temp is showing up there. Just to narrow down where the problem might be.
I’d start by looking at the way node red handles payloads with multiple values. That’s what got me hung up with Home Assistant. So I can’t say more specifically what might be happening since I don’t know Node Red much at all.
Another question re: home assistant. Been using a PI3 since the day it came out, it seems to be bogging down in my new house. What is your opinion on using a dedicated pc instead of the pi?
I've only every used HA on a pi3. I haven't had any problems, but I don't think I'm asking it to work very hard.
I know a lot of people use different hardware. Some real high-end users use a NUC. amzn.to/2DQx6uh
That seems a little extreme to me, but they swear it's the best. I guess if money wasn't a factor I'd do something like that too.
If you do change hardware you'll have to use some other installation besides hassio.
home-assistant.io/docs/installation/
That introduces a lot more potential issues and things you'll have to figure out how to get working. Hassio's add-on system makes things so easy. If you're a "computer guy" then using a different install method might not be an issue.
They just came out with a new pi3b+. Should be a little more powerful. Don't know if the current hassio image is 100% compatible with it yet.
That's my opinion for what it's worth :)
Let me know what you decide to do and how it turns out!
Awesome video and thanks for sharing, greetings from Hel, Poland :)
Thanks!
Cool!
I need a map to mark all the places people watch from. That'd be cool.
Can these be used to zone area around the home to work with a smart thermostats (nest) and home assistant ? If any one has done this please let me know thank you.
In light entry you have: "cmnd/D1mini01/power2" . I deletet "2" to get work.
I love your videos. Greetings from Denmark
Thanks!
Glad you got it working!
Awesome Denmark!
Thnx! that fixed it for me
Inspirational video. How do I read the sensor values in an iOS MQTT app like IoT OnOff? What kind of topic do I need to subscribe to?
thanks
I don't know about that specific app, but for Home Assistant the sensor entry looks something like this:
Sensor:
- platform: mqtt
state_topic: 'tele/masterBR/SENSOR'
name: 'Master Bedroom Temp' #AM2301
unit_of_measurement: '°F'
value_template: '{{ value_json.AM2301.Temperature -2 }}'
Hope that helps.
@@DrZzs Great stuff. Managed to figure it out and your tip about inserting the sensor model into the JSON parser made it all work :) Thanks!
I have followed your steps but for some reason when I opened my arduino soft ware it does not have the multiple tabs like yours does. I have tried to find where I went wrong but I cannot seems to get to the right location. It seems that when I open the Arduino software it is just that, mean it does not say sonoff like yours does at the top. I feel like I need to open a file to work in but I cannot find sonoff.ino??
I'd recommend not using Arduino IDE anymore. There's an easier way to put Tasmota on any device. Use FlashEZ and Sonoff.bin: th-cam.com/video/KMiP9Ku71To/w-d-xo.html
Hey Dr Zzzzz, great video - I'd love you to add another video to your suite.... hassio on main system, and a second raspi with the usb stick. Have the second raspberry not have hassio on it, but raspbian (or other unix), and just the usb stick for something like zigbee and/or z-wave (or both). Then connect it to the main hassio system through mqtt. That is what I want to do, as I have a network connected from my office to main house (separate buildings, same lan) with devices in both. Thoughts? Could you do this?
man, that sounds complicated.
Not sure I can say how best to do that.
Curious if you know a way to use multiple ds18b20 temp probes on the same one wire bus and get them to publish two unique MQTT topics. Any pointers on how to do that with tasmota?
I don't know off hand. I'll have to do some research.
DrZzs wow-super speedy response! Didn’t even see it until now. Is there a dr zzz Facebook or something where it’s easier to continue conversations that can help everyone in one spot?
Hi there your videos have got me hooked to Tasmota and Sonoff!
Can I use the D1 mini and Tasmota to switch on and off 2 contacts ? Say I would want to use it to send a momentary on off pulse to an appliance switch ?
you sure can.
I'm working on a project using a D1 with relays. One issue I've found so far is that the voltage output on the D1 GPIO pins is only 3.3v. That might not be enough to trigger the relay. I've got mine traveling some distance between the D1 and the relay, so the voltage drops even more. I bought a logic level shifter to boost the voltage of the signal to 5v, which should be enough. They just arrived so I haven't tried it yet.
I'd say try it without the level shifter and hopefully it'll work if you aren't losing voltage over distance like I am. If you find the relay isn't triggering with the 3.3v try one of these:
amzn.to/2r8gvxw
Hope that helps!
This is fantastic doctor! I got sensors out the wazoo. There is a wifi repeater project on github that is pretty dope too. Do you know whether it is possible to track people based on the wifi/bluetooth beacons emitted by their phones? I would like to be notified of my neighbor's comings and goings. Not for any nefarious reasons. Sometimes they don't answer their door when I knock. This way I can announce, "I know you're home, I want to finish our discussion about home automation!" If you could point me in the right direction, that would be great. Thanks for vids
When I copy and paste the code for the d11 into my yawl file it gives an error for the code.
Do you have a Raspberry Pi for the MQTT part?
Since separate power supply, can I connect to WS2811 strip lights that use 12v power instead? Thanks for answer all my questions.. I am newbie. I plan to get back to Hass.io setup.
You can not power the d1mini from 12v. It will die.
So if you have 12v lights you'll need a source of 5v for the D1mini. That can be a buck converter to change the 12v to 5v, or a separate 5v ps. The grounds need to be connected.
Great Video. Thanks
Question:
I have two Switches on the Sonoff. For one switch I get the Status of the switch via MQTT but not for the Second switch.
Do you also have a solution so I can read two different Switches via MQTT?
Thanks
Jakob
Thanks
Go to the Console in Tasmota, then click the second switch. You should see a couple lines pop up on the console. the one that starts with "stat" will be the "topic" for the state of that switch. It will probably be something like:
"stat/sonoff/POWER2"
Hope that helps
Thanks,
I tried this already and defined a second switch in the Console.
If I press the second button I get the same Mqtt Info from the two Button.
Any idea?
Hey DrZzs,
huge compliment on this and your other videos. I enjoy them very much and learnt a lot from them already.
But now, I am afraid, I am stuck trying to use my WS2812 with Tasmota on a Wemos d1 mini.
After I flashed the d1 mini, I set the module to Generic and set the corresponding pin to “07 WS2812”.
After a reboot I got the on off button and the slider but unfortunately I am not able to control the LEDs.
As soon as the d1 mini powers up all LEDs turn on on full bright white and I am not able to change it.
I checked the connections, replaced wires, used another d1 mini, used a different LED strip with only 2 LEDs, powered the LEDs with an external power supply (connecting grounds), re-flashed it… no success.
I am running out of ideas, any help would be appreciated.
Thank you
Thanks!
man, that sounds like you tried everything so far. What other info can you give me? Maybe some images of your connections and screenshots from tasmota.
For easier chatting head to discord. We have a channel for LEDs too. There may be others there that can help. discord.gg/8gvF67h
I'm sure we can get it working.
Thanks for the quick reply. Much appreciated.
Was hoping you came across this very problem before.
I am heading out of town for a couple of days now but as soon as I am back I am going to start from scratch.
Hope you or the guys at discord can point me in the right direction.
Cheers
@@tb8756 Did you ever get this sorted out? I am running into the same exact thing. I also tried using the same version of Tasmota as in the video and still have all white LEDs.
Unfortunately not.
I started again from scratch but without success.
Please let me know if you get it to work.
@@tb8756 I finally got it working!!! I had to uncomment the line that says "#define USE_WS2812_DMA" in the my_user_config.h file and then hookup my data line to the pin labeled RX on the d1 mini (GPIO3). Good luck.
Is this still necessary for the Arduino part in 2022?
DrZzs, do you use pull-up resistors when connect sensors to the w1/sonoff/node-mcu?
no. Maybe I should. I believe there are ways to turn on/off pull-ups for different pins in Tasmota.
github.com/arendst/Sonoff-Tasmota/issues/3200
@@DrZzs i believe you had no problems because you use sensors with additional smd elements on the sensor's board. i have dht22 with no board, just white piece of plastic with 4 legs, so pullup is required in my case
Thank you very much! You help me to solve the problem with constantly on/off/on/off/on/off ))) You are the best!
I am not able to get the motion sensor to work from your instruction. The Tasmota console show: "cmnd/pir2/POWER2 = TOGGLE" repeatly each time detect motion. But on the Hassio the human stick figure does not move show motion. I double check the codes several times. Set Binary sensor. Can I set it like a status show motion. Only thing not work is this motion sensor. What did I do wrong?
I finally get it to work. You forgot to mention need to execute command: Switchmode2 1 so it will toggle On and OFF. Now I need to figure out the command to delay the PIR switch for a few seconds. Any idea.
Glad you got it working. Sorry for the missed command.
If you have the 501 PIR there are some adjustable pots on the board that control sensitivity and retriggering. There is also a jumper that can be moved too, but I don't remember exactly what it does. Here's some info on the adjustments you can make.
learn.adafruit.com/pir-passive-infrared-proximity-motion-sensor/testing-a-pir
I use this AM312 PIR Sensor have better review smaller but on adjustment what so ever. I though on the Tasmota command you can set the delay on hold in seconds before turn back off similar to switching. Since I begin follow and watch your videos, you now are experts and not longer amateur in Sonoff and Hassio knowledges.
When I open the Sonoff.ino file, Only one tab opens that is the sonoff.ino. not getting the other tabs ????
I'd recommend not using the Arduino IDE anymore. I'd go with the pre-compiled binary of tasmota instead. th-cam.com/video/KMiP9Ku71To/w-d-xo.html
Much easier and much less likely to have errors in the process.
Good luck
Thanks. Is there a way to set the number of lights on my LED Strip ? Because only 40 or so are lit.
write this in the console (of the tasmota)
Pixels 1..512 = set amount of pixels in strip or ring and reset Rotation(applies only to addressable LEDs)
I'm having a tough time figuring out the answer to what I'm trying to do (similar to the video). I have a momentary push button switch and a PIR sensor attached to two different sensors as switches. Even though one is switch1 and other is switch2, they send the same mqtt topic (because "SwitchMode" changes it for all switched) and they both ending up switching the same Sonoff Basic relay. Any workaround for this?
I think for Switch2 to not switch Relay1 you have to set some other pin as Relay2. I'm not 100% sure about that, but someone else had a similar issue recently and I think that was how he solved it.
Let me know if it works or not.
Yes, setting a matching Relay2 on one of the GPIO's doesn't toggle the main relay anymore! Thanks!
The only caveat is that switching on Relay2 (or any relay) still toggles the onboard led. That's a problem for me because I planned to attach the led on the pushbutton to the GPIO13 pin on led and any of the GND. This would give me the inverse light on pushbutton so that when the light is off, the button is lit (and it also provides all blinking indications if something is wrong on sonoff). Now, with the Relay2 turning on the led, it turns off the button led. So right when someone comes close to want to turn on the light, it makes it invisible in the dark.
New idea (using your suggestion) is to connect the pushbutton to Switch2 and the pushbutton led to Relay2. The effect is very cool because now the led only turns on for a few seconds when someone gets close to the light switch. The only downside is that I will not be able to see flickering lights on pushbutton if there is a network issue or something else wrong with the sonoff.
Eugene Pugach for sure! There are commands that change what the onboard LED does
github.com/arendst/Sonoff-Tasmota/wiki/Commands
LedPower and LedState. I haven’t messed with it but you might find a setting there that you like better.
The best I got was to use SwitchMode2 2 so that onboard led is always on and the pushbutton is only on when PIR is triggered >> community.home-assistant.io/t/light-switch-with-led-push-button-and-a-pir-sensor-on-sonoff-basic/57669
Hello DrZzs,
First of all many many thanks for your tutorial which is very useful to me for making home automation.
I have made 3 switches with basic sonoff with flashing tasmota and it's working very well. thanks again.
Than I Flash tasmota on NodMCU and controlling 4 relay board, Its works but there is little problem.
When I trigger, It works opposite, means when I turning ON my relay goes OFF and When I turning OFF it goes ON.
So Please help me to solve this problem.
My tasmota settings are below.
Module type is 18.Generic
D6 GPIO12 Relay1 - Relay 01
D7 GPIO13 Led1i - Relay 02
D5 GPIO14 Sensor - Relay 03
D8 GPIO15 - Relay 04
It will be very helpful to me if you can solve this problem.
Sorry for my English.
Thanks,
Thanks, that was some good info. I just went to copy everything over to the Arduino IDE and am having some issues. The files for tasmota changed (name wise), running into a wall at the moment.
NM....used NodeMCU PyFlasher...so easy
Hi Doc! Thanks for you videos! I'm traying to flash a NodeMCU, but I can't get the extra driver turns the com port visible on Arduino software. The extra driver is installed. Any ideas?
Finally did it! My NodeMCU is V3, and this version has CH340G chip, that need other driver.
ah! good to know.
Thanks!
DrZzs I could only add 4 switches on the tasmota generic type module, even having many GPIOS pins available. I couldn't read from mqtt other options in GPIOs assignment (button, relay, leds, etc) when calling Status 8 or 10 on the Console. Is that right? Maybe I shoud try the "konnected" software on my NodeMCU to control doors magnet sensors....
that has been the case, there's a max of 4 switches assignable through Tasmota. I read a post on the github that they were going to expand it, but I don't know which version that was planned for. It might not be out yet.
Have you tried using the Button option? I don't know if it would work the same, but it might.
Any idea how to read and log an analog ( for examle a gas ) meter data? Regards
Not that I can think of right now. I know you can get analog input on the Ao pin, but what exactly the gas meter is outputting and how the D1mini/Tasmota would interpret that I can't really say.
is it possible to configure tasmota firmware wifi to an access point only so for instance i want to install in my car and access tasmota from my android device i dont want to connect to a router ?
absolutely. When you configure the wifi setup in Tasmota, just use the wifi SSID and PW of just your andriod hot-spot and don't put the one for your home wifi.
You can put 2 SSID's in to Tasmota so if it can't connect to one it will connect to the other. Just in case you want it to be able to connect to both sometimes.
Hi DrZzs, I have 8 of these running to monitor refrigerators at my business to text me if one gets to warm. I'm having an issue and wonder if you have seen it before. After between 12 hours and about a week at best some of the dht22 stop sending. If I unplug just the power to the sensor and plug it back it in it instantly works again. I've searched and have seen this to be an issue for years but I can't find a solution. The second issue is when it does stop sending HA still shows the last temp it was at until I restart HA then it's a "-" Do you know what kind of code I would have to add to the .yaml file to make it default to something like 99 if it doesn't get a signal for x number of seconds? I've tried playing with "If" statements but can't figure it out.
oh man. that sucks. I didn't know the DHT22's were so unreliable. Just a thought, but do you think a reboot of the D1mini every day or so would fix that data-freeze?
As for getting HA to report something else, I'm sure there's a way with an automation and I could give it a try but I'm not sure I'd have the right fix. Have you brought it up in the Home Assistant Discord channel? Try there and see if someone there has a sure fix. If not, let me know and I'll see what I can come up with.
Thanks for the reply. I tried the reboot but it won't work. You either have to disconnect the power from the D1 or the sensor to make it work. I'll try the Discord next for the other issue. I would just use DHT11's that are more reliable but they won't work for a freezer. I may end up just using a better sensor. I've heard the SHT31 is better.
Sorry man. Wish I new the answer for you.
Let me know if you solve it.
@@DrZzs A couple months ago I did end up changing out 6 of the sensors to SHT31's and I have not had any more sensors issues. So only 2 out of 8 DHT22 still work. Not a good investment even if they are half the price. Maybe it was just the supplier I got them from or they just all suck. I'll never know because I'm not buying them again.