Coder Social home page Coder Social logo

dotstar's Introduction

dotstar

A set of python scripts to animate Dotstar strip that has been affixed to a Christmas Tree wireform.

run_show.sh will run the set of scripts

dots_off.sh will stop the run_show.sh script and turn of the strip.

Prerequisites:

Service Installation

The service unit file dotstar.service contains the configuration needed to start and stop the animation using systemctl.

# Copy the file to the service directory: 
sudo cp dotstar.service /lib/systemd/system/

# Set file permissions: 
sudo chmod 644 /lib/systemd/system/dotstar.service

# Reload the service daemon: 
sudo systemctl daemon-reload

# Test service start:
sudo systemctl start dotstar.service

# Test service stop:
sudo systemctl stop dotstar.service

# Get service status:
sudo systemctl status dotstar.service

# Test service is active:
sudo systemctl is-active dotstar.service

# Enable the service to start on boot 
sudo systemctl enable dotstar.service

Homebridge Automation

Use cmdSwitch2 plugin with the following configuration to turn on / off animation script. Ensure that Homebridge is able to log into the remote system (i.e. use ssh-copy-id to copy the public key to the remote system)

{
    "platform": "cmdSwitch2",
    "name": "cmdSwitch2",
    "synchronous": true,
    "switches": [
        {
            "name": "RPi Tree",
            "on_cmd": "ssh pi@<ip-addr> sudo systemctl start dotstar.service",
            "off_cmd": "ssh pi@<ip-addr> sudo systemctl stop dotstar.service",
            "state_cmd": "ssh pi@<ip-addr> systemctl is-active  dotstar.service",
            "polling": true,
            "interval": 6,
            "timeout": 3
        }
    ]
}

dotstar's People

Contributors

arthurperry avatar

Watchers

 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.