{"id":16717943,"url":"https://github.com/dsheets/lgtv-sdp","last_synced_at":"2025-07-02T07:06:56.637Z","repository":{"id":64307889,"uuid":"304576842","full_name":"dsheets/lgtv-sdp","owner":"dsheets","description":"Fake startup service for LG TV","archived":false,"fork":false,"pushed_at":"2020-10-18T14:51:25.000Z","size":36,"stargazers_count":16,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T08:55:52.726Z","etag":null,"topics":["lgtv","time"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dsheets.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-16T09:13:49.000Z","updated_at":"2025-02-22T09:58:25.000Z","dependencies_parsed_at":"2023-01-15T11:00:38.335Z","dependency_job_id":null,"html_url":"https://github.com/dsheets/lgtv-sdp","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/dsheets/lgtv-sdp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsheets%2Flgtv-sdp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsheets%2Flgtv-sdp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsheets%2Flgtv-sdp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsheets%2Flgtv-sdp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dsheets","download_url":"https://codeload.github.com/dsheets/lgtv-sdp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsheets%2Flgtv-sdp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263091026,"owners_count":23412344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lgtv","time"],"created_at":"2024-10-12T21:34:25.634Z","updated_at":"2025-07-02T07:06:56.615Z","avatar_url":"https://github.com/dsheets.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lgtv-sdp\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/dsheets/lgtv-sdp)](https://goreportcard.com/report/github.com/dsheets/lgtv-sdp)\n\n**tl;dr**: LG 'smart' TV and projector devices want to phone home to get\nthe date and time and this daemon fixes these defective devices.\n\nYou just got a fancy new display from LG! Congratulations!\n\nUnfortunately, when you decided to make it behave itself by\nfirewalling it, it stopped automatically updating its time and\ndate. Maybe your display is the amazing HU-80 CineBeam portable 4K\nlaster projector and its time and date get thrown away every time you\nstore it. Or maybe you have a TV on a smart plug. Or maybe your power\nis intermittent. Or maybe you just never want to have to worry about\ndate and time on a bloody 'smart' display device. It's so nice to just\nhave the YouTube app on the device work properly... so easy. Except\nGoogle serves TLS certificates with *NotValidBefore* set so the YouTube\napp is unusable until you set the date and time manually. :-( And the\ndevice doesn't listen to the NTP server setting that it itself\nrequests via DHCP. :-(\n\nLuckily, no certificate checking is done on the initial phone home\nrequest it makes and the server response contains an HTTP header with\nthe current time in milliseconds since the UNIX epoch. Whew!\n\n## Installation for the impatient\n\n1. Download correct build for your platform.\n2. Unpack archive (it will create a subdirectory for you) where you\nwant to 'install' the daemon.\n3. `cd` into the installation directory and run `sudo ./lgtv-sdp -s\ninstall BIND_ADDRESS` where `BIND_ADDRESS` is the IP you want the\ndaemon to listen on or `0.0.0.0` or `::` for all addresses.\n4. Redirect DNS for `*.lgtvsdp.com` to an address where the daemon is listening.\n5. Enjoy _your_ LG display with the correct time!\n\n## Building\n\n1. Ensure go 1.14 is installed.\n2. Clone this repo.\n3. `go build` or `GOOS=TARGET_OS GOARCH=TARGET_ARCH go build`\n\n## How it works\n\n### TLS\n\nThe daemon will check if `key.pem` and `cert.pem` files are present in\nits directory and, if they aren't, will create new certificate\nauthority (CA) certificate and a domain certificate and sign the\ndomain certificate with the CA key. The daemon will then start an\nHTTPS server on the standard port 443.\n\n### API\n\nThe HTTPS server will respond with the contents of `initservices.json`\nwith the headers in the files under `initservices.headers/` to\nrequests for any paths. The `X-Server-Time` header will always be set\nto the number of milliseconds since the UNIX epoch. You may be able to\ncustomize more aspects of your device(s) by sending specific headers\nor JSON content but none of that is necessary to set the time. Home\nscreen widgets and further request behavior are both probably\ncontrollable with specific responses. Your contributions are very welcome.\n\n## Help wanted\n\nWe need:\n\n1. A Windows service tester\n2. LG webOS 4 and 5 testers\n3. A free world\n\n## Contributing\n\nPatches, documentation, cool features, and more are\nwelcome. Negativity and lawsuits are not welcome.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsheets%2Flgtv-sdp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsheets%2Flgtv-sdp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsheets%2Flgtv-sdp/lists"}