Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix LG TVs pre 2012 (can't get session id) #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SmoothMC
Copy link

Fix for LG TVs pre 2012.
Without it cant get the session id

Fix for LG TVs pre 2012.
Without it cant get the session id
@SmoothMC SmoothMC changed the title Update pylgnetcast.py Fix LG TVs pre 2012 (can't get session id) Jul 25, 2024
@splinter98
Copy link
Collaborator

I've had a look at this - and as this logic originates from the prior to this fork - I wanted to see if I can verify if this logic was always incorrect. From the other code I've seen that does looks to be the case.

For my understanding, after you made this change can you confirm if you are also able to get a valid response from the [get_volume](https://github.com/Drafteed/python-lgnetcast/blob/e5781eba2c1d246edfc40163c2a435e88e98f8da/pylgnetcast/pylgnetcast.py#L212) function as this change will also affect that function as well and whilst it seems this PR seems to suggest the HDCP support never worked properly (as authentication didn't work) it be good to ensure we ensure all the features work as expected.

Unfortunately I have a 2012 TV, so I cannot verify any pre-2012 functionality myself.

@Drafteed
Copy link
Owner

Before I switched from wokar/pylgnetcast, HA depended on v0.2.0. HDCP support was added in v0.3.0 (5ad0e36).
HDCP is a very rare case and it seems almost nobody used it. In addition, HA integration does not support the HDCP protocol.

I think we can accept this and in case of problems we will roll back.

Copy link
Owner

@Drafteed Drafteed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For my understanding, after you made this change can you confirm if you are also able to get a valid response from the get_volume function as this change will also affect that function as well and whilst it seems this PR seems to suggest the HDCP support never worked properly (as authentication didn't work) it be good to ensure we ensure all the features work as expected.

After confirmation we can merge.

@SmoothMC
Copy link
Author

I will have a look.
I recognized another issue with the hdcp protocol. The Key Codes are completely different at hdcp.
i will try to find a way to add this key codes to the script

POWER = 8
NUMBER_0 = 16
NUMBER_1 = 17
NUMBER_2 = 18
NUMBER_3 = 19
NUMBER_4 = 20
NUMBER_5 = 21
NUMBER_6 = 22
NUMBER_7 = 23
NUMBER_8 = 24
NUMBER_9 = 25
MUTE_TOGGLE = 9
HOME_MENU = 67
DASH = 76
FLASHBACK = 26
CHANNEL_LIST = 83
OK = 68
CHANNEL_UP = 0
CHANNEL_DOWN = 1
VOLUME_UP = 2
VOLUME_DOWN = 3
UP = 64
DOWN = 65
LEFT = 7
RIGHT = 6
BACK = 40
EXIT = 91
CONFIRM = 68
QUICK_MENU = 69
RED = 114
GREEN = 113
YELLOW = 99
BLUE = 97
LIVE_TV = 158
STOP = 177
PLAY = 176
PAUSE = 186
SKIP_BACKWARD = 143
SKIP_FORWARD = 142
RECORD = 189
EPG = 169
ENERGY_SAVING = 149
AV_MODE = 48
EXTERNAL_INPUT = 11
FAVORITE_CHANNEL = 30
SIMPLINK = 126
ASPECT_RATIO = 121
PROGRAM_INFORMATION = 170
NETCAST = 89
GUIDE = 169
SHOW_SUBTITLE = 57
TELE_TEXT = 32
TEXT_OPTION = 33
AUDIO_DESCRIPTION = 145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants