"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 formattedf"{cmd}"
.JvcProjector::op(code)
sends operation commands to write data.code
is formattedf"{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
Release history Release notifications | RSS feed
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.8.tar.gz
(11.4 kB
view hashes)
Built Distribution
Close
Hashes for pyjvcprojector-1.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62feb06676f6b1ed7042db22410accdb6e43e889fcf45b63d0d23ba4887d756a |
|
MD5 | 22bf9328287d570b74c93307152895ce |
|
BLAKE2b-256 | 12db177e3035b4e7395d5f9fc239a621f395764fa3511daa6bfe6c0c37d37420 |