how can I send an X10 command from the command line?

View: New views
6 Messages — Rating Filter:   Alert me  

how can I send an X10 command from the command line?

by Marc MERLIN-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I can do this:
gargamel:/var/local/src/misterhouse/mh/bin# ./mhsend --run "mbr kpl off"
Sending 11 bytes of data to localhost port 8084, socket made, data sent
Response: Command was run: mbr kpl off

(that was for an insteon device).

How do I do this for X10?
X10A,   P2,             compcloset_fan, All_X10,                        PLM,

gargamel:/var/local/src/misterhouse/mh/bin# ./mhsend --run "P2 off"
Sending 6 bytes of data to localhost port 8084, socket made, data sent
Response: Command not found: P2 off
gargamel:/var/local/src/misterhouse/mh/bin# ./mhsend --run "compcloset fan off"
Sending 18 bytes of data to localhost port 8084, socket made, data sent
Response: Command not found: compcloset fan off

Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ 

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: how can I send an X10 command from the command line?

by Marc MERLIN-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Nov 13, 2009 at 04:10:14PM -0800, Marc MERLIN wrote:

> I can do this:
> gargamel:/var/local/src/misterhouse/mh/bin# ./mhsend --run "mbr kpl off"
> Sending 11 bytes of data to localhost port 8084, socket made, data sent
> Response: Command was run: mbr kpl off
>
> (that was for an insteon device).
>
> How do I do this for X10?
> X10A,   P2,             compcloset_fan, All_X10,                        PLM,
>
> gargamel:/var/local/src/misterhouse/mh/bin# ./mhsend --run "P2 off"
> Sending 6 bytes of data to localhost port 8084, socket made, data sent
> Response: Command not found: P2 off
> gargamel:/var/local/src/misterhouse/mh/bin# ./mhsend --run "compcloset fan off"
> Sending 18 bytes of data to localhost port 8084, socket made, data sent
> Response: Command not found: compcloset fan off

Seriously, no one is sending X10 commands from the command line?

I'm trying to actuate a fan to make sure it's on if mh dies.

Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ 

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: how can I send an X10 command from the command line?

by Kurt André Selbach :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

mhsend?
lynx to the mh interface?


On Sun, Nov 22, 2009 at 8:33 PM, Marc MERLIN <marc_mh@...> wrote:
On Fri, Nov 13, 2009 at 04:10:14PM -0800, Marc MERLIN wrote:
> I can do this:
> gargamel:/var/local/src/misterhouse/mh/bin# ./mhsend --run "mbr kpl off"
> Sending 11 bytes of data to localhost port 8084, socket made, data sent
> Response: Command was run: mbr kpl off
>
> (that was for an insteon device).
>
> How do I do this for X10?
> X10A,   P2,             compcloset_fan, All_X10,                        PLM,
>
> gargamel:/var/local/src/misterhouse/mh/bin# ./mhsend --run "P2 off"
> Sending 6 bytes of data to localhost port 8084, socket made, data sent
> Response: Command not found: P2 off
> gargamel:/var/local/src/misterhouse/mh/bin# ./mhsend --run "compcloset fan off"
> Sending 18 bytes of data to localhost port 8084, socket made, data sent
> Response: Command not found: compcloset fan off

Seriously, no one is sending X10 commands from the command line?

I'm trying to actuate a fan to make sure it's on if mh dies.

Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                     .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: how can I send an X10 command from the command line?

by Marc MERLIN-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Nov 22, 2009 at 09:04:22PM +0100, Kurt André Selbach wrote:
> mhsend?

did gmail hide the quotes and you missed what I typed?
I pasted mhsend commands that didn't work for me. Do you have one that works
for you?

> lynx to the mh interface?

Outside of auth/cookie problem, as a last resort I could do this.

It would be a lot more work than
br L2 off
though :)

Mmmh, since I use insteon, I may just want to look at what an X10 frame
looks like, make one up myself and send it to plmsend or something like
that.

Marc
 

> On Sun, Nov 22, 2009 at 8:33 PM, Marc MERLIN <marc_mh@...> wrote:
>
> > On Fri, Nov 13, 2009 at 04:10:14PM -0800, Marc MERLIN wrote:
> > > I can do this:
> > > gargamel:/var/local/src/misterhouse/mh/bin# ./mhsend --run "mbr kpl off"
> > > Sending 11 bytes of data to localhost port 8084, socket made, data sent
> > > Response: Command was run: mbr kpl off
> > >
> > > (that was for an insteon device).
> > >
> > > How do I do this for X10?
> > > X10A,   P2,             compcloset_fan, All_X10,
> >  PLM,
> > >
> > > gargamel:/var/local/src/misterhouse/mh/bin# ./mhsend --run "P2 off"
> > > Sending 6 bytes of data to localhost port 8084, socket made, data sent
> > > Response: Command not found: P2 off
> > > gargamel:/var/local/src/misterhouse/mh/bin# ./mhsend --run "compcloset
> > fan off"
> > > Sending 18 bytes of data to localhost port 8084, socket made, data sent
> > > Response: Command not found: compcloset fan off
> >
> > Seriously, no one is sending X10 commands from the command line?
> >
> > I'm trying to actuate a fan to make sure it's on if mh dies.


