Git Product home page Git Product logo

epson_projector's Introduction

Epson-projector module

Asynchronous library to control epson projectors

Requires Python 3.5. asyncio, aiohttp.

Created mostly to use with Home Assistant, specifically with the Epson LS12000. The LS11000 should work as well.

Deploying with Docker

Build locally, then deploy with two environment variables:

  • MQTT_HOST -- IP address of your MQTT broker
  • EPSON_IP -- IP address of your Epson projector, I'd recommend setting a static IP on your projector first.

I use this bash script locally when pulling a new version to update + restart.

#! /bin/bash

docker stop epson_bridge
docker rm epson_bridge
docker rmi epson_bridge
docker build -t epson_bridge .
docker run -d --restart always --name epson_bridge --env MQTT_HOST=192.168.1.98 --env EPSON_IP=192.168.1.30 epson_bridge

Running manually

Run python /usr/src/app/asyncio_mqtt_based_client.py

Configuring in Home Assistant

You'll need an MQTT broker first, so setup that integration if you haven't already.

Once this server starts it will publish to the homeassistant topic a list of capabilities, and Home Assistant should automatically pick this up on your Entities list. If the projector is not powered on, the entities will show up as unavailable. These automatically become available when the projector powers on and latches onto a video signal correctly. (For whatever reason if the projector hasn't latched onto a video signal it won't report as powered on.)

From there you can add things as needed to your HA UI. I have two places where I use it.

Screenshot of Home Assistant configuration 1

type: entities
entities:
  - entity: switch.epson
  - entity: number.epson_projector_laser_level
  - entity: number.epson_projector_hdr_range
  - entity: number.epson_projector_scene_adaptive_gamma
  - entity: button.epson_projector_load_lens_memory_1
  - entity: button.epson_projector_load_lens_memory_2
  - entity: button.epson_projector_load_lens_memory_3
  - entity: select.epson_projector_color_mode
  - entity: select.epson_projector_color_space
  - entity: select.epson_projector_hdr_dynamic_range
  - entity: select.epson_projector_image_processing
  - entity: number.epson_projector_high_resolution_fine_line_adjustment
  - entity: number.epson_projector_high_resolution_soft_focus_detail
  - entity: number.epson_projector_brightness
  - entity: number.epson_projector_contrast
title: Projector
state_color: true

This config is a bit more complex, but makes things a little more touch friendly for a phone.

Screenshot of Home Assistant configuration 2

- type: vertical-stack
    title: Projector
    cards:
      - type: entity
        entity: switch.epson
        icon: mdi:audio-video
        state_color: true
      - type: conditional
        conditions:
          - entity: switch.epson
            state: 'on'
        card:
          type: vertical-stack
          cards:
            - type: horizontal-stack
              cards:
                - show_name: false
                  show_icon: true
                  type: button
                  tap_action:
                    action: call-service
                    service: script.epson_laser_decrease
                    service_data: {}
                    target: {}
                  entity: script.epson_laser_decrease
                  hold_action:
                    action: none
                  show_state: false
                - type: gauge
                  entity: number.epson_projector_laser_level
                  name: ' '
                  max: 100
                  min: 50
                  needle: false
                - show_name: false
                  show_icon: true
                  type: button
                  tap_action:
                    action: call-service
                    service: script.epson_laser_increase
                    service_data: {}
                    target: {}
                  entity: script.epson_laser_increase
            - type: horizontal-stack
              cards:
                - show_name: true
                  show_icon: true
                  type: button
                  entity: button.epson_projector_load_lens_memory_1
                  name: 1.7:1
                  icon: mdi:aspect-ratio
                  tap_action:
                    action: toggle
                - show_name: true
                  show_icon: true
                  type: button
                  entity: button.epson_projector_load_lens_memory_3
                  name: 1.8:1
                  icon: mdi:aspect-ratio
                  tap_action:
                    action: toggle
                - show_name: true
                  show_icon: true
                  type: button
                  entity: button.epson_projector_load_lens_memory_4
                  name: 2.2:1
                  icon: mdi:aspect-ratio
                  tap_action:
                    action: toggle
                - show_name: true
                  show_icon: true
                  type: button
                  entity: button.epson_projector_load_lens_memory_2
                  name: 2.35:1
                  icon: mdi:aspect-ratio
                  tap_action:
                    action: toggle

epson_projector's People

Contributors

dionlarson avatar henryk avatar markbergsma avatar pharris2411 avatar pszafer avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.