Giter Club home page Giter Club logo

lghorizon's People

Contributors

caraar12345 avatar dependabot[bot] avatar dynasticorpheus avatar pejeio avatar renovate[bot] avatar sholofly avatar wrt54g avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lghorizon's Issues

LG Horizon lghorizon.remote_key service/ option not working anymore

Describe the bug
This evening LG Horizon Integration was not working anymore.
After reload the integration it is partly working again.
Only remote_key function does not work anymore. I did use that for selecting a channel in NodeRed.: {"remote_key":"2"}
Now I use the {"media_content_id":"1","media_content_type":"channel"} option in NodeRed. This is still working
It looks like that lghorizon service is not working anymore. Service media_player is still working
EDIT: I also tried remote_key.Channel up. Thats also not working

To Reproduce
Steps to reproduce the behavior:

  1. Use NodeRed automatiom remote_key channel 1
  2. Nothing happens.'

Expected behavior
Switching to the chosen channel

Screenshots
image
is not working anymore. It did before
image
Is working as alternative option

Version of the component
The version of the component as it is installed on your HA

Logging
No logging information


**Additional context**

Can’t connect

Unfortunately, the setup wizard is not able to login my Telenet account.
error: can’t connect
User name and password are correct
Maybe api or Telenet service is down on this moment
40902B4F-63C7-4FCB-820C-55C83FB9AD5D

Integration causing Virgin (GB) TV Go logins to fail after a few hours.

Describe the bug
TV360 box from Virgin (GB) added as HA entity using this solution, after a couple of hours seems to fail to connect anymore and also blocks login access to Virgin TV Go app for the rest of the family. I have to disable the integration and then wait for a couple of hours then the family can start logging into the app again.

This does not occur with the old Arris DCX960 integration.

To Reproduce
Add the Virgin box as described in the instructions, wait a couple of hours the box becomes unavailable on the HA overview dashboad (just a grey box with no power button), then all family members using the Virgin TV Go app fail to log in with the message login is not possible tray again later.

Expected behavior
Usage of the integartion not to fail after a couple of hours and not block access to TV Go

Version of the component
All Virgin GB capabable version upto and including 0.4.3

Logging
I can't get any logs at the moment as it is extremely disruptive to the family to use the integration. I will enable logging and supply the logs when the family will be out for a period of time that I know will not affect them whilst I do this. Have only just realisised what the common denominator causing the issue that I initially thought was a Virgin one.

Additional context
It almost seems as though this integration is causing a spamming of sessions which then causes Virgin to block furher ones when some level is reached.

I am being forced to use the old Arris DCX960 integration at the moment to maintain some sort of continuity.

WebSocket handshake error

Describe the bug
I've seen this handshake error 2 (or 3) times in the last couple of weeks. According to #37 this is related to an outage of the supplier.

To Reproduce
N/A

Expected behavior
Even though there isn't much you can do about the unavailability of the service, I believe the component should be able to recover from such a problem.

Screenshots
N/A

Version of the component
0.4.3 (lghorizon>=0.5.12)

Logging

