Somfy serial logic

Discussion in 'Pascal Logic Code Examples' started by grssll, Jan 2, 2017.

  1. grssll

    grssll

    Joined:
    Jun 13, 2014
    Messages:
    64
    Likes Received:
    0
    Location:
    Sydney
    In the past couple days was trying to get PACA to send serial over to Somfy sonesse rs485 motors. Read a lot on the forum but still cant get it right.
    Hex string works fine from Eltima seral port software.
    Can someone have a look at my code and see if I get it right.
    My serial232 to 485 converter flashes but nothing happening.

    fc 70 fd 01 00 00 ef de f9 fe 00 ff 00 07 2d up

    fd 73 fd 01 00 00 ef de f9 00 05 34 04 stop

    fc 70 fd 01 00 00 ef de f9 ff 00 ff 00 07 2e DOWN

    PACA CODE
    Initialisation
    OpenSerial(1, 1, 4800, 8, 1, 0, 1);

    up
    once (GetLightingState("17_up") = ON) then
    begin
    WriteSerial(1, '#$fc#$70#$fd#$01#$00#$00#$ef#$de#$f9#$fe#$00#$ff#$00#$07#$2d');
    end;

    stop
    once (GetLightingState("18_stop") = OFF) then
    begin
    WriteSerial'#$fd#$73#$fd#$01#$00#$00#$ef#$de#$f9#$00#$05#$34#$04');
    end;

    down
    once (GetLightingState("19_down") = OFF) then
    begin
    WriteSerial(1, '#$fc#$70#$fd#$01#$00#$00#$ef#$de#$f9#$ff#$00#$ff#$00#$07#$2e');
    Any help will be much appreciated.
    George
     
    grssll, Jan 2, 2017
    #1
  2. grssll

    Ashley

    Joined:
    Dec 1, 2005
    Messages:
    1,524
    Likes Received:
    173
    Location:
    Adelaide, Australia
    Get rid of the quotes around the strings. You are sending out ascii characters, not the hex values.
     
    Ashley, Jan 2, 2017
    #2
  3. grssll

    grssll

    Joined:
    Jun 13, 2014
    Messages:
    64
    Likes Received:
    0
    Location:
    Sydney
    Thanks Ashley.
    You are a genius.
    Much appreciated all works now.
    Cheers
    George
     
    grssll, Jan 2, 2017
    #3
  4. grssll

    grssll

    Joined:
    Jun 13, 2014
    Messages:
    64
    Likes Received:
    0
    Location:
    Sydney
    Working logic code for Somfy rs485.
    All you need to do is change motor address which in my case 062110 or
    (EF DE F9)
    Cheers
    Screenshot (5).jpg
     
    grssll, Jan 3, 2017
    #4
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.