Thank you, this works great.
I could make it work with a Shelly UNI without flashing to Tasmota (including the integration in Home-assistant). @MARn @acesyde @nau Why did you choose to flash it ?
Merci !
Hi,
Thanks for all information posted here.
My gate has a Came BXV controller and I also wanted to control it from Home Assistant, so I used a D1mini (ESP8266) with ESPHome to build the cover.
I am sensing information both from the limit switches to determine when the gate is fully open or closed, and also from the motor to know if the gate is moving (and in which direction). This allows ESPHome to evaluate the position of the gate, even if it is controlled using the original Came remote control.
Here is a demo video: https://youtu.be/gJ1Nn_VbDwY
And all details, code and schematics are in this blog post:
Introducing CHAI - a CAME gate controller to Home Assistant Interface - Vince's thoughts
Happy hacking !
Vincent
Hello, community!
Could someone please help me to debug or understand the issue?
I have added Shelly Uni flashed to ESPHome to my Came ZF1 gates controller. Thanks, @MARn, for the diagram.
I can open and close the gates but struggle to get open/closed status. Initially, I had an issue with the sensor reporting many state changes every second. After adding delayed_on_off
, this is resolved, but I can’t get the status of the gate.
Based on the manual, on terminal 10-5, an open gate indicator can be mounted. But I can’t get its status using my Shelly.
I have attached a light bulb to confirm that the motherboard is operating correctly. The light bulb lights up when opening the gate and turns off after a short delay when the gate is closed. Here is the recording.
Here is my yaml file for Shelly:
esphome:
name: garage-gates-opener
friendly_name: Garage gates opener
esp8266:
board: esp_wroom_02
restore_from_flash: true
logger:
esp8266_store_log_strings_in_flash: False
level: DEBUG
web_server:
port: 80
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: !secret gates_ap_ssid
password: !secret gates_ap_password
api:
encryption:
key: !secret gates_api_encryption_key
ota:
password: !secret gates_ota_password
# Input
#GPIO12 (1)
#GPIO13 (2)
# Output (Relay)
# GPIO04 (2)
# GPIO15 (1)
sensor:
- platform: wifi_signal
name: "RSSI"
id: sensor_rssi
update_interval: 90s
entity_category: "diagnostic"
- platform: uptime
name: "Uptime"
id: sensor_uptime
update_interval: 300s
entity_category: "diagnostic"
switch:
- platform: gpio
pin: GPIO15
name: "Gate Switch"
icon: "mdi:gate"
id: gate_switch
on_turn_on:
- delay: 500ms
- switch.turn_off: gate_switch
- platform: gpio
id: adc_range
name: ADC Range
pin: GPIO14
restore_mode: RESTORE_DEFAULT_ON
binary_sensor:
- platform: gpio
name: "Close Sensor"
id: is_gate_closed
pin:
number: GPIO12
mode: INPUT_PULLUP
inverted: false
filters:
- delayed_on_off: 60ms
light:
- platform: status_led
name: "LED"
id: led_status
pin:
number: GPIO00
inverted: True
internal: True
restore_mode: ALWAYS_OFF
cover:
- platform: template
name: "Gates"
icon: "mdi:gate"
device_class: gate
lambda: |-
if (id(is_gate_closed).state) {
return COVER_CLOSED;
} else {
return COVER_OPEN;
}
open_action:
- switch.turn_on: gate_switch
close_action:
- switch.turn_on: gate_switch
stop_action:
- switch.turn_on: gate_switch
optimistic: true
assumed_state: false
captive_portal:
I think my previous message was unclear about what ‘can’t get the status’ means. When I open or close the gate, the sensor’s state changes several times to open or close. The sensor’s state doesn’t match the state of the lightbulb when it was connected. Or, without any operations, the status changes from ON to OFF and vice versa.