Solved

How do i switch tube light on and off from my vb program?

Posted on 2002-07-12
14
387 Views
Last Modified: 2012-06-21
How do i switch tube light on and off from my vb program? please dont consider this as a joke but this is possible.
0
Comment
Question by:dhavaljariwala
  • 2
  • 2
  • 2
  • +7
14 Comments
 
LVL 3

Expert Comment

by:Elmo_
ID: 7148656
Tube Light?  What do you mean?
0
 

Author Comment

by:dhavaljariwala
ID: 7148675
Llight or a fan any home appliances.
0
 
LVL 3

Expert Comment

by:Elmo_
ID: 7148699
Realisticly, I do not think that this is possible from a VB app.  But you can always try!!
0
 

Expert Comment

by:Amitabh
ID: 7148778
you are talking of embedded programming. for this u need to get the API's of the hardware which will control the tubelight. i don't think this is possible through VB but the first step is to get the hardware and required API's from the vendor.

-A.Pandey
0
 
LVL 4

Expert Comment

by:gencross
ID: 7148883
This is off the top of my head, but I think you may be able to pick up some converters for an AC power network and then a module that a light would plug into that you could control through the computer.  The network would run through the electical wiring of the house and the module would plug into an outlet and the light would plug into the module.  The module would be able to receive commands from the computer to turn on and off the light.

I don't know if this is viable but check out this page http://www.symantec.com/homecomputing/network.html

You could alternatively use IR (InfraRed).  You would need remote control lighting and and IR port on your machine.  Of course, you would have to be in the same room as the lighting.  It would work just like a remote control.

That being said the problem that you run into when trying to accomplish something like this is communication.  You need to have a line of a communication (a wire or wave) to the device and then the device needs to be able to speak a language that the computer understands.  Right now most lights are "dumb".  They have lighting that will come on using voice commands.  They may have lighting that can be programmed to.

You should probably be able to pick something up that will work, but I can bet it will not be for the faint of heart, or the faint in pocketbook $$$.

Hope this helps.
0
 
LVL 3

Expert Comment

by:Lewy
ID: 7149174
Check out X10 home automation at www.x10.com
I've got some of there stuff and it's great.

The tech section has the details on how to control things from VB. It's a little hard to find.
0
 
LVL 3

Expert Comment

by:kenspencer
ID: 7149459
Hi,

I have just a comment.  Back in 1991 or so, my (soon to be) wife's daughter was dating some tech person that had his lights and stereo rack in a particular room controlled by voice (!) through a PC.  While I was in the room, he spoke the unit's activation command (which was 'Mr. Spock'), told it to lower the lights a couple of times, then raise the lights, then turn on his stereo.  It all happened as he spoke.  In light of this, I would have to believe that controlling many things with VB would be possible, given the right drivers and connectivity.

Ken
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7149536
I see code silmilar of in old VB3 days working with Serial/parallel port. Just i don't remember. I will try to find the source.
The problem is you need a device that could manage light and accept input from some of these ports.
0
 
LVL 3

Accepted Solution

by:
PNJ earned 250 total points
ID: 7149661
I have used a National Instruments card that plugs into one of the PCI slots of the PC. The card comes with and OCX that loads right into VB. It's dead easy to program - I've use it to control the movements of products down our production line. Obviously, this card is only an interface between the PC and the outside (hardware) world and you'd have to build hardware to wire up the lamps etc etc.

Visit them at http://www.ni.com/.
0
 
LVL 3

Expert Comment

by:PNJ
ID: 7149686
...for instance, have a look at this card: http://sine.ni.com/apps/we/nioc.vp?cid=10127&lang=US (which is a link from the NI site)
0
 
LVL 38

Expert Comment

by:PaulHews
ID: 7150118
At x10, check out the firecracker:

http://www.x10.com/firecracker/fc_offer_br1ab.htm

Step by step instructions for controlling from VB:

http://vboverdrive.extreme-vb.net/articles/firecracker.php3
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7150141
Optionally, if you have the device:

http://www.zealsoftstudio.com/vbio/
0
 

Author Comment

by:dhavaljariwala
ID: 7151048
Thank u for ur suggestions friends. If i'll find out the solution i'll definately mail to you. I know that this is possible.
0
 

Expert Comment

by:patelplanet
ID: 8295358
Yes it is Definitely Possible to control X10 modules from a VB program.I use a Firecracker Serial Port module and an OCX included VB exe to schedule the lighting at my place.

Please check my web site for further details:

Click Below:

http://patelplanet.com/x10/

Thanks & Regards
-Shrimant Patel-
http://patelplanet.com
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now