Skip to main content

Issue x10 commands via CM17A Firecracker or Mochad (CM15A RF/PL and CM19A RF)

Project description

Wrapper module to control X10 devices.

https://travis-ci.org/clach04/x10_any.svg?branch=master

Table of Contents

Information

Initial focus is supporting:

Implemented in pure Python. Known to work with:

  • Python 2.7
  • Python 3.4.4
  • Python 3.5

Getting Started

To get started and install the latest version from PyPi:

pip install x10_any

If installing/working with a source checkout issue:

pip install -r requirements.txt

Then run tests via:

python -m x10_any.test.tests

Serial Port Permissions under Linux

Under Linux most users do not have serial port permissions, either:

  • give user permission (e.g. add to group “dialout”) - RECOMMENDED
  • run this demo as root - NOT recommended!

Giver user dialout (serial port) access:

# NOTE requires logout/login to take effect
sudo usermod -a -G dialout $USER

Sample

Mochad:

import x10_any

x10_any.default_logger.setLevel(x10_any.logging.DEBUG) # DEBUG

dev = x10_any.MochadDriver()
dev.x10_command('A', 1, x10_any.ON)
dev.x10_command('A', 1, x10_any.OFF)

Firecracker:

import x10_any

x10_any.default_logger.setLevel(x10_any.logging.DEBUG) # DEBUG

dev = x10_any.FirecrackerDriver()
#dev = x10_any.FirecrackerDriver('COM11')
#dev = x10_any.FirecrackerDriver('/dev/ttyUSB0')
dev.x10_command('A', 1, x10_any.ON)
dev.x10_command('A', 1, x10_any.OFF)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
x10_any-0.0.8.zip (12.8 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page