Okay, let us get started, bottom up.
2. If you repeat the pulsetrain often eneough a lot of folks here have the opinion "it does not matter".
2.1 It does not matter for pilight during receive, if the pulsetrain is transmitted more than twice, this is the case so receiving is not an issue
2.2 It may matter in some cases, in particular if the receiver is expecting one or more pulses as a wakeup sequence, before starting to listen to incoming RF data.
3. Consequence:
3.1. The raw pulses before you receive the 1st pulsetrain may be important.
3.2. If there is a wake-up pulse pattern present:
3.2.1 You will easily pick it up, and
3.2.2 It may be the reason why you have difficulties that your receiver responds only randomly.
3.3 If there is no wake-up pulse pattern:
3.3.1 The reason for bad reaction may be insufficient strength of the transmitted signal (pretty rare, transmitting of RF is not a common problem).
3.3.2 I do not think that noise is an issue on the transmitter side, as the quality of the received signal is pretty good.
3.3.3 There is a bug in the raw data you use. In your pilight-debug output, i think that the 6th pulse should not be 350 but 525 and the 19th pulse should not be 175 but 350.
4. To find out try other pulsetrains, for example the ones reported by pilight-raw:
4.1
5. In your C-code:
5.1. The function call createMessage(0,0,0) is not required.
5.2. add printf statements into your code and check if it is called and what the parameters / values are.
5.3. You do need to understand what the indicidual pulses of the raw data represent and how to convert them into binary values.
5.3.1. If you need it just for your own purpose, you can compare if the received string is equal to the raw data you expect to received and set the json objects accordingly ....
Quote:Talking to the bellLet us have a look at the raw data you posted (i am sure you edited that raw output but the two last lines reveal the important information:
pilight-debug shows:
Raw code: 1050 525 1050 525 1050 350 1050 525 1050 1225 350 525 1050 1225 350 1225 350 1225 175 1225 350 525 1050 525 1050 1225 350 525 1050 525 1050 525 1050 525 1050 5950
Sending this RAW-code makes the doorbell ring - sometimes. Why only sometimes? Sometimes it works a few times in a row, then sometimes i have to send the code 10 times before the bell rings. I do not understand the logic behind that behavior either.....
Quote:433gpio: 978 489 984 472 988 477 990 499 970 1206 268 489 979 1200 269 1225 242 1208 261 1217 252 477 989 479 987 1217 258 480 982 491 978 491 974 499 968 5971 -#: 361. The protocol does not have a footer, but it has a header, and we can assume that the value is 5950
433gpio: 982 480 986 488 979 501 967 488 978 1208 262 480 988 1218 257 1217 248 1236 235 1218 250 479 988 489 979 1252 224 479 979 490 981 487 977 488 978 294971 -#: 36
2. If you repeat the pulsetrain often eneough a lot of folks here have the opinion "it does not matter".
2.1 It does not matter for pilight during receive, if the pulsetrain is transmitted more than twice, this is the case so receiving is not an issue
2.2 It may matter in some cases, in particular if the receiver is expecting one or more pulses as a wakeup sequence, before starting to listen to incoming RF data.
3. Consequence:
3.1. The raw pulses before you receive the 1st pulsetrain may be important.
3.2. If there is a wake-up pulse pattern present:
3.2.1 You will easily pick it up, and
3.2.2 It may be the reason why you have difficulties that your receiver responds only randomly.
3.3 If there is no wake-up pulse pattern:
3.3.1 The reason for bad reaction may be insufficient strength of the transmitted signal (pretty rare, transmitting of RF is not a common problem).
3.3.2 I do not think that noise is an issue on the transmitter side, as the quality of the received signal is pretty good.
3.3.3 There is a bug in the raw data you use. In your pilight-debug output, i think that the 6th pulse should not be 350 but 525 and the 19th pulse should not be 175 but 350.
4. To find out try other pulsetrains, for example the ones reported by pilight-raw:
4.1
Quote:978 489 984 472 988 477 990 499 970 1206 268 489 979 1200 269 1225 242 1208 261 1217 252 477 989 479 987 1217 258 480 982 491 978 491 974 499 968 59714.2 or with the header as 1st pulse:
Quote:5971 978 489 984 472 988 477 990 499 970 1206 268 489 979 1200 269 1225 242 1208 261 1217 252 477 989 479 987 1217 258 480 982 491 978 491 974 499 968
5. In your C-code:
5.1. The function call createMessage(0,0,0) is not required.
5.2. add printf statements into your code and check if it is called and what the parameters / values are.
5.3. You do need to understand what the indicidual pulses of the raw data represent and how to convert them into binary values.
5.3.1. If you need it just for your own purpose, you can compare if the received string is equal to the raw data you expect to received and set the json objects accordingly ....