How connect X10 devices to Sensorflare using Mochad

Mochad is a Linux TCP gateway for X10 devices. Mochad is a very good and simple project that works perfectly with Senorflare in order to control and manage your X10 devices. In order to connect Mochad to Sensorflare you need to follow these simple steps (requires a running mochad server and python):

  • Log in to your Sensorflare account. If you don’t have one sign up at
  • Visit the Resources page and click the X10mochad icon. Fill in a password of your choice for mochad to Sensorflare authentication. This password is independent from your current Sensorflare password.
  • Clone and build mochad via Sourceforge following the instructions available in the README file. In most cases what you need to run is:
cd mochad
sudo make install
  • Connect your CM15 or CM19 gateway to your machine.

  • Once connected mochad should be running on your machine and you can access it with:
nc localhost 1099
  • Next you need to run the mochad-python wrapper for Sensorflare. You can grab the python code from github
  • Once you have the files you need to run the tools/ script using root permissions.
  • Copy the '' to the '' file and edit it to change the username and passwords to the one you have setup in step 2nd step of this guide. The contents of the '' file are those you can see below:
username = "myUserId" #<=== replace with your own userId
password = "myMochadPassword" #<=== replace with your own password
You can also see the contents of the file here.
  • Finally you need to run the script either using "./" or "python"
  • Head over to Sensorflare and control your X10 devices via Mochad using the Sensorflare Mochad Terminal!

Also check these cool features that Sensorflare offers to mochad users! 

Feedback and Knowledge Base