To RS232 or not to RS232?

Discussion in 'General Discussion' started by adgilcan, Aug 18, 2011.

  1. adgilcan

    adgilcan

    Joined:
    Oct 13, 2010
    Messages:
    45
    Likes Received:
    0
    Location:
    Reading UK
    I acknowledge that there are an enormous number of threads involving discussion of RS232 control and I have trawled through many of them. They all seem highly complicated and fraught with potential problems.

    I have designed, programmed and installed a large and perfectly working domestic Cbus installation complete with PICED logic but I am by no stretch of the imagination a computer programmer. I have also downloaded the cbus module software from sourceforge but don't seem to have a program able to open it.

    I would like to extend the control of Cbus from the Wiser CNI interface to include an RS232 control via a PCI interface so that I can use a Nevo Universal remote control as well.

    I would like to ask the community two questions:

    1)
    Should I stop right here as I clearly don't have sufficient knowledge to attempt anything as complicated as this?​

    2)
    Is there any GUI software I can use to learn and program Cbus module code to work as intended?​

    Many thanks for your help, as always.

    Duncan
     
    Last edited by a moderator: Aug 18, 2011
    adgilcan, Aug 18, 2011
    #1
  2. adgilcan

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,397
    Likes Received:
    26
    Location:
    Adelaide, South Australia
    You can always learn.

    The C-Bus Module s/w is a Zip file. Open / extract it should work using plain ole windows open/extract of a Zip. If that fails, try 7-zip - its free (and also very good).

    There are examples of using C-Bus Module for PC and it has been ported to many embedded platforms. You will need a C compiler, and you obviously need to have a pretty good idea of what you are doing.

    For embedded work you WILL have to do things like write driver code to get low level byte I/O running on your embedded platform. Once thats done the C-Bus Module makes life easy because you never need worry about the actual content and format of the RS-232 control strings again, it does all that for you.'

    I'd encourage you to learn. A bit of prior knowledge and an aptitude for leaping into low level thingies and understanding them would be a huge help. If you don't have, or think you never could have, that knowledge then you have a problem and you probably need to find somebody with more expertise to help you.
     
    ashleigh, Aug 18, 2011
    #2
  3. adgilcan

    adgilcan

    Joined:
    Oct 13, 2010
    Messages:
    45
    Likes Received:
    0
    Location:
    Reading UK
    Thank you Ashleigh

    I am always keen to learn and prefer to do so in order to better understand what is happening. I started from scratch with Toolkit and PICED and got the hang of it pretty quickly (with some guidance from some of our "Senior Members" - nod to Newman especially).

    As always, the initial questions are dumb but without them being answered I can't progress:

    I have extracted the cbus module s/w to a folder but there doesn't seem to be an executable file so I am stuck right at the start. Windows doesn't recognize any of the non-obvious extensions such as .c or .h so I don't know where to go. I am using a Mac with Parallels and Windows 64bit. I think I may need to use the 32 bit version but I don't think this will solve the extension issue which I'm sure is obvious to everyone but me. I can see these files on my Mac using XCode but as cbus module is not for Mac s/w, I have gone no further here. I do have a very old version of Visual Basic which I used to play with so I may have a compiler as long as modern windows will play with it but as I said I am no programmer.

    So I guess my first question is, how do I get to use the cbus module software so I can start learning?
     
    adgilcan, Aug 18, 2011
    #3
  4. adgilcan

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,397
    Likes Received:
    26
    Location:
    Adelaide, South Australia
    What you have is source code. You need a C compiler, and some glue to get programs talking on a PC serial port.

    From what I remember (it being quite a while ago now) there are some example programs in there for PC, using Borland C++ Builder (which costs a few bob). With effort you could get it all to compile using gcc.

    There also used to be an example using GTK for Linux (using the Gnome user interface / toolkit).

    It *sounds* like you need to do some real gory digging into finding suitable compilers - pretty much everything with C-Bus Module revolves around building from source code.
     
    ashleigh, Aug 19, 2011
    #4
  5. adgilcan

    Newman

    Joined:
    Aug 3, 2004
    Messages:
    2,203
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    I take it that the goal here is to use the Nevo remote to control C-Bus. Is that correct?

    There's several different ways to make 3rd party stuff talk to C-Bus.

    • Dry contact inputs to something like a Bus Coupler or Auxiliary input unit.
    • The C-Bus open protocol is the lowest level interface at a protocol level, where you manually code up the necessary ASCII strings and send them to a PC interface.
    • The C-Bus module source code being intended for those writing their own embedded applications. This is what you have downloaded from sourceforge.
    • The C-Bus Module dll (sometimes called the "C-Bus Driver") being intended for those writing their own PC applications.
    • C-Gate, for those looking for an abstracted and managed interface to C-Bus, where you run C-Gate on a Windows or Linux PC, you open a telnet/socket connection to C-Gate and send commands to/from it following the documented command set.
    Which of the above methods is best will depend upon exactly how the hardware you've got works and what kind of interface it has.

    At a guess I take it that you're planning to use a NevoConnect to receive commands from the Nevo remote and use that to output RS-232 strings. Is that correct? If so, the most rudimentary way of linking the two is probably to connect the NevoConnect to a 5500PC and program the NevoConnect to send the necessary C-Bus strings directly into the C-Bus PC Interface (assuming it has this capability). This will give you basic control, i.e. one C-Bus action for a single Nevo action.

    If you want to do more advanced functions then you may be able to connect the output of the Nevo to a 5500PAC on one of it's serial ports and you can then use the logic engine in the PAC to make more advanced things happen.

    If you have an always-on PC in the house and either you're prepared to write a PC application, or Nevo supply one, then you might be able to route the commands from the Nevo to C-Bus via the PC, with the application on the PC acting as the "glue" between the Nevo receiver and C-Gate, and then letting C-Gate handle all the C-Bus interface side of things.

    You can always start at the lowest level and do progressively more clever things as your knowledge grows.

    PS: Thanks for the kudos. :)
     
    Last edited by a moderator: Aug 19, 2011
    Newman, Aug 19, 2011
    #5
  6. adgilcan

    znelbok

    Joined:
    Aug 3, 2004
    Messages:
    1,151
    Likes Received:
    17
    You may be better off looking at software that is already done for you.

    I use CQC from charmed quark, there are others as well (none that I can think of at the moment - drawing a blank).

    The software gives you a rich visual interface to many component of your home, C-Bus being one of them. The interface can be either a PC (In-wall touchscreen), iPad, iPhone/touch and even the Nevo S7 will work with it.

    If you remote can only send RS232 commands (as opposed to ethernet like the S7), then you can use the software as an interpreter. CQC for example can receive the serial string, decode what the message is and then send out the appropriate C-Bus command. (pretty much what was mentioned above)

    I think you have a very steep learning curve ahead of you if you are struggling with what you have already and want to continue down that path. If you do continue, I am sure there are many here that will help where possible.

    Mick
     
    znelbok, Aug 19, 2011
    #6
  7. adgilcan

    adgilcan

    Joined:
    Oct 13, 2010
    Messages:
    45
    Likes Received:
    0
    Location:
    Reading UK
    Thank you all for your input.

    I must admit that the thought of low level programming is so far out of my comfort zone that it would indeed be a very steep learning curve. But then so were my first steps into computers back in the days of the early '90s.

    Essentially what I have in mind at present is to incorporate the lighting and curtain relay functions of the Cbus living room scenes into the Nevo S70 URC which controls the Home theatre. Thus I don't really need the S70 to have great control over the Cbus installation but I would like to be able to set-up both the hardware and lighting for a given "scene" at the touch of one S70 button. This would only need a few strings of coded instruction to Cbus and whilst the solution suggested by znelbok of using preconfigured software is extremely tempting (and may be the road I go down) it is very expensive for the limited use of it I envisage.

    The Nevo S70 does have the ability to load IP addresses and I thought that I may be able to load the Wiser browser interface but whilst it does load it only shows a black blank screen (with scroll bars) so I guess there is some DirectX or Flash function on the Wiser interface that Nevo doesn't support. That may merit further investigation. Do you know anything of the Wiser interface?

    As I said, thank you all for your helpful comments. I think I will need to do a foundation course in low level programming.

    All the best.

    Duncan
     
    adgilcan, Aug 19, 2011
    #7
  8. adgilcan

    Newman

    Joined:
    Aug 3, 2004
    Messages:
    2,203
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    The Wiser interface is largely flash. If the "browser" on the S70 doesn't support flash then you won't be able to use the Wiser browser interface on the S70.

    If you only need to set a single C-Bus Scene when you press a button on the Nevo then the quickest and easiest way would be to connect a device such as the NevoConnect to a 5500PC and get it to send the corresonding Scene trigger into the C-Bus network. The C-Bus Serial Protocol is freely downloadable, and I'm sure with a little reading you'll be able to get it to work.
     
    Newman, Aug 20, 2011
    #8
  9. adgilcan

    adgilcan

    Joined:
    Oct 13, 2010
    Messages:
    45
    Likes Received:
    0
    Location:
    Reading UK
    Thank you Newman

    That is pretty much all I want to do although, as is the way with these things, they tend to expand over time. I shall look in more detail at the method you suggest.
     
    adgilcan, Aug 20, 2011
    #9
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.