Code Monkey home page Code Monkey logo

pydomotic's Introduction

pydomotic

PyPI version

A Python library for home automation execution, enabling seamless control and management of your IoT devices.

"Domotics": The automatic control of home appliances by electronic systems. Contraction of domestic robotics, from the Latin domus ("home"), and robotics.

Getting Started

  1. Install pydomotic in your environment.

    $ pip install pydomotic
  2. Create your pydomotic.yml configuration file where you will define your devices and automations.

    # pydomotic.yml
    
    devices:
      fan:
        description: fan switch
        provider: noop
        id: '012'
      thermometer:
        description: temperature sensor
        provider: noop
        id: '345'
    
    automations:
      fan:
        enabled: true
        components:
          - if:
              thermometer:
                temp: '>75'
            then:
              turn-on: fan
            else:
              turn-off: fan
  3. Running the following will check each trigger and execute any actions.

    $ python -m pydomotic

Note that each configured provider will require separate installation of its specific dependencies. For installing these dependencies and full configuration documentation, see CONFIGURATION.md

For more details on deployment options, see DEPLOYING.md

Glossary

trigger: A small piece of code which evaluates to either true or false. Usually it calls on devices or 3rd party APIs to make this determination.

action: A small piece of code which is run when a trigger fires. Usually this is managing device state like turning a lightbulb on or off. When configured, it can be designated as a "then" action or an "else" action.

provider: The third party which owns the API for a set of devices. The manufacturer of a device will usually provide this API.

device: Any IoT device which can be controled with a 3rd party API managed by a provider.

sensor: A device or 3rd party API which senses information about the physical world around it. For example, a smart lightbulb or REST based current weather API.

component: A grouping of triggers and actions. When all triggers evaluate to true, its "then" actions will be run. When any trigger evaluates to false, its "else" actions will be run.

handler: The code used to run a set of components. This is the main entrypoint to the pydomotic system.

parser: The code used to read the configuration yaml and transform it into a list of components.

pydomotic's People

Contributors

purple4reina avatar

Stargazers

 avatar  avatar

Watchers

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