Skip to main content

You are here

Setting timer for FS20 ST2 (ST3) power switch

1 post / 0 new
rufik
Setting timer for FS20 ST2 (ST3) power switch

Hi, I use fs20demo code to turn on/off ST2 power switch successfully, but I need to use timer also. Protocol explanations at http://fhz4linux.info/tiki-index.php?page=FS20%20Protocol says than I need to send additional "extension" byte with time to set. So I did, but it does not work :(

I've extended fs20cmd() function a little bit to send extension but with no luck. Changes are: - setting 5th bit of instruction to indicate that extension byte is sent, - extension byte added, - checksum calculated using ext byte also.

void pw_set_timer2(uint16_t house, uint8_t addr, uint8_t cmd, uint8_t ext) { rf12_initialize(0, RF12_868MHZ); uint8_t sum = 6 + (house >> 8) + house + addr + cmd + ext; // include ext byte for (uint8_t i = 0; i < 3; ++i) { sendFS20Bits(1, 13); sendFS20Bits(house >> 8, 8); sendFS20Bits(house, 8); sendFS20Bits(addr, 8); sendFS20Bits(cmd | 32, 8); // set 5th bit to indicate extension sendFS20Bits(ext, 8); // send extension byte sendFS20Bits(sum, 8); sendFS20Bits(0, 1); delay(10); } }

It does not work at all. Anyone knows why? Anyone uses timer?

Premium Drupal Themes by Adaptivethemes