peterhinch / micropython_ir

Nonblocking device drivers to receive from IR remotes and for IR "blaster" apps.
MIT License
240 stars 51 forks source link

Support for VIZIO TV and Soundbar IR #13

Open jeff-borghoff opened 2 years ago

jeff-borghoff commented 2 years ago

Hello @peterhinch , I've been working with your IR module and for a reason I've not been able to determine, I can't capture or send IR signals that will work with the VIZIO IRs.

My dev box is a Ubuntu Linux laptop and I'm using a Raspberry PI Pico. Also, using https://smile.amazon.com/gp/product/B01E20VQD8/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

I've done some research and it may be that VIZIO and maybe VIZIO is using NEC. Is this different from NEC_8 or NEC_16?

If this is currently unsupported, could VIZIO IR support be added.

I also tried the code for Unsupported protocols.

from ir_rx.acquire import test
import ujson
lst = test()  # May report unsupported or unknown protocol
with open('burst.py', 'w') as f:
    ujson.dump(lst, f)

Where does the burst.py write to?

Many thanks Peter.

Jeff

peterhinch commented 2 years ago

Firstly there is no way I can develop code for hardware I don't possess.

The steps I would take in your position are:

  1. Verify that your receive and transmit hardware works by testing with a known remote control.
  2. Run the test documented here to try to determine the protocol used by the unknown remote.
  3. If that succeeds, continue on the basis of the identified protocol.
  4. If it fails an option is to use the "unsupported" code you identified, bearing in mind that it's experimental and limited.

The code you quote above is intended to capture a burst from a single button press of a remote. It writes it out to a file burst.py. In practice you'd create several files, one for each key that you want to transmit.

The code below it (in my doc) shows how you would replay it to the transmitter - it's only a sample, in practice you'd write an application which would select and send a captured file according to the key you want to transmit.