ratgdo / esphome-ratgdo Goto Github PK
View Code? Open in Web Editor NEWratgdo for ESPHome
License: GNU General Public License v2.0
ratgdo for ESPHome
License: GNU General Public License v2.0
Hi,
I'm attempting to control a door with a single button. I would like the button to act just like a "normal" button. In the US I'm pretty sure the state machine is:
If the door is closed, I press the normal wall control button the door will start to open, and with another press the door will stop.
Using Home Assistant (web interface)->Developer tools->TEMPLATE this code:
{{ states('cover.ratgdov2_big_door') }}
returns:
The door state is open.
but it should return:
The door state is stopped.
In the log the Status shows STOPPED but the state is reported as OPEN (in HA and the ESPHome UI)
07:22:26 | [D] | [cover:170] | 'Door' - Publishing:
-- | -- | -- | --
07:22:26 | [D] | [cover:173] | Position: 38%
07:22:26 | [D] | [cover:186] | Current Operation: CLOSING
07:22:27 | [D] | [ratgdo:595] | Cancelling position callbacks
07:22:27 | [D] | [ratgdo:188] | Status: door=STOPPED light=ON lock=UNLOCKED
07:22:27 | [D] | [cover:170] | 'Door' - Publishing:
07:22:27 | [D] | [cover:173] | Position: 38%
07:22:27 | [D] | [cover:186] | Current Operation: IDLE
07:22:29 | [D] | [esp8266.preferences:238] | Saving preferences to flash...
07:23:00 | [D] | [button:010] | 'Query status' Pressed.
07:23:00 | [D] | [number:012] | 'Rolling code counter': Sending state 435.000000
07:23:00 | [D] | [ratgdo:188] | Status: door=STOPPED light=ON lock=UNLOCKED
Thanks for the help!
Hi do you have a pin out diagram for the d1 mini?
I'm trying to understand the expected behavior when using just the 3 wires attached to my garage door motor. Right now, the garage opens and closes, however the status page and inside HA says the garage door is always open.
Should the door status be accurate without any sensors attached on the opposite side of the ratgdo board? If I use the physical button or remote, should I see a status change reflected on the device and in the logs?
My end goal is for this integration to provide the correct status so I can use it along with with a deadbolt lock. I have the deadlock lock attached to a zigbee relay board and it works great, however I need a open signal to accurately trigger the unlock.
Sorry, I've looked around a bunch and cant find the code to do a card in home assistant as shown in the Readme (with opening percentages). Can someone point me in the right direction?
I'm not sure if I'm the only one with this problem, but the wall button clock for the garage door opener resets to 12:00 whenever I apply an update or reboot the device.
As far as I know this is the only time it happens, but it is slightly annoying to have the clock flashing 12:00 and then I have to set it again manually.
Is the clock settable via the ratgdo, or is there something that can be done like shutting down the pins before applying an update that can prevent this?
Hello Again!
Just got my second door opener flashed with this and am running into an issue in HA where it's saying garagedoor2
entity names are not unique.
Platform mqtt does not generate unique IDs. ID ESPlightlight is already used by light.garagedoor1_light - ignoring light.garagedoor2_light
Same config as https://github.com/ESPHome-RATGDO/esphome-ratgdo/issues/9
HomeAssistant Discovery topic
# homeassistant/light/garagedoor2/light/config
{
"schema": "json",
"color_mode": true,
"supported_color_modes": [
"onoff"
],
"name": "Light",
"state_topic": "esphome/garagedoor2/light/light/state",
"command_topic": "esphome/garagedoor2/light/light/command",
"availability_topic": "esphome/garagedoor2/status",
"unique_id": "ESPlightlight",
"object_id": "garagedoor2_light",
"device": {
"identifiers": "50029150a64c",
"name": "garagedoor2",
"sw_version": "esphome v2023.6.2 Jun 24 2023, 21:14:15",
"model": "d1_mini_lite",
"manufacturer": "espressif"
}
}
In comparison I've got another device that's using ESPHome and it set up unique_ids with a prefix. IE
"unique_id": "d8bfc0fcf33e-uptime",
Any help appreciated. Thanks!
I use the door status output to turn on parking lasers that help with parking the cars in the right spot. I often enter the garage before the door is even fully up so the laser turns on a bit too late. It would be nice if the door status changed sooner as soon as the door starts opening. If you think about it, whether the door is partially or fully open, it is open and someone can enter. If there are use cases that would require that status to be high only when the door is fully open, then it would be nice for this to be configurable.
I am also happy to modify the code on my end as I need to modify it for other things such as being able to turn on the parking lasers manually when needed (mostly troubleshooting). I have also run into issues with the naming of entities (mostly the door as I want it to just use the name of the device since I called it "Overhead Garage Door") which led me to not use the 'package' feature.
When I used the MyQ HA integration to expose the cover entity to Alexa, I would be asked every time by my Echo devices to say the 4 digit voice code to open the garage. The first time I asked this Alexa asked me to set the code.
Through Ratgdo Esphome, Alexa ALSO asked me to set a voice code the first time I exposed the cover, but it never asks for the code via Esphome, so anyone can voice open the garage without a voice code.
Can we get the voice code working with this integration?
I'm having an issue where if I set the position be less than it's currently open it doesn't seem to go to the position, but rather just closes all of the way. I can't seem to figure out why. Any thoughts?
For example,
While closed, cover set Position 15 works... And it goes to 15 percent.
While open, cover set Position 15 just closes the door.
I ordered a Ratgdo 2.0 board but I guess I am going to get the 2.5 board now since mine has not shipped yet. Is the 2.5 board compatible with the esp32 d1 mini as it was with the 2.0 board?
Anyone able to help me with knowing which pins to use and what to plug into for this to work with this board?
Board link: AITRIP 3PCS Type-C USB ESP32...
I am seeing an issue and wondered if anyone saw this or what could be causing my issue. When I use an external power source for my Ratgdo, everything works properly. When I pull the 3.3v source from the board following the diagram here (very bottom) https://paulwieland.github.io/ratgdo/03_wiring_soldered.html, my remotes drastically lose distance. They are pretty much useless unless I am standing inside the garage when pressing a button. I assume I am drawing too much power from the board causing the remote receiver to be underpowered. Is there another 3.3v source on the board I could solder to and try?
I flashed this to ESP8266 NodeMCU. Does anyone know how the pinout would translate between D1 to the NodeMCU? I also assume that the board is not needed with NodeMCU because the MCU has the resistors onboard.
I apologize for what is likely a very basic question.
I am unable to flash ratgdo using their online flash and always intended to use this project as I use ESPHome for everything else anyway. So the thing I'm missing is the rolling code, which from the documentation it seems like you have to use ratgdo to get, then change over to ESPHome. Is this project capable of gathering that info, or do you absolutely HAVE to go through ratgdo first then flash the ESPHome version?
Thanks!
Since Ratgdo controls the garage and all ..
.. any chance you can add a user/pass authentication option? It's already built-in into the ESP-Home webserver: https://esphome.io/components/web_server.html just needs to be enabled.
having an option to disable the web server altogether would be great as well :)
In the original project an issue was opened to support the strange hybrid of lift master that is the older Liftmaster 8500. This model uses Security+ 2.0 for the wireless remotes, but the hard wired openers do not speak the protocol. This creates issues.
It looks like Paul has solved the problem and has the work in a branch: https://github.com/PaulWieland/ratgdo/tree/2.0-secplus1.0
Just creating an issue here to see if it would be possible to get this same support in the ESPHome version?
Any chance for direct MQTT support similar to the original ratgdo?
I tried via the yaml file but had an issue.
I've made the following data captures and mapped the various byte values to physical door states. Some of these door state values have been provided by users.
There must be a way of interpreting the individual bit values.
Here's what I have so far:
"normal" state codes | hex | binary |
---|---|---|
Open | 0x52 | 1010010 |
Closed | 0x55 | 1010101 |
Opening | 0x01 | 1 |
Closing | 0x04 | 100 |
user reported state codes | |||
---|---|---|---|
Open? | 0xEA | 11101010 | |
Opening? | 0x51 | 1010001 | Physical obstruction blocks door causing it to stop and reverse |
Opening? | 0x52 | 1010010 | |
Opening? | 0x80 | 10000000 | Obstruction beam is broken during close which causes the door to stop and reverse |
Opening? | 0x81 | 10000001 | Obstruction beam is broken during close which causes the door to stop and reverse |
Opening? | 0x41 | 1000001 | |
Closing? | 0x44 | 1000100 |
Is there any way to update the ratdgo firmware to v2.26a within the esphome firmware?
My opener isn’t working correctly with v2.1 and v2.26a could solve the issues.
MQTT entity name starts with the device name in your config
As I await my Ratgdo devices, I have a feature request. A few years ago, a lawsuit caused Chamberlain garage door opener lights not to come on when the obstruction beam was broken. Would it be possible to add a feature to activate the garage door lights for a configurable amount of time? Not having the devices, I assume I will be able to do this with a Home Assistant automation. For people without Home Assistant, I believe this feature could be useful for people using the hard wired buttons to Ratgdo without automations.
Thanks!
Sometimes the lock and closing duration change off of the values they are supposed to be. I cannot catch when they do it, but every time I have to set them to zero, fully open and close to door to recablibrate it. Is there a way to force those values to a certain number?
The MyQ app and the wall panel on my garage door show the status of the battery (whether its charged, discharged, or needs replacement). It would be nice of RatGDO made this information available as well.
Basically I have some WEMOS LOLIN S2 Mini boards and I would like to use them with the ratgdo shield. I'm willing to try and get it working myself but I don't really understand how to compile this project?
Any pointers or tips?
I wanted to provide feedback on three GDOs that I've installed.
The first has a 050DCTWF logic board, and this works well two 2n7000's.
The other two have 050DCTBLK logic boards, and will not work when using a 2n7000 on the transmitter. I ended up using IRLB8721PbF FETs on those, and they are working.
I'm not entirely sure why the logic board would make the difference with how my ESPs would switch transistors.
I know this isn't an issue per se, but I thought the community might benefit from my experience. Apologies if this isn't the forum for this.
I have a brand new installation, everything is working except for the obstruction sensor feedback. Installation was done using a wemos_d1_mini32
as I plan to consolidate some other ESPhome devices currently in the garage into one node by the opener. Brand new RATGDO v2 pcb and have tested with two separate ESP boards.
The obstruction sensor still is detected properly by the garage door opener. I measure about 5.8V on the RATGDO terminal for obst/blk. Meter measures frequency of 143 Hz which is right for pulses spaced 7ms apart on this terminal as well. The RATGDO obst/blk terminal feeds the R1/R2 voltage divider into the D7 pin; continuity was confirmed so as far as I can tell the hardware setup should checkout.
I added some diagnostic log statements to the ISR routine and the obstruction loop. obsruction_low_count
remains at zero. The log statement in the ISR never shows up in the log.
Any suggestions for additional troubleshooting?
void IRAM_ATTR HOT RATGDOStore::isr_obstruction(RATGDOStore* arg)
{
// if (arg->input_obst.digital_read()) {
// arg->last_obstruction_high = millis();
// } else {
// arg->obstruction_low_count++;
// }
arg->obstruction_low_count++;
ESP_LOGD(TAG, "ISR");
}
---------
/*************************** OBSTRUCTION DETECTION ***************************/
void RATGDOComponent::obstruction_loop()
{
long current_millis = millis();
static unsigned long last_millis = 0;
// the obstruction sensor has 3 states: clear (HIGH with LOW pulse every 7ms), obstructed (HIGH), asleep (LOW)
// the transitions between awake and asleep are tricky because the voltage drops slowly when falling asleep
// and is high without pulses when waking up
// If at least 3 low pulses are counted within 50ms, the door is awake, not obstructed and we don't have to check anything else
// Every 50ms
if (current_millis - last_millis > 50) {
// check to see if we got between 3 and 8 low pulses on the line
if (this->isr_store_.obstruction_low_count >= 3 && this->isr_store_.obstruction_low_count <= 8) {
// obstructionCleared();
this->obstruction_state = ObstructionState::CLEAR;
// if there have been no pulses the line is steady high or low
} else if (this->isr_store_.obstruction_low_count == 0) {
// if the line is high and the last high pulse was more than 70ms ago, then there is an obstruction present
if (this->input_obst_pin_->digital_read() && current_millis - this->isr_store_.last_obstruction_high > 70) {
this->obstruction_state = ObstructionState::OBSTRUCTED;
// obstructionDetected();
} else {
// asleep
}
}
last_millis = current_millis;
ESP_LOGD(TAG, "obstruction_low_count: %d",this->isr_store_.obstruction_low_count);
this->isr_store_.obstruction_low_count = 0;
}
}
HA Install details:
"installation_type": "Home Assistant OS",
"version": "2023.8.2",
"dev": false,
"hassio": true,
"virtualenv": false,
"python_version": "3.11.4",
"docker": true,
"arch": "x86_64",
"timezone": "America/New_York",
"os_name": "Linux",
"os_version": "6.1.39",
"supervisor": "2023.08.1",
"host_os": "Home Assistant OS 10.4",
"docker_version": "23.0.6",
"chassis": "vm",
"run_as_root": true
"esphome_version": "2023.7.1",
Hi, I am having an issue when I attempt to complete the Adopt of the esphome-ratgdo device to an Esphome yaml config. I get a number of errors and the device config is not adopted. I've attached the log file generated by Esphome. Any ideas as what or why this may be occurring?
logs_ratgdov2-4924a5_upload.txt
I seem to only be able to get the door opening and closing status when it's been triggered from the ratgdo.
The MyQ integration was able to update the closed/opening/open/closing statuses when triggered from the remotes as well.
Not sure if I've got a misconfig somewhere or if this is normal behaviour. We mostly use the remotes when in the cars as they're attached to the keys, however I have automations set to run off the status changes, regardless of how they are triggered.
Unsure if merging #80 to publish opening and closing statuses earlier might rectify this, as I'm noticing the status doesn't change to open or close until the operation is complete?
Very, very, very low priority request....
Most entities include an ID, and while esphome is a bit flakey in parsing substituted !extend values, this sort of setting seems to work and I have maybe a dozen of them, for entities I do not seem to need in Home Assistant (and are still visible in the web server):
button:
- id: !extend ${id_prefix}_toggle_door
internal: true
Two entities do not have them: restart and safe_mode_boot. Maybe that's it, but if practical could all entities have id's so one can extend them?
Hiya!
Trying to set this up in a slightly tweaked way since I use ESPHome w/ MQTT instead of the built in Home Assistant integration.
Getting Platform not found: 'number.ratgdo'.
and I'm not sure why since other platforms work.
Version a7e7ff82e9ec9f417e0132817c5800e1b28acf65
Everything after ratgdo:
is copied from base.yaml
# cat garagedoor1.yaml
substitutions:
device_name: "garagedoor1"
device_ip: "10.99.13.151"
id_prefix: ${device_name}
uart_tx_pin: D4
uart_rx_pin: D2
input_obst_pin: D7
status_door_pin: D0
status_obstruction_pin: D8
dry_contact_open_pin: D5
dry_contact_close_pin: D6
dry_contact_light_pin: D3
esphome:
name: ${device_name}
esp8266:
board: d1_mini_lite
restore_from_flash: true
external_components:
- source:
type: local
path: components/esphome-ratgdo/components
<<: !include common/wifi.yaml
<<: !include common/api.yaml
<<: !include common/web_server.yaml
<<: !include common/mqtt.yaml
ota:
password: !secret ota_password
logger:
baud_rate: 0
level: DEBUG
ratgdo:
id: ${id_prefix}
input_gdo_pin: ${uart_rx_pin}
output_gdo_pin: ${uart_tx_pin}
input_obst_pin: ${input_obst_pin}
sensor:
- platform: ratgdo
id: ${id_prefix}_openings
type: openings
entity_category: diagnostic
ratgdo_id: ${id_prefix}
name: "Openings"
unit_of_measurement: "openings"
icon: mdi:open-in-app
switch:
- platform: ratgdo
id: ${id_prefix}_lock_remotes
type: lock
entity_category: config
ratgdo_id: ${id_prefix}
name: "Lock remotes"
- platform: gpio
id: "${id_prefix}_status_door"
internal: true
pin:
number: ${status_door_pin} # D0 output door status, HIGH for open, LOW for closed
mode:
output: true
name: "Status door"
entity_category: diagnostic
- platform: gpio
id: "${id_prefix}_status_obstruction"
internal: true
pin:
number: ${status_obstruction_pin} # D8 output for obstruction status, HIGH for obstructed, LOW for clear
mode:
output: true
name: "Status obstruction"
entity_category: diagnostic
binary_sensor:
- platform: ratgdo
type: motion
id: ${id_prefix}_motion
ratgdo_id: ${id_prefix}
name: "Motion"
device_class: motion
- platform: ratgdo
type: obstruction
id: ${id_prefix}_obstruction
ratgdo_id: ${id_prefix}
name: "Obstruction"
device_class: problem
on_press:
- switch.turn_on: ${id_prefix}_status_obstruction
on_release:
- switch.turn_off: ${id_prefix}_status_obstruction
- platform: ratgdo
type: button
id: ${id_prefix}_button
ratgdo_id: ${id_prefix}
name: "Button"
entity_category: diagnostic
- platform: ratgdo
type: motor
id: ${id_prefix}_motor
ratgdo_id: ${id_prefix}
name: "Motor"
device_class: running
entity_category: diagnostic
- platform: gpio
id: "${id_prefix}_dry_contact_open"
pin:
number: ${dry_contact_open_pin} # D5 dry contact for opening door
inverted: true
mode:
input: true
pullup: true
name: "Dry contact open"
entity_category: diagnostic
on_press:
- if:
condition:
binary_sensor.is_off: ${id_prefix}_dry_contact_close
then:
- cover.open: ${id_prefix}_garage_door
- platform: gpio
id: "${id_prefix}_dry_contact_close"
pin:
number: ${dry_contact_close_pin} # D6 dry contact for closing door
inverted: true
mode:
input: true
pullup: true
name: "Dry contact close"
entity_category: diagnostic
on_press:
- if:
condition:
binary_sensor.is_off: ${id_prefix}_dry_contact_open
then:
- cover.close: ${id_prefix}_garage_door
- platform: gpio
id: "${id_prefix}_dry_contact_light"
pin:
number: ${dry_contact_light_pin} # D3 dry contact for triggering light (no discrete light commands, so toggle only)
inverted: true
mode:
input: true
pullup: true
name: "Dry contact light"
entity_category: diagnostic
on_press:
- light.toggle: ${id_prefix}_light
number:
- platform: ratgdo
id: ${id_prefix}_rolling_code_counter
type: rolling_code_counter
entity_category: config
ratgdo_id: ${id_prefix}
name: "Rolling code counter"
mode: box
unit_of_measurement: "codes"
cover:
- platform: ratgdo
id: ${id_prefix}_garage_door
device_class: garage
name: "Door"
ratgdo_id: ${id_prefix}
on_closed:
- switch.turn_off: ${id_prefix}_status_door
on_open:
- switch.turn_on: ${id_prefix}_status_door
light:
- platform: ratgdo
id: ${id_prefix}_light
name: "Light"
ratgdo_id: ${id_prefix}
button:
- platform: restart
name: "Restart"
- platform: safe_mode
name: "Safe mode boot"
entity_category: diagnostic
- platform: ratgdo
id: ${id_prefix}_sync
type: sync
entity_category: diagnostic
ratgdo_id: ${id_prefix}
name: "Sync"
- platform: ratgdo
id: ${id_prefix}_query
type: query
entity_category: diagnostic
ratgdo_id: ${id_prefix}
name: "Query"
Full log:
INFO Reading configuration /config/garagedoor1.yaml...
ERROR Unable to load component ratgdo.number:
Traceback (most recent call last):
File "/esphome/esphome/loader.py", line 162, in _lookup_module
module = importlib.import_module(f"esphome.components.{domain}")
File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 790, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/config/components/esphome-ratgdo/components/ratgdo/number/__init__.py", line 20, in <module>
number.number_schema(RATGDONumber)
AttributeError: module 'esphome.components.number' has no attribute 'number_schema'
Failed config
number.ratgdo: [source /config/garagedoor1.yaml:157]
Platform not found: 'number.ratgdo'.
platform: ratgdo
id: garagedoor1_rolling_code_counter
type: rolling_code_counter
entity_category: config
ratgdo_id: garagedoor1
name: Rolling code counter
mode: box
unit_of_measurement: codes
button.ratgdo: [source /config/garagedoor1.yaml:189]
Must be string, got <class 'esphome.cpp_generator.MockObj'>. did you forget putting quotes around the value?.
platform: ratgdo
[id] is an invalid option for [button.ratgdo]. Please check the indentation.
id: garagedoor1_sync
type: sync
entity_category: diagnostic
ratgdo_id: garagedoor1
name: Sync
button.ratgdo: [source /config/garagedoor1.yaml:195]
Must be string, got <class 'esphome.cpp_generator.MockObj'>. did you forget putting quotes around the value?.
platform: ratgdo
[id] is an invalid option for [button.ratgdo]. Please check the indentation.
id: garagedoor1_query
type: query
entity_category: diagnostic
ratgdo_id: garagedoor1
name: Query
Thanks :)
I just set up a brand new ratgdo, using the web installer and then adopted into esphome in Home Assistant. I'm seeing the logs in esphome spamming with "Collision detected, waiting to send packet", resulting in the esphome page locking up.
Steps followed:
Any thoughts?
Backup data
ESP home yaml (auto generated)
substitutions:
name: ratgdov2-d59472
friendly_name: Large Garage Door ESP
packages:
ratgdo.esphome: github://ratgdo/esphome-ratgdo/v2board_esp8266_d1_mini_lite.yaml@main
esphome:
name: ${name}
name_add_mac_suffix: false
friendly_name: ${friendly_name}
api:
encryption:
key: [redacted]
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
Logs collected wirelessly in esphome
INFO ESPHome 2023.8.3
INFO Reading configuration /config/esphome/ratgdov2-d59472.yaml...
INFO Updating https://github.com/ratgdo/esphome-ratgdo@None
INFO Updating https://github.com/ratgdo/esphome-ratgdo@None
INFO Detected timezone 'America/New_York'
INFO Starting log output from ratgdov2-d59472.local using esphome API
INFO Successfully connected to ratgdov2-d59472.local
[14:30:42][I][app:102]: ESPHome version 2023.8.3 compiled on Sep 16 2023, 14:14:17
[14:30:42][I][app:104]: Project ratgdo.esphome version 2.0
[14:30:42][C][wifi:543]: WiFi:
[14:30:42][C][wifi:379]: Local MAC: EC:FA:BC:D5:[redacted]
[14:30:42][C][wifi:380]: SSID: [redacted]
[14:30:42][C][wifi:381]: IP Address: 192.168.1.168
[14:30:42][C][wifi:382]: BSSID: [redacted]
[14:30:42][C][wifi:384]: Hostname: 'ratgdov2-d59472'
[14:30:42][C][wifi:386]: Signal strength: -58 dB ▂▄▆█
[14:30:42][C][wifi:390]: Channel: 1
[14:30:42][C][wifi:391]: Subnet: 255.255.255.0
[14:30:42][C][wifi:392]: Gateway: 192.168.1.1
[14:30:42][C][wifi:393]: DNS1: 1.1.1.1
[14:30:42][C][wifi:394]: DNS2: 1.0.0.1
[14:30:42][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:42][C][logger:301]: Logger:
[14:30:42][C][logger:302]: Level: DEBUG
[14:30:42][C][logger:303]: Log Baud Rate: 115200
[14:30:42][C][logger:305]: Hardware UART: UART0
[14:30:42][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:42][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:42][C][ratgdo.number:012]: RATGDO Number 'Rolling code counter'
[14:30:42][C][ratgdo.number:012]: Unit of Measurement: 'codes'
[14:30:42][C][ratgdo.number:014]: Type: Rolling Code Counter
[14:30:42][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:42][C][ratgdo.number:012]: RATGDO Number 'Opening duration'
[14:30:42][C][ratgdo.number:012]: Unit of Measurement: 's'
[14:30:42][C][ratgdo.number:016]: Type: Opening Duration
[14:30:42][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:42][C][ratgdo.number:012]: RATGDO Number 'Closing duration'
[14:30:42][C][ratgdo.number:012]: Unit of Measurement: 's'
[14:30:42][C][ratgdo.number:018]: Type: Closing Duration
[14:30:42][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][C][switch.gpio:068]: GPIO Switch 'Status door'
[14:30:43][C][switch.gpio:090]: Restore Mode: always OFF
[14:30:43][C][switch.gpio:031]: Pin: GPIO16
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][C][switch.gpio:068]: GPIO Switch 'Status obstruction'
[14:30:43][C][switch.gpio:090]: Restore Mode: always OFF
[14:30:43][C][switch.gpio:031]: Pin: GPIO15
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Dry contact open'
[14:30:43][C][gpio.binary_sensor:016]: Pin: GPIO14
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Dry contact close'
[14:30:43][C][gpio.binary_sensor:016]: Pin: GPIO12
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][C][gpio.binary_sensor:015]: GPIO Binary Sensor 'Dry contact light'
[14:30:43][C][gpio.binary_sensor:016]: Pin: GPIO0
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][C][light:103]: Light 'Light'
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][C][ratgdo:076]: Setting up RATGDO...
[14:30:43][C][ratgdo:077]: Output GDO Pin: GPIO2
[14:30:43][C][ratgdo:078]: Input GDO Pin: GPIO4
[14:30:43][C][ratgdo:082]: Input Obstruction Pin: GPIO13
[14:30:43][C][ratgdo:084]: Rolling Code Counter: 44
[14:30:43][C][ratgdo:085]: Remote ID: 1337
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][C][ratgdo.sensor:012]: RATGDO Sensor 'Openings'
[14:30:43][C][ratgdo.sensor:012]: State Class: ''
[14:30:43][C][ratgdo.sensor:012]: Unit of Measurement: 'openings'
[14:30:43][C][ratgdo.sensor:012]: Accuracy Decimals: 0
[14:30:43][C][ratgdo.sensor:012]: Icon: 'mdi:open-in-app'
[14:30:43][C][ratgdo.sensor:013]: Type: Openings
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][C][ratgdo.switch:068]: RATGDO Switch 'Lock remotes'
[14:30:43][C][ratgdo.switch:090]: Restore Mode: always OFF
[14:30:43][C][ratgdo.switch:013]: Type: Lock
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][C][ratgdo.binary_sensor:036]: RATGDO BinarySensor 'Motion'
[14:30:43][C][ratgdo.binary_sensor:036]: Device Class: 'motion'
[14:30:43][C][ratgdo.binary_sensor:038]: Type: Motion
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][C][ratgdo.binary_sensor:036]: RATGDO BinarySensor 'Obstruction'
[14:30:43][C][ratgdo.binary_sensor:036]: Device Class: 'problem'
[14:30:43][C][ratgdo.binary_sensor:040]: Type: Obstruction
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][C][ratgdo.binary_sensor:036]: RATGDO BinarySensor 'Button'
[14:30:43][C][ratgdo.binary_sensor:044]: Type: Button
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][C][ratgdo.binary_sensor:036]: RATGDO BinarySensor 'Motor'
[14:30:43][C][ratgdo.binary_sensor:036]: Device Class: 'running'
[14:30:43][C][ratgdo.binary_sensor:042]: Type: Motor
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][C][ratgdo.cover:014]: RATGDO Cover 'Door'
[14:30:43][C][ratgdo.cover:014]: Device Class: 'garage'
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][C][ratgdo.light:014]: RATGDO Light
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][C][restart.button:017]: Restart Button 'Restart'
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][C][safe_mode.button:022]: Safe Mode Button 'Safe mode boot'
[14:30:43][C][safe_mode.button:022]: Icon: 'mdi:restart-alert'
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][C][homeassistant.time:010]: Home Assistant Time:
[14:30:43][C][homeassistant.time:011]: Timezone: 'EST5EDT,M3.2.0,M11.1.0'
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][C][web_server:161]: Web Server:
[14:30:43][C][web_server:162]: Address: ratgdov2-d59472.local:80
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][C][mdns:112]: mDNS:
[14:30:43][C][mdns:113]: Hostname: ratgdov2-d59472
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][C][ota:093]: Over-The-Air Updates:
[14:30:43][C][ota:094]: Address: ratgdov2-d59472.local:8266
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][C][api:138]: API Server:
[14:30:43][C][api:139]: Address: ratgdov2-d59472.local:6053
[14:30:43][C][api:141]: Using noise encryption: YES
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][C][improv_serial:032]: Improv Serial:
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:43][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:44][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:45][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:45][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:45][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:45][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:45][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:45][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:45][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:45][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:45][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:45][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:45][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:45][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:45][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:45][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:45][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:45][D][ratgdo:419]: Collision detected, waiting to send packet
[14:30:45][D][ratgdo:419]: Collision detected, waiting to send packet
Curious if there is a way to make the last door state changed time persistent through a reboot? For instance, my cover card may show the door has been closed for 3 hours, but as soon as the module is reloaded for any reason, that value starts back at 0.
Apologize for probably a basic question but I'm new to ESPHome and after a couple hours of trying to figure this out, I'm hoping to get some help.
I purchased a ratgdo v2.0 and flashed it via the Web Installer, integrated it with HA and everything works great. However, I would like to disable web_server
. I assumed I would need to be able to customize the config for the ratgdo so I installed ESPHome on my computer (Mac mini) using brew so I have access to the ESPHome dashboard. I can see my ratgdo device was automatically discovered so I clicked adopt and now it's adopted to the ESPHome dashboard.
However, looking at the config file it created, it looks like it's just pulling in the default config from this repo:
packages:
ratgdo.esphome: github://ratgdo/esphome-ratgdo/v2board_esp8266_d1_mini_lite.yaml@main
My question is, how would I go about disabling web_server:
which is enabled by default in the config it's pulling from?
Appreciate any pointers!
Hi, thanks a lot for this project and migrating ratgdo to ESPHome.
I've been trying to test this project but for me buying boards (still in backorder, and payment is a PITA) and ship them to my country is very difficult.
Thanks @mariusmuja a lot for publishing the base schematic: https://github.com/mariusmuja/esphome-ratgdo
I would like to build it myself as it seems simple enough. I've come with the following BOM:
2 x 2n7000 MOSFET transistor
1 x 150 Ohm resistor
2 x 3.3 KOhm resistor
1 x 3.3V 1N4728A zener diode
Are these correct? Any other element that I'm missing?
I would be great to have it here and maybe instructions on how to build your own board. I can help with that as soon as I can get my hands on the components.
As this is a open source project, it would be great to make it open hardware too. I can submit a KiCAD design if you are interested in having it here.
Regards
Also getting the "Failed to communicate with garage opener on startup; Check the Garage-Door RATGDO East Rolling code counter number entity history and set the entity to one number larger than the largest value in history."
Found this response in #51:
You can dig though the database to find the code from the old number entity.
Look up the entity in states_meta and than link it to states.
Or factory reset the GDO by pressing and holding the pair button 3 times for 15 seconds. Than repair the wall control by pressing it, and repair all your remotes.
The ratgdo esp device should than be able to pair
How does one go through the database looking for "states_meta"?
What commands should I use?
I am not a DBA...
Can I get it via the REST_api?
Like here: https://developers.home-assistant.io/docs/api/rest/
Could you give examples of what strings to use?
This is either coming from this firmware or the esphome integration.
Logger: homeassistant.components.esphome.entry_data
Source: components/esphome/cover.py:87
Integration: ESPHome (documentation, issues)
First occurred: 15:15:10 (4 occurrences)
Last logged: 15:15:11
Error while calling subscription: cannot convert float NaN to integer
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/esphome/entry_data.py", line 340, in async_update_state
subscription()
File "/usr/src/homeassistant/homeassistant/components/esphome/entity.py", line 251, in _on_state_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 730, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 830, in _async_write_ha_state
state, attr = self._async_generate_attributes()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 773, in _async_generate_attributes
attr.update(self.state_attributes or {})
^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/cover/__init__.py", line 284, in state_attributes
if (current := self.current_cover_position) is not None:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/esphome/entity.py", line 107, in _wrapper
val = func(self)
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/esphome/cover.py", line 87, in current_cover_position
return round(self._state.position * 100.0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: cannot convert float NaN to integer
It's possible that this is not the issue....
When I went to zip tie the ratgdo in its final mounting place after testing it for a week, I was not careful enough and ended up breaking the USB port off of my ESP8266.
As a result, I ordered some esp32 d1 minis to try instead, hoping to use them also as bluetooth proxies (it looks like I can not do that, as of yet, but that's a separate issue and not a problem).
Long and short, I went more than a week without the ratgdo being able to work, soldered the headers on the new board, flashed it with the esp32 variant and didn't think I needed to copy the rolling code.
Now, I'm not able to open my garage door, although it is reporting it's status. Home assistant is throwing an error
"Failed to communicate with garage opener on startup; Check the Garage Door Opener Rolling code counter number entity history and set the entity to one number larger than the largest value in history."
but setting it to what it was this morning before I changed the board, or one or two after that, is not working. Am I stuck and no longer able to use the ratgdo, or am I able to somehow retrieve a working rolling code?
Don't see any documentation for the motion sensor. The ratgdo project doesn't look like it has a motion sensor. Not sure where this came from. Not seeing the value ever change.
#88 added a work around for this problem but it would be nice to discover the root cause and revert the work around.
I didn't have enough time to bisect far enough back to find where the problem was introduced and I didn't want to leave the issue in the wild so I settled on the work around
The motion detector that is attached to my wall correctly triggers motion ON in the ratgdo logs. It doesn't, however, turn off until it receives a 'OFF' which is essentially the 'light timer' embedded in the wall timing out. The issue here though is it detects motion quite consistently. We can see here in my logs:
17:34:50 | [D] | [ratgdo:246] | Motion: DETECTED
-- | -- | -- | --
17:34:52 | [D] | [binary_sensor:036] | 'Motion': Sending state ON
17:34:56 | [D] | [ratgdo:246] | Motion: DETECTED
17:35:00 | [D] | [ratgdo:246] | Motion: DETECTED
17:35:06 | [D] | [ratgdo:246] | Motion: DETECTED
17:38:11 | [D] | [ratgdo:210] | Status: door=CLOSED light=OFF lock=UNLOCKED
17:38:11 | [D] | [binary_sensor:036] | 'Motion': Sending state OFF
Since the motion detector is quite capable of faster intervals of detection it would be good if the associated home assistant device would trigger off far faster than waiting for the light to turn off which sends the OFF motion state. It looks like it detects motion down to 5 seconds or less. Since it doesn't send the off though till the light goes off, its worthless in HA because we wont get a motion detected state change less than ever 3-5 minutes.
Can we set this to just automatically turn off at 3 second intervals or something so the Motion: DETECTED will be sent again?
Using an esphome builtin uart
component does not work on ESP32 because it uses a hardware uart, for which transmitting stops working after the TX pin is (re-)initialized in RATGDOComponent::setup()
.
Currently, on ESP32 only the 1305us high / 1260us low sequence appears on the wire and nothing after that. If the TX pin setup()
and pin_mode()
calls are commented out, the UART transmission appears on the wire, but not the 1305us high / 1260us low sequence.
The ESP8266 uses software UART and doesn't have this issue.
Not sure if this is a ratgdo issue or esphome, but if I quickly walk through the sensor, it does not get triggered. Then my chamberlain motor light turns on but that also does not register in Home Assistant. If I stand in front on the sensor for about a second, everything works normally. Not sure if there is a debounce filter that makes it not register the brief obstructions?
I just switched my garage door from MyQ to ratgdo due to all the MyQ issues, working great so far! I'd like to get my door disconnected from MyQ, but one feature appears to be missing, remote management:
The MyQ app allows you to name your remotes, and see which remote triggered door movement. You can also add and delete the remotes individually. You can also see how many keypads are programmed to the door. Also, if the event is unlabeled, that also allow you to know the wall button caused the movement. Is this possible to add?
Received two 2.5 boards today.
The first one flashed fine but after that it doesn't show the device info or the connect to wifi option. It just shows this again:
The second one does and connected to wifi successfully.
I can get into the logs/console but nothing shows unless I 'Reset Device' and then I get some stuff with one of the last messages being 'Boot loop detected. Proceeding to safe mode'.
I've tried flashing again (selecting Erase like I did the first time) but same behavior.
Hi,
In the Diagnostic section, there is an entity named Button. What does the state of this Button indicate?
Thanks,
Tim
Hi --
First of all, fantastic job by all. I replaced my MyQ setup w/ this as it was so flaky and happy I've done it. The setup works stunningly, however, I did notice that when I turn on my garage light, it briefly triggers a problem on the obstruction sensor (which then reverts back to OK). I didn't see this as an existing issue, not sure how to troubleshoot, but, my obstruction sensors work correctly when I manually trigger them, for what it's worth. Screengrab movie attached to demonstrate. I'm happy to try and help debug if you can tell me how to best log, etc.
I assume changes will be needed to support the v2.5 hardware? If so, any timeline for that? Thank you
Request .. if it’s possible, any chance you can add the ability to control the gdo “beeping”?
I have an automation to close the garage door after being open 10 minutes and was hoping to alert with noise and lights before doing so for safety purposes w kids. Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.