Because I'm not sure about which pulse is 1 an dwhich is 0 I'm assuming following:
The packet consists of:
Groups
| Group number | sequence |
|---|---|
| 1 | 1000 |
| 2 | 0100 |
| 3 | 0010 |
| 4 | 0001 |
Buttons
| button number | sequence |
|---|---|
| 1 | 1000 |
| 2 | 0100 |
| 3 | 0010 |
| 4 | 0001 |
Function
| function | sequence |
|---|---|
| on | 0001 |
| off | 0000 |
for example turn on socket 1 of group 1 is:
1000 1000 0001