For Abertis in TVHeadend, to use the new TVE UHD mux as an example, the kind of thing you have to do is -
1. Create directory /home/hts/Abertis and put the above file abertis.py inside.
2. Create another file inside /home/hts/Abertis called tdt.sh - it should have the following contents:
Code:#!/bin/bash curl -s http://127.0.0.1:9981/stream/service/$1 | python3 /home/hts/Abertis/abertis.py $2
3. Make sure the files/folder have the right permissions for TVHeadend to execute them -
Code:sudo chown -R hts:hts /home/hts/Abertis sudo chmod +x /home/hts/Abertis/tdt.sh
4. Now in TVHeadend, you need to scan the Hispasat muxes if you've not already done so. Then go into Configuration > DVB Inputs > Services
5. Change the 'Hide' dropdown to 'None'
6. Find the 10922V service with SID 1802, and copy the UUID from the play link ( e.g. http://127.0.0.1:9981/play/ticket/stream/service/17efd118f1f63b813ea011c1610ff1d0 - the bit in bold is the UUID)
7. Use tvh-json.py to modify the service with the correct details: https://github.com/tvheadend/tvheadend/blob/master/lib/api/python/tvh-json.py - you'll need to modify tvh-json.py to contain your user details to access the TVH REST API (line #27 and #28 - create a user in TVHeadend first and paste the credentials you've created in the py file on these lines.)
Code:./tvh-json.py export 17efd118f1f63b813ea011c1610ff1d0 > abertis802.json
File abertis802.json will contain something like the following -
Code:{ "pmt": 802, "force_caid": 0, "prefcapid": 0, "stream": [], "lcn": 0, "dvb_servicetype": 0, "dvb_ignore_eit": false, "verified": 0, "uuid": "17efd118f1f63b813ea011c1610ff1d0", "pcr": 0, "priority": 0, "sid": 1802, "pts_shift": 0, "auto": 0, "srcid": 0, "lcn_minor": 0, "lcn2": 0, "prefcapid_lock": 0, "created": 1668812335, "enabled": true, "s_type_user": -1, "last_seen": 1669169044 }
We need to edit that file to force PID 802 to be recognised and decrypted in OSCam.
- We change the service ID to 802 (I use same as Abertis PID for SID, but this can be any non-existing value in the mux. If you don't change it, the changes get wiped by TVH)
- We change the PMT PID to 8000 (fake PMT PID, again to stop TVH from reading the 'real' PMT and wiping the changes)
- We add details into "stream":[] array for the 802 payload PID and CAID so that OSCam decrypts it. Plus we change PCR value also to 802.
- We add a svcname value just so we can see a name in TVHeadend for the service.
- We set "verified" to 1, so TVHeadend doesn't hide the service from us (in older versions this value doesn't exist)
The final file with the edits looks like this -
Code:{ "pmt": 8000, "force_caid": 0, "prefcapid": 0, "stream": [ { "type": "H264", "pid": 802, "position": 0 }, { "type": "CA", "caidlist": [ { "caid": 9728 } ], "pid": 8191, "position": 262144 } ], "lcn": 0, "dvb_servicetype": 0, "dvb_ignore_eit": false, "verified": 1, "uuid": "17efd118f1f63b813ea011c1610ff1d0", "pcr": 802, "priority": 0, "sid": 802, "pts_shift": 0, "auto": 1, "srcid": 0, "lcn_minor": 0, "lcn2": 0, "prefcapid_lock": 0, "created": 1668808494, "enabled": true, "s_type_user": -1, "svcname": "Abertis PID 802", "last_seen": 1668808494 }
Note: You'll need to do this rather than just copying my examples because your UUIDs will be different to mine, and everything needs to match in your install for it to work.
With the json file edited with the changes, re-import it into TVHeadend using tvh-json.py :
Code:./tvh-json.py import abertis802.json
Now you should have a service under 10922V called "Abertis PID 802", this has the same UUID as we copied earlier as we've just edited it.
You'll need the BISS key in OSCam constant.cw to match the fact that we're using the 'fake' service ID 802 and fake PMT 8000, so that will look like this :
Code:2600:000000:0322:1F40:1FFF:0322:XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX ;Abertis PID 802
8. Next, in TVHeadend we need to add a new IPTV network. Configuration > DVB Inputs > Networks > Add+
Type: IPTV Network
Name: Abertis
Enabled: Ticked
Maximum # input streams: 2
9. We now add a mux to the created IPTV network. Configuration > DVB Inputs > Muxes > Add+
Network: Abertis
URL: pipe:///home/hts/Abertis/tdt.sh 17efd118f1f63b813ea011c1610ff1d0 802
Using your UUID here, and PID 802.
Mux Name: Abertis PID 802 (or whatever you like!)
Click to add/save.
10. This new mux will be added, we need the link again from the play button for it in Configuration > DVB Inputs > Muxes. e.g. http://127.0.0.1:9981/play/ticket/stream/mux/dbedb6bee8b066373859df11424b4508?title=UHD%20%2F%20TDT
Copy the address and remove the bits in bold and add ?pids=4096 onto the end (not vital, but helps efficiency).
11. In /etc/astra/astra.conf you need to add this mux link as your source for the T2-MI conversion -
Code:tdtuhd1 = make_t2mi_decap({ name = "TDT UHD T2", input = "http://127.0.0.1:9981/stream/mux/dbedb6bee8b066373859df11424b4508?pids=4096", plp = 0, pnr = 0, pid = 4096, }) make_channel({ name = "uhd1", input = { "t2mi://tdtuhd1", }, output = { "http://0.0.0.0:17981/tdt/uhd1", }, })
Save astra.conf, and restart astra-sm
Code:sudo systemctl restart astra-sm
12. Now we add another IPTV mux in TVHeadend using the output of Astra-SM. Configuration > DVB Inputs > Muxes > Add+
Network: Abertis
URL: http://127.0.0.1:17981/tdt/uhd1
Click Save.
Provided that everything worked, playing this new mux should play the TVE UHD mux, it may take a couple of seconds to start because of the decryption steps.
{
"sid": 3270,
"lcn": 0,
"lcn_minor": 0,
"lcn2": 0,
"srcid": 0,
"dvb_servicetype": 0,
"dvb_ignore_eit": false,
"prefcapid": 0,
"prefcapid_lock": 0,
"force_caid": 0,
"pts_shift": 0,
"created": 1668241970,
"last_seen": 1674573740,
"enabled": false,
"auto": 2,
"priority": 0,
"s_type_user": -1,
"verified": 0,
"pcr": 8191,
"pmt": 7270,
"stream": [
{
"pid": 8191,
"type": "CA",
"position": 262144,
"caidlist": [
{
"caid": 9728
}
]
}
],
"uuid": "6c005115709a96b034ecf545437b9a5b"
}
{
"sid": 2270,
"lcn": 0,
"lcn_minor": 0,
"lcn2": 0,
"srcid": 0,
"dvb_servicetype": 0,
"svcname": "Abertis PID 2270",
"dvb_ignore_eit": false,
"prefcapid": 0,
"prefcapid_lock": 0,
"force_caid": 0,
"pts_shift": 0,
"created": 1668241970,
"last_seen": 1674573740,
"enabled": false,
"auto": 1,
"priority": 0,
"s_type_user": -1,
"verified": 1,
"pcr": 8191,
"pmt": 8000,
"stream": [
{
"type": "H264",
"pid": 2270,
"position": 0
},
{
"pid": 8191,
"type": "CA",
"position": 262144,
"caidlist": [
{
"caid": 9728
}
]
}
],
"uuid": "6c005115709a96b034ecf545437b9a5b"
}
Traceback (most recent call last):
File "./tvh-json.py", line 187, in <module>
main(sys.argv)
File "./tvh-json.py", line 182, in main
globals()[cmd](*argv[2:])
File "./tvh-json.py", line 155, in do_import
jdata = json.loads(jdata.decode('utf-8'))
AttributeError: 'str' object has no attribute 'decode'
Hello:
I'm using CoreELEC 19.5. I am following the steps.
Steps 1 to 6, OK (I think so).
Well... I have a problem with step 7:
.json file before editing:
Code:{ "sid": 3270, "lcn": 0, "lcn_minor": 0, "lcn2": 0, "srcid": 0, "dvb_servicetype": 0, "dvb_ignore_eit": false, "prefcapid": 0, "prefcapid_lock": 0, "force_caid": 0, "pts_shift": 0, "created": 1668241970, "last_seen": 1674573740, "enabled": false, "auto": 2, "priority": 0, "s_type_user": -1, "verified": 0, "pcr": 8191, "pmt": 7270, "stream": [ { "pid": 8191, "type": "CA", "position": 262144, "caidlist": [ { "caid": 9728 } ] } ], "uuid": "6c005115709a96b034ecf545437b9a5b" }
After editing:
Code:{ "sid": 2270, "lcn": 0, "lcn_minor": 0, "lcn2": 0, "srcid": 0, "dvb_servicetype": 0, "svcname": "Abertis PID 2270", "dvb_ignore_eit": false, "prefcapid": 0, "prefcapid_lock": 0, "force_caid": 0, "pts_shift": 0, "created": 1668241970, "last_seen": 1674573740, "enabled": false, "auto": 1, "priority": 0, "s_type_user": -1, "verified": 1, "pcr": 8191, "pmt": 8000, "stream": [ { "type": "H264", "pid": 2270, "position": 0 }, { "pid": 8191, "type": "CA", "position": 262144, "caidlist": [ { "caid": 9728 } ] } ], "uuid": "6c005115709a96b034ecf545437b9a5b" }
When I try to do:
./tvh-json.py import abertis2270.json
Code:Traceback (most recent call last): File "./tvh-json.py", line 187, in <module> main(sys.argv) File "./tvh-json.py", line 182, in main globals()[cmd](*argv[2:]) File "./tvh-json.py", line 155, in do_import jdata = json.loads(jdata.decode('utf-8')) AttributeError: 'str' object has no attribute 'decode'
Any idea about the problem?
Kind regards
OK; this is solved. I removed all ".decode('utf-8')" from tvh-json.py and it works.
Now all seems working well... except BISS.
I'm using oscam-emu with Softcam.key... and it does NOT works...
#!/bin/bash
curl -s http://192.168.1.40:9981/stream/service/$1 | python3 /storage/.kodi/addons/service.tvheadend43/bin/abertis.py $2
import sys
pid = int(sys.argv[1])
packet = sys.stdin.buffer.read(188)
while packet !="":
tspid = ((packet[1] & 0x1f) << 8) | packet[2]
if tspid == pid :
afc = packet[3] & 0x30
if afc == 0x10 :
sys.stdout.flush()
sys.stdout.buffer.write(packet[4:])
elif afc == 0x30 :
sys.stdout.flush()
sys.stdout.buffer.write(packet[packet[4]+5:])
packet = sys.stdin.buffer.read(188)
{
"sid": 3270,
"lcn": 0,
"lcn_minor": 0,
"lcn2": 0,
"srcid": 0,
"dvb_servicetype": 0,
"dvb_ignore_eit": false,
"prefcapid": 0,
"prefcapid_lock": 0,
"force_caid": 0,
"pts_shift": 0,
"created": 1674634669,
"last_seen": 1674634669,
"enabled": false,
"auto": 2,
"priority": 0,
"s_type_user": -1,
"verified": 0,
"pcr": 8191,
"pmt": 7270,
"stream": [
{
"pid": 8191,
"type": "CA",
"position": 262144,
"caidlist": [
{
"caid": 9728
}
]
}
],
"uuid": "b27fae9bda243d6ca50092a825477117"
}
{
"pmt": 8000,
"force_caid": 0,
"prefcapid": 0,
"stream": [
{
"type": "H264",
"pid": 2270,
"position": 0
},
{
"type": "CA",
"caidlist": [
{
"caid": 9728
}
],
"pid": 8191,
"position": 262144
}
],
"lcn": 0,
"dvb_servicetype": 0,
"dvb_ignore_eit": false,
"verified": 1,
"uuid": "b27fae9bda243d6ca50092a825477117",
"pcr": 2270,
"priority": 0,
"sid": 2270,
"pts_shift": 0,
"auto": 1,
"srcid": 0,
"lcn_minor": 0,
"lcn2": 0,
"prefcapid_lock": 0,
"created": 1674634669,
"enabled": true,
"s_type_user": -1,
"svcname": "Abertis PID 2270",
"last_seen": 1674634669
}
import sys
pid = int(sys.argv[1])
packet = sys.stdin.buffer.read(188)
while packet !="":
tspid = ((packet[1] & 0x1f) << 8) | packet[2]
if tspid == pid :
afc = packet[3] & 0x30
if afc == 0x10 :
sys.stdout.flush()
sys.stdout.buffer.write(packet[4:])
elif afc == 0x30 :
sys.stdout.flush()
sys.stdout.buffer.write(packet[packet[4]+5:])
packet = sys.stdin.buffer.read(188)
#!/bin/sh
curl -s http://user:[email protected]:9981/stream/service/$1 | python3 /home/hts/Abertis/abertis.py $2
chmod +x /storage/.kodi/addons/service.tvheadend43/bin/tdt.sh
chmod +x /storage/.kodi/addons/service.tvheadend43/bin/abertis.py
http://user:[email protected]:9981/play/ticket/stream/service/b27fae9bda243d6ca50092a825477117
cd /storage/.kodi/addons/service.tvheadend43/bin/
chmod +x tvh-json.py
./tvh-json.py export b27fae9bda243d6ca50092a825477117 > abertis2270.json
{
"sid": 3270,
"lcn": 0,
"lcn_minor": 0,
"lcn2": 0,
"srcid": 0,
"dvb_servicetype": 0,
"dvb_ignore_eit": false,
"prefcapid": 0,
"prefcapid_lock": 0,
"force_caid": 0,
"pts_shift": 0,
"created": 1674634669,
"last_seen": 1674634669,
"enabled": false,
"auto": 2,
"priority": 0,
"s_type_user": -1,
"verified": 0,
"pcr": 8191,
"pmt": 7270,
"stream": [
{
"pid": 8191,
"type": "CA",
"position": 262144,
"caidlist": [
{
"caid": 9728
}
]
}
],
"uuid": "b27fae9bda243d6ca50092a825477117"
}
{
"pmt": 8000,
"force_caid": 0,
"prefcapid": 0,
"stream": [
{
"type": "H264",
"pid": 2270,
"position": 0
},
{
"type": "CA",
"caidlist": [
{
"caid": 9728
}
],
"pid": 8191,
"position": 262144
}
],
"lcn": 0,
"dvb_servicetype": 0,
"dvb_ignore_eit": false,
"verified": 1,
"uuid": "b27fae9bda243d6ca50092a825477117",
"pcr": 2270,
"priority": 0,
"sid": 2270,
"pts_shift": 0,
"auto": 1,
"srcid": 0,
"lcn_minor": 0,
"lcn2": 0,
"prefcapid_lock": 0,
"created": 1674634669,
"enabled": true,
"s_type_user": -1,
"svcname": "Abertis PID 2270",
"last_seen": 1674634669
}
./tvh-json.py import abertis2270.json
Hi, I have recently updated tdt channels on sx88 4k receiver. Basically, most of the tve la 1 regional streams are not working apart from Tve la 1 Madrid and Catalunya,
Same thing happened when updating an octagon SX87.
Still all working on E2 box, but think the same will happen if I reinstall dtt Abertis files.
I suspect some Biss keys have changed ?
Only La 2 and 24h ( streams 381-383 and 388 ) on those transponders are working. +HEVC streams
Sorry I forgot to mention,Some of the keys in the THCAM settings are probably missing. I think by default I only get some of the streams too using one of these receivers, you have to add the other keys manually or update the key file via USB and then the other services will scan in.
Hello everybodyHello:
THANKS TO @Adam792 FOR HIS HELP AND PATIENCE. All the credit goes to him, really.
With his help, finally I could made Abertis 30.0W channels using:
* CoreELEC 19.5 Matrix
* Addon service.tvheadend43 for CoreELEC 19.5 Matrix
I will edit (blue colour) the modifications for CoreELEC / tvheadend addon comparing to @Adam792 previous post ( https://www.sat-universe.com/index....30w-chat-how-to-guides.306087/post-2037172211 ).
abertis.py modified:
Code:import sys pid = int(sys.argv[1]) packet = sys.stdin.buffer.read(188) while packet !="": tspid = ((packet[1] & 0x1f) << 8) | packet[2] if tspid == pid : afc = packet[3] & 0x30 if afc == 0x10 : sys.stdout.flush() sys.stdout.buffer.write(packet[4:]) elif afc == 0x30 : sys.stdout.flush() sys.stdout.buffer.write(packet[packet[4]+5:]) packet = sys.stdin.buffer.read(188)
1. All the files go to:
/storage/.kodi/addons/service.tvheadend43/bin/
folder, including above file abertis.py inside.
2. Create another file inside /storage/.kodi/addons/service.tvheadend43/bin/ called tdt.sh - it should have the following contents:
Code:#!/bin/sh curl -s http://user:[email protected]:9981/stream/service/$1 | python3 /home/hts/Abertis/abertis.py $2
user & pasword --> tvheadend user, including 127.0.0.1 into allowed networks for that user.
3. Make sure the files have the right permissions for TVHeadend to execute them (ssh your TV-Box using CoreELEC):
Code:chmod +x /storage/.kodi/addons/service.tvheadend43/bin/tdt.sh chmod +x /storage/.kodi/addons/service.tvheadend43/bin/abertis.py
4. Now in TVHeadend, you need to scan the Hispasat muxes if you've not already done so. Then go into Configuration > DVB Inputs > Services
5. Change the 'Hide' dropdown to 'None'
6. Find the 11302 H service with SID 3270, and copy the UUID from the play link (e.g.
b27fae9bda243d6ca50092a825477117 is the UUID in this example.Code:http://user:[email protected]:9981/play/ticket/stream/service/b27fae9bda243d6ca50092a825477117
7. Use tvh-json.py to modify the service with the correct details: https://github.com/tvheadend/tvheadend/blob/master/lib/api/python/tvh-json.py - you'll need to modify tvh-json.py to contain your user details to access the TVH REST API (line #27 and #28 - create a user in TVHeadend first and paste the credentials you've created in the py file on these lines.)
Put this tvh-json.py also in:
/storage/.kodi/addons/service.tvheadend43/bin/
Then:
Code:cd /storage/.kodi/addons/service.tvheadend43/bin/ chmod +x tvh-json.py ./tvh-json.py export b27fae9bda243d6ca50092a825477117 > abertis2270.json
File abertis2270.json will contain something like the following:
Code:{ "sid": 3270, "lcn": 0, "lcn_minor": 0, "lcn2": 0, "srcid": 0, "dvb_servicetype": 0, "dvb_ignore_eit": false, "prefcapid": 0, "prefcapid_lock": 0, "force_caid": 0, "pts_shift": 0, "created": 1674634669, "last_seen": 1674634669, "enabled": false, "auto": 2, "priority": 0, "s_type_user": -1, "verified": 0, "pcr": 8191, "pmt": 7270, "stream": [ { "pid": 8191, "type": "CA", "position": 262144, "caidlist": [ { "caid": 9728 } ] } ], "uuid": "b27fae9bda243d6ca50092a825477117" }
We need to edit that file to force PID 2270 to be recognised and decrypted in OSCam.
- We change the service ID to 2270 (I use same as Abertis PID for SID, but this can be any non-existing value in the mux. If you don't change it, the changes get wiped by TVH)
- We change the PMT PID to 8000 (fake PMT PID, again to stop TVH from reading the 'real' PMT and wiping the changes)
- We add details into "stream":[] array for the 2270 payload PID and CAID so that OSCam decrypts it. Plus we change PCR value also to 2270.
- We add a svcname value just so we can see a name in TVHeadend for the service.
- We set "verified" to 1, so TVHeadend doesn't hide the service from us (in older versions this value doesn't exist)
The final file with the edits looks like this;
Code:{ "pmt": 8000, "force_caid": 0, "prefcapid": 0, "stream": [ { "type": "H264", "pid": 2270, "position": 0 }, { "type": "CA", "caidlist": [ { "caid": 9728 } ], "pid": 8191, "position": 262144 } ], "lcn": 0, "dvb_servicetype": 0, "dvb_ignore_eit": false, "verified": 1, "uuid": "b27fae9bda243d6ca50092a825477117", "pcr": 2270, "priority": 0, "sid": 2270, "pts_shift": 0, "auto": 1, "srcid": 0, "lcn_minor": 0, "lcn2": 0, "prefcapid_lock": 0, "created": 1674634669, "enabled": true, "s_type_user": -1, "svcname": "Abertis PID 2270", "last_seen": 1674634669 }
Note: You'll need to do this rather than just copying my examples because your UUIDs will be different to mine, and everything needs to match in your install for it to work.
With the json file edited with the changes, re-import it into TVHeadend using tvh-json.py :
Code:./tvh-json.py import abertis2270.json
Now you should have a service under 11302 H called "Abertis PID 2270", this has the same UUID as we copied earlier as we've just edited it.
You'll need the BISS key in OSCam constant.cw to match the fact that we're using the 'fake' service ID 2270 and fake PMT 8000, so that will look like this :
Code:
2600:000000:08DE:1F40:1FFF:08DE:XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX ;Abertis PID 2270
I use oscam-emu. In SoftCam.Key file I add:
F 08DE1FFF 00 XXXXXXXXXXXXXXXXX ;ABERTIS PID 2270 (30.0W)
F 08DE1FFF 01 XXXXXXXXXXXXXXXXX ;ABERTIS PID 2270 (30.0W)
08DE = hexadecimal for 2270.
8. Next, in TVHeadend we need to add a new IPTV network. Configuration > DVB Inputs > Networks > Add+
Type: IPTV Network
Name: Abertis
Enabled: Ticked
Maximum # input streams: 2
9. We now add a mux to the created IPTV network. Configuration > DVB Inputs > Muxes > Add+
Network: Abertis
URL: pipe:///bin/sh /storage/.kodi/addons/service.tvheadend43/bin/tdt.sh b27fae9bda243d6ca50092a825477117 2270
Using your UUID here, and PID 2270.
Mux Name: PIPE 2270 (or whatever you like!)
Click to add/save.
10. You can scan the mux now, and, after that, add the services to channels:
11) The folder /storage/.kodi/addons/service.tvheadend43/bin/ is cleaned after a service.tvheadend43 update. Keep a backup of the files if you want to preserve them after upgrading tvheadend addon.
And... THANKS AGAIN TO @Adam792 FOR ALL HIS HELP AND PATIENCE.
Hello:
THANKS TO @Adam792 FOR HIS HELP AND PATIENCE. All the credit goes to him, really.
With his help, finally I could made Abertis 30.0W channels using:
* CoreELEC 19.5 Matrix
* Addon service.tvheadend43 for CoreELEC 19.5 Matrix
I will edit (blue colour) the modifications for CoreELEC / tvheadend addon comparing to @Adam792 previous post ( https://www.sat-universe.com/index....30w-chat-how-to-guides.306087/post-2037172211 ).
abertis.py modified:
Code:import sys pid = int(sys.argv[1]) packet = sys.stdin.buffer.read(188) while packet !="": tspid = ((packet[1] & 0x1f) << 8) | packet[2] if tspid == pid : afc = packet[3] & 0x30 if afc == 0x10 : sys.stdout.flush() sys.stdout.buffer.write(packet[4:]) elif afc == 0x30 : sys.stdout.flush() sys.stdout.buffer.write(packet[packet[4]+5:]) packet = sys.stdin.buffer.read(188)
1. All the files go to:
/storage/.kodi/addons/service.tvheadend43/bin/
folder, including above file abertis.py inside.
2. Create another file inside /storage/.kodi/addons/service.tvheadend43/bin/ called tdt.sh - it should have the following contents:
Code:#!/bin/sh curl -s http://user:[email protected]:9981/stream/service/$1 | python3 /home/hts/Abertis/abertis.py $2
user & pasword --> tvheadend user, including 127.0.0.1 into allowed networks for that user.
3. Make sure the files have the right permissions for TVHeadend to execute them (ssh your TV-Box using CoreELEC):
Code:chmod +x /storage/.kodi/addons/service.tvheadend43/bin/tdt.sh chmod +x /storage/.kodi/addons/service.tvheadend43/bin/abertis.py
4. Now in TVHeadend, you need to scan the Hispasat muxes if you've not already done so. Then go into Configuration > DVB Inputs > Services
5. Change the 'Hide' dropdown to 'None'
6. Find the 11302 H service with SID 3270, and copy the UUID from the play link (e.g.
b27fae9bda243d6ca50092a825477117 is the UUID in this example.Code:http://user:[email protected]:9981/play/ticket/stream/service/b27fae9bda243d6ca50092a825477117
7. Use tvh-json.py to modify the service with the correct details: https://github.com/tvheadend/tvheadend/blob/master/lib/api/python/tvh-json.py - you'll need to modify tvh-json.py to contain your user details to access the TVH REST API (line #27 and #28 - create a user in TVHeadend first and paste the credentials you've created in the py file on these lines.)
Put this tvh-json.py also in:
/storage/.kodi/addons/service.tvheadend43/bin/
Then:
Code:cd /storage/.kodi/addons/service.tvheadend43/bin/ chmod +x tvh-json.py ./tvh-json.py export b27fae9bda243d6ca50092a825477117 > abertis2270.json
File abertis2270.json will contain something like the following:
Code:{ "sid": 3270, "lcn": 0, "lcn_minor": 0, "lcn2": 0, "srcid": 0, "dvb_servicetype": 0, "dvb_ignore_eit": false, "prefcapid": 0, "prefcapid_lock": 0, "force_caid": 0, "pts_shift": 0, "created": 1674634669, "last_seen": 1674634669, "enabled": false, "auto": 2, "priority": 0, "s_type_user": -1, "verified": 0, "pcr": 8191, "pmt": 7270, "stream": [ { "pid": 8191, "type": "CA", "position": 262144, "caidlist": [ { "caid": 9728 } ] } ], "uuid": "b27fae9bda243d6ca50092a825477117" }
We need to edit that file to force PID 2270 to be recognised and decrypted in OSCam.
- We change the service ID to 2270 (I use same as Abertis PID for SID, but this can be any non-existing value in the mux. If you don't change it, the changes get wiped by TVH)
- We change the PMT PID to 8000 (fake PMT PID, again to stop TVH from reading the 'real' PMT and wiping the changes)
- We add details into "stream":[] array for the 2270 payload PID and CAID so that OSCam decrypts it. Plus we change PCR value also to 2270.
- We add a svcname value just so we can see a name in TVHeadend for the service.
- We set "verified" to 1, so TVHeadend doesn't hide the service from us (in older versions this value doesn't exist)
The final file with the edits looks like this;
Code:{ "pmt": 8000, "force_caid": 0, "prefcapid": 0, "stream": [ { "type": "H264", "pid": 2270, "position": 0 }, { "type": "CA", "caidlist": [ { "caid": 9728 } ], "pid": 8191, "position": 262144 } ], "lcn": 0, "dvb_servicetype": 0, "dvb_ignore_eit": false, "verified": 1, "uuid": "b27fae9bda243d6ca50092a825477117", "pcr": 2270, "priority": 0, "sid": 2270, "pts_shift": 0, "auto": 1, "srcid": 0, "lcn_minor": 0, "lcn2": 0, "prefcapid_lock": 0, "created": 1674634669, "enabled": true, "s_type_user": -1, "svcname": "Abertis PID 2270", "last_seen": 1674634669 }
Note: You'll need to do this rather than just copying my examples because your UUIDs will be different to mine, and everything needs to match in your install for it to work.
With the json file edited with the changes, re-import it into TVHeadend using tvh-json.py :
Code:./tvh-json.py import abertis2270.json
Now you should have a service under 11302 H called "Abertis PID 2270", this has the same UUID as we copied earlier as we've just edited it.
You'll need the BISS key in OSCam constant.cw to match the fact that we're using the 'fake' service ID 2270 and fake PMT 8000, so that will look like this :
Code:
2600:000000:08DE:1F40:1FFF:08DE:XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX ;Abertis PID 2270
I use oscam-emu. In SoftCam.Key file I add:
F 08DE1FFF 00 XXXXXXXXXXXXXXXXX ;ABERTIS PID 2270 (30.0W)
F 08DE1FFF 01 XXXXXXXXXXXXXXXXX ;ABERTIS PID 2270 (30.0W)
08DE = hexadecimal for 2270.
8. Next, in TVHeadend we need to add a new IPTV network. Configuration > DVB Inputs > Networks > Add+
Type: IPTV Network
Name: Abertis
Enabled: Ticked
Maximum # input streams: 2
9. We now add a mux to the created IPTV network. Configuration > DVB Inputs > Muxes > Add+
Network: Abertis
URL: pipe:///bin/sh /storage/.kodi/addons/service.tvheadend43/bin/tdt.sh b27fae9bda243d6ca50092a825477117 2270
Using your UUID here, and PID 2270.
Mux Name: PIPE 2270 (or whatever you like!)
Click to add/save.
10. You can scan the mux now, and, after that, add the services to channels:
11) The folder /storage/.kodi/addons/service.tvheadend43/bin/ is cleaned after a service.tvheadend43 update. Keep a backup of the files if you want to preserve them after upgrading tvheadend addon.
And... THANKS AGAIN TO @Adam792 FOR ALL HIS HELP AND PATIENCE.
I have not been able to edit the BISS keys on this receiver, as when I try to do so there is no option to enter A or B. Th colour keys allow C D E & F to be? entered only. Is there any way to do this?Instructions for receiving the new Abertis Asturias Mux on 11502V with ApeBox 2C 4K UHD:
It is important to mention that the multistream search in System/More Settings is set to OFF!
To add the new stream, create a new line in the Keys menu.
Thereby enters the following
at SID 321 (this is the streamnr 801 in Hex)
at frequency 11502
at Keys the ones already found here.
Save and manual search
The four Px are loaded and can be seen.
Don't forget to activate the multistream setting again, otherwise the box won't find MIS packets anymore.
Translated with www.DeepL.com/Translator (free version)
I have not been able to edit the BISS keys on this receiver, as when I try to do so there is no option to enter A or B. Th colour keys allow C D E & F to be? entered only. Is there any way to do this?