Skip to main content

"A python library for controlling a JVC Projector over a network connection."

Project description

pyjvcprojector

A python library for controlling a JVC Projector over a network connection.

https://pypi.org/project/pyjvcprojector/

Features

A full reference to the available commands is available from JVC here http://pro.jvc.com/pro/attributes/PRESENT/Manual/External%20Command%20Spec%20for%20D-ILA%20projector_V3.0.pdf.

Convenience functions:

  • JvcProjector::power_on() turns on power.
  • JvcProjector::power_off() turns off power.
  • JvcProjector::get_power() gets power state (standby, on, cooling, warming, error)
  • JvcProjector::get_input() get current input (hdmi1, hdmi2).
  • JvcProjector::get_signal() get signal state (signal, nosignal).
  • JvcProjector::get_state() returns {power, input, signal}.
  • JvcProjector::get_info() returns {model, mac address}.

Send remote control codes

A wrapper for calling JvcProjector::op(f"RC{code}")

  • JvcProjector::remote(code) sends remote control command.

Send raw command codes

  • JvcProjector::ref(code) sends reference commands to read data. code is formatted f"{cmd}".
  • JvcProjector::op(code) sends operation commands to write data. code is formatted f"{cmd}{val}".

Installation

pip install pyjvcprojector

Usage

import asyncio

from jvcprojector.projector import JvcProjector
from jvcprojector import const


async def main():
    jp = JvcProjector("127.0.0.1")
    await jp.connect()

    print("Projector info:")
    print(await jp.get_info())

    if await jp.get_power() != const.ON:
        await jp.power_on()
        print("Waiting for projector to warmup...")
        while await jp.get_power() != const.ON:
            await asyncio.sleep(3)

    print("Current state:")
    print(await jp.get_state())

    #
    # Example sending remote code
    #
    print("Showing info window")
    await jp.remote(const.REMOTE_INFO)
    await asyncio.sleep(5)

    print("Hiding info window")
    await jp.remote(const.REMOTE_BACK)

    #
    # Example sending reference command (reads value from function)
    #
    print("Picture mode info:")
    print(await jp.ref("PMPM"))

    #
    # Example sending operation command (writes value to function)
    #
    # await jp.ref("PMPM01")  # Sets picture mode to Film

    await jp.disconnect()

Password authentication is also supported for both older and newer models.

JvcProjector("127.0.0.1", password="1234567890")

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

pyjvcprojector-1.1.2.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

pyjvcprojector-1.1.2-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file pyjvcprojector-1.1.2.tar.gz.

File metadata

  • Download URL: pyjvcprojector-1.1.2.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for pyjvcprojector-1.1.2.tar.gz
Algorithm Hash digest
SHA256 d58e157d78b1dee10fc6cd23871a80c30bb92022395b32f63f87da979cd2a42b
MD5 dbb039c3d50e0f7ce56e77a8ba76e932
BLAKE2b-256 d4b64a0f964dee4e657ffae0d5b9c9b6db93f7a3c948cce538d13a10fc1eba38

See more details on using hashes here.

File details

Details for the file pyjvcprojector-1.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pyjvcprojector-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7953b329d21b2a69c22fd968c7533e177cf0eed74afb82869e3b52cac02dd199
MD5 6b36bb4280037cee3de1e900ab3947a2
BLAKE2b-256 47e593795ae232664a2912e81be9db692138444184eef6e2f0f7fccd7bfecfa3

See more details on using hashes here.

Supported by

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