Shop OBEX P1 Docs P2 Docs Learn Events
X10 + VB.net with Propeller Code to Follow — Parallax Forums

X10 + VB.net with Propeller Code to Follow

DiablodeMorteDiablodeMorte Posts: 238
edited 2008-07-08 01:01 in Robotics
First Off: While this post doesn't actually relate to a Parallax product, the post to follow will pertain to Parallax products

And.. here we go:
I've been working on some home automation(Xbees, X10, etc) lately and I just got around to working on my X10 CM11A controller. The final product(in the posts to follow) will use a Propeller, but for now, VB.net and a computer are used. While there are lots of stuffs out there(Dlls, OCXs, Custom Librarys) I decided to write my own interface since obviously I would actually need to KNOW how to communicate with the CM11A if I even hoped to interface w/ a propeller. I wrote a vb program today. It's very very simplistic: It allows you turn turn on and off the A1 house code. It's flexible enough to easily turn on/off all the house codes(I have it programed from A-E 1-5 though more could be easily put in). I've included some screenshots of each page along with the source.

Note: The application uses threading so the app isn't slowed down when processing the serial data.

Note 2: If anybody would like to me to continue to work on it to provide enhanced functionality I can. As of now the project(the VB.Net side) is finished and no new features will be added

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Current Projects:
Robot Control Via Skype API - Dev Stage(50% Complete) - Total(25%)
Robot Localization Via Xbee's - Research Stage
IR Tracking with Propeller - Research Stage
506 x 313 - 80K
242 x 94 - 3K
308 x 308 - 7K

Comments

  • DgswanerDgswaner Posts: 795
    edited 2008-06-25 18:11
    Diablodemorte, I'm putting in a Home Theater and I plan to automate the Projector Screen, projector (drops down from ceiling) and lighting, using X10 components. I was planning on controlling them via the web, PINK, plus Iphone. so I'd be interested in seeing your Propeller code, when you have it. it would also be cool to have a .net app with configurable address for testing before I go online.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster

    DGSwaner
  • DiablodeMorteDiablodeMorte Posts: 238
    edited 2008-06-25 19:32
    @Dgswaner: Ok, are you going to be using any other X10 modules?(ie, not simple On/Off) If so tell me and I'll try to support those modules in both my VB.net and Propeller code.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Current Projects:
    Robot Control Via Skype API - Dev Stage(50% Complete) - Total(25%)
    Robot Localization Via Xbee's - Research Stage
    IR Tracking with Propeller - Research Stage
  • DgswanerDgswaner Posts: 795
    edited 2008-06-25 20:29
    yes, I plan on controlling some can lights with dimmers.

    Thanks I really appreciate it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "A complex design is the sign of an inferior designer." - Jamie Hyneman, Myth Buster

    DGSwaner
  • DiablodeMorteDiablodeMorte Posts: 238
    edited 2008-06-29 06:13
    [noparse][[/noparse]UPDATE] Today was the day I got my Propeller to control the X10 CM11A Controller. The reason there was such a long lapse in communication was becuase I didn't have any MAX232's or MAX233's on hand to interface the propeller to the CM11A. I just got one in today and hooked it up and after alittle tweaking I got the propeller to turn off the little lamp in my living room. It was very cool [noparse]:)[/noparse]

    [noparse][[/noparse]QUESTION FOR PEOPLE WITH MORE ELECTRICAL KNOWLEDGE]
    I have the output of the TX from the MAX233 hooked directly to one of the propeller's pins. I hooked it up to an ossiliscope and the TX pin(and rx pin) max out at ~3.3, 3.6 volts. Do I need a resistor? And since the answer to that is most certaintly "yes" what size resistor would I need?

    [noparse][[/noparse]TO People Like Dgswaner who want to control X10 with their propeller]
    Assuming that you have a CM11A or similar model: Would it be easier for you to just rig the propeller up to the CM11A yourselves? or would you like me to fabricate a simple board? If you want to make your own board with the cable the CM11A came with you can just use/buy a MAX233/MAX232 adapter. If you wanted to use a more professional, at least to me, looking cable(a 4 pin telephone cable) I could easily make a PCB board with a MAX233(Or the 3.3v Supply one), a Telephone jack, some standoff holes, and a 4 pin header for propeller interface.


    I'll try to release a "real" spin object later this week(~tuesday). There probably wont be dimmer control in the first version since I don't have a dimmer module. I'll try to work in Dimmer control by ~friday.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Current Projects:
    Robot Control Via Skype API - Dev Stage(50% Complete) - Total(25%)
    Robot Localization Via Xbee's - Research Stage
    IR Tracking with Propeller - Research Stage
  • Tom_mTom_m Posts: 1
    edited 2008-07-08 01:01
    Ok the vb program works ok but fails in one case. Try unplugging the CM11A and re-connecting it again from the mains.
    The device then spews out a repeatable code and the present prog you have fails unfortunately.

    I have a very simple fix which is nowhere near as smart as your program in that it doesn't listen for replies - it just has a delay.
    You need the init() part to make it work. I have a CM12 which is the same I believe.

    http://www.massey.ac.nz/~tjmoir/x10.html

    regards

    Tom
Sign In or Register to comment.