arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
21.79k stars 4.73k forks source link

Dimmer #469

Closed macpit closed 5 years ago

macpit commented 7 years ago

Hi arendt,

Great Project and many thank for your work! I love it and it's work perfect. I know that is not project related but maybe you can help me.

I search a W-iFi dimmer for 230V/~400W for pulps. Sonoff is veyr cool but there is no dimmer :-( Maybe you have a tip for me?

Regards,

Marc

davidelang commented 7 years ago

I have not been able to find a dimmer that uses esp-8266 yet. k

nosaj66au commented 7 years ago

I'm currently working on a renovation and also required 240Vac dimmers. Im running trials using a push button dimmer "SAL Push Button Dimmer 350W Master Switch SDD350TCM" which has a remote switch option SDD350TCS. The remote/slave push button is just 2off, 10K resistors in series and a tactile switch. This I have replaced with a sonoff and 2 off 10K resistors. I can turn the light on off and dim. I'm currently look at way to set dim level using a sonoff POW to measure power consumption or Current but it's a bit flaky at the moment. Work is still on going. Jaosn

Blue407 commented 7 years ago

I'm also looking for the same thing. The ability to dim 230v GU10 LED bulbs. (They are dimmable type)

jbarneson commented 7 years ago

+1 I'm hopeful sonoff releases one soon

Amli2011 commented 6 years ago

Wishing for something like this: http://www.apogeekits.com/advanced-electronic-kits/dc-light-dimmer-k8064.htm Together with pwm out of a tasmota software in a sonoff package with CE and terminals for a wall switch, or even better, built into a sonoff touch panel. Could we all tip sonoff/itead about it? Maybe they will make it if the interest is there?

klaernie commented 6 years ago

Has anyone thought about replacing the regular relay by a solid state relay? I think one of these fostek SSR should be fine with running smaller resistive loads in pwm. Could the esp8266 run pwm on the output steering the relay?

hesich commented 6 years ago

Only in German, but google can translate https://ex-store.de/2-Kanal-RS232-Dimmer-Modul-V4-fuer-Unterputzmontage-230V-3A they have also the relay version (currently sold out) https://ex-store.de/ESP8266-WiFi-Relay-V31

Martinvdm commented 6 years ago

Is there still no dimmer possible with tasmota and mqtt?

davidelang commented 6 years ago

do you have a module that has dimmer capabilities (instead of the relays that almost all of them have)?

Martinvdm commented 6 years ago

https://github.com/Theb-1/ESP8266-wifi-light-dimmer

davidelang commented 6 years ago

I was hoping that there was a commercial one available :-(

trying to do that sort of very precise timing on a system that is doing a lot of other things (network I/O, etc) is going to be quite a problem

On Sun, 14 Jan 2018, Martinvdm wrote:

https://github.com/Theb-1/ESP8266-wifi-light-dimmer

jonas59075 commented 6 years ago

I have just ordered this one:

https://www.aliexpress.com/snapshot/0.html?spm=a2g0s.9042647.6.2.iGlAYq&orderId=88957336184289&productId=32562891943

It will arrive in 10-15 Days.

Perhaps it is possible to modify the tasmota firmware to get it work.

This one seem interesting too: https://de.aliexpress.com/item/AC110V-220V-WiFi-0-10V-Touch-Panel-LED-Dimmer-output-0-10v-dimming-signal-by-ios/32799514095.html?spm=a2g0s.8937420.0.0.714a4c39LINMVF

But it only comes in black and I need it in white

bensuffolk commented 6 years ago

Hi @jonas59075 that link does not work (I think its a copy of your order so only works when your logged in).

Was it this you were linking to? https://www.aliexpress.com/item/Best-Sales-Wallpad-White-Glass-LED-110-250V-EU-Phone-Wifi-Wireless-Remote-Controlled-Power-Dimmer/32562891943.html

Ben

jonas59075 commented 6 years ago

Oh, sorry for that. Yes ... your Link is the right one ...

Have anyone experience with that device?

bensuffolk commented 6 years ago

Thats pretty expensive, you have to be keen on dimming existing lamps I think rather than buying some dimmable ones like the B1.

But it will be interesting to see if its got the same esp8266 chip in. Nice to know what options are out there for when I come to do some more bits on my home.

Martinvdm commented 6 years ago

This looks promising:

http://www.instructables.com/id/ARMTRONIX-WIFI-SINGLE-Dimmer-Board-V02/

nosaj66au commented 6 years ago

Hi Guys, I think your barking up the wrong tree. If we are serious about HA we should be moving to LED, as its low power and just makes good sense. If we say YES, LED is the way to go then, everyone knows 240/110 VAC LEDs (driver and LED) are a bitch to work with and have mixed results, usually poor due to flicker etc. If we go back to electronics 101 a LED is a DC device and the best way to dim it is PWM of a suitable DC supply voltage 12/24/36 volts and the current is very low < 1-2 amps. I recently approached Itead to provide a quotation to manufacture a T1 wall switch replacing the relay/s with Mosfet/s and a different power supply to drive the LEDs. The price was 7K USD for the proto types 1-2-3 gang and just a but to rich for an individual, but for a group ???? For the power supply we have 2 choices, power it with 240-95VAC and configure the output voltage for driving LEDs or just supply the switch with the DC voltage your LED requires. I have hacked a 3 gang T1 already by removing 3 component and install a 24vdc to 5vdc supply. Which works perfectly. I have done many dimming trials with a H801 as it Mosfets switch the negative rail, I can remove the LED manufactures driver and power the LEDs directly using PWM giving perfect dimming 1 to 100%. In short by combining these 2 products T1 and H801 you could end up with a great solution What do you guys think? Jason

madjam002 commented 6 years ago

A dimmer would still be useful for some applications. I’d like to wire up my salt lamp which has a manual dimmer at the moment, and the bulbs for a salt lamp cannot be LED.

jonathanschneider commented 6 years ago

A dimmer would still be useful for some applications. I’d like to wire up my salt lamp which has a manual dimmer at the moment, and the bulbs for a salt lamp cannot be LED.

The same goes for Edison light bulbs.

This looks promising:

http://www.instructables.com/id/ARMTRONIX-WIFI-SINGLE-Dimmer-Board-V02/

I happened to order this before stumbling upon this thread. I'll let you know about it once I received it.

checksummaster commented 6 years ago

This can be the solution for real dimmer (not led solution), I will give a shot https://www.banggood.com/3Pcs-RobotDyn-AC-Light-Dimmer-Module-For-PWM-Control-1-Channel-3_3V5V-Logic-AC-50hz-60hz-220V-110V-p-1255783.html?rmmds=myorder&cur_warehouse=CN

nosaj66au commented 6 years ago

Agree let me know how it goes.

stanvv commented 6 years ago

Any updates? I just ordered this one, since the seller told me there's an ESP8266 inside.

https://www.aliexpress.com/item/WiFi-LED-Dimmer-Switch-220V-110V-Dimming-Panel-Switch-Connected-To-Alexa-Google-Home-Voice-Control/32859257784.html?spm=2114

reeso3000 commented 6 years ago

I ordered one like Stanvv and it arrived today. This is what it looks like inside if anyone is interested.

img_4201 img_4202 img_4203

qingz2004 commented 6 years ago

Does it work without changing the firmware?

reeso3000 commented 6 years ago

Yes it works without changing the firmware - Uses Smart Life app that is compatible with Alexa. The results are a bit mixed - it dims ok but the lights seem to flicker, I purchased dimmable leds (Gu10) to use in my kitchen and this is the result. Going to try it in my living room with B22 bulb to see if its any bettter.

qingz2004 commented 6 years ago

I bought the same one from Aliexpress, but a US version. https://www.aliexpress.com/item/WiFi-Light-Dimmer-Switch-Stepless-Dimming-Touch-Panel-Dimmer-Work-with-Alexa-Google-Assistant-IFTTT-White/32857809626.html It did not response or dim to the +/- touch button on the plate, but it did (some how, but not smooth) with Smart Life app. The bulb flickers a lot once dimmed. I tried with both dimmable LED and incandescent bulb. Even worse, after I tried a few times with phone app, the dimmer is completely dead. No response to anything. Only power cycle can fix it. I believe the MCU STM8S103F3P6 does not work or is not properly programmed, since all the touch button signals and the cross zero interrupt signal go to the MCU, and the MCU generates the PWM. I checked with a oscilloscope, the signals go into the MCU are perfect, but the PWM generated from the MCU is not. ESP8266 here is to communicate with the phone, and transmit the command to the MCU through the serial port. We might be able to bypass the MCU and use the ESP8266 to do everything.

epicality85 commented 6 years ago

I have the same one as @reeso3000. Im looking into modifying :D let us know if solve the issue.

They are available on Amazon UK for a fair price.

stanvv commented 6 years ago

Mine works fine with the standard app, but I'm trying to flash Tasmota. No success so far:

Got this schema of the ESP8266 by Hysiry, which is placed in the dimmer: https://fccid.io/2AKBPESP8266/User-Manual/User-Manual-3192780 I assume the schema at page 6 (3. Pin description) is flipped, see also page 13 (7. Minimum System Requirements). I think I got it in programming mode by connecting ground with IO0, cause the left dimmer button lights up, while it doesn't light up when only connecting the programmer. I soldered 4 pins to the board as follows. When switching 3v3 and ground it didn't power up, so I assume that is connected correctly. wifi_module

But I get the 'standard' error:

warning: espcomm_sync failed error: espcomm_open failed error: espcomm_upload_mem failed error: espcomm_upload_mem failed

I also tried to switch TX and RX, but that didn't work.

Anyone who can help?

qingz2004 commented 6 years ago

On my US version, there is no pin hole for Tx Rx, but anyway the serial port from ESP8266 is connected to the MCU STM8S103F3P6 which I think also drives the bus. You may have to cut the trace (at least the Rx) between ESP8266 and MCU before you can flash the ESP8266. I haven't tried that. You may want to backup the image from the original ESP8266 before you flash it in case you want to go back, since Tasmota does not support it yet.

qingz2004 commented 6 years ago

Anybody tried this one? https://www.amazon.com/2018Upgraded-Wireless-Assistant-Anywhere-Installation/dp/B07CL1M664 Does it use ESP8266?

ahzazou commented 6 years ago

Im looking to buy this dimmer , any success guys !?

stanvv commented 6 years ago

Unfortunately not.. I tried to contact the manufacturer asking where the pins (TX/RX/GND/3V3) are placed, but I don't think they understood what I meant. Anyone who can help?

ahzazou commented 6 years ago

You need to connect those as mentioned on the board , them wile booting your esp8266 you need to connect gpio0 to ground to enable flash mode

stanvv commented 6 years ago

Yeah I know how to flash Tasmota in general, but I don't know which holes belong to which pins. See my previous post.

ahzazou commented 6 years ago

You can use the esp8266 type you have and it has all the pins you need

qingz2004 commented 6 years ago

dimmer This is how mine looks like. It's a USA version of the dimmer. It is basically a ESP-12F. The picture show its backside.

ahzazou commented 6 years ago

This one can be hacked easily as tx Rx vcc GND AND gpio0 is appearant on board

qingz2004 commented 6 years ago

As I said in the previous post, the serial port is used to connect between esp-12F and the MCU. And the MCU also drives the port when you apply the power, so you have to cut the wire before you can program the esp8266.

qingz2004 commented 6 years ago

Received this one from AliExpress today. http://www.ihome-s.com/product/278023134 Works perfect with eWeLink and the buttons. No flickery at all when dimmed. And no flickery even with my dimmable LED bulb. I believe it has ESP8266 since it uses eWeLink, but I can not open it and see the inside. It's really hard to open it, and I don't want to break it.

galak commented 6 years ago

I picked up:

https://www.amazon.com/gp/product/B07CTNSZZ8/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1

Its got a TYWE3S module in it, but I haven't had any luck in getting the device to flash. I'm able to see output on the serial port. I'll post some picture later if people are interested.

qingz2004 commented 6 years ago

Is there any other MCU like STM8 other than the ESP8285?

galak commented 6 years ago

Is there any other MCU like STM8 other than the ESP8285?

There might be, there are some chips that I haven't identified yet. Why do you ask?

galak commented 6 years ago

There might be, there are some chips that I haven't identified yet. Why do you ask?

@qingz2004 Looks like there is a Nuvoton 8-bit micro

qingz2004 commented 6 years ago

If there is another MCU, flash ESP8285 will not get you anywhere. The other MCU is the main processor, and the ESP8285 is used for WiFi communication only.

galak commented 6 years ago

Here are some images for the WIFI Dimmer:

img_4881 img_6836 img_9718 img_8149 img_0788 img_1946

The MCU is a Nuvoton 8-bit micro (N76E003). There is also a Byd IT Capacitive Touch Key Controller (BF6911A22)

galak commented 6 years ago

If there is another MCU, flash ESP8285 will not get you anywhere. The other MCU is the main processor, and the ESP8285 is used for WiFi communication only.

I tried disconnecting the MCU and that didn't help.

qingz2004 commented 6 years ago

screenshot_6 TYWE3S is basically a packed ESP8266. From the picture, I can see only TXD, RXD, RST, EN, GPIO15, GND, and VCC are connected. Before you flash, you have to ground GPIO0 and make sure Tx and Rx are not connected to anywhere else. Make sure you backup the original stock image, or you may lose the control to the Dimmer. I guess all the logic is inside the MCU, like Zero cross detection, PWM generation, touch button response. While EPS8266 is just get the commands from WiFi and transfer them to the MCU through the Serial port.

galak commented 6 years ago

TYWE3S is basically a packed ESP8266. From the picture, I can see only TXD, RXD, RST, EN, GPIO15, GND, and VCC are connected. Before you flash, you have to ground GPIO0 and make sure Tx and Rx are not connected to anywhere else. Make sure you backup the original stock image, or you may lose the control to the Dimmer. I guess all the logic is inside the MCU, like Zero cross detection, PWM generation, touch button response. While EPS8266 is just get the commands from WiFi and transfer them to the MCU through the Serial port.

I'm guessing the fact that some combo of Tx/Rx seem to be connected to the cap sensor might be my issue. I've disconnected the microcontroller board, but haven't tried w/o the cap sensor. I've verified that my GPIO0 to GND is working - I'm in boot/uart flash mode based on the UART output:

 ets Jan  8 2013,rst cause:2, boot mode:(1,6)

vs normal boot output of:

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 1396, room 16 
tail 4
chksum 0x89
load 0x3ffe8000, len 776, room 4 
tail 4
chksum 0xe8
load 0x3ffe8308, len 540, room 4 
tail 8
chksum 0xc0
csum 0xc0

2nd boot version : 1.4(b1)
  SPI Speed      : 40MHz
  SPI Mode       : QIO
  SPI Flash Size & Map: 8Mbit(512KB+512KB)
jump to run user1 @ 1000

OS SDK ver: 1.4.2(23fbe10) compiled @ Sep 22 2016 13:09:03
phy v

Guess I need to solder to the TYWE3S pins and disconnect it from the micro & cap sensor.

qingz2004 commented 6 years ago

I can't see it is connected to a cap sensor if you disconnect both ribbon cables. It's not hard to trace the wires with a multi-meter, or even better if you have a logic analyzer to check the activities on the serial port.

qingz2004 commented 6 years ago

After cutting the RXD trace, I was able to read and write the flash. My board is this. ESP-12F with 4M flash. https://www.aliexpress.com/item/WiFi-Light-Dimmer-Switch-Stepless-Dimming-Touch-Panel-Dimmer-Work-with-Alexa-Google-Assistant-IFTTT-White/32857809626.html Now I'm waiting for Tasmota support, so I can bypass the onboard MCU, use only the ESP8266 for everything.

Can we borrow some code from here?