somfy Busline transmitter

Discussion in 'C-Bus Wired Hardware' started by RichardC, Jun 6, 2012.

  1. RichardC

    RichardC

    Joined:
    Nov 1, 2004
    Messages:
    19
    Likes Received:
    0
    Hi we are trying to control a Somfy busline transmitter with CBus via a 232 to 485 converter. We are having a bit of trouble understanding the construction of a correct string. They are just blinds and curtains opening and closing.

    Can anyone provide an example to me please of just one string to do this that they know works.

    thanks in advance

    Richard
     
    RichardC, Jun 6, 2012
    #1
  2. RichardC

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,420
    Likes Received:
    62
    Location:
    Adelaide
    Do you have the protocol documentation?

    If so, are you able to post some of it here so that someone can help?

    If not, have you asked Somfy for it? Their local guys (Sydney) are very helpful.

    Nick
     
    NickD, Jun 8, 2012
    #2
  3. RichardC

    RichardC

    Joined:
    Nov 1, 2004
    Messages:
    19
    Likes Received:
    0
    Somfy RTS RS485

    Data transmission is based on an asynchronous serial communication:

    Bauds Rate 4800
    Data bits 8
    Parity Odd
    Start Bit Logical level 0
    Stop Bit Logical level 1
    Character coding NRZ

    3.2 Character Coding
    ?Character? refers to all bits including START bit, DATA bits, PARITY bit and STOP bits

    An example of our string to be sent.

    once (GetLightingState("Blind Lounge1") = ON) then
    begin
    OpenSerial(1, 1, 4800, 8, 1, 0, 1);
    WriteSerial(1, '7F F2 FA 01 00 00 44 79 FA FE FE 06 1F');
    CloseSerial(1);
    end;

    The string is proven as working with my laptop. The somfy RTS transmitter is RS485. We have a RS232 to RS485 convertor.


    The string in the somfy software is described as a FORMAT STRING and is
    represented as a hexadecimal byte

    I have checked the log in the colour touchscreen and the string is being transmitted. There is a LED on our RS232 to RS485 convertor and it flashes when a RS232 code is being received from the touchscreen.

    Hope you can help,
    Thanks in advance
    RichardC
     
    RichardC, Jun 15, 2012
    #3
  4. RichardC

    RichardC

    Joined:
    Nov 1, 2004
    Messages:
    19
    Likes Received:
    0
    Somfy RTS RS485

    Google "rs485 protocol users guide somfy" for the protocol. Its the first search to appear
     
    RichardC, Jun 15, 2012
    #4
  5. RichardC

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,420
    Likes Received:
    62
    Location:
    Adelaide
    This will send an ascii "7" character (hex character value $37), followed by an ascii "F" (hex character value $46), followed by a " " (space 0 hex character $20)..

    Is this what you want? Or do you actually want to send the hex character $7F followed by $F2 etc?

    Exactly what/how are you sending it with the laptop? With a terminal program like hyperterminal and typing it in, or some other way? Do you need a carriage return at the end?

    Nick
     
    NickD, Jun 15, 2012
    #5
  6. RichardC

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    Have a read of the Logic Help File topic "Serial IO Examples" for an example of the difference between the two types of protocols that Nick is describing.
     
    Darren, Jun 15, 2012
    #6
  7. RichardC

    RichardC

    Joined:
    Nov 1, 2004
    Messages:
    19
    Likes Received:
    0
    Somfy RTS RS485

    I am sending the string to the RTS module with a Tool created by somfy. somfy rs485 demo tool. Google this for PDF on tool.


    Scan the RS485 network. TSelect your RTS transmitter. You then have 16 channels of blinds that you can control. up, down stop etc.

    For every command you send, the program shows you the "Frame Sent"

    I used a serial port monitoring program to check what was being transmitted out of the RS232 port of my lap top.
    The same string is shown in the motoring program as is shown in the somfy tool.

    eg. 7F F2 FA 01 00 00 44 79 FA FE FE 06 1F

    No carriage return.

    I have attached a print screen of the somfy tool.

    What do you think.
    Thanks again for the help
    Richard C
     

    Attached Files:

    RichardC, Jun 16, 2012
    #7
  8. RichardC

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,420
    Likes Received:
    62
    Location:
    Adelaide
    I suspect it's actually transmitting those hex values as binary, rather than ascii... a screenshot from your serial port monitoring program where it shows what was transmitted might help confirm this.

    The help file darren referred to previously explains the difference.

    Nick
     
    NickD, Jun 18, 2012
    #8
  9. RichardC

    RichardC

    Joined:
    Nov 1, 2004
    Messages:
    19
    Likes Received:
    0
    sorry still dont get it!

    Hey guys, thanks for your replies but I am still having trouble with this even after reading the help file.I need a personal interpretor to help me translate please.

    As I understand it, i am writing this is one language, HEX, but the serial on the touchscreen needs a different language, ASCII. I am having trouble doing the translation.

    Nick, the serial monitoring programming reads the string coming out as it is entered going in , being 7F F2 FA 01 00 00 44 79 FA FE FE 06 1F. We know this example string works fine from our PC using hyperterminal via our RS232 to 485 converter, we open and close blinds no problems. It looks like its going in HEX and coming out the same way on the monitoring software.

    Is there someone who can take this HEX string and show us what it would look like in the correct language/format that the touchscreen serial port would understand please?

    Also If possible the steps on how you did this would be of great help.

    By the way we have talked extensively wth Clipsal CIS and Somfy about this with no success yet.
     
    RichardC, Jun 18, 2012
    #9
  10. RichardC

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    Can you show us a screen shot from this monitoring program?

    According to the Somfy RS485 Protocol User's Guide (http://files.domoticaforum.eu/Somfy/RS485_Protocol_User's_guide.pdf) the protocol is not using ASCII characters.

    To send the example command you have provided (7F F2 FA 01 00 00 44 79 FA FE FE 06 1F) from logic, the code would be:
    Code:
    WriteSerial(1, #$7F#$F2#$FA#$01#$00#$00#$44#$79#$FA#$FE#$FE#$06#$1F);
     
    Darren, Jun 18, 2012
    #10
  11. RichardC

    RichardC

    Joined:
    Nov 1, 2004
    Messages:
    19
    Likes Received:
    0
    Somfy RTS RS485

    Hi,
    We are on site. I have tried that string. Our RS485 converter flashes when it is receiving a string from the touchscreen. I have attached another screen shot from the com port monitoring program.
    Thanks again
     
    RichardC, Jun 19, 2012
    #11
  12. RichardC

    RichardC

    Joined:
    Nov 1, 2004
    Messages:
    19
    Likes Received:
    0
    Somfy RTS RS485

    I 'm trying a different comms cable at the moment, will let you no how that goes
     
    RichardC, Jun 19, 2012
    #12
  13. RichardC

    RichardC

    Joined:
    Nov 1, 2004
    Messages:
    19
    Likes Received:
    0
    Somfy RTS RS485

    No luck. Picture now attached
     

    Attached Files:

    RichardC, Jun 19, 2012
    #13
  14. RichardC

    Darren Senior Member

    Joined:
    Jul 29, 2004
    Messages:
    2,361
    Likes Received:
    0
    Location:
    Adelaide, South Australia
    You haven't given details of the string that is being displayed (7F F2 FA 01 00 00 44 79 FA FE FE 06 1F).

    Was it sent from the touch screen, or something else?

    Did it work?

    It does appear that binary coding is used. To the right of the string, you can see some odd characters, which are the ASCII equivalents of the hex values. For example, the "D" corresponds to the hex character 44, and the "y" corresponds to the hex character 79.
     
    Darren, Jun 19, 2012
    #14
  15. RichardC

    RichardC

    Joined:
    Nov 1, 2004
    Messages:
    19
    Likes Received:
    0
    Somfy Rts

    The screen shot was from my laptop sending a string into the Somfy rts device. Bottom left is the Somfy tool for sending the string. The other 3/4 of the screen was the port monitoring software.
    I have tried cOnnecting the touchscreen into my computer to read what is coming out the screen without success.
    The only indication that the touchscreen is outputting a string is our rs485 converter flashes when a string is received.
    I will try to expand the port monitoring software for more detail.
    Thanks again.
     
    RichardC, Jun 19, 2012
    #15
  16. RichardC

    RichardC

    Joined:
    Nov 1, 2004
    Messages:
    19
    Likes Received:
    0
    Somfy RTS RS485

    A Cut and paste from the serial port monitoring software - Request View. When I connect to the Somfy RTS transmitter using my laptop with the somfy RS485 demo tool.

    My latest string

    once (GetLightingState("Blind Lounge1") = OFF) then
    begin
    OpenSerial(1, 1, 4800, 8, 1, 0, 1);
    WriteSerial(1, '#$7F#$F2#$FA#$01#$00#$00#$44#$79#$FA#$FE#$FD#$06#$1E');
    CloseSerial(1);
    end;


    Port opened by process "RS485DemoTool.exe" (PID: 5952)

    IO Control: 20/06/2012 9:28:50 AM.18664 (+42.5938 seconds)
    DOWN (0x00000000): IOCTL_SERIAL_SET_QUEUE_SIZE: Set queue size
    InSize=8192
    OutSize=4096

    IO Control: 20/06/2012 9:28:50 AM.18664 (+0.0000 seconds)
    UP (0x00000000): IOCTL_SERIAL_SET_QUEUE_SIZE: Set queue size

    IO Control: 20/06/2012 9:28:50 AM.18664 (+0.0000 seconds)
    DOWN (0x00000000): IOCTL_SERIAL_SET_TIMEOUTS: Set timeouts
    ReadIntervalTimeout=0
    ReadTotalTimeoutMultiplier=0
    ReadTotalTimeoutConstant=400
    WriteTotalTimeoutMultiplier=0
    WriteTotalTimeoutConstant=0

    IO Control: 20/06/2012 9:28:50 AM.18664 (+0.0000 seconds)
    UP (0x00000000): IOCTL_SERIAL_SET_TIMEOUTS: Set timeouts

    IO Control: 20/06/2012 9:28:50 AM.18664 (+0.0000 seconds)
    DOWN (0x00000000): IOCTL_SERIAL_GET_BAUD_RATE: Retrieve Baud Rate

    IO Control: 20/06/2012 9:28:50 AM.18664 (+0.0000 seconds)
    UP (0x00000000): IOCTL_SERIAL_GET_BAUD_RATE: Retrieve Baud Rate
    Baud Rate=4800

    IO Control: 20/06/2012 9:28:50 AM.18664 (+0.0000 seconds)
    DOWN (0x00000000): IOCTL_SERIAL_GET_LINE_CONTROL: Retrieve line control

    IO Control: 20/06/2012 9:28:50 AM.18664 (+0.0000 seconds)
    UP (0x00000000): IOCTL_SERIAL_GET_LINE_CONTROL: Retrieve line control
    WordLength=8
    StopBits=1 stop bit
    Parity=Odd parity

    IO Control: 20/06/2012 9:28:50 AM.18664 (+0.0000 seconds)
    DOWN (0x00000000): IOCTL_SERIAL_GET_CHARS: Retrieve special characters

    IO Control: 20/06/2012 9:28:50 AM.18664 (+0.0000 seconds)
    UP (0x00000000): IOCTL_SERIAL_GET_CHARS: Retrieve special characters
    EofChar=0x0
    ErrorChar=0x0
    BreakChar=0x0
    EventChar=0x0
    XonChar=0x0
    XoffChar=0x0

    IO Control: 20/06/2012 9:28:50 AM.18664 (+0.0000 seconds)
    DOWN (0x00000000): IOCTL_SERIAL_GET_HANDFLOW: Retrieve handshake information

    IO Control: 20/06/2012 9:28:50 AM.18664 (+0.0000 seconds)
    UP (0x00000000): IOCTL_SERIAL_GET_HANDFLOW: Retrieve handshake information
    ControlHandShake=0
    FlowReplace=0
    XonLimit=4096
    XoffLimit=1024

    IO Control: 20/06/2012 9:28:50 AM.18664 (+0.0000 seconds)
    DOWN (0x00000000): IOCTL_SERIAL_SET_BAUD_RATE: Set baud rate
    Baud Rate=4800

    IO Control: 20/06/2012 9:28:50 AM.18664 (+0.0000 seconds)
    UP (0x00000000): IOCTL_SERIAL_SET_BAUD_RATE: Set baud rate

    IO Control: 20/06/2012 9:28:50 AM.18664 (+0.0000 seconds)
    DOWN (0x00000000): IOCTL_SERIAL_CLR_RTS: Clear RTS

    IO Control: 20/06/2012 9:28:50 AM.18664 (+0.0000 seconds)
    UP (0x00000000): IOCTL_SERIAL_CLR_RTS: Clear RTS

    IO Control: 20/06/2012 9:28:50 AM.18664 (+0.0000 seconds)
    DOWN (0x00000000): IOCTL_SERIAL_CLR_DTR: Clear DTR

    IO Control: 20/06/2012 9:28:50 AM.18664 (+0.0000 seconds)
    UP (0x00000000): IOCTL_SERIAL_CLR_DTR: Clear DTR

    IO Control: 20/06/2012 9:28:50 AM.18664 (+0.0000 seconds)
    DOWN (0x00000000): IOCTL_SERIAL_SET_LINE_CONTROL: Set line control
    WordLength=8
    StopBits=1 stop bit
    Parity=Odd parity

    IO Control: 20/06/2012 9:28:50 AM.18664 (+0.0000 seconds)
    UP (0x00000000): IOCTL_SERIAL_SET_LINE_CONTROL: Set line control

    IO Control: 20/06/2012 9:28:50 AM.18664 (+0.0000 seconds)
    DOWN (0x00000000): IOCTL_SERIAL_SET_CHARS: Set special characters
    EofChar=0x0
    ErrorChar=0x0
    BreakChar=0x0
    EventChar=0x0
    XonChar=0x0
    XoffChar=0x0

    IO Control: 20/06/2012 9:28:50 AM.18664 (+0.0000 seconds)
    UP (0x00000000): IOCTL_SERIAL_SET_CHARS: Set special characters

    IO Control: 20/06/2012 9:28:50 AM.18664 (+0.0000 seconds)
    DOWN (0x00000000): IOCTL_SERIAL_SET_HANDFLOW: Set handshake information
    ControlHandShake=0
    FlowReplace=0
    XonLimit=0
    XoffLimit=0

    IO Control: 20/06/2012 9:28:50 AM.18664 (+0.0000 seconds)
    UP (0x00000000): IOCTL_SERIAL_SET_HANDFLOW: Set handshake information

    IO Control: 20/06/2012 9:28:50 AM.18664 (+0.0000 seconds)
    DOWN (0x00000000): IOCTL_SERIAL_PURGE: Purge requests
    Purge mask=TXABORT: Read requests, RXABORT: Receive buffer, TXCLEAR: Write requests, RXCLEAR: Write buffer

    IO Control: 20/06/2012 9:28:50 AM.18664 (+0.0000 seconds)
    UP (0x00000000): IOCTL_SERIAL_PURGE: Purge requests

    Request: 20/06/2012 9:28:50 AM.59264 (+0.4063 seconds)

    41 BF 74 FF 01 00 00 00 00 00 02 33 A?t?.......3

    Answer: 20/06/2012 9:28:51 AM.24964 (+0.2500 seconds)

    9F F4 AF 44 79 FA 01 00 00 03 FA Ÿ??Dy?....?

    Request: 20/06/2012 9:28:51 AM.65564 (+0.4063 seconds)

    8F 74 FF 01 00 00 44 79 FA 03 BA ?t?...Dy?.?

    Answer: 20/06/2012 9:28:51 AM.71764 (+0.0625 seconds)

    8E EE AF 44 79 FA 01 00 00 C1 BC B2 BE FB FE 08 Ž??Dy?...??????.
    C9
     

    Attached Files:

    RichardC, Jun 20, 2012
    #16
  17. RichardC

    RichardC

    Joined:
    Nov 1, 2004
    Messages:
    19
    Likes Received:
    0
    Somfy RTS RS485

    Another print screen from another port monitoring software that also has the ability to send a Somfy demo tool created string from this software which works from the laptop serial port.
     

    Attached Files:

    RichardC, Jun 20, 2012
    #17
  18. RichardC

    RichardC

    Joined:
    Nov 1, 2004
    Messages:
    19
    Likes Received:
    0
    Problem solved

    I was always trying new strings in between inverted comma. example
    '#$7F#$F2#$FA#$01#$00#$00#$44#$79#$FA#$FE#$FE#$06#$1F'
    instead of just
    #$7F#$F2#$FA#$01#$00#$00#$44#$79#$FA#$FE#$FE#$06#$1F
    I had copied this method from 2 other jobs where I needed the inverted comma.
    Very simple now. Thanks for all the help
    RichardC
     
    RichardC, Jun 20, 2012
    #18
  19. RichardC

    [email protected]

    Joined:
    Nov 29, 2012
    Messages:
    11
    Likes Received:
    0
    Location:
    Mexico
    RichardC could you tell me what type of convertor 232 to 485 did you used? And what configuration?
     
    [email protected], Dec 17, 2012
    #19
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.