I am attempting a new device decoder for the Salus RT505TX room thermostat but I need some advice and guidance.
At the moment I have the following limits set:
r_device salus = {
.name = "Salus RT505TX",
.modulation = FSK_PULSE_PCM,
.short_limit = 58,
.long_limit = 58,
.reset_limit = 9937, //no idea what this should be?
.json_callback = &salus_callback,
.disabled = 0,
.demod_arg = 1,
.fields = output_fields
};
When I look at the signal analysis I can see that the modulation seems to change part way through. 37 Pulses with a width of 14511 (short distance 58 ms) then 22 pulses with a width of 6985 with a short distance of 28 ms).
After 0.262144s the signal is then repeated another 5 times.
Are there any other devices that exhibit this behaviour, I can then hopefully look at the code and learn from?
What should the reset limit be set at?
Detected FSK package @ @0.000000s
Analyzing pulses...
Total count: 37, width: 14511 (58.0 ms)
Pulse width distribution:
[ 0] count: 1, width: 12 [12;12] ( 48 us)
[ 1] count: 25, width: 104 [104;105] ( 416 us)
[ 2] count: 6, width: 208 [208;209] ( 832 us)
[ 3] count: 2, width: 313 [313;313] (1252 us)
[ 4] count: 2, width: 418 [418;418] (1672 us)
[ 5] count: 1, width: 147 [147;147] ( 588 us)
Gap width distribution:
[ 0] count: 3, width: 295 [257;314] (1180 us)
[ 1] count: 21, width: 104 [104;105] ( 416 us)
[ 2] count: 6, width: 209 [209;209] ( 836 us)
[ 3] count: 1, width: 1462 [1462;1462] (5848 us)
[ 4] count: 4, width: 600 [522;627] (2400 us)
[ 5] count: 1, width: 835 [835;835] (3340 us)
Pulse period distribution:
[ 0] count: 5, width: 304 [269;314] (1216 us)
[ 1] count: 18, width: 208 [208;209] ( 832 us)
[ 2] count: 6, width: 417 [417;418] (1668 us)
[ 3] count: 2, width: 1409 [1253;1566] (5636 us)
[ 4] count: 2, width: 574 [522;626] (2296 us)
[ 5] count: 2, width: 783 [731;835] (3132 us)
[ 6] count: 1, width: 1044 [1044;1044] (4176 us)
Level estimates [high, low]: 15483, 224
Frequency offsets [F1, F2]: 17418, -15651 (+66.4 kHz, -59.7 kHz)
Guessing modulation: No clue...
Total count: 22, width: 6985 (27.9 ms)
Pulse width distribution:
[ 0] count: 1, width: 0 [ 0; 0] ( 0 us)
[ 1] count: 2, width: 331 [314;348] (1324 us)
[ 2] count: 17, width: 104 [104;105] ( 416 us)
[ 3] count: 1, width: 209 [209;209] ( 836 us)
[ 4] count: 1, width: 154 [154;154] ( 616 us)
Gap width distribution:
[ 0] count: 1, width: 10 [10;10] ( 40 us)
[ 1] count: 15, width: 104 [104;105] ( 416 us)
[ 2] count: 3, width: 313 [313;313] (1252 us)
[ 3] count: 1, width: 522 [522;522] (2088 us)
[ 4] count: 1, width: 1148 [1148;1148] (4592 us)
Pulse period distribution:
[ 0] count: 1, width: 10 [10;10] ( 40 us)
[ 1] count: 5, width: 424 [417;453] (1696 us)
[ 2] count: 12, width: 208 [208;209] ( 832 us)
[ 3] count: 1, width: 313 [313;313] (1252 us)
[ 4] count: 1, width: 626 [626;626] (2504 us)
[ 5] count: 1, width: 1253 [1253;1253] (5012 us)
Level estimates [high, low]: 15522, 266
Frequency offsets [F1, F2]: 17593, -13617 (+67.1 kHz, -51.9 kHz)
Guessing modulation: No clue...
Detected FSK package @ @0.262144s
Analyzing pulses...
Total count: 37, width: 14503 (58.0 ms)
Pulse width distribution:
[ 0] count: 1, width: 0 [ 0; 0] ( 0 us)
[ 1] count: 3, width: 323 [313;342] (1292 us)
[ 2] count: 24, width: 104 [104;105] ( 416 us)
[ 3] count: 6, width: 209 [209;209] ( 836 us)
[ 4] count: 2, width: 417 [417;418] (1668 us)
[ 5] count: 1, width: 154 [154;154] ( 616 us)
Gap width distribution:
[ 0] count: 1, width: 16 [16;16] ( 64 us)
[ 1] count: 21, width: 104 [104;106] ( 416 us)
[ 2] count: 2, width: 313 [313;314] (1252 us)
[ 3] count: 6, width: 209 [209;209] ( 836 us)
[ 4] count: 1, width: 1462 [1462;1462] (5848 us)
[ 5] count: 4, width: 600 [522;627] (2400 us)
[ 6] count: 1, width: 836 [836;836] (3344 us)
Pulse period distribution:
[ 0] count: 1, width: 16 [16;16] ( 64 us)
[ 1] count: 8, width: 434 [417;522] (1736 us)
[ 2] count: 17, width: 208 [208;209] ( 832 us)
[ 3] count: 4, width: 313 [313;313] (1252 us)
[ 4] count: 2, width: 1409 [1253;1566] (5636 us)
[ 5] count: 3, width: 730 [626;835] (2920 us)
[ 6] count: 1, width: 1044 [1044;1044] (4176 us)
Level estimates [high, low]: 15503, 330
Frequency offsets [F1, F2]: 15144, -11583 (+57.8 kHz, -44.2 kHz)
Guessing modulation: No clue...
Detected FSK package @ @0.262144s
@0.262144s
Analyzing pulses...
Total count: 22, width: 6986 (27.9 ms)
Pulse width distribution:
[ 0] count: 1, width: 0 [ 0; 0] ( 0 us)
[ 1] count: 2, width: 327 [313;341] (1308 us)
[ 2] count: 17, width: 104 [104;105] ( 416 us)
[ 3] count: 1, width: 208 [208;208] ( 832 us)
[ 4] count: 1, width: 154 [154;154] ( 616 us)
Gap width distribution:
[ 0] count: 1, width: 17 [17;17] ( 68 us)
[ 1] count: 15, width: 104 [104;105] ( 416 us)
[ 2] count: 3, width: 313 [313;314] (1252 us)
[ 3] count: 1, width: 522 [522;522] (2088 us)
[ 4] count: 1, width: 1148 [1148;1148] (4592 us)
Pulse period distribution:
[ 0] count: 1, width: 17 [17;17] ( 68 us)
[ 1] count: 5, width: 423 [417;446] (1692 us)
[ 2] count: 12, width: 208 [208;209] ( 832 us)
[ 3] count: 1, width: 313 [313;313] (1252 us)
[ 4] count: 1, width: 627 [627;627] (2508 us)
[ 5] count: 1, width: 1252 [1252;1252] (5008 us)
Level estimates [high, low]: 15447, 314
Frequency offsets [F1, F2]: 15352, -12955 (+58.6 kHz, -49.4 kHz)
Guessing modulation: No clue...
At the moment the output from the decoder looks like this:
Thermostat On Signal
[00] {478} 7f ff ff 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 00 00 7f 01 ff f8 07 ff ff e0 3f 80 fe 00 00 00 00 1f c0 00 00 00 00 00 00 00 00 00 7f 00 00 03 f8 00 00 1f fc
[00] {478} 7f ff ff 00 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 00 00 7f 01 ff f8 07 ff ff e0 3f 80 fe 00 00 00 00 1f c0 00 00 00 00 00 00 00 00 00 7f 00 00 03 f8 00 00 1f f8
[00] {478} 7f ff ff 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 00 00 7f 01 ff f8 07 ff ff e0 3f 80 fe 00 00 00 00 1f c0 00 00 00 00 00 00 00 00 00 7f 00 00 03 f8 00 00 1f fc
[00] {478} 7f ff ff 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 00 00 7f 01 ff f8 07 ff ff e0 3f 80 fe 00 00 00 00 1f c0 00 00 00 00 00 00 00 00 00 7f 00 00 03 f8 00 00 1f f8
[00] {478} 7f ff ff 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 00 00 7f 01 ff f8 07 ff ff e0 3f 80 fe 00 00 00 00 1f c0 00 00 00 00 00 00 00 00 00 7f 00 00 03 f8 00 00 1f f8
[00] {478} 7f ff ff 00 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 00 00 7f 01 ff f8 07 ff ff e0 3f 80 fe 00 00 00 00 1f c0 00 00 00 00 00 00 00 00 00 7f 00 00 03 f8 00 00 1f f0
[00] {478} 7f ff ff 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 00 00 7f 01 ff f8 07 ff ff e0 3f 80 fe 00 00 00 00 1f c0 00 00 00 00 00 00 00 00 00 7f 00 00 03 f8 00 00 1f f0
[00] {478} 7f ff ff 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 00 00 7f 01 ff f8 07 ff ff e0 3f 80 fe 00 00 00 00 1f c0 00 00 00 00 00 00 00 00 00 7f 00 00 03 f8 00 00 1f f8
[00] {478} bf ff ff 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 00 00 7f 01 ff f8 07 ff ff e0 3f 80 fe 00 00 00 00 1f c0 00 00 00 00 00 00 00 00 00 7f 00 00 03 f8 00 00 1f fc
[00] {478} 7f ff ff 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 00 00 7f 01 ff f8 07 ff ff e0 3f 80 fe 00 00 00 00 1f c0 00 00 00 00 00 00 00 00 00 7f 00 00 03 f8 00 00 1f f8
Thermostat Off Signal
[00] {478} 7f ff ff 00 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 00 00 7f 01 ff f8 07 ff ff e0 3f 80 fe 00 00 00 00 1f c0 00 00 00 00 00 00 00 00 3f 80 00 00 03 f8 00 0f e0 00
[00] {478} 7f ff ff 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 00 00 7f 01 ff f8 07 ff ff e0 3f 80 fe 00 00 00 00 1f c0 00 00 00 00 00 00 00 00 3f 80 00 00 03 f8 00 0f e0 00
[00] {478} 7f ff ff 00 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 00 00 7f 01 ff f8 07 ff ff e0 3f 80 fe 00 00 00 00 1f c0 00 00 00 00 00 00 00 00 3f 80 00 00 03 f8 00 0f e0 00
[00] {478} 7f ff ff 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 00 00 7f 01 ff f8 07 ff ff e0 3f 80 fe 00 00 00 00 1f c0 00 00 00 00 00 00 00 00 3f 80 00 00 03 f8 00 0f e0 00
[00] {478} 7f ff ff 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 00 00 7f 01 ff f8 07 ff ff e0 3f 80 fe 00 00 00 00 1f c0 00 00 00 00 00 00 00 00 3f 80 00 00 03 f8 00 0f e0 00
[00] {478} 7f ff ff 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 00 00 7f 01 ff f8 07 ff ff e0 3f 80 fe 00 00 00 00 1f c0 00 00 00 00 00 00 00 00 3f 80 00 00 03 f8 00 0f e0 00
[00] {478} 7f ff ff 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 00 00 7f 01 ff f8 07 ff ff e0 3f 80 fe 00 00 00 00 1f c0 00 00 00 00 00 00 00 00 3f 80 00 00 03 f8 00 0f e0 00
[00] {478} 7f ff ff 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 00 00 7f 01 ff f8 07 ff ff e0 3f 80 fe 00 00 00 00 1f c0 00 00 00 00 00 00 00 00 3f 80 00 00 03 f8 00 0f e0 00
[00] {478} 7f ff ff 00 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 00 00 7f 01 ff f8 07 ff ff e0 3f 80 fe 00 00 00 00 1f c0 00 00 00 00 00 00 00 00 3f 80 00 00 03 f8 00 0f e0 00
[00] {478} 7f ff ff 00 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 3f 80 fe 03 f8 0f e0 00 00 7f 01 ff f8 07 ff ff e0 3f 80 fe 00 00 00 00 1f c0 00 00 00 00 00 00 00 00 3f 80 00 00 03 f8 00 0f e0 00
Bytes 51 & 52
0000 0000 0111 1111=007f= on
0011 1111 1000 0000=3f80= off