Roller shutter with a single command - emulate cover

Hi. I have a roller shutter (and a cover as well), controller with a single input trigger. It emulates the pressing of a button: pressing starts moving, pressing stops, pressing again starts on the opposite direction.

I’d like to emulate cover functionality: with the help of a timer, by knowing how long it takes to fully open the cover/roller, I should be able to estimate the position of the device and act accordingly.

I was wondering if:

  1. something similar already exists: I did several searches but didn’t find anything, but I might have used the wrong keywords
  2. if nothing exists, I’d like to try creating a blueprint. For this, I’d like some advices on how to begin: I guess I need to emulate the three buttons (up/stop/dn) and a sensor for the current position

Thanks.

a quick search brings me the Time Base Cover, I imagine this integration would be perfect.

I’m not sure how the ESP would know what the next button press will do, that might take a little more working out.

1 Like

Thank you, I knew I was missing something.

I’ve another question, tough: can I use ESPHome components in HA?

thanks again

Have a look here, because it should automatically connect, mine don’t and I don’t know why, I have to do them manually.

Unless you mean something else :slight_smile:

Screenshot 2024-03-21 183226

But this means I need to connect my roller shutter to an ESP device. My roller is triggered by a Shelly 2PM, so I don’t need it…

Oh :slight_smile:

I was under the impression you were going to emulate the button on the ESP, you’ve not mentioned the shelly device.

I’ve reread the original post and it actually doesn’t state what type of ‘button’ you have. Is it physical? Is it on a remote? Can you bypass it?

The Shelly IS an esp device already. You just need to flash it with esphome, which the Shelly allows you to do quite easily.

@maxxer I don’t have a Shelly, but a search found this flashing tutorial that should help.

@ShadowFist Is the above a decent link?

Not sure if the Tasmota part is still required for ota.
It’s been a few years since I played around with shellies & I’ve always done the first flash via wire

Do you think I can flash the .bin file generated by ESPHome directly as a firmware to the Shelly?

I found a Twitter thread where a HA dev hinted about OTA flashing for Shelly devices from ESPHome, but later in the thread he says he didn’t continue the development. I see Shellies can be flashed via cable and PINs, but I don’t have one ATM.

So, I had a quick search. Looks like Tasmota intermediate step is still required for ota because there’s not enough space for original firmware & esp firmware during the first flash.
Unfortunately it seems the more recent Tasmota versions cause issues after reflashing with esphome.

The only currently working way is to flash via cable the first time, which is my preferred option anyway.
This thread explains everything, including the Tasmota issue.
Hope it helps, even if it probably wasn’t what you wanted to hear

1 Like

Thank you for the help. I did find that thread yesterday, but didn’t dig fully into it. My bad.

Anyway I don’t know if I want to embark into reflashing it. I have a spare ESP32 board, I might have a look at it, but I fear it won’t have relay PINs like the Shelly.

I also did find time_cover implementations for HA, but all of them are abandoned. The one available in HACS throws a Python error, but might be a shorter path for me than flashing :sweat_smile:

Thanks again, ciao!

The link I gave you at the beginning shows you the time_cover, it’s an integration, you put it together yourself, in Yaml, on the ESP, or am I not understanding? What were you going to flash to the Shelly?

To my understanding, the Time Base Cover you linked is an ESPHome component, thus usable on ESP devices only. Am I wrong?

Not at all, I just thought the plan was to flash your Shelly with ESPhome. I think we were on parallel roads | | but not quite the same one :slight_smile:

Anyway, it seems you have enough information now, let us know how you get on.

1 Like

My initial goal was to find an HA component to be used with the Shelly. Flashing the Shelly came up from the discussion, I wasn’t aware of this option.

1 Like