Code Monkey home page Code Monkey logo

hass-data-detective's Introduction

PyPI Version Binder Code style: black

Introduction

The HASS-data-detective package provides classes and functions to help you explore and analyse the data in your Home Assistant database. If you are using Home Assistant (former Hass.io), it will automatically discover your database and by default collect information about the entities in your database. See the notebooks directory for examples of using the detective package.

Installation on your machine

You can either: pip install HASS-data-detective for the latest released version from pypi, or pip install git+https://github.com/robmarkcole/HASS-data-detective.git --upgrade for the bleeding edge version from github. Note that due to the matplotlib dependency, libfreetype6-dev is a requirement on aarch64 platforms (i.e. RPi).

Run with Docker locally

You can use the detective package within a Docker container so there is no need to install anything on your machine (assuming you already have docker installed). Note this will pull the jupyter/scipy-notebook docker image the first time you run it, but subsequent runs will be much faster.

From the root directory of this repo run:

docker run --rm -p 8888:8888 -e JUPYTER_ENABLE_LAB=yes -v "$PWD":/home/jovyan/work jupyter/scipy-notebook

Follow the URL printed to the terminal, which opens a Jupyter lab instance. Open a new terminal in Jupyter lab and navigate to the work directory containing setup.py, then run:

~/work$ pip install .

You can now navigate to the notebooks directory and start using the detective package. Note that you can install any package you want from pypi, but they will not persist on restarting the container.

Try out detective online

You can try out the latest version of detective from pypi without installing anything. If you click on the 'launch binder' button above, detective will be started in a Docker container online using the Binderhub service. Run the example notebook to explore detective, and use the Upload button to upload your own home-assistant_v2.db database file for analysis. Note that all data is deleted when the container closes down, so this service is just for trying out detective.

Development

  • Create a venv: python3 -m venv venv
  • Activate venv: source venv/bin/activate
  • Install requirements: pip3 install -r requirements.txt
  • Install detective in development mode: pip3 install -e .
  • Optional install Jupyter to run the notebooks: pip3 install jupyterlab
  • Run jupyter, ensuring from venv: venv/bin/jupyter lab

Running tests

  • Install dependencies: pip3 install -r requirements_test.txt
  • Run: pytest .

Contributors

Big thanks to @balloob and @frenck, checkout their profiles!

hass-data-detective's People

Contributors

robmarkcole avatar balloob avatar basnijholt avatar willkoehrsen avatar bramkragten avatar fabaff avatar 9r avatar jlrgraham avatar gerritjandebruin 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.