--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ 

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: how can I send an X10 command from the command line?

by Dickie Bradford :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I use these and it seems to work well:

command-line>   /projects/mh/bin/mhsend -run 'modem off'

command-line>   /projects/mh/bin/mhsend -run 'modem on'

and I have this in my mht file

X10A,               O15,                Modem,              
Work,               TI103

Basically, I have a php script pinging every so often and when a ping is
dead for 3 times, the script tells MH  to turn off the x10 device
controlling the cable modem power and after 60 seconds the script tells
mh to turn it back on. and emails me.

I hope this helps you out

Dickie



Kurt André Selbach wrote:

> mhsend?
> lynx to the mh interface?
>
>
> On Sun, Nov 22, 2009 at 8:33 PM, Marc MERLIN <marc_mh@...
> <mailto:marc_mh@...>> wrote:
>
>     On Fri, Nov 13, 2009 at 04:10:14PM -0800, Marc MERLIN wrote:
>     > I can do this:
>     > gargamel:/var/local/src/misterhouse/mh/bin# ./mhsend --run "mbr
>     kpl off"
>     > Sending 11 bytes of data to localhost port 8084, socket made,
>     data sent
>     > Response: Command was run: mbr kpl off
>     >
>     > (that was for an insteon device).
>     >
>     > How do I do this for X10?
>     > X10A,   P2,             compcloset_fan, All_X10,                
>            PLM,
>     >
>     > gargamel:/var/local/src/misterhouse/mh/bin# ./mhsend --run "P2 off"
>     > Sending 6 bytes of data to localhost port 8084, socket made,
>     data sent
>     > Response: Command not found: P2 off
>     > gargamel:/var/local/src/misterhouse/mh/bin# ./mhsend --run
>     "compcloset fan off"
>     > Sending 18 bytes of data to localhost port 8084, socket made,
>     data sent
>     > Response: Command not found: compcloset fan off
>
>     Seriously, no one is sending X10 commands from the command line?
>
>     I'm trying to actuate a fan to make sure it's on if mh dies.
>
>     Marc
>     --
>     "A mouse is a device used to point at the xterm you want to type
>     in" - A.S.R.
>     Microsoft is to operating systems & security ....
>                                          .... what McDonalds is to
>     gourmet cooking
>     Home page: http://marc.merlins.org/
>
>     ------------------------------------------------------------------------------
>     Let Crystal Reports handle the reporting - Free Crystal Reports
>     2008 30-Day
>     trial. Simplify your report design, integration and deployment -
>     and focus on
>     what you do best, core application coding. Discover what's new with
>     Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>     ________________________________________________________
>     To unsubscribe from this list, go to:
>     http://sourceforge.net/mail/?group_id=1365
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus signature database 4628 (20091122) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>  
> ------------------------------------------------------------------------
>
> ________________________________________________________
> To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365
>
>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus signature database 4628 (20091122) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>  



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4628 (20091122) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: how can I send an X10 command from the command line?

by Marc MERLIN-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Nov 22, 2009 at 04:37:11PM -0500, Dickie Bradford wrote:

> I use these and it seems to work well:
>
> command-line>   /projects/mh/bin/mhsend -run 'modem off'
>
> command-line>   /projects/mh/bin/mhsend -run 'modem on'
>
> and I have this in my mht file
>
> X10A,               O15,                Modem,              
> Work,               TI103
 
I think this may just not work with the PLM:
gargamel:/var/local/src/misterhouse# mh/bin/mhsend -run 'compcloset on'
Sending 13 bytes of data to localhost port 8084, socket made, data sent
Response: Command not found: compcloset on
gargamel:/var/local/src/misterhouse# grep compcloset code/insteon.mht
X10A,   P2,             compcloset,     All_X10,                        PLM,

But I ended up writing some code to send X10 commands directly (which was a pain
in the butt due to X10 codes being not that simple to address).
The end result is this script:

plmsend -d /dev/insteon -v -e 0263ce00
sleep 1
if [ "$1" = on ]; then
    plmsend -d /dev/insteon -v -e 0263c280
else
    plmsend -d /dev/insteon -v -e 0263c380
fi
 
I'm surprised there does not seem to be any X10_PLM program to send X10
commands on a PLM (without having to painstakenly compute them by hand)
but I'm set for now with my program.

Thanks,
Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ 

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365