public void SendSomfyFrame(SomfyRtsFrame frame, int repetition = 6) { var cmd = $"SC;R={repetition};SR;P0=-2560;P1=2560;P3=-640;D=10101010101010113;SM;C=645;D={frame.GetFrame().ToHexString()};F=10AB85550A;"; Console.WriteLine($"SEND: {cmd}"); SendCommand(cmd); }
public SomfyRtsFrame CreateFrame(SomfyRtsButton button) { SomfyRtsFrame frame = new SomfyRtsFrame() { Address = Address, Command = button, EncryptionKey = EncryptionKey, RollingCode = RollingCode }; //Update Keys RollingCode += 1; EncryptionKey += 1; if (EncryptionKey > 0xAF) { EncryptionKey = 0xA0; } Save(); return(frame); }