esphome icon indicating copy to clipboard operation
esphome copied to clipboard

RP2040: Add remote_transmitter, and remote_receiver components

Open lsellens opened this issue 1 year ago • 4 comments

What does this implement/fix?

Just adding remote_transmitter, and remote_receiver to the the Pico boards

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): fixes https://github.com/esphome/issues/issues/4033

Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#<esphome-docs PR number goes here>

Test Environment

  • [ ] ESP32
  • [ ] ESP32 IDF
  • [ ] ESP8266
  • [X] RP2040
  • [ ] BK72xx
  • [ ] RTL87xx

Example entry for config.yaml:

# Example config.yaml

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:

lsellens avatar Dec 20 '23 20:12 lsellens

Fixes esphome/issues#4033

lsellens avatar Dec 25 '23 20:12 lsellens

I tested the transmitter component with the following config:

external_components:
  - source: github://pr#5974
    components: [ remote_transmitter ]

remote_transmitter:
  pin: 
    number: GPIO17
  carrier_duty_percent: 50%

switch: 
  - platform: template
    name: "Volume up"
    turn_on_action:
      remote_transmitter.transmit_nec:
            address: 0x7080
            command: 0x38C7

But it wasn't working only once it did turn up the volume. It flashes the LED because i can see that with my camera, but maybe it can't handle the nec protocol... It works flawlessly with my ESP32. PS_nr1: i'm using the MIKROE IR Click. PS_nr2: It works correctly, i wasn't careful enough with the position that i held the IR LED.

optimusprimespace avatar Jan 16 '24 15:01 optimusprimespace

I tested the transmitter component with the following config:

external_components:
  - source: github://pr#5974
    components: [ remote_transmitter ]

remote_transmitter:
  pin: 
    number: GPIO17
  carrier_duty_percent: 50%

switch: 
  - platform: template
    name: "Volume up"
    turn_on_action:
      remote_transmitter.transmit_nec:
            address: 0x7080
            command: 0x38C7

But it wasn't working only once it did turn up the volume. It flashes the LED because i can see that with my camera, but maybe it can't handle the nec protocol... It works flawlessly with my ESP32. PS_nr1: i'm using the MIKROE IR Click. PS_nr2: It works correctly, i wasn't careful enough with the position that i held the IR LED.

I've been using it with the nec protocol for several weeks now on 2 different devices with no issue. Make sure you're using a properly sized resistor with your ir led.

lsellens avatar Jan 17 '24 20:01 lsellens

I'm using this for a transmitter and it is working for me. I was a little surprised that it doesn't seem to use the PIO feature, I saw another rx transmitter pico project doing that way.

Anything I can do, as a random user, to help get this merged? What's the next step?

tringenbach avatar Apr 02 '24 01:04 tringenbach

I'm using RPi Pico W, and wanting to use remote_transmitter and remote_receiver components. Would be good to see this merged.

ojwc avatar Jul 06 '24 09:07 ojwc

I'm using RPi Pico W, and wanting to use remote_transmitter and remote_receiver components. Would be good to see this merged.

I think you'll probably just have to use it as a external component

external_components:
  - source: github://pr#5974
    components: [ remote_transmitter,  remote_receiver]

This would be better implemented as a PIO state machine, but I don't think that's why it hasn't been merged. With it buried in close to 230 pending PRs it might not ever be. I don't think the maintainers really have time to vet all of the changes.

lsellens avatar Jul 06 '24 14:07 lsellens

Hello, this pull request needs to be updated to include the toleranceType when calling setTolerance. It is currently not compiling.

sensorware avatar Jul 07 '24 13:07 sensorware

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 53.78%. Comparing base (4d8b5ed) to head (da29e8b). Report is 922 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #5974      +/-   ##
==========================================
+ Coverage   53.70%   53.78%   +0.07%     
==========================================
  Files          50       50              
  Lines        9408     9660     +252     
  Branches     1654     1704      +50     
==========================================
+ Hits         5053     5196     +143     
- Misses       4056     4140      +84     
- Partials      299      324      +25     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Jul 07 '24 16:07 codecov-commenter

Hello, this pull request needs to be updated to include the toleranceType when calling setTolerance. It is currently not compiling.

Should be fixed now, but please test. I don't use the remote_receiver component myself and I'm not at home to test these changes.

lsellens avatar Jul 07 '24 17:07 lsellens