Тёмный

Arduino NodeMCU AC Light Dimmer + MQTT+ Alexa | Part #2 | Tutorial # 33 

Netmedias
Подписаться 29 тыс.
Просмотров 30 тыс.
50% 1

AC Light Dimmer with Home Assistant (MQTT) & Alexa echo dot & NodeMcu
Part 1: • NodeMcu AC Light Dimme...
In this tutorial, we will build AC light dimmer with NodeMcu and RobotDyn Zero Crossing dimmer.
RobotDyn Dimmer:
Project Source Code On GitHub:
github.com/nassir-malik/IOT-L...
mqtt:
password: "welcome"
light:
- platform: mqtt
name: "Office Lights"
state_topic: "netmedias/office lights/status"
command_topic: "netmedias/office lights/switch"
brightness_state_topic: 'netmedias/office lights/brightness'
brightness_command_topic: 'netmedias/office lights/brightness/set'
qos: 0
optimistic: false

Наука

Опубликовано:

 

17 ноя 2018

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 134   
@VeyrmanKatituta
@VeyrmanKatituta 4 года назад
That's great!!! I did it!!! Thank you very much!!! I used your project to control the fan. Everything works!!! Yes!!! Respect from Russia!
@netmedias7657
@netmedias7657 4 года назад
Thank you for your valuable feedback.
@roystervi
@roystervi 5 лет назад
Thanks for adding mqtt to ur projects
@netmedias7657
@netmedias7657 5 лет назад
bobby royster thank you for your feedback.
@vicbcn5455
@vicbcn5455 4 года назад
Nice video!! Thankyou very much!!
@tripleakat
@tripleakat 5 лет назад
Yeahh.. waiting for part 3.. with 4 channel dimmer module & esp32 hardware pwm :)
@netmedias7657
@netmedias7657 5 лет назад
Stay tuned. Thank you
@shavkats838
@shavkats838 5 лет назад
Thanks from RobotDyn!
@netmedias7657
@netmedias7657 5 лет назад
Shavkat S Thank you.
@tomasind6840
@tomasind6840 5 лет назад
It would be great if you could connect the buttons for dimming. Good job :)
@jdrosarios
@jdrosarios 5 лет назад
hi, finally, alexa did detect my light... maybe i gave up very soon at the first try... jejeje after 10 minutes without doing nothing , i command alexa to discover... then light was detected and now i can dimm/turn on/off via alexa. thank you Mr. Malik once again!!!!
@netmedias7657
@netmedias7657 5 лет назад
Thank you
@anokhautomation4453
@anokhautomation4453 3 года назад
Nice project.
@anupammishra3675
@anupammishra3675 4 года назад
Great tutorial. can you list all the libraries required for the sketch to compile in arduino ide?
@vishalchauhan8735
@vishalchauhan8735 5 лет назад
Hi. Thanks for this video I'm playing with HA only. It doesn't work if close serial communication from putty.
@nomiahmad5268
@nomiahmad5268 3 года назад
nice explanation, i need to ask a question where you define interupt routine in code . with interupt how can we control ac dimmer module in physical?
@PaytonShao
@PaytonShao 4 года назад
Can I use this to control my led ceiling light ?
@modicon1108
@modicon1108 5 лет назад
Hi and thanks for the Video @netmedias. I am trying to use this with Blynk and Alexa so I don't require any MQTT support, but I am having trouble figuring out what support libraries need to be downloaded from github. For example, where do I find the "hw_timer.h" library? How do I install the whole library package? Thanks for any help you can give.
@yogeshitaliya473
@yogeshitaliya473 5 лет назад
😍😍😍😍😍
@fefeporcodiaccio
@fefeporcodiaccio 5 лет назад
holle, really nice job! is it possible to give to nodemcu a static ip instead of dhcp?
@netmedias7657
@netmedias7657 5 лет назад
Yes, Watch following tutorial. I am using static IP for this project. Code link is on GitHub. See the video description for code link. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-sFJE_PsUlm8.html
@carlborgen
@carlborgen 5 лет назад
I see that your light has a fade between states, and I can't see that functionality in your nodemcu code, is that a feature of the espalexa? Since I'm trying to make a slow wake up light dimmer, I'm trying to figure out whether to put that functionality locally at the node or have it in home assistant somehow.
@netmedias7657
@netmedias7657 5 лет назад
Please take a look at "robodyn_dimmer.h" file. byte fade = 1;
@cyril_leonel4713
@cyril_leonel4713 4 года назад
can i use this in esp32 ?
@ANOOPKUMAR53352
@ANOOPKUMAR53352 5 лет назад
@Netmedias Thanks for the video. what is the procedure to connect this to alexa. Can you please elobrate step wise. Thanks in advance
@netmedias7657
@netmedias7657 5 лет назад
Once dimmer is turned on say 'Alexa, discover devices' to Echo dot or Echo.
@paslertomas
@paslertomas 5 лет назад
Hello, I like this project a lot, i have a few questions on you about. Is it possible to use D1mini board instead of nodemcu? Is it possible to add a external button (mechanical push button attached to board) for turn on/off output? I am using HA with mqqt broker installed on it, and using tasmota on my mqqt devices. But tasmota doesn't allow to use dimmer like this. So i found your awesome project. But i am not so well in coding sketch like this. I think it should work, but D1mini has different pins, so. I am looking for your answer. Keep up doing things like this. It is awesome :)
@netmedias7657
@netmedias7657 5 лет назад
Yes, you can use Wemos d1 mini and use it as 3-way switch. You will need to do current sensing and modify the code to handle it. I will be doing a tutorial on it soon. In meanwhile you can check out my 3-Way switch tutorials. Good Luck. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-5SgB6wzgxY0.html ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-QaY5m5RmB7M.html ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-_jeQWu23xqs.html
@jakubgorski8196
@jakubgorski8196 4 года назад
Hi, do you modified the code to the button? Is it working? Because I got problems with it. Can you please share your code?
@MarcoAntonio-nw2dq
@MarcoAntonio-nw2dq 5 лет назад
When installing the bulb on the ceiling of the house, does the esp8266 need to stay on 5v or will it be powered by the ac dimmer board?
@netmedias7657
@netmedias7657 5 лет назад
Marco Antonio No. You will need to supply 5v if using NodeMcu or 3.3 to plain ESP8266.
@rumitshah7136
@rumitshah7136 2 года назад
Hey can you make a video of how to Dc Light Dimmer with alexa.
@amird8400
@amird8400 5 лет назад
Can I omit the home assistant part and still have alexa voice command on this project? Thank for the tutorial by the way
@netmedias7657
@netmedias7657 5 лет назад
Yes
@Zerous_12
@Zerous_12 5 лет назад
can be configured to work with a motion sensor and a switch for bathrooms?
@netmedias7657
@netmedias7657 5 лет назад
Richard Mequert Yes, It requires a small change in code and sensor. I will try to add it to the future tutorial.
@Zerous_12
@Zerous_12 5 лет назад
@@netmedias7657 I look forward to it, and keep it up! Thanks to you I was able to automate the whole room and part of the house with ALEXA, now I am focusing on the reinforcement of the security of the network to counteract any possible infiltration, I know that it is paranoid but it is not too much to be prepared.
@netmedias7657
@netmedias7657 5 лет назад
Richard Mequert you are right to be concern about the security of your network. It does not matter how secure your network is there is always a chance that it is hackable by hackers but you should not worry since we are at bottom of the hackers list.😄 I am planning to start making my projects secure by using SSL and fingerprinting methods. So stay tuned. Thank you for your valuable feedback and good luck with your projects.
@DanangWidiantoro
@DanangWidiantoro Год назад
my alexa getting crazy
@gastonche1
@gastonche1 4 года назад
hello Netmedia s Can you help me with the sketch? I have a wemos d1 mini, I modify the ssid and the password but I can't connect to the Wi-Fi, I have the following error: "Cannot connect to WiFi. Please check data and reset the ESP. "
@thetechrumble6596
@thetechrumble6596 4 года назад
Pleas help me by using above circuit i can control my ceiling fan it worked but it gives humming sound/ noise at low speed and as soon as i increase the speed upto 75% humming sound goes off but it stuck on that speed and circuit lost the control over speed in order to control speed again i need to switch off the circuit ... humming sound will not apper on low and high speeds ....please help P.S. Light dimming through above circuit works perfectly
@HFSoluciones
@HFSoluciones 5 лет назад
I only can turn on or off, not dimming
@nandaeko89
@nandaeko89 2 года назад
sorry, i want to ask something, why my dimmer module cannot control lamp brightness? please help. thank you
@MohamedAbdoLOS
@MohamedAbdoLOS 3 года назад
Sooo coool, do you think i can attach a potentiometer to control this bulb in parallel with the hass, so what ever i do with the pot controls the hass mqtt
@netmedias7657
@netmedias7657 3 года назад
Yes, you can add code in MCU
@MohamedAbdoLOS
@MohamedAbdoLOS 3 года назад
@@netmedias7657 thank you so much, I actually tried but I don’t know where exactly to add my code
@MohamedAbdoLOS
@MohamedAbdoLOS 3 года назад
I really would be so grateful for a help or a clue even a psudo code and where to add it
@roystervi
@roystervi 5 лет назад
How do you turn it on manually ? it would be great if the sketch has some more pins open like adding a dht22 sensor, a pir and a switch
@netmedias7657
@netmedias7657 5 лет назад
bobby royster it is easy to add a switch but not possible to create 3 way/4 way switch.
@roystervi
@roystervi 5 лет назад
and adding a pir and dht22? am not a code person like most, but find it hard to use a nodemcu that has 8 pins to only control one thing. plus in each room I like to add a light switch, a pir for motion for that room and a dht22 temp sensor to monitor the temp for that room
@sankarmondal89
@sankarmondal89 5 лет назад
can you make a video on a project that is included, NodeMCU + Relay module + Robotdyn AC light dimmer + Blynk? or can I have the coding? I'm trying to make a project like that but really poor in coding. Will you please help?
@ankitrana007
@ankitrana007 3 года назад
Hi Naseer, can you do the same for 12v / 24v LED strips ?
@netmedias7657
@netmedias7657 3 года назад
This circuit for AC voltage only.
@HomeAutomationTECH
@HomeAutomationTECH 4 года назад
Dear sir tell me how to control ac fan speed with ir remote and arduino make videos plse
@ashishcchauhan
@ashishcchauhan 5 лет назад
hello Nassir, Can I control the fan speed with this dimmer and use alexa? if NOT what can I use for that. Thank You.
@netmedias7657
@netmedias7657 5 лет назад
Ashish Chauhan yes you can control fan speed. Good luck.
@VeyrmanKatituta
@VeyrmanKatituta 4 года назад
Hello friend! Please tell me! If I want to make a second such dimmer and put it on the same MQTT broker and home assistant, what do I need to change in the sketch?
@VeyrmanKatituta
@VeyrmanKatituta 4 года назад
It's all right! Changed topiks and made a second dimmer!
@yawarsaeed6499
@yawarsaeed6499 5 лет назад
Thanks for sharing this project. Do I need mqqt broker on raspberry pi as the project is based on MQTT. Please confirm. Thanks
@netmedias7657
@netmedias7657 5 лет назад
Yes, You don't need to install MQTT server if you are using home assistant on pi. Any MQTT server will work. Good luck.
@bhutchins1991
@bhutchins1991 4 года назад
I’ve been trying to figure something out with no luck. I have the dimmer as well as the new 4 channel version robotdyn.com/ac-light-dimmer-module-4-channel-3-3v-5v-logic-ac-50-60hz-220v-110v.html I would also like to add manual dimmers or a 2way rocker switch, any ideas how I would do this?! Thanks so much
@rafisheikh1141
@rafisheikh1141 5 лет назад
hi can you add ota to the sketch so we can update over the air. Thanks
@netmedias7657
@netmedias7657 5 лет назад
Sure, I will add it in next tutorial.
@rafisheikh1141
@rafisheikh1141 5 лет назад
Netmedias when will you be doing the next tutorial?
@soovui
@soovui 5 лет назад
Very good and interesting. How to do that in node red instead of home assistant?
@netmedias7657
@netmedias7657 5 лет назад
soovui I will do a similar tutorial in node red once done with my current projects.
@soovui
@soovui 5 лет назад
@@netmedias7657 u r the best bro...
@animusdsouza9718
@animusdsouza9718 5 лет назад
So you're using pwm to control the brightness, so as it is esp8266 only one device could be dimmed , right ?
@netmedias7657
@netmedias7657 5 лет назад
temporary account1 I am planning to do a video with multiple dimmers. Please stay tuned.
@animusdsouza9718
@animusdsouza9718 5 лет назад
@@netmedias7657 Are you going to use ZCD ( zero cross detection ) and triacs for dimming, cause there's some flickering issue there, however it can be rectified, perhaps using proper edge detection or something ( I don't remember correctly ). Do let me know your approach , may be it might help me too ( cause I've been working on it for some time now )
@netmedias7657
@netmedias7657 5 лет назад
temporary account1 I am not seeing any flickering issue may be because I am using led lights. I let you know if have a similar issue.
@animusdsouza9718
@animusdsouza9718 5 лет назад
Sure @@netmedias7657
@MarcoAntonio-nw2dq
@MarcoAntonio-nw2dq 5 лет назад
It is possible to make the connection together with a sonoff t1?
@netmedias7657
@netmedias7657 5 лет назад
Do you mean control it with sonnoff only not NodeMcu? Yes it will require some soldering and custom firmware.
@MarcoAntonio-nw2dq
@MarcoAntonio-nw2dq 5 лет назад
@@netmedias7657 I have the dimmable light that is now controlled by a sonoff t1 (tasmota) only the on and off function. I would like to know if I can install the nodemcu between the lamp and sonoff t1. Thanks for listening
@aniketkumthekar5088
@aniketkumthekar5088 5 лет назад
Sir can u show on Google assistant
@netmedias7657
@netmedias7657 5 лет назад
Sure, Stay Tuned.
@aimanrosli2461
@aimanrosli2461 5 лет назад
wanna ask sir.. can i add light level sensor.. so that i can control the light precisely according to surrounding situation?
@netmedias7657
@netmedias7657 5 лет назад
A EYEMAN Yes, but you will need to modify the code. It is very easy, read the light sensor and set the brightness in code. tarBrightness = {mapped reading from a sensor}
@aimanrosli2461
@aimanrosli2461 5 лет назад
@@netmedias7657 oo i see ... btw.. is it possible? if i wanna use arduino uno, i also wanna implement iot into it using esp8266 wifi module.. it was my final year studies project...
@aimanrosli2461
@aimanrosli2461 5 лет назад
my lecturer ask me to control the brightness of the lamp using triac and zero crossing detector circuit.. im a little bit lost since im an electrical student not electronic 😂😂
@netmedias7657
@netmedias7657 5 лет назад
Yes, You can use UNO (use the Arduino timer) and connect it to ESP8266 for wifi. I did a tutorial on Uno wifi with NoduMcu. You can use the same code for ESP8266. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-SiU-QZwik8w.html
@netmedias7657
@netmedias7657 5 лет назад
This is exactly kind of circuit you need for a zero crossing detector. You can use this module it is around $3. If the requirement is to build your own then get the module and take out the parts since it will be cheaper and design your own PCB and use the parts. Also tracing the original PCB will help you with new PCB tracing or breadboard hookup. You can use the same code and your project is complete with some modification. Good Luck.
@ady8077
@ady8077 5 лет назад
Hi, does the ESP8266 need to be powered by its usb port, or does it work off the dimmer module ?
@netmedias7657
@netmedias7657 5 лет назад
Adrian Ewing You can power it from USB or VIN pin 5 volts.
@ady8077
@ady8077 5 лет назад
@@netmedias7657 Can the dimmer module provide the 5 volts ?
@netmedias7657
@netmedias7657 5 лет назад
No, but you can use the following power supply. HLK-PM01 AC-DC 220V to 5V Step-Down Power Supply www.ebay.com/itm/NEW-HLK-PM01-AC-DC-220V-to-5V-Step-Down-Power-Supply-Module-Household-Switch/191745800605?epid=1953378887&hash=item2ca4f0b99d:g:4pcAAOSwf-VWVQ1B:rk:1:pf:0
@razidaufaa9626
@razidaufaa9626 4 дня назад
Excusme Sir, i am sorry, i done compile my program, but error = exit status 1 ets_sys.h: No such file or directory do you can help me sir? thanks
@jannix861
@jannix861 5 лет назад
Could you make a tutorial where you create an Alexa Smart Home Skill (not custom skill) with Amazon AWS and control the ESP8266 with it. You are making great tutorials and as I have looked so far there isn't a tutorial for that. (Or not a tutorial with your quality)
@netmedias7657
@netmedias7657 5 лет назад
Stay tuned. It is coming out soon.
@michellenaficy6333
@michellenaficy6333 5 лет назад
I would love that tutorial as well! Had my light up and running so fast with the first part of this tutorial. Thanks! @@netmedias7657
@ptaudio
@ptaudio 3 года назад
can this also work with domoticz and google home ?
@netmedias7657
@netmedias7657 3 года назад
No, look at my google home video
@kalh53
@kalh53 2 года назад
Sir, on google assistant please!
@theravian2010
@theravian2010 5 лет назад
can we add some more channels in the code?
@netmedias7657
@netmedias7657 5 лет назад
Sure, I will add it on next dimmer video. Stay tuned.
@alizafar5732
@alizafar5732 5 лет назад
Is this same process could be done by using fan instead of light?
@netmedias7657
@netmedias7657 5 лет назад
ali zafar It will work but may produce humming noise at low speed. I will not recommend it.
@alizafar5732
@alizafar5732 5 лет назад
​@@netmedias7657​what i have do for fan?...
@juergenfoterek6743
@juergenfoterek6743 5 лет назад
@@alizafar5732 As Netmedias said , you have to change the Frequency of the PWM Signal that comes from the ESP8266 modul. Normaly it is set to 21 kHz, aczeptable operation range is 21 to 28 kHz. Best will be 25 kHz .Search for changing PWM Frequency on a Arduino. I can´t remember what was the correct line in the Setup Section in the Code. But it is only one C-command in Setup. Look this video it shows you what Netmedias mean with noise . ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-AEJ8MQyEOBg.html Then you have no noice when the Fan is on low speed. Rgds Juergen
@aimanrosli2461
@aimanrosli2461 5 лет назад
how to do that using goggle assistant,is it the same?
@netmedias7657
@netmedias7657 5 лет назад
I will create a dimmer with Google soon
@yusufrizqimaulana8987
@yusufrizqimaulana8987 5 лет назад
sir, can u make Alexa only respond to your voice?
@netmedias7657
@netmedias7657 5 лет назад
It can recognize your voice and have different action executed but you cannot have it respond to a specific voice only.
@yudistra5455
@yudistra5455 2 года назад
this IP address static or not?
@vigneshbalram7930
@vigneshbalram7930 4 года назад
once i configured in the the yaml file i am getting the below issue. please help me out The following integrations and platforms could not be set up: mqtt mqtt.light Please check your config.
@netmedias7657
@netmedias7657 4 года назад
Looks like your config file is not formatted correctly. Please verify.
@jdrosarios
@jdrosarios 5 лет назад
what about esp8266-01?
@netmedias7657
@netmedias7657 5 лет назад
Yes, It will work with ESP8266-01.
@jdrosarios
@jdrosarios 5 лет назад
@@netmedias7657 thank you for your quick response... and now lets work on my dimmer ;) thank you for your hard work !!
@netmedias7657
@netmedias7657 5 лет назад
Jose Daniel Rosario Thank you for trying this project. Please let us know of your progress. Good Luck.
@ClarkKent-ls6ic
@ClarkKent-ls6ic 4 года назад
Hi i get the following error please guide Connecting to WiFi Connecting..... Connected to Home Prime IP address: 192.168.0.8 INFO: Turn light off... INFO: Attempting MQTT connection... ERROR: failed, rc=-2DEBUG: try again in 5 seconds INFO: Attempting MQTT connection... ERROR: failed, rc=-2DEBUG: try again in 5 seconds INFO: Attempting MQTT connection...
@rafisheikh1141
@rafisheikh1141 5 лет назад
I got it to work but it flickers a lot and it dose not dim low
@netmedias7657
@netmedias7657 5 лет назад
Are you using 220v? What type of bulb?
@rafisheikh1141
@rafisheikh1141 5 лет назад
I am using dimmable Led 220v 50hz
@rafisheikh1141
@rafisheikh1141 5 лет назад
@@netmedias7657 i got it working with the led spot light thanks :)
@tomasind6840
@tomasind6840 4 года назад
same for me. what is the solution?
@djarieljpp
@djarieljpp 5 лет назад
not WORKING 110AC
@netmedias7657
@netmedias7657 5 лет назад
Please make using you are using the correct version (2.3.0) of esp board manager.
@JuanPabloCook
@JuanPabloCook 5 лет назад
Can I make this to use an AC 220v ceiling fan?
@netmedias7657
@netmedias7657 5 лет назад
Yes,
@thetinytrader1564
@thetinytrader1564 5 лет назад
Can we also use this dimmer as a fan speed controller ?
@netmedias7657
@netmedias7657 5 лет назад
Harvinder Pal Singh yes but you may hear humming noise on low speed.
@thetinytrader1564
@thetinytrader1564 5 лет назад
@@netmedias7657 So what's the solution to that. I want to make a fan speed controller.
@netmedias7657
@netmedias7657 5 лет назад
Harvinder Pal Singh Try is as is. If you hear humming noise on low speed try to add Inductor coil. It should eliminate the noise. They are not that expensive.
Далее
Получилось у Миланы?😂
00:13
Просмотров 790 тыс.
15 Home Assistant Tips You MUST Do
14:28
Просмотров 352 тыс.
Control Nearly ANYTHING with Alexa for under $10! 👍
5:24
Home Assistant Control Panel For My Wall
11:19
Просмотров 190 тыс.
AC Dimmer with Arduino | RobotDyn AC dimmer
4:10
Просмотров 41 тыс.
How to Use Arduino Interrupts The Easy Way
33:28
Просмотров 79 тыс.
Копия iPhone с WildBerries
1:00
Просмотров 7 млн
ЗАБЫТЫЙ IPHONE 😳
0:31
Просмотров 13 тыс.
КРУТОЙ ТЕЛЕФОН
0:16
Просмотров 6 млн