With the new integrated cc1101 support, I excitedly upgraded HA, ordered a cc1101 board from Amazon and repurposed my test hardware. I really want to control a couple of Hunter ceiling fans. The cc1101 is always "marked bad" in the logs. I cannot for the life of me figure out what I am missing and I have been at it for hours making and re-making and verifying connections. I have stripped out the remote_receiver section as well.
Link to cc1101 board:
cc1101
ESP32 board:
ESP32
Relevant log sections:
[22:24:19.129][C][cc1101:232]: CC1101:
[22:24:19.129][C][cc1101:232]: Chip ID: 0x0000
[22:24:19.129][C][cc1101:232]: Frequency: 433919840 Hz
[22:24:19.129][C][cc1101:232]: Channel: 0
[22:24:19.129][C][cc1101:232]: Modulation: ASK/OOK
[22:24:19.129][C][cc1101:232]: Symbol Rate: 4996 baud
[22:24:19.129][C][cc1101:232]: Filter Bandwidth: 203125.0 Hz
[22:24:19.129][C][cc1101:232]: Output Power: 9.6 dBm
[22:24:19.130][C][cc1101:152]: CS Pin: GPIO27
[22:24:19.135][E][component:224]: cc1101 is marked FAILED: unspecified
[22:24:19.213][C][remote_receiver.esp32:120]: Remote Receiver:
[22:24:19.213][C][remote_receiver.esp32:120]: Clock resolution: 1000000 hz
[22:24:19.213][C][remote_receiver.esp32:120]: RMT symbols: 192
[22:24:19.213][C][remote_receiver.esp32:120]: Filter symbols: 0
[22:24:19.213][C][remote_receiver.esp32:120]: Receive symbols: 192
[22:24:19.213][C][remote_receiver.esp32:120]: Tolerance: 50%
[22:24:19.213][C][remote_receiver.esp32:120]: Carrier frequency: 0 hz
[22:24:19.213][C][remote_receiver.esp32:120]: Carrier duty: 100%
[22:24:19.213][C][remote_receiver.esp32:120]: Filter out pulses shorter than: 250 us
[22:24:19.213][C][remote_receiver.esp32:120]: Signal is done after 4000 us of no changes
[22:24:19.220][C][remote_receiver.esp32:152]: Pin: GPIO25
My config file:
substitutions:
name: esphome_tank_test
friendly_name: ESPHome Tank Test
devicename: esphome_tank_test
# esphome_platform: esp32
esphome_board: esp32dev
esphome_project_name: "Matt.Ward Aquarium Monitor"
esphome_project_version: "aquarium-monitor-v.2"
esphome:
name: ${name}
friendly_name: ${friendly_name}
# platform: $esphome_platform
# board: $esphome_board
name_add_mac_suffix: false
project:
name: $esphome_project_name
version: $esphome_project_version
on_boot:
if:
condition:
api.connected: null
then:
- logger.log: API is connected! Now we can trigger what we want!
esp32:
board: esp32dev
framework:
type: esp-idf
advanced:
minimum_chip_revision: "3.1"
sram1_as_iram: true
network:
enable_ipv6: true
min_ipv6_addr_count: 2
enable_high_performance: true
#status_led:
# pin:
# number: 02
# inverted: false
# Enable logging
logger:
level: DEBUG
debug:
update_interval: 30s
# Enable Home Assistant API
api:
# Allow Over-The-Air updates
ota:
platform: esphome
# Allow provisioning Wi-Fi via serial
improv_serial:
wifi:
domain: .home
ssid: !secret wifi_ssid
password: !secret wifi_password
# Set up a wifi access point
ap:
ssid: "${friendly_name}"
password: !secret wifi_ap_password
# In combination with the `ap` this allows the user
# to provision wifi credentials to the device via WiFi AP.
captive_portal:
dashboard_import:
package_import_url: github://esphome/example-configs/esphome-web/esp32.yaml@main
import_full_config: true
# To have a "next url" for improv serial
web_server:
include_internal: True
i2c:
sda: GPIO21
scl: GPIO22
frequency: 400kHz
spi:
clk_pin: GPIO18 # SCK
miso_pin: GPIO19 # MISO
mosi_pin: GPIO23 # MOSI
cc1101:
cs_pin: GPIO27
frequency: 433.92MHz
modulation_type: ASK/OOK # ASK/OOK # 2-FSK # 4-FSK # GFSK # MSK
#remote_transmitter:
# pin: GPIO02 # Must match GDO0
# id: transmitter0
# carrier_duty_percent: 100
remote_receiver:
pin:
number: GPIO25 # GDO2 (Optional for TX-only)
inverted: true
id: receiver0
dump: raw
# Settings to optimize recognition of RF devices
tolerance: 50%
filter: 250us
idle: 4ms
display:
- platform: lcd_pcf8574
id: mydisplay
dimensions: 16x2
address: 0x27
lambda: |-
//Print IP address and heater state on row 0
it.printf(0, 0, "%s", id(IP).state.c_str());
it.printf(13, 0, "%s", id(tank_heat).state.c_str());
// Print the current time on row 1
it.strftime(1,1,"%I:%M%p %m/%d", id(my_time).now());
if (id(tank_backlight).state) {
// Binary sensor is on
// Control backlight on mydisplay
// Binary sensor is on in HA
id(mydisplay).backlight();
} else {
// Binary sensor is off in HA
id(mydisplay).no_backlight();
}
time:
- platform: homeassistant
id: my_time
text_sensor:
- platform: homeassistant
id: tank_heat
entity_id: binary_sensor.tank_heating
internal: true
# Send Uptime in raw seconds
- platform: template
name: $friendly_name Uptime
id: uptime_human
icon: mdi:clock-start
# Expose WiFi information as sensors.
- platform: wifi_info
ip_address:
name: IP
id: IP
# address_0: # This usually holds the primary IPv6 address
address_1:
name: IPv6 LL
address_2:
name: IPv6 routed
ssid:
name: SSID
#bssid:
# name: BSSID
mac_address:
name: ESP Mac Wifi Address
#scan_results:
# name: ESP Latest Scan Results
#- platform: debug
# device:
# name: "Device Info"
# reset_reason:
# name: "Reset Reason"
sensor:
# Uptime sensor.
- platform: uptime
name: $friendly_name Uptime
id: uptime_sensor
update_interval: 60s
on_raw_value:
then:
- text_sensor.template.publish:
id: uptime_human
# Custom C++ code to generate the result
state: !lambda |-
int seconds = round(id(uptime_sensor).raw_state);
int days = seconds / (24 * 3600);
seconds = seconds % (24 * 3600);
int hours = seconds / 3600;
seconds = seconds % 3600;
int minutes = seconds / 60;
seconds = seconds % 60;
return (
(days ? to_string(days) + "d " : "") +
(hours ? to_string(hours) + "h " : "") +
(minutes ? to_string(minutes) + "m " : "") +
(to_string(seconds) + "s")
).c_str();
# WiFi Signal sensor.
- platform: wifi_signal
name: WiFi Signal
update_interval: 60s
binary_sensor:
- platform: homeassistant
id: tank_backlight
entity_id: input_boolean.esphome_backlight
internal: false
- platform: status
name: "Connected"
switch:
- platform: restart
name: "Restart"
Physical pinouts:
|1 GND black
|2 3.3v red
|3 gdd0 brown gpio 02
|4 csn yellow gpio 27
|5 sck gray gpio18
|6 mosi purple gpio 23
|7 miso / gd01 white gpio19
|8 gd02 green gpio 25