Use your Shelly 1 for electric gate opener

The tiny size allowed me to put a Shelly 1 inside my interkom that also has a button to open my electrically operated front door.

Trick was to bring 220V to the intercom (luckily I had a wall socket near by) and connect it to L and N of the Shelly 1.
Then I connected the 0 and 1 of the Shelly 1 to the Interkom button.

Below a simple code as package. The system works perfectly. Be AWARE that some electric door work at 12V not 220V, in that case you should change jumper position in the Shelly 1 to the 12V position (I tried that, but BEWARE THAT my Shelly 1 broke, awaiting news from the support, although the 220V works perfectly).

switch:
  - platform: shelly
    switches:
      cancello_12:
        path: /relay/0 # (optional, defaults to /relay/0)
        host: 192.168.1.161
       # username: admin
       # password: admin
      cancello_14:
        path: /relay/0 # (optional, defaults to /relay/0)
        host: 192.168.1.162
       # username: admin
       # password: admin
      cancello_carrabile_14b:
        path: /relay/0 # (optional, defaults to /relay/0)
        host: 192.168.1.163
       # username: admin
       # password: admin
automation:
  - alias: Apri cancello 12
    trigger:
      platform: state
      entity_id: switch.cancello_12
      from: 'off'
      to: 'on'
    action:
      - delay: 
          milliseconds: 1250
      - service: homeassistant.turn_off
        entity_id: switch.cancello_12
  - alias: Apri cancello 14
    trigger:
      platform: state
      entity_id: switch.cancello_14
      from: 'off'
      to: 'on'
    action:
      - delay: 
          milliseconds: 1250
      - service: homeassistant.turn_off
        entity_id: switch.cancello_14
  - alias: Apri cancello carrabile 14 b
    trigger:
      platform: state
      entity_id: switch.cancello_carrabile_14b
      from: 'off'
      to: 'on'
    action:
      - delay: 
          milliseconds: 1250
      - service: homeassistant.turn_off
        entity_id: switch.cancello_carrabile_14b
1 Like

Hey, nice project. I’m looking forward to use some Shelly 1 as well. Where did you get the platform “shelly” from?
Can’t find it on https://www.home-assistant.io/components/

Shelly products are great. Thanks for the shelly.py it works great for use as a switch. I want to use a Shelly2 for (Roller Shutter) Shelly roller mode. Who has a config to integrate in a cover template? Shelly has great API documentation, but I can’t figure it out… (http://shelly-api-docs.shelly.cloud/#roller-mode). Can someone help me???

My roller shutter has an open pin and a close pin. I think most do, they work by grounding briefly the appropriate pin. So that similates a momentry button press.

I found this thread as I was looking for peoples experiences with Shelly stuff. They look amazingly easy to work with due to exposed flash and gpio sockets. Plus the relay has both contacts exposed and is 16A rated. Plus they are inexpensive. I have ordered 2, need to decide whether to use stock or tasmota firmware on them, tasmota probably.

now you can also use your own mqtt server (haven’t tested it). I personally use stock firmware, works perfetcly also locally, so why bother

Yes, I’ll probably do that, I read up on the api after i posted that.

Did you already find out how to get the brief grounding working?

We have a garage gate motor with exactly the same setup. Only difference is that mine are already flashed with Tasmota.

I am using this https://github.com/marthoc/GarHAge I am fairly new to HASS, was not really aware of tasmota. I have a reed switch on the door, opening, closing and status is done with mqtt. there are npn transistors on the gpio pins which pull down the respective switch pins on the garage door controller. You could use relays instead. Before I installed Hass I just had a simple html page on the esp8266, it essentially just pulled down the pin for 400ms, which meant making the gpio high for that amount of time.

I’ve just configured my Shelly 2 to work within Home Assistant as a roller shutter controller. It works well.

Here’s my yaml, if it’s of any help to you. I should add that it’s not all my own work but I can’t recall where I copied the bulk of it from, so thank you to the originator!

EDIT: I came from here.

cover:
### Garage Door ###
  - platform: mqtt
    state_topic: "shellies/shellyswitch-123456/roller/0"
    command_topic: "shellies/shellyswitch-123456/roller/0/command"
    name: "Garage Door"
    qos: 0
    retain: false
    optimistic: true
    payload_open: "open"
    payload_close: "close"
    payload_stop: "stop"
    open_cover:
    - service: mqtt.publish
      data:
        topic: 'shellies/shellyswitch-123456/roller/0/command'
        payload: "open"
    close_cover:
    - service: mqtt.publish
      data:
        topic: 'shellies/shellyswitch-123456/roller/0/command'
        payload: "close"
    stop_cover:
    - service: mqtt.publish
      data:
        topic: 'shellies/shellyswitch-123456/roller/0/command'
        payload: "stop"

There’s currently a beta firmware for the SHelly 2 that supports intermediate openings which will be great for awnings when it is released.

Great, now I need to find the hardware, never had motorised curtains, so I know nothing about :slight_smile: