With ESPHome 2024.4.0, there was added the support to decode and dump Dooya RF codes inside the remote receiver.
In the according pull request I found a complete YAML file, which shows an example configuration:
esphome:dev
← bukureckid:add-dooya-rf-support
opened 09:46PM - 05 Apr 24 UTC
# What does this implement/fix?
Added support for Dooya RF remote devices.
…
## Types of changes
- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Other
**Related issue or feature (if applicable):** NA
**Pull request in [esphome-docs](https://github.com/esphome/esphome-docs) with documentation (if applicable):** esphome/esphome-docs#3749
## Test Environment
- [x] ESP32
- [ ] ESP32 IDF
- [ ] ESP8266
- [ ] RP2040
- [ ] BK72xx
- [ ] RTL87xx
## Example entry for `config.yaml`:
```
binary_sensor:
- platform: remote_receiver
name: "Ch. 1 up"
internal: true
dooya:
id: 0x0018C2E6
channel: 142
button: 14
check: 1
filters:
- delayed_off: 100ms # Debounce multiple signals received from remote
on_press:
- cover.open: cover_1
# RF receiver
remote_receiver:
pin: GPIO15
dump: dooya
# Settings to optimize recognition of RF devices
tolerance: 50%
filter: 250us
idle: 7ms
buffer_size: 10kb
```
```yaml
# Example config.yaml
# Basic Config
esphome:
name: kc868-a8
platform: ESP32
board: esp32dev
ota:
safe_mode: true
password: update
i2c:
sda: 4
scl: 5
scan: true
id: bus_a
wifi:
ssid: <ssid>
password: <pass>
pcf8574:
- id: 'pcf8574_hub_out_1' # for output channel 1-8
address: 0x24
- id: 'pcf8574_hub_in_1' # for input channel 1-8
address: 0x22
# Individual outputs
switch:
- platform: gpio
name: "a8_relay8"
id: a8_relay8
pin:
pcf8574: pcf8574_hub_out_1
number: 0
mode: OUTPUT
inverted: true
interlock: [a8_relay7]
interlock_wait_time: 500ms
restore_mode: ALWAYS_OFF
- platform: gpio
name: "a8_relay7"
id: a8_relay7
pin:
pcf8574: pcf8574_hub_out_1
number: 1
mode: OUTPUT
inverted: true
interlock: [a8_relay8]
interlock_wait_time: 500ms
restore_mode: ALWAYS_OFF
- platform: gpio
name: "a8_relay6"
id: a8_relay6
pin:
pcf8574: pcf8574_hub_out_1
number: 2
mode: OUTPUT
inverted: true
interlock: [a8_relay5]
interlock_wait_time: 500ms
restore_mode: ALWAYS_OFF
- platform: gpio
name: "a8_relay5"
id: a8_relay5
pin:
pcf8574: pcf8574_hub_out_1
number: 3
mode: OUTPUT
inverted: true
interlock: [a8_relay6]
interlock_wait_time: 500ms
restore_mode: ALWAYS_OFF
- platform: gpio
name: "a8_relay4"
id: a8_relay4
pin:
pcf8574: pcf8574_hub_out_1
number: 4
mode: OUTPUT
inverted: true
interlock: [a8_relay3]
interlock_wait_time: 500ms
restore_mode: ALWAYS_OFF
- platform: gpio
name: "a8_relay3"
id: a8_relay3
pin:
pcf8574: pcf8574_hub_out_1
number: 5
mode: OUTPUT
inverted: true
interlock: [a8_relay4]
interlock_wait_time: 500ms
restore_mode: ALWAYS_OFF
- platform: gpio
name: "a8_relay2"
id: a8_relay2
pin:
pcf8574: pcf8574_hub_out_1
number: 6
mode: OUTPUT
inverted: true
interlock: [a8_relay1]
interlock_wait_time: 500ms
restore_mode: ALWAYS_OFF
- platform: gpio
name: "a8_relay1"
id: a8_relay1
pin:
pcf8574: pcf8574_hub_out_1
number: 7
mode: OUTPUT
inverted: true
interlock: [a8_relay2]
interlock_wait_time: 500ms
restore_mode: ALWAYS_OFF
binary_sensor:
# GPIO inputs
- platform: gpio
name: "a8_input1"
pin:
pcf8574: pcf8574_hub_in_1
number: 0
mode: INPUT
inverted: true
- platform: gpio
name: "a8_input2"
pin:
pcf8574: pcf8574_hub_in_1
number: 1
mode: INPUT
inverted: true
- platform: gpio
name: "a8_input3"
pin:
pcf8574: pcf8574_hub_in_1
number: 2
mode: INPUT
inverted: true
- platform: gpio
name: "a8_input4"
pin:
pcf8574: pcf8574_hub_in_1
number: 3
mode: INPUT
inverted: true
- platform: gpio
name: "a8_input5"
pin:
pcf8574: pcf8574_hub_in_1
number: 4
mode: INPUT
inverted: true
- platform: gpio
name: "a8_input6"
pin:
pcf8574: pcf8574_hub_in_1
number: 5
mode: INPUT
inverted: true
- platform: gpio
name: "a8_input7"
pin:
pcf8574: pcf8574_hub_in_1
number: 6
mode: INPUT
inverted: true
- platform: gpio
name: "a8_input8"
pin:
pcf8574: pcf8574_hub_in_1
number: 7
mode: INPUT
inverted: true
- platform: gpio
name: "a8_s3"
pin:
number: 32
inverted: true
- platform: gpio
name: "a8_s4"
pin:
number: 33
inverted: true
# Remote controlled inputs
- platform: remote_receiver
name: "Ch. 1 up"
internal: true
dooya:
id: 0x0018C2E6
channel: 142
button: 14
check: 1
filters:
- delayed_off: 100ms # Debounce multiple signals received from remote
on_press:
- cover.open: cover_1
- platform: remote_receiver
name: "Ch. 1 down"
internal: true
dooya:
id: 0x0018C2E6
channel: 142
button: 12
check: 3
filters:
- delayed_off: 100ms # Debounce multiple signals received from remote
on_press:
- cover.close: cover_1
- platform: remote_receiver
name: "Ch. 1 stop"
internal: true
dooya:
id: 0x0018C2E6
channel: 142
button: 10
check: 10
filters:
- delayed_off: 100ms # Debounce multiple signals received from remote
on_press:
- cover.stop: cover_1
# Shutters
cover:
- platform: time_based
device_class: shutter
name: "Time Based Cover 1-2"
id: "cover_4"
open_action:
- switch.turn_on: a8_relay1
open_duration: 20s
close_action:
- switch.turn_on: a8_relay2
close_duration: 20s
stop_action:
- switch.turn_off: a8_relay1
- switch.turn_off: a8_relay2
- platform: time_based
device_class: shutter
name: "Time Based Cover 3-4"
id: "cover_3"
open_action:
- switch.turn_on: a8_relay3
open_duration: 20s
close_action:
- switch.turn_on: a8_relay4
close_duration: 20s
stop_action:
- switch.turn_off: a8_relay3
- switch.turn_off: a8_relay4
- platform: time_based
device_class: shutter
name: "Time Based Cover 5-6"
id: "cover_2"
open_action:
- switch.turn_on: a8_relay5
open_duration: 20s
close_action:
- switch.turn_on: a8_relay6
close_duration: 20s
stop_action:
- switch.turn_off: a8_relay5
- switch.turn_off: a8_relay6
- platform: time_based
device_class: shutter
name: "Time Based Cover 7-8"
id: "cover_1"
open_action:
- switch.turn_on: a8_relay7
open_duration: 20s
close_action:
- switch.turn_on: a8_relay8
close_duration: 20s
stop_action:
- switch.turn_off: a8_relay7
- switch.turn_off: a8_relay8
# RF receiver
remote_receiver:
pin: GPIO15
dump: dooya
# Settings to optimize recognition of RF devices
tolerance: 50%
filter: 250us
idle: 7ms
buffer_size: 10kb
# Enable logging
logger:
level: DEBUG
# Enable Home Assistant API
api:
```
## Checklist:
- [x] The code change is tested and works locally.
- [ ] Tests have been added to verify that the new code works (under `tests/` folder).
If user exposed functionality or configuration variables are added/changed:
- [x] Documentation added/updated in [esphome-docs](https://github.com/esphome/esphome-docs).
Here GPIO15 was used to receive the signals from the ESP32, but I can’t find out which pins were connected to a 433MHz module for which signal like the 433MHz remote receiver module CC1101.
Does anyone already use this or has an example for the pin connections?
Thank you in advance!
Regards
Markus
Hi,
For CC1101 you have to put you GD0 pin instead, and you SPI pins in the yaml file. Check esphome-cc1101/cc1101.yaml at b34603edbc4e6745add895a75e9cf705d1bf7833 · dbuezas/esphome-cc1101 · GitHub
Have you been able to setup ESPHOME with CC1101?
I am using a ESP32 C3, and I would love to control Dooya motors using a CC1101.
Do you have a the yaml file to setup the ESPHOME device?
If you could share it, it would be a good starting point.
Thank you
Finally, I have an ESP32 C3 with CC1101 working but it doesn¡t detect Dooya packets.
Using raw mode, it dumps lots of packets, so I think that my motors and remote controls, with quite similar aesthetics to Dooya remote controls and motors, have a different code / protocol…
I will try to capture the packets using the Esphome receiver and to replicate them, but I guess that they have a rolling code or similar configurations, so it is not to work.
Quite dissapointed here…
eporsche
(Erik Porsche)
August 1, 2024, 4:57am
4
@buitre-buitaker , @MS47608
Did you see this repo: gabest11/esphome-cc1101 (github.com) ?
It references to a pull request to esphome - which incorporates a cc1101 component and it also references to a documentation preview on how to use it.
With this I got my dooya motor working.
1 Like
Thank you!!
I will check it and I will be back with feedback.
The motor brand support service confirmed that it should work with Dooya remote controls so the protocol is the same.
Any chance there’s a ESP Dooya in the works (Like ESP Somfy)?
Finally I used a rfxcom device to control the motors.
It worked out of the box and I am able to integrate more devices in HA.