Giter Club home page Giter Club logo

mqtt-pwm-lights's Introduction

SUMMARY
=======

This script subscribes to a topic defined in /etc/mqtt-pwm-lights/mqtt-pwm-lights.cfg, and adjust the PWM value on the configured pin (18 by defualt) on a Raspberry Pi. It requires the WiringPi library from https://projects.drogon.net/raspberry-pi/wiringpi/ as the gpio command is used to control the PWM values on the GPIO interface. Neither WiringPi SYSFS exporting or RPi.GPIO (Python library) support PWM at this point in time.

When any change to the lighting level is required, it will ramp up or down to the desired level, creating a smooth lighting level change effect.

INSTALL
=======

# This needs automated and/or packaged up

sudo echo "deb http://repo.mosquitto.org/debian wheezy main" > /etc/apt/sources.list.d/mosquitto-wheezy.list
wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key -O /tmp/mosquitto-repo.gpg.key
sudo apt-key add /tmp/mosquitto-repo.gpg.key
sudo apt-get update

sudo apt-get install python-mosquitto git
mkdir /etc/mqtt-pwm-lights/
git clone git://github.com/kylegordon/mqtt-pwm-lights.git /usr/local/mqtt-pwm-lights/
cp /usr/local/mqtt-pwm-lights/mqtt-pwm-lights.cfg.example /etc/mqtt-pwm-lights/mqtt-pwm-lights.cfg
cp /usr/local/mqtt-pwm-lights/mqtt-pwm-lights.init /etc/init.d/mqtt-pwm-lights
update-rc.d mqtt-pwm-lights defaults
cp /usr/local/mqtt-pwm-lights/mqtt-pwm-lights.default /etc/default/mqtt-pwm-lights
## Edit /etc/default/mqtt-pwm-lights and /etc/mqtt-pwm-lights/mqtt-pwm-lights.cfg to suit
/etc/init.d/mqtt-pwm-lights start

LICENSE
=======
See LICENSE file

mqtt-pwm-lights's People

Contributors

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