GithubHelp home page GithubHelp logo

changes's Introduction

changes

Track changes to web sites (or anything you wish) and notify via home assistant notify service if there is any.

Installing dependencies

pip3 install -r requirements.txt

Configuraiton

  • Copy config.json.example and name the new file as config.json
  • config.json needs three variables which are ha_url, ha_token and ha_device.
  • ha_url is the URL of your home assistant instance. If changes will run on the same machine with home assistant, it probably would be http://127.0.0.1:8123.
  • ha_token is long-lived access token for home assistant. You can create yours from home assistant dashboard. Go to your profile, at the bottom of the page you'll see Long-Lived Access Tokens. Click Create Token.
  • ha_device is the name of the notify service thatchanges will call. You can find it from Developer Tools->Services. It would be something like mobile_app_xxx.
  • modules_path is the path to directory that contains modules. Optional. Default value is changes/targets.

How to use

You need to write a python code which implements check() method and place it into targets directory. changes will call check() method of each file automatically every time it runs.

Your implementation of check() should return a json that has title and message fields. These are the title and message part of your notification. If you don't want changes() to send notification (i.e. there is no change on the web site), you should return None. See example implementations.

Launching

# launch manually
python3 changes

# example cron job that runs every 5 min
*/5 * * * * /usr/bin/python3 /path-to-changes 2>&1 >> /path-to-your-log-file/log.log

changes's People

Contributors

paddlesteamer avatar utkuufuk avatar

Watchers

 avatar

changes's Issues

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.