bertbert72 / HomeAssistant_VirginTivo

HomeAssistant component for control of Virgin Media Tivo boxes
GNU General Public License v3.0
27 stars 22 forks source link

Error getting listings #117

Open ColinRobbins opened 8 months ago

ColinRobbins commented 8 months ago

I get the following error showing in my logs.

This error originated from a custom integration.

Logger: custom_components.virgintivo.media_player
Source: custom_components/virgintivo/media_player.py:453
Integration: virgintivo (documentation)
First occurred: 15:28:31 (7 occurrences)
Last logged: 15:35:12

Error getting listings [Expecting value: line 1 column 1 (char 0)]
Error getting listings ['listings']

Looking at the code, it would seem web-api-pepper.horizon.tv is not available.

(http://horizon.tv and http://web-api-pepper.horizon.tv both return errors)

It is not clear if this is a temporary or permanent issue.

bertbert72 commented 8 months ago

I'm guessing temporary as looks to be returning data now

https://web-api-pepper.horizon.tv/oesp/api/GB/eng/web/channels

ResteNarquois commented 8 months ago

Still getting these errors.

Tried various get requests via curl, and the issue seems to be with the listings endpoint not with the channels endpoint, with the latter still working OK.

The get request for listings is returning Service unavailable - i.e not JSON - so the code is looping through the get_guide_listings routine, and continuing to do so even after the Tivo is tuned off, reporting multiple errors in the log every few seconds.

Might this be a permanent change on the API to withdraw the listings service?

stewartpriest commented 8 months ago

Still getting these errors.

I am also getting these errors in HA, but can get results by clicking on the link in @bertbert72's post above..

ResteNarquois commented 8 months ago

As I said in my comment, the link posted by bertbert72 is to the channels endpoint, which is still working. The integration still loads successfully from this at start up, so no errors appear in the log at that stage.

But it is failing to get listings for the channel you are actually watching, which is when the errors start appearing in the logs, and will keep appearing until you restart HA.

The link for listings as per the current code would be:

https://web-api-pepper.horizon.tv/oesp/api/GB/eng/web/listings

with a constantly updated query appended to the url for the specific channel and time you are watching e.g. ?byStationID=<STATION_ID>&byEndTime=<TIMESTAMP_NOW>~<TIMESTAMP_FUTURE>&sort=startTime". This is the link that has stopped working.

tankstage commented 8 months ago

Just to say I am getting the same problem...

bertbert72 commented 8 months ago

For now I've disabled the listings functionality to prevent the error. Quick and dirty... If it comes back, I'll reinstate it and maybe add a config item to allow toggling it in future or detect when the listings aren't available and just throw the error once.

RoadkillUK commented 5 months ago

@bertbert72 Just to clarify, is this the reason I'm not getting any Programme details?

bertbert72 commented 5 months ago

@bertbert72 Just to clarify, is this the reason I'm not getting any Programme details?

Yes, that's correct