Home Automation Control GUI interface in XBMC with API - Dimming the Lights and such?
waldo22 Wrote:@miamiwice,

I think I'm mis-communicating this somehow.

The only device that was serial in the past is the controlling module (X-10 firecracker for example) that you send the commands to in order to get it to relay those commands to the other modules that you want to control.

The X-10 modules don't communicate with each other using the RS-232 protocol, they use the X-10 protocol. I guess I don't understand what you mean. The only adapter that is serial (RS-232) is the one that you send commands to via your computer. I think we both understand this, right?

Again, I don't really understand what you mean. I'm sure a lot of people have serial control modules, but it's just one module, not a whole house of modules that would have to be replaced...

The Insteon 2412N that I keep mentioning uses TCP for control. (well, it uses a web page, so you send commands to it over http.)

I think we both understand that, too.

The point is that the Insteon device supports both Insteon modules AND all devices that use the older X-10 protocol.

Therefore, all you have to do is replace ONE adapter, the serial control module, with the new http Insteon module, and you're done. Now your "installed base" is http instead of serial.

I guess what I'm saying is, if your home automation uses the X-10 protocol or the Insteon protocol, you need to spend $120 and buy this adapter, and we can make it work easy as pie.

If you're concerned that the people who have serial control modules don't want to spend $120 on ONE module that could do all of this, I think you're mistaken.

It will just be too much work to control an RS-232 controller via a computer when all you have to do is send http data to this new device, and you have backwards compatibility with all of your old X-10 devices.


I understand totally what youre saying, i know all you have to do is replace the serial with a tcp module. But there are more than just x10. X10 is an older technology. There are newer powerline technologies available, such as UPB thats WAY more reliable and has a stronger signal. When implementing whole house lighting control, almost every house has a place or 2 x10 wont make it to. There are others also. I know in several houses where x10 wouldnt work on several lights and outlets, even when using phase couplers, and trying to rewire the switches, etc. so UPB switches were put in and worked flawlessly. I was just thinking of having the option for every available lighting control technology out there. I agree the insteon should be supported, tcp is the way to go, , and everything will use tcp modules in the future, but most people that use lighting control in a whole house way has some sort of home automation system controlling it. Unless its a fairly new system, it wont have the tcp communications. Personally for me tcp is fine, and thats what i use. I just said it thought it would be nice to use serial also, as to be backwards compatible with the largest install base out there. Open it up for more folks. also with serial there are many tvs, AV receivers, video matrix switches out there that take serial commands only. If it sent a serial string out, you could have it turn on your tv, set it to the right input, turn on your receiver to the right input when you send a play command. Just my 2 cents. I know its hard and probably wont happen, but it would be nice to have. I hope the insteon things gets worked out soon, im looking orward to that.
Got it, I just wanted to make sure we are on the same page. I've definitely run in to some of those X-10 reliability issues. Insteon is much better (or so I've read)

Obviously, support for more protocols and technologies is better.

The hard part about controlling serial devices is that each one has its own command set that would have to be programmed in...


we could program some sort of interface in a skin where you enter the serial commands (in hex) specific to your control module/automation system that should be sent when some specified event occurs, and the COM that it's sent over?

ie. on video start
-sent FFFFF FFF241 FFF358 on COM1

where FFFFF FFF241 FFF358 are commands from your device's instruction manual to make something happen...

Anyway, it's a good thought.
ASCII is what most components and automation systems understand
So you mean that you connect to them with a "terminal" session, not just send serial commands?

That would make it much more difficult.
I'm surprised nobody's responded yet. I'd try going into IRC and having a chat with them there.
I don't know if this is helpful, but in linuxmce (built on a version of kubuntu) dan damron has written ruby code to control insteon devices. Some of his code is found at http://wiki.linuxmce.com/index.php/Setti...M_Template. I am not a programmer, but thought perhaps this code might be helpful to someone else looking to write some code to control the Insteon devices.
just curious if this ever happened? I would love to get XBMC to control some lighting... CQC is a home automation program that has a huge DIY userbase that would be a good interface
Hello ahreo. Nothing ended up happening with this project. I ended up doing an internship with a Boston based company called Cerebode and XBMC just didn't mesh with the goals of the internship. I'm still interested and if I had a little more time I might be able to get something rolling but right now I just don't have the time. The ideas presented about using the serial output of the Arduino are interesting. I may spend some time looking into this at Christmas or during the summer. I use Homeseer for automation but I'd like to build something that's more broadly compatible than that.
why use serial? Any decent home automation setup will listen to commands over network. Sure it wont work with X10 but X10 is crap.

