472,353 Members | 1,643 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

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 2334
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: qwweeeit | last post by:
Hi all, Elliot Temple on the 1 June wrote: > How do I make Python press a button on a webpage? I looked at > urllib, but I only see how to open...
25
by: Neil Ginsberg | last post by:
I have a strange situation with my Access 2000 database. I have code in the database which has worked fine for years, and now all of a sudden...
1
by: Jimmer | last post by:
I've got what should be an easy automation problem, but the solution simply isn't coming to me. I've got several public variables set up for...
1
by: Lee Seung Hoo | last post by:
hi~ :) I need all information of "Automation" or "Automation Object" what is that ? why is it useful ? How can I use that by C# or .Net...
3
by: Ghosthunter1966 | last post by:
I just recently watched the "High Tech Home" streaming video on the Microsoft: At Home web site and was just wondering what kind of software was...
0
by: Sharath | last post by:
Quality Globe is Glad to Offer you the Fast Track course on Automation, QTP Basics and Advanced, and Quality Center Starting Date: June 4th,...
0
by: Sharath | last post by:
"Inspired" by the huge success of our first two automation fast track batches We are forced to start third fast track automation batch ...
0
by: Sharath | last post by:
We are glad to inform you that "Inspired" by the huge success of our first three automation fast track batches We are forced to start fourth fast...
0
by: Sharath | last post by:
We are glad to inform you that "Inspired" by the huge success of our first four automation fast track batches We are forced to start fifth fast...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.