Skip to main content

A module to parse the NEC IR remote control protocol in Python

Project description

IRReceiver

A module to parse the NEC IR remote control protocol in Python

Description

This is a fully tested module that creates a parser for the NEC IR remote control protocol.

The NEC protocol is used by many remotes, you can read about it here.

NOTE: Although there is an example of this sketch that is made for the Raspberry PI, it is unlikely to work. The Raspberry Pi does not have a real time operating system and in my testing this did not work reliably.

Dependencies

  • This project has no external dependencies but the example code does depend on being run on a Raspberry Pi.
  • All code follows PEP 8 and there is a Github action to run code through YAPF before it is merged to the main branch.

Tested On

  • A Raspberry Pi (first generation)
  • A Yamaha MRX-90M remote

To Install

  • pip install irreceiver

To Use

  • An example file can be found in the examples directory.
  • Here is a basic example of decoding an list of IR timing pulses:
from irreceiver import NecDecoder
decoder = NecDecoder()
# PULSES should be a list of IR pulse timings
message = decoder.decode(PULSES)
# Message will be a number such as 0x00AD where the first byte 00 is the address and the second byte AD is the command 

Project Structure

Directory structure should be clear. All code is in the irreceiver directory.

License

:copyright: Willy Nolan 2020

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

irreceiver-0.9.5.tar.gz (4.4 kB view hashes)

Uploaded source

Built Distribution

irreceiver-0.9.5-py3-none-any.whl (4.6 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page