Web Interface To X10 Commander

Forum to discuss X10 Commander iPhone/iPod/iPad/Android client for X10 Devices

Re: Web Interface To X10 Commander

Postby Rocket J Squirrel » Tue Aug 02, 2011 7:22 pm

Synewave wrote:I'd like to add the status of each module i.e. on or off in the webpage, but struggling to find some code.

This would be nice, but I don't believe it can be done.

  • Most X10 modules don't support status queries in hardware. Only "two-way" modules support queries.
  • I'm not aware of an HTTP interface to the X10 Commander server to query status.
  • You could write your own web-server-side code to keep track of module status, but you can't track both X10 Commander client commands and WebX10der commands because the former don't go through the web server.
  • If you use WebX10der exclusively, you could write client-side code to keep track of state changes. But any state change via a light switch or other control would not be detected.

That said, if you do figure out how to do it, please share! :wink:
User avatar
Rocket J Squirrel
 
Posts: 76
Joined: Wed Jan 06, 2010 3:39 pm
Location: California, USA

Re: Web Interface To X10 Commander

Postby Synewave » Thu Aug 04, 2011 8:21 am

My thinking was that if I type http://192.168.1.100:8086/?x10command=DEVICE~sendplc~"A1" into a browser it returns the following:

Dining Room Front:A1:Power Line:100

Could you include that command into your script to return the status of each module?
Synewave
 
Posts: 2
Joined: Sat Jul 30, 2011 10:48 am

Re: Web Interface To X10 Commander

Postby Rocket J Squirrel » Thu Aug 04, 2011 11:28 am

Synewave wrote:My thinking was that if I type http://192.168.1.100:8086/?x10command=DEVICE~sendplc~"A1" into a browser it returns the following:

Dining Room Front:A1:Power Line:100

Could you include that command into your script to return the status of each module?

That could be done, but as I said in my previous post, it would not be reliable. The script would have no way of knowing whether the modules were subsequently changed by a light switch or other controller. I'm not inclined to add code which I know will be misleading or unreliable. You are free to modify the code for your own use, of course.

The best way to keep track of state is to use the X10 ActiveHomePro software. Because it monitors the CM15A (or whatever controller you use), it hears all the X10 signals in your house. The only signals it would miss would be from local (non-transmitting) light switch presses.
User avatar
Rocket J Squirrel
 
Posts: 76
Joined: Wed Jan 06, 2010 3:39 pm
Location: California, USA

Re: Web Interface To X10 Commander

Postby mpomerlo » Sun Aug 28, 2011 11:21 am

Does the Var need to be set to my (local server which run the X10 commander) ex 192.168.1.120 or my
xxxx.dnydns-free.com adress?

Thanks
mpomerlo
 
Posts: 2
Joined: Sun Aug 28, 2011 11:14 am

Re: Web Interface To X10 Commander

Postby Rocket J Squirrel » Sun Aug 28, 2011 11:31 am

mpomerlo wrote:Does the Var need to be set to my (local server which run the X10 commander) ex 192.168.1.120 or my
xxxx.dnydns-free.com adress?

The server variable can be set to the machine's local LAN address if you intend to use it only at home when connected to your home LAN.

If you ever intend to use it across the Internet, you'll need to use the host name as known to dynamic DNS.

In most cases, using the dnydns name should work everywhere: inside your home and elsewhere.
User avatar
Rocket J Squirrel
 
Posts: 76
Joined: Wed Jan 06, 2010 3:39 pm
Location: California, USA

Re: Web Interface To X10 Commander

Postby mpomerlo » Sun Aug 28, 2011 11:43 am

Rocket J Squirrel wrote:
mpomerlo wrote:Does the Var need to be set to my (local server which run the X10 commander) ex 192.168.1.120 or my
xxxx.dnydns-free.com adress?

The server variable can be set to the machine's local LAN address if you intend to use it only at home when connected to your home LAN.

If you ever intend to use it across the Internet, you'll need to use the host name as known to dynamic DNS.

In most cases, using the dnydns name should work everywhere: inside your home and elsewhere.



