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

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()

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.0.9.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyjvcprojector-1.0.9-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyjvcprojector-1.0.9.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for pyjvcprojector-1.0.9.tar.gz
Algorithm Hash digest
SHA256 7307fb78332a90ba383ceb7bfec2ea9e51f346fcaf0e747a407afb51e9c2d02a
MD5 9e7b819eabcdaeba32f5bbd2e3d1bce1
BLAKE2b-256 7e614d11cdd66563f93122fc7d0808046fc1827f2d7d447d5d61d71a710c205c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyjvcprojector-1.0.9-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for pyjvcprojector-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 4a56c7d577b5136c595a356cccbc5a59e22b580a97a3cdf86140f7d155823e40
MD5 ee520e6dbb30b459b34bbed5cf6d9b81
BLAKE2b-256 25993f6769b7c40b5bc958e6b08f9f7c205b9b5951338d04c6155587dd800383

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