Giter VIP home page Giter VIP logo

ha-catt-fix's Introduction

ha-catt-fix

This is a solution for the timeout issue when casting Home Assistant using CATT.

Installation

  1. It is recommended to install this with HACS by adding a custom repository (important: select "Lovelace" as category). Alternatively, download ha-catt-fix.js and put it inside /config/www/.

  2. Add it as a resource to your Home Assistant UI. Follow the instructions displayed by HACS. If you are not installing with HACS, then:

    If you use the YAML mode, put the following in your configuration.yaml:

    lovelace:
      mode: yaml
      resources:
        - url: /local/ha-catt-fix.js
          type: module
    

    Otherwise go to Settings -> Dashboards -> (three dots in the upper right corner) -> Resources.

  3. In case of the YAML mode, a restart of Home Assistant is required.

That's it. Continue to use CATT for casting HA to your display but dismantle anything you had set up to re-cast it every 10 minutes.

How does it work

The reason for the timeout is that nothing is being played so the receiver application gets closed. The solution for that is to add a hidden Cast media player component and play an image every 9 minutes. That is not new, it has been used in the official Home Assistant Cast integration for quite a long time.

However, there's one problem with DashCast (which is used by CATT to cast websites). It replaces itself with the target website (window.location = url). It means it looses control of the display. That's why this solution is to embed the receiver code into the Home Assistant UI itself and do the dummy playback there.

ha-catt-fix's People

Contributors

swiergot 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.