How To: Driveway Swing Gate Automation (Shelly + BFT) - Working Perfectly with states!

With my BFT-Thalia I used this:

Shelly 1 v3 + addon

  • Shelly 1 v3: #1 and #0 from Shelly 1 to BFT Thalia’s case terminals #60 (COM) and #61 (IC 1)
  • AddonShelly: #black and yellow from Shelly to BFT Thalia’s case terminals #26 and #27

it works :slight_smile:
Cattura

Looks like I’ll be getting the Roger Edge1 controller. I’m waiting on the vendor to check that terminal 19->20 gives me a signal all the time that its open. Not quite sure whether this is night hours only, or turns off after x mins, etc.

Looks like I’ll be able to connect across 33 and 34 to open or close, though I’m wondering whether I need a 3rd switchable contact to open the ped gate.

I might also want read the ‘obstructed’ signal back from the photocells, as I can imagine that might be quite useful when triggering automations. The Shelly gives me a spare input, so it could be that I can detect a change here. Again, not sure whether they’re powered all the time, or only when the gate is being bothered.

Lots to explore. Might have to just buy the kit and find out how it works :slight_smile:

I might also want read the ‘obstructed’ signal back from the photocells, as I can imagine that might be quite useful when triggering automations.

Aren’t you overcomplicating this? I also have a tendency to ignore simple solutions, but I learned the hard way the KISS principle.
In reality, gate operation can be interrupted by a number of reasons - not just photocell, also other safeties like too high load when something gets in the way. Or somebody else using a remote. Or some kind of a fault. There are too many options, too much time to program all possibilities in the world.
I managed to read: (a) if the gate is open (b) if the gate is moving. From this you can easily figure out that your command didn’t complete successfully. This is simple to code and gives you pretty good information. Then you can act - e.g. try again. Or display camera view.
Just my advice from spending too much time on this exact project :slightly_smiling_face:

1 Like

Possibly…. I was coming more from the “leaving the gates open because we are expecting guests but also getting a chime in the house when they drive/stroll through the gap” use case, vs detecting a failed operation.

As you rightly say, the latter is easily done with a script that calls the operation, waits for 30 secs, checks the status and sends a notify if it doesn’t match the target.

Nice informations about the BFT and the shelly.

I’m using shelly1 on my bft, and it’s working well.
I don’t have the #26 and #27

If I want to get the status of the gate, do I have to connect only the SW to the #20 or #21 ?

My shelly is connected to the 220V, on 24VAC it’s not working well.

The custom bft integration finally gave up for me so I added an electromagnetic relay to the I2 input on my Qubino Flush 1 relay to pickup the gate status from #20/#21 (#26/#27 weren’t working for me), stepping the voltage up from the BFT board 24VDC to 240VAC as I’m running the Qubino from a 240V supply in the BFT controller casing (24VDC supply wouldn’t work from the BFT board as others have found).

Working great now, only issue is the loud electromagnetic relay when it’s activated (gates open). Going to try swapping for a solid state relay and hoping for a quieter result.

Khar, thank you for you work.
Can you share HA config example?

I have a Shelly Uni wired in but cannot figure out how to configure HA with two separate MQTT topics for the cover. I.e.

command_topic: "shellies/Shelly-BFT/relay/0/command", payload_open: "on", for open
command_topic: "shellies/Shelly-BFT/relay/1/command", payload_close: "on" for close

Does anyone have any ideas?

Figured it out and I hope this helps others.

I’m using a Shelly Uni with two inputs connected to the two AUX outputs of my Thalia. One set to “Gate Open” and the other “Flashing Light” (gate moving).

The the two outputs are connected to the Thalia inputs set as “Open Gate” and “Close Gate”.

Here’s my config which uses an MQTT button for gate open and gate close and an MQTT binary sensor to detect if the gate is open or moving.

These feed into a cover template that can detect open or closed and I have a separate entity on the dashboard to show if the gate is moving.

Screenshot 2022-08-02 at 12.10.54

mqtt:
  button:
    - unique_id: shelly-bft-open
      name: "Open Driveway Gates"
      command_topic: "shellies/Shelly-BFT/relay/1/command"
      payload_press: "on"
    - unique_id: shelly-bft-close
      name: "Close Driveway Gates"
      command_topic: "shellies/Shelly-BFT/relay/0/command"
      payload_press: "on"
  binary_sensor:
    - name: "Driveway Gates Open"
      device_class: "door"
      state_topic: "shellies/Shelly-BFT/input/1"
      payload_on: "1"
      payload_off: "0"
    - name: "Driveway Gates Moving"
      device_class: "moving"
      state_topic: "shellies/Shelly-BFT/input/0"
      payload_on: "1"
      payload_off: "0" 

