Skip to main content

A library for sending IR commands to an ITach IP2IR gateway

Project description

ITachIP2IR library

A C++ library with python bindings for sending IR commands to an ITach IP2IR gateway.

It can be given an ip address and port to connect to, or it can be given a mac address and will listen for broadcasts from any ITach gateway that matches the mac address.

It gets the IR commands from a command library file that follows the format of:

CH1
0000 006D 0000 0022 00AC 00AB 0015 0041 0015 0041 0015 0041 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0041 0015 0041 0015 0041 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0041 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0041 0015 0041 0015 0016 0015 0041 0015 0041 0015 0041 0015 0041 0015 0041 0015 0689

CH2
0000 006D 0000 0022 00AC 00AB 0015 0041 0015 0041 0015 0041 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0041 0015 0041 0015 0041 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0041 0015 0016 0015 0041 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0016 0015 0041 0015 0016 0015 0041 0015 0041 0015 0041 0015 0041 0015 0041 0015 0689

Dependencies

  • CMake 2.8 or Python 2 or 3

How to use

  • Executable command line interface for sending one shot ir commands
    ./itachip2ir [ip-of-itach] [itach-listening-port] [ir-commands.txt] [name-of-ir-command] [itach-mod] [itach-conn] [message-count]
  • Python object
    import pyitachip2ir
    import logging
    
    logging.basicConfig(level=logging.INFO) # Get log messages from pyitachip2ir
    
    mac_address = None # If known use this, it will search for the itach
    ip_address = "127.0.0.1"
    port = 4998
    itach = pyitachip2ir.ITachIP2IR(mac_address, ip_address, port)
    
    with open("tv_commands.txt",'r') as cmds:
        itach.addDevice("tv", 1, 3, cmds.read())
    
    if not itach.ready(5000): # Search for 5 seconds for device
        raise IOError("ITach not found")
    
    itach.send("tv", "ON", 1)

License

  • MIT License

Any questions please contact: me@alan.fish

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

pyitachip2ir2-0.0.8.tar.gz (8.2 kB view details)

Uploaded Source

File details

Details for the file pyitachip2ir2-0.0.8.tar.gz.

File metadata

  • Download URL: pyitachip2ir2-0.0.8.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for pyitachip2ir2-0.0.8.tar.gz
Algorithm Hash digest
SHA256 40105a8cbdd40953eb20c99f7fd2fffe01ac1c5d160d19db7dcf21575b563311
MD5 8694f84183f9d7949ed9d06c971e0f57
BLAKE2b-256 2075ac6863720b3a70e019a1850b3df12ac7d66208a198c2e4301a5f3b49ff68

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page