View Full Version : NetRemote and X10
sonata31
June 16th, 2008, 01:42 AM
Is NetRemote can send X10 commands directly without pc and Girder ?
Rob H
June 16th, 2008, 04:44 AM
No, I'm afraid not - at least not without a lot of work.
Neo_4092
June 16th, 2008, 05:31 AM
Hello Sonata,
I am trying to program my installation and I use a Global Cache interface that allows me to manage both the IR, relays and also RS232 without turning on the PCHC.
You can also use a simple RS232/Ethernet converter.
@ +
sonata31
June 16th, 2008, 05:41 AM
No, I'm afraid not - at least not without a lot of work.
Take the X10 actions of Girder and send then by Wifi with the netremote client ?
sonata31
June 16th, 2008, 05:42 AM
Hello Sonata,
I am trying to program my installation and I use a Global Cache interface that allows me to manage both the IR, relays and also RS232 without turning on the PCHC.
You can also use a simple RS232/Ethernet converter.
@ +
Global Caché is ok for IR, not for X10
Neo_4092
June 16th, 2008, 06:56 AM
But you can use the RS port to dialog with the CM11 RS232.
sonata31
June 16th, 2008, 06:58 AM
But you can use the RS port to dialog with the CM11 RS232.
My CM11 is USB
tmorten
June 19th, 2008, 06:01 PM
I use NetRemote with an EZ-Bridge from SimpleHomeNet to send X10 with no PC in the loop. There is a simple XML interface which can be done from LUA sockets. The one caveat: this is one-way communication, so while you can send X10 commands from NetRemote, receiving commands in NetRemote is more challenging (both due to the need to keep a LUA socket open, and due to the need to parse all the traffic into useful data).
Best,
Tim
sonata31
June 22nd, 2008, 09:45 AM
I use NetRemote with an EZ-Bridge from SimpleHomeNet to send X10 with no PC in the loop. There is a simple XML interface which can be done from LUA sockets. The one caveat: this is one-way communication, so while you can send X10 commands from NetRemote, receiving commands in NetRemote is more challenging (both due to the need to keep a LUA socket open, and due to the need to parse all the traffic into useful data).
Best,
Tim
Can you send X10 commands with the NetRemote client and the PC power off ?
tmorten
June 22nd, 2008, 12:34 PM
Correct; no PC in the loop whatsoever (just the PocketPC running NetRemote talking directly to the EZ Bridge or EZ Serve -- both are the same device with different firmware).
Here's a sample LUA function; it just understands five commands: "On", "Dim", "Off", "AllLightsOn", and "AllLightsOff" but you'll see that it would be simple to extend if so desired. Note that all values passed are strings, so arguments should be in quotes (eg: SendX10( "A", "1", "ON" ) and so forth). Also, and this is important: make sure you use the correct IP address for your EZ Bridge or EZ Serve -- if you don't, the socket library will hang for several seconds until the open socket command times out, which will make it feel like NetRemote has frozen up.
This code could be further improved by putting the housecode and unitcode values into tables... the big "if...then" blocks might be frowned upon by some of the professional software engineers out there :).
function SendX10( szHouseCode, szUnitCode, szCommand )
-- Bail out if precursors are nil
if ( szHouseCode == nil or szUnitCode == nil or szCommand == nil ) then
return;
end;
-- Convert command to uppercase
szCommand = string.upper( szCommand );
-- Look up the correct byte value for the specified house code
-- This correlation is taken from the EZ Bridge/EZ Serve documentation
local szByte1, szByte2;
if ( szHouseCode == "A" ) then
szByte1 = "6";
elseif ( szHouseCode == "B" ) then
szByte1 = "E";
elseif ( szHouseCode == "C" ) then
szByte1 = "2";
elseif ( szHouseCode == "D" ) then
szByte1 = "A";
elseif ( szHouseCode == "E" ) then
szByte1 = "1";
elseif ( szHouseCode == "F" ) then
szByte1 = "9";
elseif ( szHouseCode == "G" ) then
szByte1 = "5";
elseif ( szHouseCode == "H" ) then
szByte1 = "D";
elseif ( szHouseCode == "I" ) then
szByte1 = "7";
elseif ( szHouseCode == "J" ) then
szByte1 = "F";
elseif ( szHouseCode == "K" ) then
szByte1 = "3";
elseif ( szHouseCode == "L" ) then
szByte1 = "B";
elseif ( szHouseCode == "M" ) then
szByte1 = "0";
elseif ( szHouseCode == "N" ) then
szByte1 = "8";
elseif ( szHouseCode == "O" ) then
szByte1 = "4";
elseif ( szHouseCode == "P" ) then
szByte1 = "C";
else
print( "Bad house code." );
return;
end;
-- Look up the correct byte value for the specified unit code
-- This correlation is taken from the EZ Bridge/EZ Serve documentation
if ( szUnitCode == "1" ) then
szByte2 = "6";
elseif ( szUnitCode == "2" ) then
szByte2 = "E";
elseif ( szUnitCode == "3" ) then
szByte2 = "2";
elseif ( szUnitCode == "4" ) then
szByte2 = "A";
elseif ( szUnitCode == "5" ) then
szByte2 = "1";
elseif ( szUnitCode == "6" ) then
szByte2 = "9";
elseif ( szUnitCode == "7" ) then
szByte2 = "5";
elseif ( szUnitCode == "8" ) then
szByte2 = "D";
elseif ( szUnitCode == "9" ) then
szByte2 = "7";
elseif ( szUnitCode == "10" ) then
szByte2 = "F";
elseif ( szUnitCode == "11" ) then
szByte2 = "3";
elseif ( szUnitCode == "12" ) then
szByte2 = "B";
elseif ( szUnitCode == "13" ) then
szByte2 = "0";
elseif ( szUnitCode == "14" ) then
szByte2 = "8";
elseif ( szUnitCode == "15" ) then
szByte2 = "4";
elseif ( szUnitCode == "16" ) then
szByte2 = "C";
else
print( "Bad unit code." );
return;
end;
-- Set the appropriate level based on the command
local szLevel = "";
if ( szCommand == "ON" ) then
szLevel = "2";
elseif ( szCommand == "OFF" ) then
szLevel = "3";
elseif ( szCommand == "DIM" ) then
szLevel = "4";
elseif ( szCommand == "ALLLIGHTSON" ) then
szLevel = "1";
elseif ( szCommand == "ALLLIGHTSOFF" ) then
szLevel = "6";
else
print( "Unknown x10 command." );
return;
end;
-- Load the socket library
local socket = require( "socket" );
-- IMPORTANT: Use the correct IP address for your EZ Bridge/EZ Serve here
local hostip = "192.168.2.14";
-- Set up the first XML string
local szXML = "<?xml version=\"1.0\" ?><command>SndX10<parameter1>0x"..szByte1..szByte2.."</parameter1><parameter2>0x00</parameter2></command>";
-- Set up the socket
local master = socket.tcp( );
-- Open the socket
local a, b = master:connect( hostip, 8002 );
if ( a == nil ) then
print( "X10 Error:", b );
return;
end;
-- Send the first XML string to the EZ Bridge
master:send( szXML );
-- Pause between commands
-- For Girder, use "win.Sleep"; for NetRemote, use "NetRemote.Sleep"
NetRemote.Sleep( 500 );
-- Set up the second XML string
szXML = "<?xml version=\"1.0\" ?><command>SndX10<parameter1>0x"..szByte1..szLevel.."</parameter1><parameter2>0x80</parameter2></command>";
-- Send the second XML string to the EZ Bridge
master:send( szXML );
-- Close the socket
master:close( );
end;
sonata31
June 23rd, 2008, 02:10 AM
Is this model : http://www.simplehomenet.com/prods.asp?page_id=prodServers_EZBridgePLM_Combo
Is compatible with french power ?
Rob H
June 23rd, 2008, 02:50 AM
Almost certainly not - there are no European Insteon devices at present unfortunately.
sonata31
June 23rd, 2008, 04:38 AM
Almost certainly not - there are no European Insteon devices at present unfortunately.
I am very sad !!!
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.