Nova Posted August 20, 2005 Posted August 20, 2005 Hi again guys,Just wondering if there are any wizards out there that would quickly convert this project into autoit for me, the project is an interface for a piece of hardware I recently purchase that allows you to turn on/off house hold appliances using your computer.I know absolutly no VB and would love to have an example of how to do this in autoit...If anyone is intrested or is just bored at work id really appriachate even an example. http://www.rentron.com/FireCracker.htmThanx a million for your time
LxP Posted August 20, 2005 Posted August 20, 2005 (edited) Looks like the biggest hassle will be figuring out how to send bytes to your serial port.I found a couple threads on the topic, one involving a FileOpen("COM1", ...) call but it didn't seem possible to send data to the port that way. A couple people mentioned third-party DLLs to tap into as well.Maybe someone knows the answer to this hurdle and will post away? Good luck in getting it to work! Edited August 20, 2005 by LxP
DaleHohm Posted August 20, 2005 Posted August 20, 2005 (edited) I too have a Firecracker and it has long been on my ToDo list to create an AutoIt interface for it... still haven't taken the time however.The example you cite uses the MSComm Com interface for interacting with the device on the Com port. This makes it wasy to manipulate the signal of the different pins of the serial com port and to send and receive data. I recently posted an example of using this interface in the form of a modem phone dialer: Phone Dialer using MSCommThis example should be enough to get you started (unless you firmly believe that COM is overkill for something that can be done with FileOpen - right LxP? )You can find full documentation on MSComm at MSDN.DaleHi again guys,Just wondering if there are any wizards out there that would quickly convert this project into autoit for me, the project is an interface for a piece of hardware I recently purchase that allows you to turn on/off house hold appliances using your computer.I know absolutly no VB and would love to have an example of how to do this in autoit...If anyone is intrested or is just bored at work id really appriachate even an example. http://www.rentron.com/FireCracker.htmThanx a million for your time<{POST_SNAPBACK}>Edit: fixed a couple of typos Edited August 20, 2005 by DaleHohm Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
LxP Posted August 21, 2005 Posted August 21, 2005 This example should be enough to get you started (unless you firmly believe that COM is overkill for something that can be done with FileOpen - right LxP? )Nah, COM looks like the way to go here -- FileOpen() wasn't able to get the job done.And yes, I know I had that coming!
Nova Posted August 21, 2005 Author Posted August 21, 2005 Thanx a million for the initial push guys, sadly I know absolutly nothing about com. This could take me quite some time... Cheers guys.
DaleHohm Posted August 21, 2005 Posted August 21, 2005 OK, give me a few days and I'll create a little stronger push with some skeleton code for this project. I have an older CM17a -- is taht what you have, ot is it a CM18? Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
Nova Posted August 22, 2005 Author Posted August 22, 2005 I have the English/Irish USB version. CM19U Heres a linkhttp://www.x10.co.uk/accessories/usb_transceiver/index.htmlA skeleton structure would be an brilliant push...I look forward to it.Thanx man
DaleHohm Posted August 22, 2005 Posted August 22, 2005 Ooops. You have a Firecracker with a USB interface. Notice that the picture at the top of the page you linked to in your first post looks very different from you pointed me to on the X10 site. That picture shows a serial interface that plugs into a comm port (this is what I have).You'll need to find some examples or an interface library for communicating to this USB device before I can help.I did a live chat with X10 to try to find out what was available -- I'll include it below. The gist is that the free download only appears to provide a stock interface to the device (you may be able to control it with AutoIt though its GUI however, so it may help you). To find out what X10 knows about a general interface to it, you'll need to call their Tech Support.DaleLiveChat transcript:( Dale 6:23:15 ) A friend recently purchased a USB X10 Command Messenger. He has asked me for help with creating a program to interface to it. I have an older Firecracker CM17a and I'm able to communicate to it with it on the serial port.Is there a general software interface library available this module like there was for the CM17a?Referring Page: /accessories/usb_transceiver/index.html( GrEg 6:30:17 ) Give me a minute to find your answer ( GrEg 6:41:17 ) Some X10 software and drivers are available for free download and can be found through the following link. If you need technical assistance, please contact Support at 1-800-442-5138 to speak with a Support Representative. ( http://www.x10.com/support/support_soft1.htm )I have the English/Irish USB version. CM19U Heres a linkhttp://www.x10.co.uk/accessories/usb_transceiver/index.htmlA skeleton structure would be an brilliant push...I look forward to it.Thanx man<{POST_SNAPBACK}> Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
Nova Posted August 23, 2005 Author Posted August 23, 2005 Its a pity that our firecrackers are so different. Alto im confussed as to why mine being USB would cause a problem... The software im using was downloaded from www.x10.com which seems to support both comm and usb devices, it auto detects the device. How does the USB version affect writing an interface ? Cant the commands be sent to the usb as easy as be sent to comm1.
DaleHohm Posted August 23, 2005 Posted August 23, 2005 I'll be dating myself here, but here's some background...The interface used in the sourcecode you pointed to uses MSCOMM -- COMM stands for COMMunications port as in 9 or 25 "pin" serial communications port. The MSCOMM interface plays with 5 Volt signals in those copper pins on your serial port. Looking at the code, you'll see things like DTR and DTS (Data Terminal Ready and Data Set Ready) -- This actually creates a 0 or 5 volt signal on pins 4 and 6... This is NOTHING like how USB works.You need to find something sprecifically for USB communications with this device -- I suggest you call their Tech Support -- you will certainly not be the first person to ask this question as others upgradding from the serial version will be looking for it.DaleIts a pity that our firecrackers are so different. Alto im confussed as to why mine being USB would cause a problem... The software im using was downloaded from www.x10.com which seems to support both comm and usb devices, it auto detects the device.How does the USB version affect writing an interface ? Cant the commands be sent to the usb as easy as be sent to comm1.<{POST_SNAPBACK}> Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
Nova Posted August 23, 2005 Author Posted August 23, 2005 Thanx a million for your help Dale, much appriachated.
Confuzzled Posted August 24, 2005 Posted August 24, 2005 I don't know, but could I guess that the USB interface just emulates a serial port anyway? There was a small IOPORT.DLL floating around a while ago that was used by VB programmers to write direct to serial and parallel ports. You may still be able to find something that works well with XP if you hunt around, and then just call that using the DLLCall statement, passing it the port number and value to send or retrieve. Don't forget to initialise the port to the right baud rate, etc, and allow for timing delays for the X10 device to respond. Good luck!
Nova Posted August 26, 2005 Author Posted August 26, 2005 I don't know, but could I guess that the USB interface just emulates a serial port anyway?There was a small IOPORT.DLL floating around a while ago that was used by VB programmers to write direct to serial and parallel ports. You may still be able to find something that works well with XP if you hunt around, and then just call that using the DLLCall statement, passing it the port number and value to send or retrieve. Don't forget to initialise the port to the right baud rate, etc, and allow for timing delays for the X10 device to respond.Good luck!You lost me! Ive no idea about how to do what your suggesting
tuicemen Posted January 23, 2006 Posted January 23, 2006 Not sure if your still looking for away to talk to your cm19a (firecracker) but if you are this may help. I've read in other forums where users have had success using the AHP SDK to talk to the firecracker. I don't have one to confirm that but if it is true you could then control your firecracker via command line with a line like "ahcmd sendrf a1 on" to turn on module A1.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now