From a little bit of looking and talking to some people on the CQC channel, it should be quite simple. just have CQC or J9 (johnnynine.com i think) listening to a UDP stream from XBMC... something like that anyways...
Ahreno: Just listening to the network is already available through XBMC. There's a pretty decent HTTP API in place already. The advantage I could see with serial is that its low level and its bidirectional. I haven't thought about all of the details in a while. Here are the components I think would be necessary for home automation integration:

* A Plugin in the home automation software - This plugin could talk directly with XBMC through the HTTP API or through a separate communication utility.

* A Plugin in XBMC - This plugin would let XBMC control the home automation software

* Possibly a Communication Utility that's always running - The advantage here is home automation software could access XBMC's library information when XBMC was offline, launch XBMC if there was a need to (alarm clock?), and simplify communication with the home automation software. The communication utility would also communicate over serial if that ended up being the right decision.

* Skin integration - I don't know if there are any skins that let you launch scripts from the top level but it would be helpful to have a home automation entry in the top level that launches the XBMC plugin.

I think these components would be necessary regardless of the home automation software used. As I said I personally use Homeseer (my network is z-wave and X10 RF) but I think the basic components would be necessary for any home automation software.
Anyone who got home automation working based on events from XBMC UDP broadcast?
I've tried the XBMC Listener but can't get it to work. Maybe there is another way to have home automation based on XBMC events?

My wish is to have my A/V Receiver powered on when media of any type is started/played in XBMC.

I also want it to turn of after playback in XBMC have been stopped or paused for x minutes.

If you could use more conditions like tell if media played back is just audio (maybe even tell how many channels that's used) to have buttkickers turned off for music and turned on for movies.

Any ideas how to accomplish this?

Has anyone considered adding support for xPL protocol? It is a protocol for uniform notification and control of various elements and equipment for generally understood home automation.


The protocol itself has a subset ("schema") dealing with media control:


Why would it be beneficial? It would nicely supplement the already existing features of XBMC, i.e. HTTPAPI and the event server. Instead of writing your own apps for handling events, you could just incorporate XBMC into existing network.

Some examples:
- display in XBMC OSD the number of a person calling on the phone
- turn the volume down when the call is accepted and up when it is done
- display the currently played song on an external LCD
- easy setup for a menu in XBMC for various automation features (lights on/off, curtains up/down, etc.) - no need to script the events internally
- easy configuration for scenes and events (i.e. one remote button dims the lights and plays the movie)
- automation of certain events - e.g. play a hot movie when the temperature gets low... Umm, I think we have enough examples.

Naturally, all this can be done with an external app. However, I think adding the support would not be too hard - XBMC already has broadcast and listening functions, so it is just a matter of additional layers with proper formats...
Hi !

I agree with you, an integration of the xPL protocol (send and receive) within xbmc would be great !!!

You said that it could already be done using external app, i'd like to know how you can do that..

I explain my situation.

I'm running XBMC Live 9.11 + SVN (so linux based) and i have a Windows 7 server for media and home automation.
I'd like to have xbmc send xpl message when playing movies/series to my server so that my server can dim the light (using eventghost which can receive xpl events).

I found a python script to run a batch script when playing/pausing/restarting a videos but i don't know yet how to send xpl messages...

I'm really a beginner with xpl so i wish you can help me out !!!

Thank you very much !

Romain Big Grin
Unfortunately I am not familiar with Python... Have you had a look at xPL Toolkit for Python:


As I wrote, an external application might also pick up the info from XBMC and send it over xpl. However, I think it would be best to wait a little bit, as I understand the API system is undergoing an overhaul at the moment.
Big Grin 
Thanks for your reply !

I actually managed to use XBMC and xPL to control my appliances.. Cool

I installed xPL-perl which runs perfectly in Linux and provides nice xPL command line tools.

I used this python script to get the XBMC video playing states (play/pause/stop), then i used batch scripts to send xPL messages through xPL-sender which is part of xPL-perl.

The messages are received on my server PC, running windows 7 and eventghost with xPL plugin, and it fires events.
In my case i use a Tellstick, a USB dongle which can control RF appliances, lamp etc.. in the 433,92 range (used by many cheap brand in europe : chacon, nexa, intertechno, elro, klikonklikuit, homeeasy..) to create light scenes.

I was worried about the delays (catch XBMC states, send xPL message through command line on the network, receive message, send actions Eek), but it's actually really fast !

I'm discovering xPL and homeautomation and i's great ! Hope it will be integrated somehow within XBMC (natively or with python scripts) since it opens a lot of nice functionality !
Thread Rating:
  • 1 Vote(s) - 5 Average

Logout Mark Read Team Forum Stats Members Help
Home Automation Control GUI interface in XBMC with API - Dimming the Lights and such?51
This forum uses Lukasz Tkacz MyBB addons.