473,696 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2390
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*@redcatmedi a.net> skrev i melding
news:BDBAFB2B.2 DA0%oc*@redcatm edia.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.te lia.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
5842
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 a URL with that. I searched > google but no luck. > For example, google has a button <input type=submit value="Google > Search" name=btnG> how would i make a script to press that button? I have a similar target: web automation, which
25
3725
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 doesn't work fine on one or two of my client's machines. The code opens MS Word through Automation and then opens a particular Word doc. It's still working fine on most machines; but on one or two of them, the user is getting an Automation Error. The code used is as follows: Dim objWord As...
1
808
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 automation as follows: Public gappExcel As Excel.Application 'ADO Object for Excel Automation Public gstrExcelDir As String 'Source or Destination Directory
1
2404
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 Framework ?
3
1712
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 used to do all that home automation. More specifically, in the kitchen there was software that worked with barcodes to keep the kitchen inventory and recipes. Even more importantly, it was all voice controlled. Can anyone let me know what that was? Is is something we can expect from Microsoft...
0
9314
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, 2007 Timings: 10 AM to 3:30 PM Duration: 50 Hours Location: BTM Layout 1st Stage, Bangalore
0
2371
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 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++ Course on Automation, QTP Basics and Advanced, Quality Center and project ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
0
2194
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 track automation batch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Course on Automation, QTP Basics and Advanced, Quality Center and project
0
2069
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 track automation batch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Course on Automation, QTP Basics and Advanced, Quality Center and project
0
8590
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9140
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9005
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8869
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8845
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7693
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5848
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4603
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2304
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.