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

session time is not resting on TV #1

Open
abdulazizalmass opened this issue Jan 12, 2023 · 8 comments
Open

session time is not resting on TV #1

abdulazizalmass opened this issue Jan 12, 2023 · 8 comments

Comments

@abdulazizalmass
Copy link

Thanks for the amazing tip.

After following the steps, this was received {"result":"success","errorCode":"200","errorMsg":"GNL"} .

The session was not extended as tested on the developer mod app from LG tv. By any chance, did this happen to you ?

reverse engineering might work through ssh with localhost:9922/status but will consider this after your response

@licensed
Copy link

licensed commented Sep 3, 2023

Thanks for the amazing tip.

After following the steps, this was received {"result":"success","errorCode":"200","errorMsg":"GNL"} .

The session was not extended as tested on the developer mod app from LG tv. By any chance, did this happen to you ?

reverse engineering might work through ssh with localhost:9922/status but will consider this after your response

Same here.

@xcorp
Copy link

xcorp commented Nov 10, 2023

@SR-Lut3t1um @abdulazizalmass I also get the same issue, timer not updating on the Developer Mode app. This might only be a cosmetic thing?

@abdulazizalmass
Copy link
Author

@SR-Lut3t1um @abdulazizalmass I also get the same issue, timer not updating on the Developer Mode app. This might only be a cosmetic thing?

After installing the latest code update from LG, LG developers added an amazing feature to extend the session to 999 hours. For now, this is a good alternative to try.

Best of luck 🤞

@xcorp
Copy link

xcorp commented Nov 11, 2023

@SR-Lut3t1um @abdulazizalmass I also get the same issue, timer not updating on the Developer Mode app. This might only be a cosmetic thing?

After installing the latest code update from LG, LG developers added an amazing feature to extend the session to 999 hours. For now, this is a good alternative to try.

Best of luck 🤞

Yeah, but I'm using this with https://github.com/SLG/tv-service so would be nice to not have to bother all together :)

@SR-Lut3t1um
Copy link
Owner

Sorry for the late respone. In theory it should still work, even if the timer is not correctly shown on the TV. You can verify the timer with https://developer.lge.com/secure/CheckDevModeSession.dev?sessionToken={your_token}. If that fails, you will need to redo the process. So using the actual script might be a more stable solution, keep in mind it will need to start the TV.

@xcorp
Copy link

xcorp commented Nov 14, 2023

Yeah, seems to reset fine, many thanks :)

@posti85
Copy link

posti85 commented Jan 10, 2024

I seems the time counter doesn't update in the Developer Mode App until you turn off the TV and also unplug it. So, indeed, querying the CheckDevModeSession endpoint is the most fiable way.

By the way, you can also query the session token, after Connecting TV and PC, just executing:

ares-novacom --device tv --run "cat /var/luna/preferences/devmode_enabled"

@gfrancesco
Copy link

gfrancesco commented Oct 29, 2024

I just run into this, I can also confirm that I cannot see the timer reset on the TV even when the CheckDevModeSession endpoint confirms that it has been reset.
I'll need to test unplugging the tv, but I'm a bit worried that the tv might just reset all the apps installed when its counter goes to zero, regardless of what the remote API endpoint says.

Anyway, I created a small Cloudflare Worker to reset the counter. You can run it for free (don't remember the free tier limit on Cloudflare but it's high), you just need to add a trigger to schedule the execution as often as you want (I set it once a week) and add an LG_API_KEY secret variable with your key under Variables and Secrets in the Cloudflare dashboard.

You can also reset the counter manually by calling the worker url.

async function fetchLGapi(api_key){
  let res = await fetch(`https://developer.lge.com/secure/ResetDevModeSession.dev?sessionToken=${api_key}`);
  return res;
}

export default {

  async fetch(request, env, ctx) {
    return await fetchLGapi(env.LG_API_KEY);
  },

  async scheduled(event, env, ctx) {
    return ctx.waitUntil(fetchLGapi(env.LG_API_KEY));
  }

};

EDIT:
If of any interest, I performed a couple of tests and I was able to see the timer reset from the TV, but only after disabling QuickStart+ on the tv. My guess is that the cache is cleared more frequently, so the TV is updating the counter every time you turn it on or at least more often than before.

A note on the worker script above: if you use the standard URL for Cloudflare workers (e.g. your-worker.workers.dev) it will be hit by random bots several times during the day. It's not a big problem since I've never seen more than a hundred requests a day, which is way below the free tier, but if you want to avoid this you can delete the fetch block so the worker can be triggered only by the scheduler once a week or so.

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

No branches or pull requests

6 participants