Skip to main content

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.

Metadata

Release files for pydomotic 1.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pydomotic 1.4.1
File Size Uploaded
pydomotic-1.4.1.tar.gz 18.7 kB Details

Release files / pydomotic-1.4.1.tar.gz

Download URL pydomotic-1.4.1.tar.gz
Size 18.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d0e0e14f3382991ae323cfb4a8e5588feb4b02286ff8dcc694c26cfdae23a979
BLAKE2b-256 checksum
How to use checksums
158aeaab77a28c6c60145dc59eddd94352ef93849fd11fd16e75c1893f7e4a8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.7

Release history Release notifications | RSS feed

This release

1.4.1 This release

1 release file

1.4.0

1 release file

1.3.1

1 release file

1.3.0

1 release file

1.2.0

1 release file

1.1.0

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page