Git Product home page Git Product logo

home-assistant-sse's Introduction

Home Assistant Server Sent Events

Home Assistant ships its own very nice web frontend. This prototype shows an option to display values without the possibility of interacting with Home Assistant by the user.

A requirement on the client-side is existing support for the EventSource interface. This means that not all browsers are supported.

Installation

It's assumed that your Home Assistant installation is ready before cloning this repository. Change to your local Home Assistant configuration folder .homeassistant and clone this repository.

$ git clone https://github.com/fabaff/home-assistant-sse.git

In the folder www you will find an index.html file and the folder that contains the CSS file.

Open the index.html file and include the entities you want to show on the page in the entities array. Check the "Developer tools" of Home Assistant to retrieve the entity ID. Please replace the periods (dots) with undersores in the entities.

var entities = ['sensor_cpu',
                'sensor_time',
                'binary_sensor_printer',
                'sensor_time_beat',
                'sun_sun'
                ];

Also set the API password used by your Home Assistant installation.

var source = new EventSource("/api/stream?api_password=YOUR_PASSWORD");

Launch your Home Assistant instance.

$ hass

Now the web site is available at http://[your_hass_host]:8123/local/index.html

Screenshot

screenshot

License

home-assistant-sse is licensed under MIT, for more details check LICENSE.

home-assistant-sse's People

Contributors

fabaff avatar darookee avatar

Watchers

James Cloos 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.