GithubHelp home page GithubHelp logo

edorsey / pimatic-mochad Goto Github PK

View Code? Open in Web Editor NEW

This project forked from petski/pimatic-mochad

0.0 2.0 0.0 268 KB

Connects pimatic to mochad

License: GNU General Public License v2.0

CoffeeScript 100.00%

pimatic-mochad's Introduction

NPM version

pimatic-mochad

Connects pimatic to mochad (an X10-controller controller)

Description

pimatic-mochad gives you control over your X10-units via RF (433 Mhz), powerline (PL) and pimatic(-mobile-frontend)

Hardware schematic

                                       RF Antenna (433 Mhz)
          
                                       \ /           \ /
           Network                    - o -         - o -
 +---------+     +---------+   USB      |             |   
 | RPi     |-----| RPi [1] |════════╗   |             `-- X10 devices (sensors, remotes, ..)
 | Pimatic |     | Mochad  |        ║   |                         
 +---------+     +---------+       +-----+                        
                                   |     |
          _OR_                     | X10 |
                                   |     |
 +-------------+     USB           |     |
 | RPi Pimatic |═══════════════════|     | X10 controllor (CM15A/CM19A/CM15Pro)
 | and Mochad  |                   +-----+
 +-------------+                     |  
                                     `----- Powerline ------> X10 devices 
                                                              (switches, dimmers, blinds, ..)
                                     
 [1] Or even OpenWrt (, etc) running Mochad                                    

Contemplations

I've choosen mochad over node-x10 because mochad allows us to run pimatic on a different host as the X10 controller is attached to. For example, you can run your mochad instance on OpenWrt, while running pimatic on your Raspberry Pi.

Configuration

Under "plugins" add:

{
  "plugin": "mochad"
}

Under "devices" add (something like):

{
  "id": "CM15Pro",
  "class": "Mochad",
  "name": "CM15Pro",
  "host": "192.168.1.11",
  "port": 1099,
  "units": [
    {
      "id": "light-kitchen",
      "class": "MochadSwitch",
      "name": "Kitchen Light",
      "housecode": "P",
      "unitcode": 1
    },  
    {
      "id": "light-living",
      "class": "MochadSwitch",
      "name": "Living Light",
      "housecode": "P",
      "unitcode": 2
    }
  ]
}   

Some cool rules

if it is 18:00 then turn Kitchen Light on

if button "All lights off" is pressed then tell CM15Pro to send "pl a all_lights_off"

if it is after 23:00 and CM15Pro receives event "rf a all_lights_off" then push title:"Good nigth!" message:"Sleep well, sir!"

if CM15Pro receives event "rf a9 on" then turn Kitchen Light off and turn Living Light on

pimatic-mochad's People

Contributors

petski avatar edorsey avatar

Watchers

James Cloos 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.