I've opted to configure OSCAM to read the CCCAM lines and configured it also as a newcamd server.
TVheadend connects to oscam in newcamd format.
Working for some weeks without an issue:
OSCAM:
config > newcamd
- port: 9201@1111:000000 (in the form: port@caid:000000 - the port to answer request, followed by the caid to answer in this port)
- key: 0101010101010101010101010101
- keep alive: on
- mgclient: on
More info in oscam docs.
Don't forget to define a reader per cccam line you want to connect to.
TVHEADEND:
configuration > CAs > Add > Type code word client (newcamd);
- client name: (whatever you want);
- username: (the user defined in oscam to access this newcamd connection - remember to have it configured in the same group as the newcamd server);
- password:
- hostname: localhost (as oscam is running in the same machine as tvheadend)
- port: 9201 (the port defined in oscam to answer requests for newcamd
- DES key: 01:01:01:01:01:01:01:01:01:01:01:01:01:01 (must be the same key defined in oscam for this newcamd connection)
- Update card (EMM): off
- Updates from one mux (EMM): off
- keepalive interval: 30
This way tvheadend connects to oscam in newcamd. Oscam connects to the readers (cccam lines) you want.
You can define and redefine oscam readers, without having to touch newcamd server or tvheadend configuration.