Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 1.9 KB

README.md

File metadata and controls

48 lines (35 loc) · 1.9 KB

HassSyn

HassSyn is a Home Assistant(Hass) Automation Synthesizer. This synthesizer takes specifications from a given history of the user's Hass platform and generates an automation rule in forms of YAML that consistent with the user's data.

Author Infomation

Name: Jaeho Choi
Contact: [email protected]


Installation Guide

HassSyn is developed in Scala. Before installation, you need to install JDK 8+ and sbt (build tool for Scala).

Download HassSyn

$ git clone https://github.com/workstudy-zero/hasssyn.git hasssyn

Installation of HassSyn using sbt

$ cd hasssyn && sbt compile

Run Commands

To run the synthesizer, start sbt shell.

$ sbt

In sbt shell, you can run the synthesizer with the following command:

$sbt:hasssyn> run <history-file-name> <output-file-name> <action-name> <error-bound> 
# For example, run test/history3 example2 turnOn 150
  • history-file-name is a name of JSON file containing user data that are inputs of HassSyn. This history file can be obtained from Hass using REST API
  • output-file-name is a name of YAML file where the automation rule that is output of HassSyn will be dumped.
  • action-name is a name of target action. (Currently, only turnOff and turnOn are supported.)
  • error-bound is an integer (in seconds) that bounds error in the synthesis process.

Test

I uploaded 3 test cases in test directory. For each history file (.json), HassSyn synthesize automation rule (.yaml) well with error-bound = 150.