Wow Fast answers!
When I type from my network localhost or 192.168.1.120 I got the web10der page that work well
but when I try to connect from work, using my dyndns-free.com, I got nothing, the var server is the "xxx.dyndns-free.com"
Apache port 80 is redirect to my 192.168.1.120 in the router as well the 8086 or something like that (the lisen port for x10commander)
thanks
mpomerlo
 
Posts: 2
Joined: Sun Aug 28, 2011 11:14 am

Re: Web Interface To X10 Commander

Postby Rocket J Squirrel » Sun Aug 28, 2011 1:17 pm

Hmm, I dunno. You should have 3 ports forwarded: 80 for normal HTTP, 6003 for X10 Commander clients, and 8086 for Web X10der over HTTP.

If those are all set correctly, open up your Apache logs and see if there are any errors.

The only other thing I can think of offhand is a firewall getting in the way.

Does the Web X10der web page display at all? If not, then regular HTTP over port 80 isn't getting through. If the page displays, but the buttons don't work, that's port 8086 not getting through.

If your HTTP server on the same LAN as the X10 Commander server, then the server variable in the Web X10der script can be the latter machine's local IP address. It only needs to be a real hostname if you are accessing it from outside your local network.
User avatar
Rocket J Squirrel
 
Posts: 76
Joined: Wed Jan 06, 2010 3:39 pm
Location: California, USA

Web Interface All Lights command

Postby mtrayn01 » Sun Dec 04, 2011 1:03 pm

Hi guys,

Thanks to the X10 commander web interface, I've managed to integrate the web commands into a SiriProxy plugin that I created, and it works perfectly, however I can't find the command to trigger an All Lights Off / On or an All Units Off / On.

The below command is an example of the command I issue to switch A5 ON.
http://127.0.0.1:8086/?x10command=DEVIC ... 5%20ON%22'

Can anyone help me out with determining what would be the command to issue for All lights off to house code A?
mtrayn01
 
Posts: 2
Joined: Sun Dec 04, 2011 12:57 pm

Re: Web Interface All Lights command

Postby Rocket J Squirrel » Sun Dec 04, 2011 2:19 pm

mtrayn01 wrote:Thanks to the X10 commander web interface, I've managed to integrate the web commands into a SiriProxy plugin that I created, and it works perfectly

Cool! I want this! But I suppose it only runs on Macs? I only have Windows machines.

Can anyone help me out with determining what would be the command to issue for All lights off to house code A?

As far as I know, there isn't one in the current X10 Commander server. You need to create a macro in the X10 software running on your server (which is ActiveHomePro on my Windows machine). This can be as simple as translating "A16 OFF" to "A ALL OFF", or you could iterate through whatever devices you like.
User avatar
Rocket J Squirrel
 
Posts: 76
Joined: Wed Jan 06, 2010 3:39 pm
Location: California, USA

Re: Web Interface To X10 Commander

Postby mtrayn01 » Sun Dec 04, 2011 4:13 pm

I'm running SiriProxy on a virtual instance of Ubuntu Server running on my Windows 7 NAS server.

It's a bit of a learning curve to get up and running, but there are plenty of people using it now, so there are several posts to help with common problems. Took me about 6 hours to get it working, and to program the X10 plugin after looking around for examples of Ruby code (I'm a tinkerer, not a developer so had to learn the correct syntax). Now it works perfectly with all my X10 devices, and also with my WiFi thermostat. I was fortunate that the existing plugin for the thermostat was developed using that same Thermostat I have, so it just worked out of the box so to speak!

I highly recommend spending the time to get this up and running. My wife is much happier now that she doesn't have to find the correct iPhone application to open (depending on whether she wants to control the Thermostat, or the X10 units, or the TV), she simply asks Siri to do it and voila!

I've coded around the lack of an All lights function, by iterating through all the units one by one as you had also suggested. Not ideal, but it works fine.
mtrayn01
 
Posts: 2
Joined: Sun Dec 04, 2011 12:57 pm

Re: Web Interface To X10 Commander

Postby Melloware » Sun Dec 04, 2011 6:06 pm

