Pollin - graznik/librsswitch GitHub Wiki
##Device details
Vendor ID (librsswitch) | Vendor | Order number | Remote control encoder |
---|---|---|---|
1 | Pollin | 2605 | PT2262 (HX2262) |
The Pollin sockets come with 10 pole DIP switches. The first five switches (1-5) define the socket group, the latter five switches (A-F) define the socket number within the group. The last switch (F) does not seem to have any functionality.
Call the API function socket_send() from within your program in order to either switch a socket on or off.
socket_send(uint dev, uint group, uint socket, uint data);
Since the program is written in C, counting always starts with 0.
Parameter dev: dev is always 1 for Pollin 2605 sockets.
The parameters group and socket are dependent on the DIP switch settings of your sockets. The group parameter is binary coded with DIP switch 1 as LSB and DIP switch 5 as MSB, so there are 2^5 = 32 possible groups. The socket parameter is NOT binary coded, there are only four sockets possible per group. See the following tables for more details:
1 | 2 | 3 | 4 | 5 | A | B | C | D | E | group | socket |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | x | 0 | 0 |
0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | x | 0 | 1 |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | x | 0 | 2 |
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | x | 0 | 3 |
1 | 2 | 3 | 4 | 5 | A | B | C | D | E | group | socket |
---|---|---|---|---|---|---|---|---|---|---|---|
1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | x | 1 | 0 |
1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | x | 1 | 1 |
1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | x | 1 | 2 |
1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | x | 1 | 3 |
1 | 2 | 3 | 4 | 5 | A | B | C | D | E | group | socket |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | x | 2 | 0 |
0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | x | 2 | 1 |
0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | x | 2 | 2 |
0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | x | 2 | 3 |
1 | 2 | 3 | 4 | 5 | A | B | C | D | E | group | socket |
---|---|---|---|---|---|---|---|---|---|---|---|
1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | x | 3 | 0 |
1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | x | 3 | 1 |
1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | x | 3 | 2 |
1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | x | 3 | 3 |
1 | 2 | 3 | 4 | 5 | A | B | C | D | E | group | socket |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | x | 4 | 0 |
0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | x | 4 | 1 |
0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | x | 4 | 2 |
0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | x | 4 | 3 |
1 | 2 | 3 | 4 | 5 | A | B | C | D | E | group | socket |
---|---|---|---|---|---|---|---|---|---|---|---|
1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | x | 5 | 0 |
1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | x | 5 | 1 |
1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | x | 6 | 2 |
1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | x | 6 | 3 |
1 | 2 | 3 | 4 | 5 | A | B | C | D | E | group | socket |
---|---|---|---|---|---|---|---|---|---|---|---|
1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | x | 31 | 0 |
1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | x | 31 | 1 |
1 | 1 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | x | 31 | 2 |
1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | x | 31 | 3 |
Parameter data: Use 0 for off and 1 for on.
###Examples
-
Use the following API call to switch on the second switch of socket group A):
socket_send(0, 0, 1, 1);
-
Use the following API call to switch off the third switch of socket group B:
socket_send(0, 1, 2, 0);