Giter Club home page Giter Club logo

bottlesprocket's Introduction

Bottlesprocket

About

bottlesprocket is a port of bottlerocket using largely the same approach but written in Rust.

So far, bottlesprocket has been tested on Ubuntu 16 with a CM17A in ttyS0.

Huh? What's a CM17A whatsit?

A company called X-10, a long time ago, made these little wall-warts you could plug in to appliances and control by sending control signals through your AC mains. So you were able to turn devices on or off or dim them by sending a signal through another plug in your house.

The wall-warts for appliances are called "modules" and the one that sends the signal is called a "transceiver".

The CM17A is a tiny brick that sits in your RS-232 (old school) serial port, and sends a command sequence wirelessly to the transceiver, which then sends the command through your power lines.

Installing

Requirements

Instructions

cargo install --git https://github.com/scottmmjackson/bottlesprocket

Usage

GOTCHA: Dimming requires some domain knowledge

# Turn all my stuff off
bottlesprocket --house A --command ALL_OFF

# Turn my fan on
bottlesprocket --house A --device 3 --command ON

# Dim my bedroom light 30%
# Each DIM command reduces by 5%
bottlesprocket --house A --device 4 --command ON
bottlesprocket --house A --command DIM
bottlesprocket --house A --command DIM
bottlesprocket --house A --command DIM
bottlesprocket --house A --command DIM
bottlesprocket --house A --command DIM

# Brighten my porch light by 20%
# Same idea
bottlesprocket --house A --device 12 --command ON
bottlesprocket --house A --command BRIGHT
bottlesprocket --house A --command BRIGHT
bottlesprocket --house A --command BRIGHT
bottlesprocket --house A --command BRIGHT

Roadmap

  • Make a single convenience command for dimming
  • Make a simple JSON API tool that consumes the same library

bottlesprocket's People

Contributors

scottmmjackson avatar

Watchers

James Cloos avatar  avatar

bottlesprocket's Issues

Daemon-Client Mode

https://old.reddit.com/r/homeautomation/comments/cjux2y/seeing_this_at_work_threw_me_back_to_1998/evkq5aa/

Commenter in this reddit thread with no github account suggests a daemon-client mode. This is smart. Due to the use of bit banging and the lack of a facility for locking the serial device, it's probable that multiple calls of the standalone tool could cause garbage to be sent to the serial device.

I've been looking for an opportunity to try out https://capnproto.org/ which has decent support on Rust. However, I may end up using protocol buffers simply because I have experience working with them. Finally, I may also just use a Hyper-based HTTP server as that could make things easier for folks trying to integrate with home automation systems such as HomeAssistant.

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.