Zima Weather: LG TV Store

Publishing Zima Weather to the LG TV Store

Zima Weather: LG TV Store

After zero luck with Hacker News and minor interest from Habr, I thought about other distribution channels for my app. I designed my weather dashboard app for desktop use, so my options are Microsoft Apps and Apple's App Store. I cover my submission to the Microsoft Store in another post: XXX

Another platform I thought about was Smart TVs. Most of weather apps on Smart TVs are just video feeds from a news anchor, so I thought my app could fit well there. And since I myself have Smart TV from LG at home, my choice fell on LG TV Store.

Building app for LG SmartTV

LG Smart TVs run WebOS, which is basically Chrome browser underneath, so apps are simply web applications – html/css/javascript.

There are basically two app types that you can create for LG TV: packaged and hosted:

  • Packaged app is when you create an archive with all the resources, html pages, css, js, etc. The advantage here is that all the resources are contained inside the app, so that the TV does not have to request them over network.
  • Hosted app, on other hand, is very simple: it consists of some metadata files, icons, and a single html file. The html file simply contains a redirect to your website with the app. The advantage here is that you can update the app any time without going through the submission process all the time.

I was just exploring the platform at that time, didn't have a proper build process to package my app standalone, so I went with the hosted app.

WebOS Versions

Chrome versions inside WebOS lag official Chrome versions quite a bit behind. WebOS 2020 (5.x), for instance, runs Chrome 68, which was actually released back in August 2018. It doesn't have flatMap  (came in Chrome 69), optional chaining in JavaScript, backdrop-filters in CSS, gap property in flexbox, AVIF support, etc.. That means transcriber + polyfills would be necessary to develop apps for those platforms.

I cover my build process with esbuild for transcription in another post: XXX

Currently, 2020 models are the most prevalent with ~40% of the market share according to my apps' April-July 2023 statistics:

Here you can find the correspondence table between WebOS and Chrome versions:

Web API and Web Engine
Check out web API and web engine information supported by webOS TV.

LG TVs Hardware

Another discovery for me was that many LG TVs have actually very poor hardware. It's probably designed to handle 4K streaming flawlessly, but for web apps, performance is the same or even worse than that of Raspberry PI 4.

My home TV, 65“ LG 4K NanoCell TV NANO75, is considered entry-level and has the QuadCore processor, produces around 30-40 FPS running Zima Weather.

I set up FPS collection 30 second after the start of the app to get some statistics, and here are the latest graphs:

There is no specific TV model in the user-agent string, but seeing such low numbers makes me think that the majority of devices are on the entry-level side. 2020 devices have the worst performance of around ~20FPS , while newer models about 30-40 FPS on average.

WebOS Simulator

LG also provides a TV simulator to test your app from your local machine. It is convenient, and basically has a specific chrome version packed inside, so you can access Chrome Developer Tools from there:

However, simulator only emulates the WebOS 2022 and newer models (Chrome > 87), so to test if the app works properly on older browsers, you need to use tools like BrowserStack/LambdaTest, or download specific old chromium versions (that's what I ended up doing).

Submission Process

To submit an app to LG TV store, you need to register on the LG Seller Lounge: https://seller.lgappstv.com/seller/main/Main.lge

Seller Lounge has one of the most complex submission processes I have seen so far. The interface is quite dated and unresponsive, even after 2023 update, but that's okay.

The most peculiar thing is that they require you to fill a form, covering in details the functionality of your app, and fill out whether it passes all the requirements (you shouldn't submit if it doesn't pass any of those).

But that's already an improvement, when I submitted Zima in October 2022, that form was an Excel spreadsheet.

But that's not all, you also need to submit a presentation, showcasing your application screen and features. Here is one of the pages I did for the initial version of Zima Weather:

Good thing about the hosted app is that after approval, you can modify your web app and only re-submit the app if you need to change metadata like screenshots or store descriptions.

After submission, your app will be functionally tested by a team in Korea. Testing process focuses on checking whether any interactive elements in your app work correctly with TV remotes. If there are issues, they will come back to you with the description and possibly a screenshot of a problematic element.

Go Live

Finally, Zima Dashboard was approved and released to LG Store in the end of October 2022, and I screwed up everything on the launch day.

The whole verification process on LG Seller Lounge took more than a month, so when I finally received a notification that my app was finally released, I thought: "meh... whatever, will look at it later. Nobody is going to install it right away".

I was very wrong. I also misinterpreted increased traffic from "Linux" (what's how Mixpanel identified WebOS) and thought these were bots. Turns out new apps released for LG TVs appear on separate cards in the store, and because there are not that many new apps every day, lots of people saw my app.

Graph on Cloudflare starts earlier because I have added mixpanel later

It was only the next morning that I realized there were hundreds of new users trying my app. But because the browser's geolocation feature on LG TVs doesn't work at all ... they all got a fallback location in Zurich. I scrambled to quickly implement a fix for this by connecting to the Google Geolocation API to get the location by IP address.

Later in the evening, there were so many API requests that I ran out of the daily quota for the OpenWeather APIs. I was away from my PC, so I rushed to increase the limits somehow from my phone.

After a couple of days, I was also on track to exceed the free tier on Google Geolocation API for the current month, and my current rate would cost my around 200$ extra. This happened because I was using Google APIs not only to resolve location based on IP address, but also to make a separate request to get the location name from latitude/longitude (because on PCs the app used the browser's geolocation, which returned coordinates). I switched to Mapbox afterwards for name resolution as it also provided better localization capabilities, but that's a different story.