Martin Jerry / Tessan Dimmer Automation Help [SOLVED]

How did you flash the switch?

I tried compiling the ESPHome and have the bin file. I tried using Tasmota Upgrade Firmware.

I get this message:
Upload Failed

Upload buffer miscompare

Are you running a new version of Tasmota? Apparently Tasmota version 8+ will not let you flash esphome.

According to digiblur, the 3 way dimmers do not use esp8266 chips. Unless somebody has figured it out or something has changed (I haven’t researched it much further), Tasmota or esphome does not appear to be possible.

Yes I am running the latest version of Tasmota 8…1. So what version were you running when you flashed ESPHome?

I usually flash from version 6 or 7 and it works fine. The last time i used tuya-convert it did have an older Tasmota bin included which I always used to bootstrap. Probably worth trying to downgrade… I think anything below 8 still works. Let us know if you have success

Also note you will need to reboot it once (small button right below the rocker switch) after flaahing esphome, otherwise you will see some odd behavior. Just one reboot clears it up.

@rlust i just noticed this on the esphome “Migrating from Tasmota” page. May be worth a try and hope it helps.

If you are using Tasmota 8+ and get an error after uploading the firmware, go to the console and type SetOption78 1 , then restart the device and try the firmware again.

1 Like

Thanks for the reply Mark, tired your SetOption78 1 and still fails upgrade to ESPHome. I will try to get an older bin and try that.

I got it working by configuring a basic ESP8266 with nothing, and uploaded it. That worked. Then I uploaded a full light configuration!! Thanks!

Did you figure out how to modify this to operate Hue bulbs? I’d like to do the same… Thanks!

I ended up returning the switch :confused:

Any way to “invert” the main button light (the small blue circle that’s lit when the switch is on) so that it’s lit when the switch is off with ESPHome? It’d be useful for helping find the switch in a dark room :no_mouth:

Unfortunately, no. The blue LED is tied to the relay, so it comes on when the relay does.

Bummer, but makes sense. Could the red (GPIO4) be used instead since it’s separate?

It is possible to turn on the red status light when the switch is off - that’s how I have it setup via Tasmota. I’m using digiblur fork: https://github.com/digiblur/Tasmota. That fork also allows to send MTTQ commands on long power button press and, feature that I don’t use, multipress button combinations (6 per button!).

I have three issues with that fork - leds are too bright, light brightness gets out of sync with led status (not a big issue) and dimming is not immediate and could be smoother (I’m not sure if this is due to hardware).

It looks like the red LED uses GPIO 4, which isn’t defined on mine. It’s an inverted pin according to the digiblur’s Tasmota template.

So, you could try defining GPIO 4 as an additional power_supply component, set to non-inverting (so when the power supply is OFF the LED should illuminate and when ON would turn it off).

Tie that power_supply to the “light”.

Maybe something like this (this has not been tested):


light:
  - platform: monochromatic
    # https://esphome.io/components/light/monochromatic.html
    name: ${friendly_name}
    output: pwm
    default_transition_length: ${no_delay} 
    id: dimmer
    ## Add power supply to tie red LED to light
    power_supply:  redled

power_supply:
  - id: relay
    # https://esphome.io/components/power_supply.html
    pin: 
      number: GPIO16
      inverted: True
    enable_time: ${no_delay}
    keep_on_time: ${no_delay}
  ## Add Red LED
  - id: redled
    pin:
      number: GPIO4
      inverted: False
    enable_time: ${no_delay}
    keep_on_time: ${no_delay}

Hopefully that works.

Nice! I’m afraid that without this config I wouldn’t have succeeded.
I have one question. Is the dimmer supposed to work on long press up and down or it works only by clicking? These functions works out of the box, so is that a problem with my config?Thanks!

If you mean whether the dimmer continues to adjust while you hold it down, no it does not… it works by clicking.

This is mainly because it opens up other functions for long presses (or even multi-press if so desired). The current template is configured that holding down for a second or so will set it to 20% brightness, holding up for a second sets it to 100% brightness (note that both of these functions occur after releasing the button).

1 Like

Does anyone has the schematics of those tessan dimmers?
Mine is the EDM-01AA-EU and has 8 internal LEDs and only one button.

Maybe those other Tessan Dimmers are connected similar between the Controller and the ESP8266,
so if you got schematics or links, i would be happy.

Wolfram.

I have 2 MJ dimmers that were working on previous versions of HA and ESPHome. Now they are unavailable in HA. I can control them with switch website. Anyone have any ideas?

Sorry for reviving this old topic, but I wanted to see if anyone has found a solution to turn off the switch instantly, rather than the dimming routine that happens when you press the main button to power off (taking 1-2 seconds)? I have transition_length and no_delay set to 0s, but the behavior continues.

Background: I’ve been running four MJ-SD01 switches for about a year with Tasmota, but the wifi connectivity has been unstable since upgrading my home network to an Asus AIMesh system recently. It seems a well-documented compatibility problem with no real solution and not much interest from the Tasmota devs as far as I can tell. I loaded ESPHome onto one of the switches and it’s been rock solid. I like everything about it except this “power off” behavior, which kind of bugs my wife a little bit. I’ve experimented with light.turn_off instead of light.toggle, but no improvement. I’m very new to ESPHome, but I’ve been reading up on the docs and haven’t really been able to figure this one out yet. Thought I would check in to see if I can improve this before switching the other three to ESPHome. Thanks in advance!

PS: Big thanks to the contributors on this thread. The sketch works really well, and I’ve learned a ton from you all.