If you send Z99 a special non-valid house code that is the ALL ON and ALL OFF of X10 Commander.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11017
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA

Re: Web Interface To X10 Commander

Postby Rocket J Squirrel » Tue Dec 06, 2011 6:36 pm

Melloware wrote:If you send Z99 a special non-valid house code that is the ALL ON and ALL OFF of X10 Commander.

Right, but the question was about sending ALL ON/OFF to one specific house code.
User avatar
Rocket J Squirrel
 
Posts: 76
Joined: Wed Jan 06, 2010 3:39 pm
Location: California, USA

Re: Web Interface To X10 Commander

Postby Melloware » Tue Dec 06, 2011 7:32 pm

Rocket J Squirrel wrote:
Melloware wrote:If you send Z99 a special non-valid house code that is the ALL ON and ALL OFF of X10 Commander.

Right, but the question was about sending ALL ON/OFF to one specific house code.


Oh right, nevermind I didn't realize til I re-read it that is what the user was asking. Thanks for correcting me. :)
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11017
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA

Re: Web Interface To X10 Commander

Postby harry_s24 » Tue Feb 21, 2012 7:40 pm

Hi,
Is there any way to find out if a command sent to X10 commander from the web was actually received by X10 commander?

Here is the situation: I have X10 commander setup on 2 PCs in my home. I searched this forum and found the registry key to change 8086 to another port number on one of the PCs. So I have dyndns pointing to my router and my router forwards one port to 1 PC and the other port to the other PC. Also, I have my personal website hosted with a web host and I was able to upload my Web Xtender HTML file to my web host so that I don't have to go thru setting up a web server and keeping it running all the time. I password protected the folder with the web Xtender files on my web host for added security.

My reason for having X10 commander on 2 PCs is simply for redundancy borne out of actual usage patterns: Sometimes only one of the PCs is on at my home. I don't want to have a dedicated PC just for X10 and my X10 devices need to be accessed only when someone is at home - that is when one of the 2 PCs are on. So at such times I want to make sure that I can access my X10 devices from my smartphone. Now, with the setup I have, I just repeat the "send" command in the HTML file to two different ports corresponding to the 2 PCs and it works ok; except if both PCs are on, then the command gets repeated - which is not that bad, but would have been nice if there was a way to verify the first send, and then send again to the second PC only if the first send failed.

If there was a way to find out if the command I sent to the first PC first did actually get thru to X10 commander (not to the X10 device - that as I see is another issue and I am not looking to solve that) - then I wont have to sent the second command to the other PC. If X10 commander responded to the request on port 8086 or such back to the HTTP server with a simple "I'm alive", that would be sufficient. Just wondering if something like this is available or can be scripted based on existing hooks in X10 commander?

BTW thanks for a great product - much needed - both the X10 commander as well as the web-xtender. I have been using X10 devices for long and just now found this software and I am really happy that it does exactly what I need. I have CM17 firecracker on one PC and CM11 serial interface on another PC and now with X10 commander I finally have web based access to my X10 modules. I don't personally own an iPhone or android device: just an old Tilt2 with Windows Mobile and so am forced to use the web interface which works well. (Also, just FYI though I have a CM11a, I have to select Marimtek CM15Pro from the options to get my CM11a working with X10 commander.)

Thanks,
Harry
harry_s24
 
Posts: 2
Joined: Tue Feb 21, 2012 7:09 pm

Re: Web Interface To X10 Commander

Postby Melloware » Wed Feb 22, 2012 6:30 am

Whenever you send any command to the HTTP server it responds with the stats from the server.

Try this in your web browser like IE, Chrome or Firefox but replace : 192.168.0.10 with your PC IP.

Code: Select all
http://192.168.0.10:8086/?x10command=DEVICE~sendplc~"A4 OFF"


It responds in the web page back with...

Code: Select all
Living Room:C2:Power Line:100


Where the 4th number is either 0 to 100 for the status of the device returned from
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11017
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA

PreviousNext

Return to X10 Commander

Who is online

Users browsing this forum: No registered users and 1 guest

cron