2023-02-07 01:51:42.205 ERROR (Thread-3 (_thread_main)) [lghorizon.models] Caught exception in on_connect: WebSocket handshake error
2023-02-07 01:51:42.209 ERROR (Thread-3 (_thread_main)) [root] Uncaught thread exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3591, in _thread_main
    self.loop_forever(retry_first_connection=True)
  File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1756, in loop_forever
    rc = self._loop(timeout)
  File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1164, in _loop
    rc = self.loop_read()
  File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1556, in loop_read
    rc = self._packet_read()
  File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 2439, in _packet_read
    rc = self._packet_handle()
  File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3039, in _packet_handle
    return self._handle_connack()
  File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3138, in _handle_connack
    on_connect(
  File "/usr/local/lib/python3.10/site-packages/lghorizon/models.py", line 314, in _on_mqtt_connect
    self.connect()
  File "/usr/local/lib/python3.10/site-packages/lghorizon/models.py", line 319, in connect
    self._mqtt_client.connect(self._brokerUrl, 443)
  File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 914, in connect
    return self.reconnect()
  File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1080, in reconnect
    sock = WebsocketWrapper(sock, self._host, self._port, self._ssl,
  File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3713, in __init__
    self._do_handshake(extra_headers)
  File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3797, in _do_handshake
    raise WebsocketConnectionError("WebSocket handshake error")
paho.mqtt.client.WebsocketConnectionError: WebSocket handshake error

Additional context
I'm now either reloading the component manually or restarting HA, which fixes the issue.

Volume Buttons

Love the LG solution for the ziggo next mini, will the volume buttons also be made available?

Integration not showing up in HACS

Just copied al the files to my custom_components/lghorizon directory. no matter what i do its not showing up in the integrations page.

Use 'voice' button on remote control to generate Home Assistant Assist command

Is your feature request related to a problem? Please describe.

Describe the solution you'd like
Wild idea: would it be possible to use the 'voice' button functionality of the remote control to generate an input command for the new Home Assistant Assist feature?

Describe alternatives you've considered
none

Additional context
remote voice button

Google home

The mediabox doens't show up anymore in the google home app also its not posible to controle the box true google assistant

Integration stuck on starting configuration

Describe the bug
Integration stuck on starting configuration

To Reproduce
Steps to reproduce the behavior:

  1. Manual installation
  2. Go to integrations and search for LG Horizon
  3. Click on LG horizon

Expected behavior
A config screen appears

Screenshots
image

I've got no error in log

Thread-9 (_thread_main)) [lghorizon.lghorizon_api] Could not handle status message

Just updated to

Home Assistant 2023.2.1
Supervisor 2023.01.1
Frontend-versie: 20230202.0 - latest

Checked the logs and see these errors.
I both have a Ziggo Next box and a Next Mini. (Not sure if the Next Mini even applies here)

2023-02-03 20:22:30.319 ERROR (Thread-9 (_thread_main)) [lghorizon.lghorizon_api] Could not handle status message

2023-02-03 20:22:30.328 ERROR (Thread-9 (_thread_main)) [lghorizon.lghorizon_api] Full message: {'version': '1.4.1', 'type': 'CPE.uiStatus', 'source': '3C36E4-EOSSTB-003873640001', 'messageTimeStamp': 1675452149398, 'status': {'uiStatus': 'mainUI', 'playerState': {'sourceType': 'linear', 'speed': 1, 'lastSpeedChangeTime': 1675446521193, 'source': {'channelId': 'NL_000090_019492', 'eventId': 'crid:2F2Fgn.tv2F89519292FEP028286950071,imi:cc200fd3f3c7982b5c35faf0622ead0f29cc79a8'}}, 'uiState': {}}, 'id': '81dmVeAE'}

2023-02-03 20:32:51.017 ERROR (Thread-9 (_thread_main)) [lghorizon.lghorizon_api] Could not handle status message

2023-02-03 20:32:51.019 ERROR (Thread-9 (_thread_main)) [lghorizon.lghorizon_api] Full message: {'version': '1.4.1', 'type': 'CPE.uiStatus', 'source': '3C36E4-EOSSTB-003873640001', 'messageTimeStamp': 1675452770575, 'status': {'uiStatus': 'mainUI', 'playerState': {'sourceType': 'linear', 'speed': 1, 'lastSpeedChangeTime': 1675446521193, 'source': {'channelId': 'NL_000088_019251', 'eventId': 'crid:2F2Fgn.tv2F108780602FEP033716750113,imi:609a396a6deb5b5396c7c688982034f461606d16'}}, 'uiState': {}}}

2023-02-03 20:48:40.748 ERROR (SyncWorker_2) [lghorizon.lghorizon_api] Unable to fetch recording capacity...

Unable to connect VM (GB)

I was using arris_dcx960 integration until a few days ago. I managed to install this (latest version) integration and it was working to some degree. I noticed that the source list was not showing correctly. I thought I may have configured incorrectly, so I tried installing again. Since then I have been unable to connect. I am using the correct username and password (reset password to make sure). I have tried earlier releases of this integration but none seem to work for me.

Logs show:

This error originated from a custom integration.

Logger: custom_components.lghorizon.config_flow
Source: custom_components/lghorizon/config_flow.py:81
Integration: LG Horizon (documentation, issues)
First occurred: 22:28:19 (2 occurrences)
Last logged: 22:31:31

'LGHorizonAuth' object has no attribute 'accessToken'

My HA instance is running latest versions.

lghorizon.remote_key_press doesn't work anymore

Since a few weeks, sending commands through the LG Horizon: Send key doesn't do anything anymore.

The commands used to work, such as the following, but since then doesn't do anything... even though it returns ""Action run succesfully""

entity_id: media_player.telenet_tv_box remote_key: ChannelDown

What coud be the issue?

I am using Telenet in Belgium.
(I can still change channels from the media player entity).

Unable to login (Telenet BE)

Describe the bug
After trying to log in with my Telenet credentials, the submit button keeps spinning.

Log

Giving up _do_api_call(...) after 3 tries (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://prod.spark.telenet.tv/eng/web/linear-service/v2/replayEvent/telenet5?returnLinearContent=true&language=nl. Error:404 Client Error: Not Found for url: https://prod.spark.telenet.tv/eng/web/linear-service/v2/replayEvent/telenet5?returnLinearContent=true&language=nl)

integrate Sunrise TV (Switzerland)

@Sholofly First of all many thanks for this nice piece of software. I live in Switzerland and used UPC for a long time. UPC has been merged into Sunrise in Switzerland and in future every UPC-customer will become a Sunrise-customer (https://www.sunrise.ch/de/home). Basically the set-top box from Sunrise is the same as from UPC. There is also a login (https://www.sunrise.ch/mysunrise) where you can track your devices and services.

Is it possible to extend the support of LG Horizon to Sunrise-customers in Switzerland? I would be willing to help as I recently moved my subscription from UPC to Sunrise and couldnt find any integration to control my set-top box. I am no technical expert but I guess their backend is probably more or less the same as the GUI of the set-top box is identical to the one from UPC.

Regards from Switzerland

This integration will stop working after The next home assistant update

Describe the bug
After updating to the next beta this integration not available anymore. And you need to find your remote again to control

To Reproduce
2023.12.4 In this version it still runs. After version 2024.1.0b0 it is not more available/running

Expected behavior

Screenshots

Version of the component

Logging
Enable debug logging and add your log. DO NOT SHARE SENSITIVE DATA SUCH AS PASSWORDS AND ACCOUNT INFO!
You can enable logging by setting up the logging component in HA as follows:

logger:
  default: warning
  logs:
    lghorizon: debug

Additional context
Add any other context about the problem here.

Error: Unable to fetch recording capacity

Describe the bug

Hi @Sholofly! Still running this great integration and loving it a lot!
Since a week or two the HASS log's show up the following error. No big problem, just FYI.

Logger: lghorizon.lghorizon_api
Source: /usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py:425
First occurred: 1 april 2023 om 15:38:33 (9 occurrences)
Last logged: 07:38:33

Unable to fetch recording capacity...

To Reproduce
/

Expected behavior
/

Screenshots
/

Version of the component
v0.5.0

Logging
Enable debug logging and add your log. DO NOT SHARE SENSITIVE DATA SUCH AS PASSWORDS AND ACCOUNT INFO!
You can enable logging by setting up the logging component in HA as follows:

logger:
  default: warning
  logs:
    arris_dcx960: debug

Additional context
Add any other context about the problem here.

Add volume control

Is your feature request related to a problem? Please describe.
No existing problems

Describe the solution you'd like
Implement a possiblity to control volume either in the media-player device itself, or using the remote_key_press support
Sound control is the only missing feature of importance.

Describe alternatives you've considered
Implement remote_key_press support for volUpCommand and volDownCommand
Or alternatively, provide support for volume control in the media-player

Additional context
I recently migrated from Homebridge to Home Assistant and the volume control was available in Homebridge.
https://github.com/jsiegenthaler/homebridge-eosstb

Now I don't know if it's feasible though, I suppose you already looked into it, but it would be a great feature.

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)

Errors when you have a TV package without recording

Describe the bug
If you have a TV package which does not contain cloud recording (e.g. Ziggo TV Start in The Netherlands), you will get constantly errors in the log about the recording services.

Expected behavior
Maybe you can add a field in the configuration where you can select if you have a TV package with cloud recording capability?

Screenshots
If applicable, add screenshots to help explain your problem.

Version of the component
0.1.3

Logging
Full logs
2022-10-30 11:00:42.989 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration lghorizon which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

2022-10-30 11:01:06.530 INFO (SyncWorker_6) [lghorizon.lghorizon_api] Backing off _do_api_call(...) for 0.1s (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://prod.spark.ziggogo.tv/eng/web/recording-service/customers/9207255_nl/quota. Error:402 Client Error: Payment Required for url: https://prod.spark.ziggogo.tv/eng/web/recording-service/customers/9207255_nl/quota)

2022-10-30 11:01:06.890 INFO (SyncWorker_6) [lghorizon.lghorizon_api] Backing off _do_api_call(...) for 0.2s (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://prod.spark.ziggogo.tv/eng/web/recording-service/customers/9207255_nl/quota. Error:402 Client Error: Payment Required for url: https://prod.spark.ziggogo.tv/eng/web/recording-service/customers/9207255_nl/quota)

2022-10-30 11:01:07.242 ERROR (SyncWorker_6) [lghorizon.lghorizon_api] Giving up _do_api_call(...) after 3 tries (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://prod.spark.ziggogo.tv/eng/web/recording-service/customers/9207255_nl/quota. Error:402 Client Error: Payment Required for url: https://prod.spark.ziggogo.tv/eng/web/recording-service/customers/9207255_nl/quota)

2022-10-30 11:01:07.256 ERROR (SyncWorker_6) [lghorizon.lghorizon_api] Unable to fetch recording capacity...

2022-10-30 11:01:33.211 WARNING (MainThread) [homeassistant.components.media_player] Updating lghorizon media_player took longer than the scheduled update interval 0:00:10

Unable to Login

Unable to login in to vigin media GB, just keeps loading.

playback time views media card

Is your feature request related to a problem? Please describe.
no problem but new feature request

Describe the solution you'd like
I would like to have the function that the playback time of the program is displayed in the media card, as shown in the photo is the case of Sonos Music

Describe alternatives you've considered

at sonos it is called that for the media playback time, I think it is displayed in seconds

media_duration: 172

Additional context
image

async_setup_platforms instead of awaiting async_forward_entry_setups; this will fail in version 2023.3.

Describe the bug
I do get a warning from HA that something will be depreciated in version 2023.3

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:77
First occurred: 07:25:40 (1 occurrences)
Last logged: 07:25:40

Detected integration that called async_setup_platforms instead of awaiting async_forward_entry_setups; this will fail in version 2023.3. Please report issue to the custom integration author for lghorizon using this method at custom_components/lghorizon/__init__.py, line 56: hass.config_entries.async_setup_platforms(entry, PLATFORMS)


Not showing up in hacs

The integration is not showing up in hacs.
Even after deleting cache , etc... Not showing up. Is it already available?

Browse media directly from media card / buttons for favourite channels

I would like to be able to browse media directly from the card. Now I have to push the 3 dots in the upper right corner and browse the channels on the next dialog window.
Further: I would like to create a series of buttons to directly jump to my favourite channels. How to do that?

Thx for your help!

Ziggo next mini yaml example

I don't know if this is the right way to ask. If not I apoligize upfront.

I would really like to use this coponent, it looks very promising!
But I don't know how to add the custom services.

Does someone has a working yaml of the ziggo next mini which I can use a starting point?

Thank you very much in advance!

Virgin Media (GB) didn't connect without a value in identifier field

The documentation appears to say that the identifier field is not required unless using Telenet.

I'm just moving from the old Arris integration and when I tried to add originally I saw this error in HA:

Logger: custom_components.lghorizon.config_flow
Source: custom_components/lghorizon/config_flow.py:78
Integration: LG Horizon (documentation, issues)
First occurred: 10:36:38 (3 occurrences)
Last logged: 10:36:55
'indentifier'

I went back and added the integration but put 'no' in the identifier field (just as a test) and the integration added and it all works. So not sure if the config flow expects a value for identifier?

TVbox info not updating

Describe the bug
The TVbox integration fetches status & info correctly when starting up HA, but after a while the information doesn't update anymore.
(Telenet Belgium)

To Reproduce

  1. Restart HA with integration for Telenet installed & configured
  2. Check Media Control Card linked to the TVBox on Dashboard
  3. Status & info isn't updated
  4. Check history; power state is the same for a long period of time
  5. Automations linked to power state change do not trigger

Expected behavior
Power state should reflect the real power state, and Media Control Card should give some graphic footage of the current content playing

Screenshots

Version of the component
v0.3.4

Logging
Logger: lghorizon.lghorizon_api
Source: /usr/local/lib/python3.10/site-packages/backoff/_common.py:120
First occurred: 11:42:35 AM (1 occurrences)
Last logged: 11:42:35 AM

Giving up _do_api_call(...) after 3 tries (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://prod.spark.telenet.tv/eng/web/linear-service/v2/replayEvent/telenet3?returnLinearContent=true&language=nl. Error:404 Client Error: Not Found for url: https://prod.spark.telenet.tv/eng/web/linear-service/v2/replayEvent/telenet3?returnLinearContent=true&language=nl)

Logger: lghorizon.lghorizon_api
Source: /usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py:271
First occurred: 11:42:35 AM (1 occurrences)
Last logged: 11:42:35 AM

Could not handle status message

Logger: lghorizon.lghorizon_api
Source: /usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py:273
First occurred: 11:42:35 AM (1 occurrences)
Last logged: 11:42:35 AM

Full message: {'version': '1.4.1', 'type': 'CPE.uiStatus', 'source': '3C36E4-EOSSTB-003972776805', 'messageTimeStamp': 1669718548887, 'status': {'uiStatus': 'mainUI', 'playerState': {'sourceType': 'linear', 'speed': 1, 'lastSpeedChangeTime': 1669708218485, 'source': {'channelId': 'telenet3', 'eventId': 'telenet3'}}, 'uiState': {}}}

Logger: lghorizon.models
Source: /usr/local/lib/python3.10/site-packages/paho/mqtt/client.py:2529
First occurred: 11:42:35 AM (1 occurrences)
Last logged: 11:42:35 AM

Caught exception in on_message: format_exception() got an unexpected keyword argument 'etype'

Logger: root
Source: /usr/src/homeassistant/homeassistant/bootstrap.py:342
First occurred: 11:42:35 AM (1 occurrences)
Last logged: 11:42:35 AM

Uncaught thread exception
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py", line 320, in _do_api_call
api_response.raise_for_status()
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://prod.spark.telenet.tv/eng/web/linear-service/v2/replayEvent/telenet3?returnLinearContent=true&language=nl

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py", line 269, in _on_mqtt_message
self._handle_box_update(deviceId, message)
File "/usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py", line 296, in _handle_box_update
raw_replay_event = self._do_api_call(f"{self._country_settings['api_url']}/eng/web/linear-service/v2/replayEvent/{eventId}?returnLinearContent=true&language={self._country_settings['language']}")
File "/usr/local/lib/python3.10/site-packages/backoff/_sync.py", line 105, in retry
ret = target(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py", line 323, in _do_api_call
raise LGHorizonApiConnectionError(f"Unable to call {url}. Error:{str(httpEx)}")
lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://prod.spark.telenet.tv/eng/web/linear-service/v2/replayEvent/telenet3?returnLinearContent=true&language=nl. Error:404 Client Error: Not Found for url: https://prod.spark.telenet.tv/eng/web/linear-service/v2/replayEvent/telenet3?returnLinearContent=true&language=nl

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3591, in _thread_main
self.loop_forever(retry_first_connection=True)
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1756, in loop_forever
rc = self._loop(timeout)
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1164, in _loop
rc = self.loop_read()
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1556, in loop_read
rc = self._packet_read()
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 2439, in _packet_read
rc = self._packet_handle()
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3033, in _packet_handle
return self._handle_publish()
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3327, in _handle_publish
self._handle_on_message(message)
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3570, in _handle_on_message
on_message(self, self._userdata, message)
File "/usr/local/lib/python3.10/site-packages/lghorizon/models.py", line 321, in _on_client_message
self._on_message_callback(jsonPayload)
File "/usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py", line 274, in _on_mqtt_message
_logger.error(repr(traceback.format_exception(etype=exc_type, value = exc_value, tb=exc_traceback)))
TypeError: format_exception() got an unexpected keyword argument 'etype'

Additional context

No longer connecting with a Virgin (GB) box

Describe the bug
Integration no longer working, not connecting to Virgin (GB)

To Reproduce
Steps to reproduce the behaviour:
Look in Devices and Services and Integration is red and entity is not available

Expected behaviour
Entity to be available

Version of the component
v0.5.3 installed

Logging
2024-01-10 19:52:19.894 ERROR (SyncWorker_2) [lghorizon.lghorizon_api] Giving up connect(...) after 11 tries (AttributeError: 'LGHorizonAuth' object has no attribute 'username')
2024-01-10 19:52:19.895 ERROR (MainThread) [custom_components.lghorizon.config_flow] 'LGHorizonAuth' object has no attribute 'username'

Additional context
Tried removing and re-adding, it just spins for a while then says can't connect. All details used for login are correct, double checked with Virgin TV Go app and that is logging in and all working correctly.

doesnt seem to work anymore - handshake error

Describe the bug
The integration doesnt work anymore. A restart of HA nor a restart of the integration helped. I use the integration in Switzerland with UPC.

Version of the component
newest version as of January 14 2023

Home Assistant 2023.1.4
Supervisor 2022.12.1
Operating System 9.4
Frontend 20230110.0 - latest

Logger: homeassistant.config_entries
Source: custom_components/lghorizon/init.py:50
Integration: LG Horizon (documentation, issues)
First occurred: 20:21:37 (1 occurrences)
Last logged: 20:21:37

Error setting up entry [email protected] for lghorizon
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/lghorizon/init.py", line 50, in async_setup_entry
await hass.async_add_executor_job(api.connect)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py", line 272, in connect
self._mqttClient.connect()
File "/usr/local/lib/python3.10/site-packages/lghorizon/models.py", line 319, in connect
self._mqtt_client.connect(self._brokerUrl, 443)
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 914, in connect
return self.reconnect()
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1080, in reconnect
sock = WebsocketWrapper(sock, self._host, self._port, self._ssl,
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3713, in init
self._do_handshake(extra_headers)
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3797, in _do_handshake
raise WebsocketConnectionError("WebSocket handshake error")
paho.mqtt.client.WebsocketConnectionError: WebSocket handshake error

Error thrown when viewing Live TV - Virgin UK.

Describe the bug
Error gets thrown when viewing Live TV - Virgin UK.

To Reproduce
Tune to a Live TV channel. Check HA log.

Version of the component
V 0.4.2

I get these errors when I change channels up/down.

2023-01-19 17:50:52.599 ERROR (Thread-2 (_thread_main)) [lghorizon.lghorizon_api] Giving up _do_api_call(...) after 3 tries (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://prod.spark.virginmedia.com/eng/web/linear-service/v2/replayEvent/crid:~~2F~~2Fgn.tv~~2F8605755~~2FEP012708730086,imi:3ba8877dde21ac3f5c1ecba04d7d0b1e1a40b33e?returnLinearContent=true&language=en. Error:401 Client Error: Unauthorized for url: https://prod.spark.virginmedia.com/eng/web/linear-service/v2/replayEvent/crid:~~2F~~2Fgn.tv~~2F8605755~~2FEP012708730086,imi:3ba8877dde21ac3f5c1ecba04d7d0b1e1a40b33e?returnLinearContent=true&language=en)
2023-01-19 17:50:52.739 ERROR (Thread-2 (_thread_main)) [lghorizon.lghorizon_api] Could not handle status message
2023-01-19 17:50:52.741 ERROR (Thread-2 (_thread_main)) [lghorizon.lghorizon_api] Full message: {'version': '1.4.1', 'type': 'CPE.uiStatus', 'source': '3C36E4-EOSSTB-003369527704', 'messageTimeStamp': 1674150645316, 'status': {'uiStatus': 'mainUI', 'playerState': {'sourceType': 'linear', 'speed': 1, 'lastSpeedChangeTime': 1674065654955, 'source': {'channelId': '1464', 'eventId': 'crid:~~2F~~2Fgn.tv~~2F8605755~~2FEP012708730086,imi:3ba8877dde21ac3f5c1ecba04d7d0b1e1a40b33e'}}, 'uiState': {}}}
2023-01-19 17:50:58.286 ERROR (Thread-2 (_thread_main)) [lghorizon.lghorizon_api] Giving up _do_api_call(...) after 3 tries (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://prod.spark.virginmedia.com/eng/web/linear-service/v2/replayEvent/crid:~~2F~~2Fgn.tv~~2F8605755~~2FEP012708730086,imi:3ba8877dde21ac3f5c1ecba04d7d0b1e1a40b33e?returnLinearContent=true&language=en. Error:401 Client Error: Unauthorized for url: https://prod.spark.virginmedia.com/eng/web/linear-service/v2/replayEvent/crid:~~2F~~2Fgn.tv~~2F8605755~~2FEP012708730086,imi:3ba8877dde21ac3f5c1ecba04d7d0b1e1a40b33e?returnLinearContent=true&language=en)
2023-01-19 17:50:58.288 ERROR (Thread-2 (_thread_main)) [lghorizon.lghorizon_api] Could not handle status message
2023-01-19 17:50:58.289 ERROR (Thread-2 (_thread_main)) [lghorizon.lghorizon_api] Full message: {'version': '1.4.1', 'type': 'CPE.uiStatus', 'source': '3C36E4-EOSSTB-003369527704', 'messageTimeStamp': 1674150649271, 'status': {'uiStatus': 'mainUI', 'playerState': {'sourceType': 'linear', 'speed': 1, 'lastSpeedChangeTime': 1674065654955, 'source': {'channelId': '1464', 'eventId': 'crid:~~2F~~2Fgn.tv~~2F8605755~~2FEP012708730086,imi:3ba8877dde21ac3f5c1ecba04d7d0b1e1a40b33e'}}, 'uiState': {}}}
2023-01-19 17:51:05.798 ERROR (Thread-2 (_thread_main)) [lghorizon.lghorizon_api] Giving up _do_api_call(...) after 3 tries (lghorizon.exceptions.LGHorizonApiConnectionError: Unable to call https://prod.spark.virginmedia.com/eng/web/linear-service/v2/replayEvent/crid:~~2F~~2Fgn.tv~~2F8605755~~2FEP012708730086,imi:3ba8877dde21ac3f5c1ecba04d7d0b1e1a40b33e?returnLinearContent=true&language=en. Error:401 Client Error: Unauthorized for url: https://prod.spark.virginmedia.com/eng/web/linear-service/v2/replayEvent/crid:~~2F~~2Fgn.tv~~2F8605755~~2FEP012708730086,imi:3ba8877dde21ac3f5c1ecba04d7d0b1e1a40b33e?returnLinearContent=true&language=en)
2023-01-19 17:51:05.799 ERROR (Thread-2 (_thread_main)) [lghorizon.lghorizon_api] Could not handle status message
2023-01-19 17:51:05.800 ERROR (Thread-2 (_thread_main)) [lghorizon.lghorizon_api] Full message: {'version': '1.4.1', 'type': 'CPE.uiStatus', 'source': '3C36E4-EOSSTB-003369527704', 'messageTimeStamp': 1674150649292, 'status': {'uiStatus': 'mainUI', 'playerState': {'sourceType': 'linear', 'speed': 1, 'lastSpeedChangeTime': 1674065654955, 'source': {'channelId': '1464', 'eventId': 'crid:~~2F~~2Fgn.tv~~2F8605755~~2FEP012708730086,imi:3ba8877dde21ac3f5c1ecba04d7d0b1e1a40b33e'}}, 'uiState': {}}}

Anything I can check to help debug this?

Can't select radio station in the ziggo intergration

When i select a radio station like 'radio 538` in de mediaplayer in home assistant. I see a response from my media box but te station is not selected or shown on my tv.

The media box gives the message " Deze titel is naar je tv gestuurd vanaf home assistant" but the input is not changed

I changed my password on my phone forgot about home assistant now my account is locked.

Describe the bug
I changed the ziggo password on my phone. and forgot about this integration
the integration kept using the old password. and now the account is locked.

To Reproduce (use at own risk)

  1. set the integration
  2. change the password some where else
  3. the integration will keep using the password that is incorrect. ignoring a you are using a wrong password notification
  4. you cant use the integration any more changing the password to the correct one wont help you because the account is locked.

Expected behavior
Please dont use a wrong password over and over again.

Version of the component
0.5.0

Logging

2023-04-15 11:38:54.652 ERROR (SyncWorker_8) [lghorizon.lghorizon_api] Giving up _authorize(...) after 3 tries (lghorizon.exceptions.LGHorizonApiConnectionError: Account locked)
2023-04-15 11:39:27.811 ERROR (SyncWorker_8) [lghorizon.lghorizon_api] Giving up _authorize(...) after 3 tries (lghorizon.exceptions.LGHorizonApiConnectionError: Account locked)

Additional context
can you please if you know tell me how to tell ziggo what api is used. and what they need to unlock?

Telenet stopt working

After working for years , integration stopt working... Tried to delete and re-install , but now unable to login... Also the data for retrieving the DTV key seems outdated , cant find this page in my Telenet account.

Integration called deprecated "async_setup_platforms" instead of awaiting "async_forward_entry_setups"

Describe the bug
Warning message of deprecated function when starting integration:

Detected integration that called async_setup_platforms instead of awaiting async_forward_entry_setups; this will fail in version 2023.3. Please report issue to the custom integration author for lghorizon using this method at custom_components/lghorizon/init.py, line 49: hass.config_entries.async_setup_platforms(entry, PLATFORMS)

To Reproduce
Start integration on HA instance with version 2023.2.xx

Expected behavior
No warning about deprecated function use and that integration will continue to work in HA 2023.3

Screenshots
n/a

Version of the component
0109318

Logging
n/a

Additional context
n/a

Error in Service.yaml

I get after every update an error in Watchman report about missing entity: media_player.tv_box_livingroom

Seems an easy fix, just in services. yaml an # and problem solved, can you implement this in future updates?

`record:
fields:
entity_id:
# example: "media_player.tv_box_livingroom"

rewind:
fields:
entity_id:
# example: "media_player.tv_box_livingroom"

fast_forward:
fields:
entity_id:
# example: "media_player.tv_box_livingroom"

remote_key_press:
fields:
entity_id:
# example: "media_player.tv_box_livingroom"
remote_key:
# example: TV`

Detected integration that called async_setup_platforms instead of awaiting async_forward_entry_setups; this will fail in version 2023.3

Describe the bug
HA shows in log:

Detected integration that called async_setup_platforms instead of awaiting async_forward_entry_setups; this will fail in version 2023.3. Please report issue to the custom integration author for lghorizon using this method at custom_components/lghorizon/init.py, line 49: hass.config_entries.async_setup_platforms(entry, PLATFORMS)

To Reproduce
Steps to reproduce the behavior:
Upgrade HA to version greater than 2023.3.
Start HA and check log

Expected behavior
No error in log

Version of the component
0109318

Logging
NA

Additional context

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:77
First occurred: 15:59:20 (1 occurrences)
Last logged: 15:59:20

Detected integration that called async_setup_platforms instead of awaiting async_forward_entry_setups; this will fail in version 2023.3. Please report issue to the custom integration author for lghorizon using this method at custom_components/lghorizon/__init__.py, line 49: hass.config_entries.async_setup_platforms(entry, PLATFORMS)

Service

I'm missing the service lghorizon to change a channel in Home assistant version 2022.10.5.

Channel 999 not working (NL, Ziggo)

Describe the bug
Channel 999 (NPO 1 UHD, worldcup) is causing an error.
I've the idea this might be very similar to the issue I had with the previous integration and channel 14 (Ziggo Sport).

To Reproduce
Steps to reproduce the behavior:

  1. Go to channel 999 on the mediabox (tv remote)
  2. Error in the log

Expected behavior
In an ideal world the integration should see this channel, with an image and the current program name.

Screenshots

Version of the component
Just pulled your dev branch

Logging

2022-11-25 20:14:06.019 ERROR (Thread-106 (_thread_main)) [lghorizon.lghorizon_api] Full message: {'version': '1.4.1', 'type': 'CPE.uiStatus', 'source': '3C36E4-EOSSTB-003926772108', 'messageTimeStamp': 1669403644226, 'status': {'uiStatus': 'mainUI', 'playerState': {'sourceType': 'linear', 'speed': 1, 'lastSpeedChangeTime': 1669402258378, 'source': {'channelId': 'NL_000207_019518', 'eventId': 'crid:~~2F~~2Fgn.tv~~2F22430094~~2FEP044898230020,imi:ab76b7f1351c75dd815695e983a3a06f48a52c03'}}, 'uiState': {}}}
2022-11-25 20:14:06.021 ERROR (Thread-106 (_thread_main)) [lghorizon.lghorizon_api] ['Traceback (most recent call last):\n', '  File "/usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py", line 269, in _on_mqtt_message\n    self._handle_box_update(deviceId, message)\n', '  File "/usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py", line 298, in _handle_box_update\n    channel = self._channels[replayEvent.channelId]\n', "KeyError: 'NL_000207_019518'\n"]

Let me know if you need more logs (debug).

Additional context
Add any other context about the problem here.

YouTube

Is it possible to make YouTube available in the channel select dropdown? Netflix/Videoland/Disney and others are available, but I'm not able to select YouTube.

Integration stops updating until reload

Hi ,

I am using Virgin Media (GB). My integration works for a few hours, then the boxes etc stop responding, at which point I have to reload the integration, and it all works fine again. It is really strange issue, but consistently stops working. The integration is loaded etc and running fine, it just seems to lose the link to the Virgin TV boxes

UPC Switzerland now at Sunrise Switzerland

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Hi, as UPC CH has been merged with Sunrise CH all the UPC customers have been moved to sunrise and the upc accounts have been closed and therfore no devices will be found (even though you can still successfully connect to UPC...

Describe the solution you'd like
A clear and concise description of what you want to happen.

Any chance to exchange (or add) sunrise instead (or additionally) to the integration?

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

media info

Describe the bug
Same media info on 2 default cards
Yesterday I tested this add-on; seems to work fine
only problem on this moment:
2 tv-boxes were found: tvbox1 and tvbox2
so 2 cards were created with the correct info
When starting first tv-box everything was ok and I got the media info on the screen (displaying the program that was on TVbox1
After starting tvbox 2 and change the source to another channel, the media info was correct; but after 5 seconds media info on both cards became the same.
Altough I can still change the source on both tvboxes

Automation with double/triple numbers

Hello,

I want to make a automation for my wife (mostly for my learning curve) that turns the tv on at specific time and channel.

When I want to choose a channel with 2 numbers, nothing happens.

action:

  • service: lghorizon.remote_key_press
    data:
    entity_id: media_player.mediabox_woonkamer
    remote_key: "34"
    mode: single

I tried several options, but nothing worked (my lack of knowledge I think)

When somebody can help me with this "probably" small thing, I would be grateful

Show "Pause" status when watching TV

Is your feature request related to a problem? Please describe.
When I put my Telenet TV Box on pause watching one of channels. It does not reflect in the app (not in the view or the logs)

Describe the solution you'd like
Show the Pause status of TV Channels in the HA media player so it can be used remotely or to trigger items

Describe alternatives you've considered
It works when I use a chrome cast on the same TV.

Additional context
image

image

Unable to login to Virgin Media (GB)

I've had to set up a completely new instance of Home Assistant and am unable to login to Virgin Media (GB) with the LG Horizon integration. This is the error I get from the logs:

Logger: lghorizon.lghorizon_api
Source: /usr/local/lib/python3.10/site-packages/backoff/_common.py:120
First occurred: 20:06:04 (1 occurrences)
Last logged: 20:06:04

Giving up connect(...) after 11 tries (AttributeError: 'LGHorizonAuth' object has no attribute 'accessToken')

Any idea how I can get past this error?

I've tried bith version 5.0 and 4.4 of the Integration, installed via HACS.

Missing code?

service: lghorizon.play_media
service_data:
entity_id: media_player.ziggo_beneden
media_content_id: 401 # Any channel number, 'Netflix' or 'Videoland'

This service is written down in the README. But i can not find it back in homeassistant and no mention in. services.yaml

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Version of the component
The version of the component as it is installed on your HA

Logging
Enable debug logging and add your log. DO NOT SHARE SENSITIVE DATA SUCH AS PASSWORDS AND ACCOUNT INFO!
You can enable logging by setting up the logging component in HA as follows:

logger:
  default: warning
  logs:
    lghorizon: debug

Additional context
Add any other context about the problem here.

Error setting up entry Virgin Media for lghorizon

I am having issues with this plugin whenever I do a restart/reset of home assistant. Seems to drop connection and won't re-establish. Sometimes, reloading or disabling and enabling the integration will fix the issue but this does not always work. Seems to be an issue with the accessToken -

Error setting up entry Virgin Media for lghorizon
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 372, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/lghorizon/init.py", line 50, in async_setup_entry
await hass.async_add_executor_job(api.connect)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py", line 267, in connect
self._obtain_mqtt_token_gb()
File "/usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py", line 256, in _obtain_mqtt_token_gb
self._session.headers["x-oesp-token"] = self._auth.accessToken
AttributeError: 'LGHorizonAuth' object has no attribute 'accessToken'

Telenet - Could not handle status message

Describe the bug
Errors show up in logs related to lghorizon configured for Telenet (BE).

Version of the component
v0.5.0

Logging

2023-04-14 21:55:10.836 WARNING (Thread-3 (_thread_main)) [lghorizon.lghorizon_api] Full message: {'version': '1.3.18', 'type': 'CPE.uiStatus', 'source': '3C36E4-EOSSTB-003950633101', 'messageTimeStamp': 1681502110744, 'status': {'uiStatus': 'mainUI', 'playerState': {'sourceType': 'replay', 'speed': 2, 'lastSpeedChangeTime': 1681502110741, 'source': {'eventId': 'crid:~~2F~~2Fgn.tv~~2F8019684~~2FMV013851670000,imi:d745a73c443100635e51bac4ca5f93591d249229', 'prePadding': 300000, 'postPadding': 600000, 'sessionStartTime': 1681497360000, 'sessionEndTime': 1681504560000, 'adManifest': [{'dStart': 216320, 'dEnd': 301240, 'adType': 'IP_OTHER', 'adCounter': False, 'isSkippable': False}, {'dStart': 1825960, 'dEnd': 2105880, 'adType': 'IP_OTHER', 'adCounter': False, 'isSkippable': False, 'restrictions': ['ff', 'sF', 'ddF']}, {'dStart': 3727120, 'dEnd': 3958640, 'adType': 'IP_OTHER', 'adCounter': False, 'isSkippable': False, 'restrictions': ['ff', 'sF', 'ddF']}]}, 'relativePosition': 3960620}, 'uiState': {}}}
2023-04-14 22:17:44.779 ERROR (Thread-3 (_thread_main)) [lghorizon.lghorizon_api] Could not handle status message
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 449, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/lib/python3.10/http/client.py", line 1374, in getresponse
response.begin()
File "/usr/local/lib/python3.10/http/client.py", line 318, in begin
version, status, reason = self._read_status()
File "/usr/local/lib/python3.10/http/client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.10/site-packages/urllib3/packages/six.py", line 769, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 449, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/lib/python3.10/http/client.py", line 1374, in getresponse
response.begin()
File "/usr/local/lib/python3.10/http/client.py", line 318, in begin
version, status, reason = self._read_status()
File "/usr/local/lib/python3.10/http/client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py", line 298, in _on_mqtt_message
self._handle_box_update(deviceId, message)
File "/usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py", line 331, in _handle_box_update
raw_replay_event = self._do_api_call(f"{self._country_settings['api_url']}/eng/web/linear-service/v2/replayEvent/{eventId}?returnLinearContent=true&language={self._country_settings['language']}")
File "/usr/local/lib/python3.10/site-packages/backoff/_sync.py", line 105, in retry
ret = target(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py", line 360, in _do_api_call
api_response = self._session.get(url)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 600, in get
return self.request("GET", url, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 547, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
2023-04-14 22:17:44.784 WARNING (Thread-3 (_thread_main)) [lghorizon.lghorizon_api] Full message: {'version': '1.3.18', 'type': 'CPE.uiStatus', 'source': '3C36E4-EOSSTB-003950633101', 'messageTimeStamp': 1681503464701, 'status': {'uiStatus': 'mainUI', 'playerState': {'sourceType': 'replay', 'speed': 2, 'lastSpeedChangeTime': 1681503464699, 'source': {'eventId': 'crid:~~2F~~2Fgn.tv~~2F8019684~~2FMV013851670000,imi:d745a73c443100635e51bac4ca5f93591d249229', 'prePadding': 300000, 'postPadding': 600000, 'sessionStartTime': 1681497360000, 'sessionEndTime': 1681504560000, 'adManifest': [{'dStart': 216320, 'dEnd': 301240, 'adType': 'IP_OTHER', 'adCounter': False, 'isSkippable': False}, {'dStart': 1825960, 'dEnd': 2105880, 'adType': 'IP_OTHER', 'adCounter': False, 'isSkippable': False, 'restrictions': ['ff', 'sF', 'ddF']}, {'dStart': 3727120, 'dEnd': 3958640, 'adType': 'IP_OTHER', 'adCounter': False, 'isSkippable': False, 'restrictions': ['ff', 'sF', 'ddF']}, {'dStart': 5411560, 'dEnd': 5761760, 'adType': 'IP_OTHER', 'adCounter': False, 'isSkippable': False, 'restrictions': ['ff', 'sF', 'ddF']}]}, 'relativePosition': 5403260}, 'uiState': {}}}
2023-04-14 22:36:08.154 ERROR (Thread-3 (_thread_main)) [lghorizon.lghorizon_api] Could not handle status message
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 449, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/lib/python3.10/http/client.py", line 1374, in getresponse
response.begin()
File "/usr/local/lib/python3.10/http/client.py", line 318, in begin
version, status, reason = self._read_status()
File "/usr/local/lib/python3.10/http/client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/local/lib/python3.10/site-packages/urllib3/packages/six.py", line 769, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 449, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/lib/python3.10/http/client.py", line 1374, in getresponse
response.begin()
File "/usr/local/lib/python3.10/http/client.py", line 318, in begin
version, status, reason = self._read_status()
File "/usr/local/lib/python3.10/http/client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py", line 298, in _on_mqtt_message
self._handle_box_update(deviceId, message)
File "/usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py", line 331, in _handle_box_update
raw_replay_event = self._do_api_call(f"{self._country_settings['api_url']}/eng/web/linear-service/v2/replayEvent/{eventId}?returnLinearContent=true&language={self._country_settings['language']}")
File "/usr/local/lib/python3.10/site-packages/backoff/_sync.py", line 105, in retry
ret = target(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/lghorizon/lghorizon_api.py", line 360, in _do_api_call
api_response = self._session.get(url)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 600, in get
return self.request("GET", url, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 547, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

MQTT required ?

Is MQTT a prerequisite for the integration to work ?
based on debug logs, it looks like all data is being exchanged throught the API's...

All MQTT interaction seem to be failing (see other bug report #58 )
Hence, MQTT does not seem to provide any added value and could/should possibly disabled...

Perhaps some integrations require MQTT to work, but for Telenet that does not seem to be the case. Hence I would rather have the option to disable such connectivity and avoid sharing information to unrelated 3rd party websites.

Curious to get your opinion/feedback.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.