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/

Forked from https://github.com/SteveEasley/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.

Commands

  • JvcCommandHelpers.get_available_commands() return an object containing all available commands.
  • JvcCommandHelpers.get_command_help("picture_mode") return human readable help for a given command.

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::is_on() returns True if the power is on and ready
  • 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 supported commands

  • JvcProjector::send_command(cmd, val) where cmd is a top level key from JvcCommandHelpers.get_available_commands() such as laser_power and val is a valid option found in the values key. For example, clear_motion_drive, low.

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 not await jp.is_on():
        await jp.power_on()
        print("Waiting for projector to warmup...")
        while not await jp.is_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
    #
    await jp.send_command(const.CMD_PICTURE_MODE_LASER_POWER, const.VAL_LASER_POWER[1])

    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_test-1.1.7.tar.gz (22.6 kB view details)

Uploaded Source

Built Distribution

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

pyjvcprojector_test-1.1.7-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file pyjvcprojector_test-1.1.7.tar.gz.

File metadata

  • Download URL: pyjvcprojector_test-1.1.7.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pyjvcprojector_test-1.1.7.tar.gz
Algorithm Hash digest
SHA256 f6d9b2f5a1a043d84fabfe244ff988048c6651559f74ccbbc144a85a89f5213a
MD5 00593c37bb724e8b9add56b79d424268
BLAKE2b-256 865e2b11058f1356c59f54e7c4bdaf368b1c3f5c2af9953039a19617e6abf495

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyjvcprojector_test-1.1.7.tar.gz:

Publisher: build.yml on iloveicedgreentea/pyjvcprojector

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyjvcprojector_test-1.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for pyjvcprojector_test-1.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 d940332a55c1fd0f4bb2b24aa5bc10e9c0f848ec993d3b7f5a1784e3962df5a5
MD5 600e532bf3744e908243a164ed756762
BLAKE2b-256 b7302928f66d3eb650689193d61af7b571578adf03ec2157e2af0474f0c7a29a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyjvcprojector_test-1.1.7-py3-none-any.whl:

Publisher: build.yml on iloveicedgreentea/pyjvcprojector

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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