cover:
  - platform: template
    covers:
      driveway_gates:
        device_class: gate
        friendly_name: driveway gates
        value_template: >-
          {% if is_state('binary_sensor.driveway_gates_open', 'on') %}
            open
          {% else %}
            closed
          {% endif %}
        optimistic: true
        open_cover:
          - service: button.press
            target:
              entity_id: button.open_driveway_gates
        close_cover:
          - service: button.press
            target:
              entity_id: button.close_driveway_gates
2 Likes

Thanks, @perimore. I’m using the same setup as you and your YAML also. The only difference is that I’ve got a BFT Deimos Ultra with a Merak board.

Everything seems to be working fine so far, however the gate status doesn’t update. It is always “Closed”. I have AUX3 set to “1” - SCA GATE OPEN LIGHT.

Did you have to connect terminals 51 and 27 to provide 24v power, as per @Khan suggested earlier in the thread?

BUMP

Any one know if there is any harm in jumpering terminals 51 and 27 to provide close Open/Close status to Shelly Uni?

Thanks.

Someone tried the same thing with BFT A400 with HAMAL board ?
Seems quite the same as merak, but without the screen, and it seems #61 and #62 are not manageable.

I tried to use the two contactors on #42 and #43 to know if it’s open or close, directly connected to input 1 and 2 of Shelly uni, but does not seems to work… :’(

@sos_nz great guide, and i’m asking something.

my case of use will be this (because i want to touch the board less):

that’s my motor, bft deimos ultra bt a400

i have a button inside the house which opens the gate (wired probably between 60 and 61) so i wanted to “pick” the wires from there and power the shelly with 220v inside the house.

the only doubt left is, how can i get the state with the board? or is it better to wire a reed sensor between SW and L (is it L even with 220 right?)

thanks in advance :slight_smile:

1 Like

Hi Khar,

Thanks for providing these instructions and I’ve been trying to follow although my brain density is proving a problem.
I’ve got the same BFT ultra as vh13294 except i’ve got a Shelly Plus 1. I’m assuming i wire the N+ to port 51 and L to port 50 to power the device? Is that correct?

Hello,
My bft deimos ultra bt a400 works with only 1 remote button. It is simply operates “start- stop- reverse” for every press.
I hava a shelly 1 and I would like to connect it to main board.
I am a little confused about which pin should be attached to which pin.
I have flasher and contact sensor accessories connected to main board also.

Can someone lead me about to process?

@Khar thanks for this guide, I found it really useful when setting up my Thalia P and Guino Ultra motor.

The only small issue I have (not sure if I’ve not done something right, or it’s just how it is) is that if I use the BFT remote control to open or close the gate, HA doesn’t know the gate state. It’s an easy fix in that if it’s closed and I tell HA to close the gate, the state is restored.

I have to say, that I’ve not implemented anything on Aux setting 8 (magnetic lock) which could fix that.

The only other thing, is the open and close buttons work great, but I am not able to stop the gate at any point. With the remote, I press it once to open, again to stop, and again to close.

With a second Uni, and therefore more outputs, I can see I can implement the Logic 4 Ped (pedestrian) feature which looks good.

It looks like 71 gives a stop / go function so I’m going to investigate that too.

@perimore Thanks for this. I copied you and it works great!

Hello @Khar ,
How is your ESPHome project?
Would you mind of sharing ESPHome config?
Thanks

Hello, thank you for your guide.

Can someone help me with my Garage Gate Control Unit? It is a Roger H70/10CC-11CC.

I am able to control the opening and closing of the gate using the Shelly Plus 1. Having my home electrical installation connected to the Live and Neutral connections of the Shelly and the terminals 0 and I of the Shelly connected to the gate board terminals PP and COM.

Alternatively, I could also power the Shelly with 24V by connecting the gate board terminal 24V to the Shelly connector N, and the board connector COM to the Shelly connector L. The Shelly connectors 0 and I would still be connected to PP and COM.
(I hope the +/- wiring are not reversed)

I noticed that I could possibly have an indication if the gate is not closed if the gate board connectors SC/COM are connected to a 24Vdc light.

Is there a way I could connect the SC connector to a Shelly to have an indication of “Door Not Closed”?
I tried connecting the gate board terminal SC to the Shelly terminal SW but I get no switch indication change in the Shelly APP when the door is open.

How could I fix this?

Thank you in advance.

This is the explanation of the board connectors.