@cristianchiribes, at some post above glmnet was saying that the numbers in raw format represent time of the transmission (when positive) and the delay (no activity) when negative. Assuming this, the sequence of codes in raw format cannot start with negative number as the receiver cannot know when “pause” (no activity) starts…
This can indicate that your sequence is recorded “negative” and in order to fix it I would try to add inverted: false
(opposite to what you have) to your pin definition for receiver. Then I would see how the raw codes looks and if the are starting with positive number. If so, then would try this code.