470,609 Members | 1,412 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,609 developers. It's quick & easy.

Home automation

Not really sure if this is the right place to start for this. I've just got
this burning desire to mess around with some home automation. Is there any
way with PHP that you can write out to a USB port, for example, to turn a
device on of off?

Does anyone know where there's any decent information about this?

Andy

Jul 17 '05 #1
2 2284
USB connections can be used just as another COM-port:
(haven't tested this, but it should work)

<?php
`mode com1: BAUD=9600 PARITY=N data=8 stop=1 xon=off`;
$fp = fopen ("COM1:", "w+");
$command = chr(27)+chr(64); //DEVICE DEPENDANT
fputs ($fp, $command);
fclose ($fp);
?>

/anders

"Andy Jacobs" <oc*@redcatmedia.net> skrev i melding
news:BDBAFB2B.2DA0%oc*@redcatmedia.net...
Not really sure if this is the right place to start for this. I've just got this burning desire to mess around with some home automation. Is there any way with PHP that you can write out to a USB port, for example, to turn a
device on of off?

Does anyone know where there's any decent information about this?

Andy

Jul 17 '05 #2
On 13/11/04 10:37 am, in article kt********************@news.telia.no,
"Anders Holte" <an*@nospstart.no> wrote:
USB connections can be used just as another COM-port:
(haven't tested this, but it should work)

<?php
`mode com1: BAUD=9600 PARITY=N data=8 stop=1 xon=off`;
$fp = fopen ("COM1:", "w+");
$command = chr(27)+chr(64); //DEVICE DEPENDANT
fputs ($fp, $command);
fclose ($fp);
?>


Hmmm... Probably should have said that I'm running a Mac. I get your point
though.

Cheers

Andy

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

15 posts views Thread by qwweeeit | last post: by
25 posts views Thread by Neil Ginsberg | last post: by
1 post views Thread by Jimmer | last post: by
1 post views Thread by Lee Seung Hoo | last post: by
3 posts views Thread by Ghosthunter1966 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.