Git Product home page Git Product logo

jasper-module-mqtt's Introduction

Jasper-Module-MQTT

Jasper MQTT Module for my HAL9000 Raspberry PI Instructable

When triggered it publishes a simple MQTT event using the following topic:

hal9000/*device*/*index* 

Available devices:

  • device
  • room
  • light
  • sensor
  • door

Available indexes:

  • one
  • two
  • three
  • ...
  • ten

Available topic messages:

  • on
  • off
  • true
  • false
  • open
  • close

Steps to install MQTT Module

  • Install the python Mosquitto package:
sudo pip install paho-mqtt
  • run the following commands in order:
git clone https://github.com/ArtBIT/jasper-module-mqtt.git
cp jasper-module-mqtt/Mqtt.py <path to jasper/client/modules>
#i.e. cp jasper-module-mqtt/Mqtt.py /usr/local/lib/jasper/client/modules/
  • Edit ~/.jasper/profile.yml and add the follwing at the bottom:
mqtt:
  hostname: 'your.mqtt.broker.hostname.or.ip'
  port: 1883
  protocol: 'MQTTv31' # Note: this should be either MQTTv31 or MQTTv311, I had problems with Ubuntu broker and MQTTv311
  • Restart the Pi:
sudo reboot

Congrats, JASPER MQTT Module is now installed and ready for use.

Here are some examples:

YOU: Light one off
JASPER: *publishes an mqtt event* topic:hal9000/light/one message:off
YOU: Door two close
JASPER: *publishes an mqtt event* topic:hal9000/door/two message:close

jasper-module-mqtt's People

Contributors

artbit avatar

Stargazers

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