Giter Club home page Giter Club logo

esphome-cc1101's Introduction

IMPORTANT

--> make sure to copy both cc1101.yaml and cc1101.h <--

image

CC1101 support for ESPHome

image

image

Basic Usage

see cc1101.yaml

Raw signal visualizer

https://github.com/dbuezas/esphome-remote_receiver-oscilloscope

Advanced

See cc1101-advanced.yaml

Adds RSSI sensor and number components to tweak frequency and bandwidth on the fly. I use this to tweak the values to maximize reception.

Links:

esphome-cc1101's People

Contributors

dbuezas avatar gabest11 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

esphome-cc1101's Issues

Not able to send or receive

Guys, I am unable to get this module to send / receive. I guess receive is not working because send is failing.

Here my setup. I have 2x ESP8266 WeeMos D1 minis setup, with 2 of these modules connect to each esp via the wiring outlined in the Repo.

https://amptech.co.nz/CC1101-Wireless-Transceiver-Module-SMA-Antenna-Arduino-433MHZ?search=cc1101

I have added the demo yaml configuration to both devices in ESPhome and installed on the esp.

If I go one of the ESPs and open the Garage binary sensor, and then open the other ESP and open the Garage button, when I press the button I do not see the Garage binary sensor changing state.

Any ideas on this one? It is all untouched config straight from the REPO. I have everything wired execpt for GDO2.

Thanks

cannot transmit or receive

I am still unable to get this to work.

I've shifted over to a Wemos ESP WROOM02 D1 Battery Shield and using the same code, I get a log message saying that the remote code was sent but nothing received.

On my receiver, I do seem to be getting a lot of noise, so I take it its receiving ok?? But still, no sign of the code received and no trigger on the garage output.

One other thing, with the stock YAML, same code but one on a WemosD1 mini and one on the Wemos D1 Battery Sheild, however I do not get any of the noise on the WROOM02 shield as I do on the D1mini.

Any ideas?
Thanks

Pic of the noise I receive

image

ESP32-S2 Crashing on Transmit

I have the module connected to a ESP32-S2. Recieving of signals works without any problems. Unfortuatly when i press the button to send, Esphome crashes and reboots the esp. I don't detect any signals with my flipper zero either :(

sensor:
  - platform: custom
    lambda: |-
      auto 868 = new CC1101(
        36, // SCK
        37, // MISO
        35, // MOSI
        34, // CSN
        2, // GDO0
        200, // bandwidth_in_khz
        868.35 // freq_in_mhz
      );
      App.register_component(868);
      return {868};
    sensors:
      id: transciver
      internal: true
remote_transmitter:
  - pin: 2 # This is GDO0
    carrier_duty_percent: 100%

remote_receiver:
  - pin: 2 # This is GDO0
      # on the esp8266 use any of D1,D2,D5,D6,D7,Rx
      # Don't use D3,D4,D8,TX, boot often fails.
      # Can't be D0 or GPIO17 b/c no interrupts
    dump:
      - raw
binary_sensor:
  - platform: remote_receiver
    name: Garage
    raw:
      code: [-6278,417,-788,387,-788,383,-789,402,-391,790,-799,398,-389,788,-782,392,-788,387,-394,789,-390,791,-391,794,-793,387,-402,793,-386,788,-786,402,-386,788,-391,783,-786,379,-788,387,-390,795,-397,781,-786,387,-784,384,-788,387,-397,779,-399,785,-396,791,-785,388,-791,386,-780,383,-786,408,-784,385,-407,779,-388,794,-404,787,-784,387]
button:
  - platform: template
    name: Garage
    on_press:
      - lambda: get_cc1101(transciver).beginTransmission();
      - remote_transmitter.transmit_raw:
          code: [-6278,417,-788,387,-788,383,-789,402,-391,790,-799,398,-389,788,-782,392,-788,387,-394,789,-390,791,-391,794,-793,387,-402,793,-386,788,-786,402,-386,788,-391,783,-786,379,-788,387,-390,795,-397,781,-786,387,-784,384,-788,387,-397,779,-399,785,-396,791,-785,388,-791,386,-780,383,-786,408,-784,385,-407,779,-388,794,-404,787,-784,387]
      - lambda: get_cc1101(transciver).endTransmission();

Raw signal with 65 bits / keeping track of canvas position

I have a remote which sends a signal with 65 bits - the protocol definition is like:

RCSwitchBase(5200,  600, 600, 200, 200, 600, false)

