Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

An mqtt to x10 bridge to allow x10 based device to work and function like modern IoT SmartHome devices.

License

NotificationsYou must be signed in to change notification settings

jpetrocik/SmartX10

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project bridges the gap between X10 based devices andnewer SmartHome IoT devices that rely on mqtt. X10 hasa signifacant install base and the cost to convert a completeX10 install to modern IoT devices is cost prohibitive. This libaryallows X10 device to respond to mqtt messages and blend seemlesslyinto a modern IoT network. A psudeo state of the device is storedso the device state can be queried.

A key part of the config.json file maps mqtt topics to devices. Thistell mqtt-x10-bridge which topics to subscribe to and when a messageis recieved what x10 device to turn on/off.

.. "topics":{"house/livingroom/lamp/command":{        "house":"G",        "module":"2",        "status":"house/livingroom/lamp/status"      },     .     .

For each device an entry into topics to added. The statusentry is the queue to publish current status to. The currentstatus is stored so it can be queried like modern IoT devices.

The bridge depends on the node-x10-comm module to send the commandsto the serial port and the serialport module to interface with theserial port itself.

The message body is a simple 0 or 1 for on or off. An example ofpublishing a message to turn off the device using mosquitto_pub client:

mosquitto_pub -h 127.0.0.1 -t house/outside/landscaping/command -m 0

The configuration entries that must be updated include:

  • mqttServerUrl - url of the mqtt server to connect to. This can either startwith tcp:// or mqtts://. If it starts with mqtts:// there must be a subdirectoryin the lib directory called mqttclient which contains ca.cert, client.cert,client.key which contain the key and associated certificates for a clientwhich is authorized to connect to the mqtt server.
  • serialPort - the serial port that should be used to send out the commands
  • topics - a mapping of topics to deviceshouse: X10 house codemodule: X10 module numberstatus: mqtt topic to publish current device status

Installation

Clone this repository and then run npm install.
Make sure you have installed both gcc-4.8 and g++-4.8 and they are the default compilersas native compiles are required for the serialport module.

Running

To run the mqtt-x10-bridge app, add node.js to your path (currently requires 4.x or better) andthen run:

npm start

other modules

About

An mqtt to x10 bridge to allow x10 based device to work and function like modern IoT SmartHome devices.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript100.0%

[8]ページ先頭

©2009-2025 Movatter.jp