lghorizon
lghorizon copied to clipboard
Virgin Media (GB) recording capacity
I'm not sure this ever worked on the original Arris integration (certainly for me the value was always unavailable for recording_capacity) but the following appears in the log for getting recording capacity in GB:
Logger: lghorizon.lghorizon_api Source: /usr/local/lib/python3.10/site-packages/backoff/_common.py:120 First occurred: 10:39:10 (1 occurrences) Last logged: 10:39:10 Giving up _do_api_call(...) after 3 tries (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://prod.spark.virginmedia.com/eng/web/recording-service/customers/xxx_gb/quota. Error:501 Server Error: Not Implemented for url: https://prod.spark.virginmedia.com/eng/web/recording-service/customers/xxx_gb/quota)
@callumeveratt I think this works as intended. For me there's no way to determine if cloud recording is available but to query that url. If it gives me a 501 i know it isn't avaiable. I presume you don't have a sensor at all anymore for recording capacity?
It looks like VM sends this over MQTT as a percentage --
Topic: {household_id}/{box_id}/localRecordings/capacity
Payload: {"messageType":"CPE.capacity","version":"1.0.7","used":97}
Ah m8 thats brilliant information. Until now i was only supporting cloud recordings. In this way I can add a sensor for local recordings. How did you find out?
All the investigation I've been doing has been just by logging into https://virgintvgo.virginmedia.com with the Chrome dev tools open and watching the calls it makes.
In particular, in the call to mqtt
, which is the websocket, you can see the MQTT messages either way!
Cool, I'm going to try to add this to the api. Thanks!
BTW, can you find out of anything in your account data states that recording is enabled and if this is network or local?
Ignore that - I imagine it's not specified anywhere for Virgin GB as channel owners have cold feet over cloud recording - so it's never been enabled in the UK from what I gather
Would definitely be cool to use the local recording data where applicable though :-)
Will also have a dig around -- but with Virgin, I can confidently say it'll always be local as we don't have Cloud DVR!
@callumeveratt I think remote recording in that context is the ability to remotely instruct your box to record something rather than recording to VM's servers
@caraar12345 - Yeah you're right, I got ahead of myself for a second. It is the ability to remote record, not cloud record.
Ha! Impressive timing from both of us 😁
Does look like there's something about local DVR though -- localDvrAvailable
. I believe networkDvrAvailable
refers to being able to play back local recordings on a mobile device.
Unrelated tidbit, I do wonder where they get 'gender' from, as I may be somewhat effeminate, but I've definitely never identified myself as female to anyone 😆
{
"oespToken": "",
"accessToken": "",
"householdId": "{customer_id}_gb",
"username": "{customer_id}",
"locationId": "18",
"originalLocationId": "18",
"timeToIdleSeconds": 7200,
"customer": {
"givenName": "Aaron",
"countryCode": "GB",
"gender": "female",
"status": [],
"smartCardId": "",
"physicalDeviceId": "{box_id}",
"stbType": "EOS",
"networkDvrAvailable": true,
"replayOTTOnlyAvailable": false,
"localDvrAvailable": true,
"householdId": "{customer_id}_gb",
"sharedProfileId": "",
"replayTvEntitled": true,
"replayTvAvailable": true,
"replayTvMinimumBroadcastTime": 0,
"replayTvOptedIn": true,
"offlineViewingEntitled": true,
"profileIds": [
""
],
"oboProvisioned": true,
"customerId": "{customer_id}",
"purchaseEntitlementsToken": "",
"isSkLite": false
},
From what call is this data coming from?
Oops - https://prod.oesp.virginmedia.com/oesp/v4/GB/eng/web/session
Are you guys (or guy and lady) able to update and can you check if every box have an attribute with recording capacity?
Will give it a shot; unfortunately I'm still contending with the config flow issue (hopefully this restart will sort it!?)
@Sholofly On VirginMedia GB, I have 1 device and 1 entity. No sign of recording capacity anywhere.
If you click the box entity, does it show in attributes?
No you should check the developer tools
Yep - there for me. Null though - is that expected at the mo?
Depends, do you have local recordings?
Yep - have recordings on the box and on TVGo I can see the MQTT request @caraar12345 gave
{"messageType":"CPE.capacity","version":"1.0.7","used":72}
ok, i that case it doesn't work yet. I have to add more logging to find out where the problem is. Do you have debugging enabled in your component?
Nope - but if you need to add some more logging I can get it turned on in the meantime
OK stupid. I didnt't commit the part to subscribe to the actual mqtt topic :( Can you manually update your manifest.json to
"requirements": [
"lghorizon>=0.5.13"
]
And then reboot of course ;)
@Sholofly On VirginMedia GB, I have 1 device and 1 entity. No sign of recording capacity anywhere.
The local recordings are an attribute of the box. It's not an account thing like the cloud recordings.
After changing the entry 0.5.12 to 0.5.13 and restarting, I no longer have an entry for recording capacity listed in states. I can see all my local recodings in the integration.
Do you see recording capacity of each box in the box attributes?
I updated the manifest also - the recording_capacity did disappear originally but it came back but sadly still null
Can you check the logs for mqtt messages if you set it to debug?
Just trawling though, so far found these
2022-12-21 15:05:41.002 DEBUG (Thread-3 (_thread_main)) [lghorizon.models] Sending SUBSCRIBE (d0, m7) [(b'201434117_gb/+/localRecordings', 0)]
2022-12-21 15:05:41.003 DEBUG (Thread-3 (_thread_main)) [lghorizon.models] Sending SUBSCRIBE (d0, m8) [(b'201434117_gb/+/localRecordings/capacity', 0)]