The original receiver accepts this signal even when I send only the first 64 bits. Thus I can define a button using this protocol and send button presses.

I can define a binary_sensor using rc_switch_raw. This way I am notified about presses from the original remote.

But due to this problem I'd like to receive these signals with a defined protocol. At the moment rc_switch can't see those signals.

ESPHOME ESP32 Issue

First off, thanks for this code dbuezas! I think it is really great!
I have this working ok on an esp8266, but have had some issues with esp32 devices. If I try to flash with the default cc1101.h the esp32 bootloops. If I add the following to cc1101.h its stops bootlooping and boots fine // noInterrupts(); // interrupts(); Receive works perfect transmit does not. Checked with RTL-SDR no transmission. Tried adding the GDO2 pin and putting receive on that to seperate transmit and receive, same result. Saw this info in another post. Any advice would be appreciated. See below...

void beginTransmission() {
ELECHOUSE_cc1101.setModul(_moduleNumber);
ELECHOUSE_cc1101.SetTx();
pinMode(_GDO0, OUTPUT);
// noInterrupts();
}
void endTransmission() {
// interrupts();
pinMode(_GDO0, INPUT);
ELECHOUSE_cc1101.setModul(_moduleNumber);
ELECHOUSE_cc1101.SetRx();
ELECHOUSE_cc1101.SetRx(); // yes, twice

ESP32 needs separate GDO2 and cannot disable interrupts

I was trying to get the bottom of this and basically the code from #2, and when noInterrupts(); / interrupts(); is called then it will crash with this stack, so you may want to remove those with ESP32.

Guru Meditation Error: Core 1 panic'ed (Interrupt wdt timeout on CPU1).

0x40091d5b: vListInsert at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/freertos/list.c line 182
0x40090a7f: vTaskPlaceOnEventList at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/hal/esp32/include/hal/cpu_ll.h line 39
0x4008fcb6: xQueueSemaphoreTake at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/freertos/queue.c line 1688
0x400fd78b: rmt_write_items at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/driver/rmt.c line 1165
0x400e142e: esphome::remote_transmitter::RemoteTransmitterComponent::send_internal(unsigned int, unsigned int) at /config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/stl_vector.h line 805
0x40198f9d: esphome::remote_base::RemoteTransmitterBase::send_(unsigned int, unsigned int) at src/esphome/components/remote_base/remote_base.cpp line 160
0x400eca83: esphome::remote_base::RemoteTransmitterActionBase ::play(ArduinoJson6185_D1::ObjectConstRef) at src/esphome/components/remote_base/remote_base.h line 118

Compile fails saying the pin in the lambda isn't defined

I might just not be great at this, sorry.

Steps Followed
YAML
esphome:
  name: esphome-web-dde34c
  friendly_name: ESPHome - Faro Radio
  includes:
    - cc1101.h
  libraries:
    - SPI
    - "SmartRC-CC1101-Driver-Lib"

esp32:
  board: esp32doit-devkit-v1
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "REDACTED"

ota:


wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esphome-Web-Dde34C"
    password: "muD8LhuLQ3Qp"

sensor:
  - platform: custom
    lambda: |-
      auto my_sensor = new CC1101(
        GPIO18, // SCK
        GPIO19, // MISO
        GPIO23, // MOSI
        GPIO5, // CSN
        GPIO13, // GDO0
        200, // bandwidth_in_khz
        303.875 // freq_in_mhz
      );
      App.register_component(my_sensor);
      return {my_sensor};
    sensors:
      id: transciver
      internal: true
    
remote_transmitter:
  - pin: GPIO13 # This is GDO0
    carrier_duty_percent: 100%

remote_receiver:
  - pin: GPIO13 # This is GDO0
      # on the esp8266 use any of D1,D2,D5,D6,D7,Rx
      # Don't use D3,D4,D8,TX, boot often fails.
      # Can't be D0 or GPIO17 b/c no interrupts
    dump:
      - raw
binary_sensor:
  - platform: remote_receiver
    name: Garage
    raw:
      code: [415,-300,370,-300,375,-300,378,-300,378,-300,379,-300,405]
button:
  - platform: template
    name: Garage
    on_press:
      - lambda: get_cc1101(transciver).beginTransmission();
      - remote_transmitter.transmit_raw:
          code: [415,-300,370,-300,375,-300,378,-300,378,-300,379,-300,405]
      - lambda: get_cc1101(transciver).endTransmission();

I can't get the file to compile, it fails after a minute or so complaining for example "error: 'GPIO18' was not declared in this scope".

Any help appreciated.

Error Log
/config/esphome/esphome-web-dde34c.yaml: In lambda function:
/config/esphome/esphome-web-dde34c.yaml:39:9: error: 'GPIO18' was not declared in this scope
         GPIO18, // SCK
         ^~~~~~
/config/esphome/esphome-web-dde34c.yaml:39:9: note: suggested alternative: 'GPIO'
         GPIO18, // SCK
         ^~~~~~
         GPIO
/config/esphome/esphome-web-dde34c.yaml:40:9: error: 'GPIO19' was not declared in this scope
         GPIO19, // MISO
         ^~~~~~
/config/esphome/esphome-web-dde34c.yaml:40:9: note: suggested alternative: 'GPIO'
         GPIO19, // MISO
         ^~~~~~
         GPIO
/config/esphome/esphome-web-dde34c.yaml:41:9: error: 'GPIO23' was not declared in this scope
         GPIO23, // MOSI
         ^~~~~~
/config/esphome/esphome-web-dde34c.yaml:41:9: note: suggested alternative: 'GPIO'
         GPIO23, // MOSI
         ^~~~~~
         GPIO
/config/esphome/esphome-web-dde34c.yaml:42:9: error: 'GPIO5' was not declared in this scope
         GPIO5, // CSN
         ^~~~~
/config/esphome/esphome-web-dde34c.yaml:42:9: note: suggested alternative: 'GPIO'
         GPIO5, // CSN
         ^~~~~
         GPIO
/config/esphome/esphome-web-dde34c.yaml:43:9: error: 'GPIO13' was not declared in this scope
         GPIO13, // GDO0
         ^~~~~~
/config/esphome/esphome-web-dde34c.yaml:43:9: note: suggested alternative: 'GPIO'
         GPIO13, // GDO0
         ^~~~~~
         GPIO
/config/esphome/esphome-web-dde34c.yaml:48:24: error: could not convert '{my_sensor}' from '<brace-enclosed initializer list>' to 'std::vector<esphome::sensor::Sensor*>'
       return {my_sensor};
                        ^
*** [/data/esphome-web-dde34c/.pioenvs/esphome-web-dde34c/src/main.cpp.o] Error 1
========================= [FAILED] Took 532.71 seconds =========================

Grothe Mistral SE doorbell button

Sorry to abuse the 'issues' for a support question.

I have a doorbell button like this (https://img.ricardostatic.ch/images/f764d4ee-3e9c-4652-af2f-382893df9216/t_1800x1350/grothe-sender-mistral-se-011b)
It mentions 868.35Mhz

and i also found this code on github (https://raw.githubusercontent.com/Ralf9/RFFHEM/master/FHEM/lib/signalduino_protocols.pm)
that is about the same device with hopefully some usefull info:

		"96"	=>	# Funk-Gong | Taster Grothe Mistral SE 03.1 / 01.1, Innenteil Grothe Mistral 200M(E)
							# https://forum.fhem.de/index.php/topic,64251.msg940593.html?PHPSESSID=nufcvvjobdd8r7rgr0cq3qkrv0#msg940593 @coolheizer
							# SD_BELL_104762 Alarm        MC;LL=-430;LH=418;SL=-216;SH=226;D=23C823B1401F8;C=214;L=49;R=53;
							# SD_BELL_104762 ring         MC;LL=-439;LH=419;SL=-221;SH=212;D=238823B1001F8;C=215;L=49;R=69;
							# SD_BELL_104762 ring low bat MC;LL=-433;LH=424;SL=-214;SH=210;D=238823B100248;C=213;L=49;R=65;
							# SD_BELL_0253B3 Alarm        MC;LL=-407;LH=451;SL=-195;SH=239;D=23C129D9E78;C=215;L=41;R=241;
							# SD_BELL_0253B3 ring         MC;LL=-412;LH=458;SL=-187;SH=240;D=238129D9A78;C=216;L=41;R=241;
							# SD_BELL_024DB5 Alarm        MC;LL=-415;LH=454;SL=-200;SH=226;D=23C126DAE58;C=215;L=41;R=246;
							# SD_BELL_024DB5 ring         MC;LL=-409;LH=448;SL=-172;SH=262;D=238126DAA58;C=215;L=41;R=238;
			{
				name            => 'Grothe Mistral SE',
				comment         => 'Wireless doorbell Grothe Mistral SE 01.1 or 03.1',
				changed         => '20190518 new',
				id              => '96',
				knownFreqs      => '868.35',
				clockrange      => [170,260],
				format          => 'manchester',
				clientmodule    => 'SD_BELL',
				modulematch     => '^P96#',
				preamble        => 'P96#',
				length_min      => '40',
				length_max      => '49',
				method          => \&main::SIGNALduino_GROTHE,		# Call to process this message
			},

I started with the example yaml:

esphome:
  name: buzzer
  friendly_name: buzzer
  includes:
    - cc1101.h
  libraries:
    - SPI
    - "SmartRC-CC1101-Driver-Lib"

esp8266:
  board: d1_mini

[...]
    
sensor:
  - platform: custom
    lambda: |-
      auto my_sensor = new CC1101(
        D5, // SCK
        D6, // MISO
        D7, // MOSI
        D3, // CSN
        D1, // GDO0
        200, // bandwidth_in_khz
        868.35 // freq_in_mhz
      );
      App.register_component(my_sensor);
      return {my_sensor};
    sensors:
      id: transciver
      internal: true
remote_transmitter:
  - pin: D1 # This is GDO0
    carrier_duty_percent: 100%

remote_receiver:
  - pin: D1 # This is GDO0
      # on the esp8266 use any of D1,D2,D5,D6,D7,Rx
      # Don't use D3,D4,D8,TX, boot often fails.
      # Can't be D0 or GPIO17 b/c no interrupts
    dump:
      - raw
      
binary_sensor:
  - platform: remote_receiver
    name: Garage
    raw:
      code: [415,-300,370,-300,375,-300,378,-300,378,-300,379,-300,405]
button:
  - platform: template
    name: Garage
    on_press:
      - lambda: get_cc1101(transciver).beginTransmission();
      - remote_transmitter.transmit_raw:
          code: [415,-300,370,-300,375,-300,378,-300,378,-300,379,-300,405]
      - lambda: get_cc1101(transciver).endTransmission();

I do not get any errors, but i was expecting 'something' to show up in the logs from the remote_receiver if i pushed the doorbell button.

The garage button seems to trigger the transmitter:

[18:14:37][C][logger:301]: Logger:
[18:14:37][C][logger:302]:   Level: DEBUG
[18:14:37][C][logger:303]:   Log Baud Rate: 115200
[18:14:37][C][logger:305]:   Hardware UART: UART0
[18:14:37][C][remote_transmitter:018]: Remote Transmitter...
[18:14:37][C][remote_transmitter:019]:   Carrier Duty: 100%
[18:14:37][C][remote_transmitter:020]:   Pin: GPIO5
[18:14:37][C][remote_base:027]: Remote Receiver Binary Sensor 'Garage'
[18:14:37][C][remote_receiver.esp8266:060]: Remote Receiver:
[18:14:37][C][remote_receiver.esp8266:061]:   Pin: GPIO5
[18:14:37][C][remote_receiver.esp8266:066]:   Buffer Size: 1000
[18:14:37][C][remote_receiver.esp8266:067]:   Tolerance: 25%
[18:14:37][C][remote_receiver.esp8266:068]:   Filter out pulses shorter than: 50 us
[18:14:37][C][remote_receiver.esp8266:069]:   Signal is done after 10000 us of no changes
[18:14:37][C][captive_portal:088]: Captive Portal:
[18:14:37][C][mdns:112]: mDNS:
[18:14:37][C][mdns:113]:   Hostname: buzzer
[18:14:37][C][ota:093]: Over-The-Air Updates:
[18:14:37][C][ota:094]:   Address: buzzer.local:8266
[18:14:37][C][ota:097]:   Using Password.
[18:14:37][C][api:138]: API Server:
[18:14:37][C][api:139]:   Address: buzzer.local:6053
[18:14:37][C][api:141]:   Using noise encryption: YES
[18:14:55][D][button:010]: 'Garage' Pressed.
[18:14:55][D][remote_transmitter:075]: Sending remote code...

I guess if i hooked the cc1101 board incorrectly i would get explicit errors ?

On ESP32 transceiver stops receiving after first transmission

Hi,

Thanks for the awesome work, I would really love to see this implemented as official component for ESPHome.

The only issue i have is that on ESP32 the transceiver stops receiving after the first transmission...I tested both basic and advanced .yaml configs from your repo so the issue seems to be in CC1101.h code

If you can give any clues about what can cause the issue i can test it

Regards

Can't run it on ESPHome 2023.12.6

Hi!

It was a while since I used my 433 sniffer so I decided to start from fresh firmware.
Unfortunately, looks like device can't boot right now, logs from esphome-flasher
flashing.log

I'm attaching my YAML configuration:

# https://github.com/dbuezas/esphome-cc1101
esphome:
  name: 433-receiver
  includes:
    - cc1101.h
  libraries:
    - SPI
    - "SmartRC-CC1101-Driver-Lib"
esp8266:
  board: nodemcuv2

logger:
  level: DEBUG
api:
  encryption:
    key: "[...]"
ota:
  password: "[...]"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "433-Receiver Fallback Hotspot"
    password: "[...]"

sensor:
  - platform: custom
    lambda: |-
      auto my_sensor = new CC1101(
        D5, // SCK
        D6, // MISO
        D7, // MOSI
        D3, // CSN
        D1, // GDO0
        200, // bandwidth_in_khz
        433.92 // freq_in_mhz
      );
      App.register_component(my_sensor);
      return {my_sensor};

    sensors:
      id: transciver_1
      name: "RSSI"
      unit_of_measurement: dBm
      entity_category: diagnostic

remote_receiver:
  - id: receiver_1
    pin:
      number: D1 # This is GDO0
      # allow_other_uses: True
      # on the esp8266 use any of D1,D2,D5,D6,D7,Rx
      # Don't use D3,D4,D8,TX, boot often fails.
      # Can't be D0 or GPIO17 b/c no interrupts
    dump: all

Photos of device:
IMG_0568
IMG_0569

Receives but doesn't send commands

I was able to configure my WROVER-B device, have it register to Home Assistant and I have no problem receiving data according to the serial console, but for some reason it doesn't actually send anything according to my SDR & Universal Radio Hacker. Given that I can receive, I'm guessing that the issue is with my configuration. My GDO pins re slightly different given that I'm using a slightly different esp32. My understanding is that GDO2 isn't used in this case as the CC1101 chip can only Tx or Rx at any point in time but not both.

My own C app written in Arduino & using the same library works, so I know that the hardware is connected fine and can work as expected.

When I use the remote control I see the following which closely resembles the code I want to send (aka: with some errors):

�[0;32m[I][remote.raw:041]: Received Raw: 413, -653, 388, -662, 387, -659, 365, -677, 367, -319, 733, -650, 385, -657, 384, -659, 380, -316, 745, -642, 401, -295, 729, -681, 382�[0m

When I press the button in Home Assistant:

�[0;36m[D][button:010]: 'Garage' Pressed.�[0m
�[0;36m[D][sensor:094]: 'transciver': Sending state -78.00000  with 0 decimals of accuracy�[0m

My yaml configuration:

# https://github.com/dbuezas/esphome-cc1101
esphome:
  name: cc1101
  platform: ESP32
  board: nodemcu-32s
  includes:
    - cc1101.h
  libraries:
    - SPI
    - "SmartRC-CC1101-Driver-Lib"

wifi:
  ssid: <hidden>
  password: <hidden>
  fast_connect: true
  power_save_mode: HIGH

logger:
api:
ota:

sensor:
  - platform: custom
    lambda: |-
      auto my_sensor = new CC1101(
        18, // SCK
        19, // MISO
        23, // MOSI
        5, // CSN
        2, // GDO0
        4, // GDO2
        48, // bandwidth_in_khz
        303.886 // freq_in_mhz
      );
      App.register_component(my_sensor);
      return {my_sensor};
    sensors:
      id: transciver
      internal: true
remote_transmitter:
  - pin: GPIO2 # This is GDO0
    carrier_duty_percent: 100%

remote_receiver:
  - pin: GPIO4 # This is GDO2
      # on the esp8266 use any of D1,D2,D5,D6,D7,Rx
      # Don't use D3,D4,D8,TX, boot often fails.
      # Can't be D0 or GPIO17 b/c no interrupts
    dump:
      - raw
binary_sensor:
  - platform: remote_receiver
    name: Garage
    raw:
      code: [346,-692,346,-692,346,-692,346,-692,346,-346,692,-692,346,-692,346,-692,346,-692,346,-692,346,-346,692,-692,346,-1038]
button:
  - platform: template
    name: Garage
    on_press:
      - lambda: get_cc1101(transciver).beginTransmission();
      - remote_transmitter.transmit_raw:
          code: [346,-692,346,-692,346,-692,346,-692,346,-346,692,-692,346,-692,346,-692,346,-692,346,-692,346,-346,692,-692,346,-1038]
      - lambda: get_cc1101(transciver).endTransmission();

Wiring E07-M1101S (C1101) with D1 mini

Hey,
Thanks for the code! I hope it will help me characterize my store remote signals to reproduce them as I want.
Could you please guide me into the wiring diagram between the two components?
I have two small red electronic cards so I guess one is the emitter and the other one is the receiver, right?
Is antenna mandatory?
Thanks for your help 😊

Help understanding and decoding signal for garage door opener

First, thank you for making this!

I am trying to replicate my garage door opener and for a single button press I get this output:

[12:45:49][D][remote.raw:028]: Received Raw: 453, -178, 213, -209, 229, -218, 219, -200, 228, -206, 234, -210, 236, -209, 211, -209, 237, -212, 207, -210, 236, -210, 236, -203, 218, -195, 249, -204, 233, -182, 245, -193, 242, -193, 241, -199, 245, -180, 1787, -395, 477, -384, 482, 
[12:45:49][D][remote.raw:028]:   -171, 486, -394, 478, -383, 282, -145, 265, -194, 240, -195, 251, -177, 259, -183, 268, -169, 265, -170, 265, -170, 476, -383, 267, -174, 260, -194, 466, -178, 258, -385, 283, -157, 486, -179, 262, -184, 254, -390, 477, -181, 261, -387, 488, -386, 472, 
[12:45:49][D][remote.raw:028]:   -173, 270, -176, 256, -182, 261, -387, 260, -185, 261, -157, 290, -157, 263, -184, 450, -199, 252, -402, 259, -182, 461, -181, 261, -402, 470, -399, 456, -408, 259, -183, 264, -159, 262, -184, 479, -173, 244, -200, 256, -384, 259, -192, 464, -173, 266, 
[12:45:49][D][remote.raw:028]:   -172, 252, -408, 485, -379, 268, -169, 489, -177, 257, -182, 244, -193, 242, -414, 470, -404, 257, -158, 487, -181, 262, -390, 471, -395, 251, -180, 487, -383, 284, -156, 264, -183, 454, -201, 240, -404, 479, -183, 261, -184, 236, -184, 262, -184, 262, 
[12:45:49][D][remote.raw:028]:   -375, 272, -172, 475, -181, 262, -184, 261, -389, 260, -181, 453, -394, 475, -206, 259, -387, 458, -411, 471, -396, 477, -384, 282, -169, 265, -169, 464, -402, 483, -383, 268, -170, 486, -399, 255, -183, 461, -193, 242, -193, 241, -194, 249, -406, 259, 
[12:45:49][D][remote.raw:028]:   -169, 265, -170, 266, -169, 469, -205, 235, -194, 240, -194, 241, -193, 243, -399, 483, -183, 246, -190, 243, -413, 250, -179, 485, -382, 268, -169, 487, -174, 250, -406, 258, -168, 265, -170, 266, -169, 269, -178, 258, -184, 261, -168, 267, -167, 462, 
[12:45:49][D][remote.raw:041]:   -199, 248, -179, 258, -385, 483, -401, 467, -199, 247, -405, 260, -167, 265, -169, 487, -374, 487, -401, 481, -172, 265, -391, 251, -179, 485, -383, 466, -204, 230, -195, 241, -200, 260, -4149, 227
[12:45:49][D][remote.raw:028]: Received Raw: 640, -182, 208, -207, 234, -209, 219, -217, 217, -219, 218, -220, 225, -206, 232, -209, 210, -210, 236, -210, 236, -183, 236, -210, 236, -183, 262, -183, 230, -194, 244, -200, 255, -182, 233, -195, 241, -194, 1767, -411, 453, -420, 474, 
[12:45:49][D][remote.raw:028]:   -174, 457, -409, 481, -398, 247, -170, 271, -178, 258, -181, 262, -183, 264, -156, 263, -182, 263, -183, 237, -183, 477, -396, 251, -180, 258, -183, 463, -205, 241, -389, 272, -171, 477, -181, 244, -192, 243, -414, 470, -178, 257, -409, 459, -414, 468, 
[12:45:49][D][remote.raw:028]:   -174, 253, -203, 233, -183, 244, -416, 246, -169, 265, -174, 278, -182, 259, -162, 465, -205, 236, -417, 248, -171, 468, -205, 235, -409, 459, -401, 470, -424, 252, -181, 264, -179, 236, -183, 486, -179, 261, -183, 236, -399, 248, -200, 455, -182, 244, 
[12:45:49][D][remote.raw:028]:   -196, 239, -412, 473, -407, 259, -169, 465, -200, 241, -194, 247, -178, 258, -386, 483, -402, 255, -178, 464, -201, 256, -384, 485, -389, 280, -157, 479, -394, 277, -154, 259, -182, 461, -207, 235, -416, 471, -173, 248, -198, 256, -182, 261, -168, 241, 
[12:45:49][D][remote.raw:028]:   -414, 246, -194, 473, -180, 260, -170, 241, -414, 248, -197, 469, -383, 487, -181, 240, -413, 471, -405, 459, -407, 475, -393, 249, -198, 255, -181, 460, -412, 455, -396, 272, -172, 477, -408, 260, -182, 468, -178, 261, -183, 229, -193, 244, -400, 256, 
[12:45:49][D][remote.raw:028]:   -182, 262, -184, 263, -156, 493, -179, 235, -211, 237, -177, 243, -195, 250, -408, 459, -209, 237, -183, 262, -402, 249, -169, 472, -405, 258, -183, 466, -206, 235, -402, 247, -195, 247, -182, 255, -183, 262, -158, 262, -184, 262, -183, 264, -157, 494, 
[12:45:49][D][remote.raw:041]:   -179, 229, -193, 273, -374, 482, -410, 462, -179, 262, -403, 244, -174, 278, -183, 458, -410, 465, -395, 472, -178, 259, -387, 285, -156, 485, -387, 471, -199, 248, -177, 257, -184, 260, -3968, 256
[12:45:50][D][remote.raw:028]: Received Raw: 640, -183, 210, -234, 208, -195, 217, -247, 190, -219, 241, -199, 229, -207, 234, -209, 236, -209, 211, -210, 236, -209, 237, -182, 236, -210, 236, -183, 229, -193, 245, -201, 256, -181, 262, -158, 263, -183, 1791, -374, 483, -411, 459, 
[12:45:50][D][remote.raw:028]:   -176, 461, -422, 456, -413, 253, -169, 265, -169, 267, -173, 277, -181, 262, -157, 269, -169, 265, -170, 265, -172, 475, -383, 283, -169, 265, -170, 462, -201, 256, -384, 260, -184, 461, -206, 237, -183, 263, -374, 496, -178, 257, -384, 485, -402, 467, 
[12:45:50][D][remote.raw:028]:   -172, 270, -177, 257, -182, 261, -391, 243, -193, 265, -171, 248, -179, 258, -183, 486, -182, 236, -405, 255, -179, 463, -201, 256, -384, 487, -386, 475, -393, 274, -177, 255, -182, 244, -168, 489, -175, 241, -200, 247, -407, 262, -165, 489, -175, 240, 
[12:45:50][D][remote.raw:028]:   -195, 249, -406, 459, -408, 266, -169, 487, -177, 256, -182, 260, -184, 238, -388, 481, -411, 249, -169, 495, -180, 234, -413, 457, -401, 272, -169, 467, -409, 259, -183, 263, -157, 493, -179, 263, -375, 469, -201, 255, -182, 260, -169, 241, -193, 242, 
[12:45:50][D][remote.raw:028]:   -415, 251, -179, 484, -183, 242, -193, 242, -388, 274, -178, 484, -381, 483, -175, 242, -411, 476, -408, 468, -396, 468, -399, 256, -183, 247, -190, 463, -395, 473, -407, 259, -183, 466, -412, 257, -183, 451, -199, 248, -177, 258, -182, 261, -385, 259, 
[12:45:50][D][remote.raw:028]:   -182, 265, -183, 261, -158, 477, -174, 270, -177, 257, -182, 261, -168, 241, -413, 468, -200, 228, -206, 234, -417, 243, -170, 486, -400, 256, -183, 462, -182, 244, -413, 271, -171, 249, -179, 259, -183, 262, -183, 267, -153, 264, -183, 264, -156, 481, 
[12:45:50][D][remote.raw:041]:   -173, 266, -172, 278, -383, 485, -386, 477, -174, 265, -399, 252, -182, 262, -184, 460, -412, 448, -423, 446, -206, 234, -412, 259, -183, 456, -395, 495, -177, 257, -181, 262, -183, 236, -3983, 218

Using the visualization tool we get this:
image

I've also tried to get a better understanding of what to do from this issue, but I'm having a hard time wrapping my head around this.

Do you see any immediate patterns and what the code could be for my garage door opener? My understanding is that the remote outputs several commands, the numbers after "Received Raw:" and that this is what gets plotted in the visualizer. I've tried to copy one of the lines and transmit this, but to no success.

Radio doesn't seem to take into account Frequency

I bought a radio that was recommended as working for 303Mhz despite being listed at 404 originally.

Further to our other issue I did a few tests far away from another other noise, but the radio picks up nothing at all in the 300Mhz range, despite listing the frequency.

I do, however, get correct signals when doing tests at the 404Mhz range, even if the frequency si set up to be 303. I'm not sure if this is expected or if it indicates that the radio is not in fact using the frequency I specified.

not able to send

hello i have aa cc1101 hooked up to a wemos D1 mini.

when hooking up i could recieve some data.

but when i resend this data there is nothing happening, the lights wont turn on.
what could be wrong, how to find out what is wrong.

below is my yaml file

# --- start default settings ---
esphome:
  name: 118-rf-tranceiver
  includes:
    - cc1101.h
  libraries:
    - SPI
    - "SmartRC-CC1101-Driver-Lib"
    
esp8266:
  board: d1_mini_lite

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_pwd

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "rf fallback"
    password: !secret esphome_pwd
  
  manual_ip:
    static_ip: 192.168.1.118
    gateway: 192.168.1.1
    subnet: 255.255.255.0

captive_portal:

# Enable logging
logger:

api:
  password: !secret esphome_api

ota:
  password: !secret esphome_ota

web_server:
  port: 80


# --- End default settings ---

# --- Start of custom sensors ---

sensor:
  - platform: custom
    lambda: |-
      auto my_sensor = new CC1101(
        D5, // SCK
        D6, // MISO
        D7, // MOSI
        D8, // CSN
        D1, // GDO0
        D2, // GDO2
        200, // bandwidth_in_khz
        433.92 // freq_in_mhz
      );
      App.register_component(my_sensor);
      return {my_sensor};
    sensors:
      id: transciver
      internal: true
remote_transmitter:
  - pin: D1 # This is GDO0
    carrier_duty_percent: 100%

remote_receiver:
  - pin: D1 # This is GDO0
      # on the esp8266 use any of D1,D2,D5,D6,D7,Rx
      # Don't use D3,D4,D8,TX, boot often fails.
      # Can't be D0 or GPIO17 b/c no interrupts
    dump: rc_switch
      
binary_sensor:
  - platform: remote_receiver
    name: Garage
    rc_switch_raw:
      code: "0011000100001110101001111000"
      protocol: 1
button:
  - platform: template
    name: Garage
    on_press:
      - lambda: get_cc1101(transciver).beginTransmission();
      - remote_transmitter.transmit_rc_switch_raw:
          code: "0011000100001110101001111000"
          protocol: 1
      - lambda: get_cc1101(transciver).endTransmission();
      - lambda: get_cc1101(transciver).beginTransmission();
      - remote_transmitter.transmit_rc_switch_raw:
          code: "0011000100001110101001111000"
          protocol: 1
      - lambda: get_cc1101(transciver).endTransmission();
      
      - lambda: get_cc1101(transciver).beginTransmission();
      - remote_transmitter.transmit_rc_switch_raw:
          code: "0011000100001110101001111000"
          protocol: 1
      - lambda: get_cc1101(transciver).endTransmission();
      - lambda: get_cc1101(transciver).beginTransmission();
      - remote_transmitter.transmit_rc_switch_raw:
          code: "001100010000111010100111100"
          protocol: 1
      - lambda: get_cc1101(transciver).endTransmission();

Need support to create YAML configuration to read water meter data and send it to HA

Hi,

i found this Github Repo and i hope you can help me. I am using a cc1101 433 MHz to read the data from my water meter which is working. I figured out the exact frequency. What is not working is to send the data to HA via MQTT. Unfortunately the developer is no longer supporting the project in order to support.

This is the project: https://github.com/psykokwak-com/everblu-meters-esp8266

Therefore i searched after a ESPhome solution but i am really struggling to create the YAML file.
My question is if somebody can create a YAML file for me as i dont know how and where to start?

I would really appreciate your support!

ESPHome 2023.12.1 can't use same pin for emit/receive

Hello,

It seems like in ESPHome 2023.12.1 a new check happens and it is not possible to use the same pin for both the emitter and receiver, asi in the example cc1101.yaml:
image

What would be the best workaround for this?

Best regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.