Topic: My HTML Viewer Project

As much as I like the space clock, I needed something more.  I've never liked the idea of creating widgets in flash, but I'm familiar with HTML/Javascript so I've started an attempt at replacing the standard dashboard with an HTML Viewer which can be used to display a downloaded HTML/Javascript whatever (dashboard, widget system, webpage, etc).

Aside: I'm not calling it a webbrowser because the goal isn't to browse the web, but instead to display an HTML page (so there is no history, no bookmarks, and limited interaction).

I started with the QtWebkit/webbrowser example and made it full screen and chromeless. The casual observer only sees the rendered HTML and has no idea what is actually driving it.

I have the whole thing on a USB thumb driving running because of a debugchumby script.  I have it running on an Insignia-3-incher.

As my proof of concept, I wrote, in HTML/Javascript, a Picasa viewer with clock and weather overlay.  I've had some problems with it running out of memory, but I think I've fixed those.

My next steps are to allow Javascript access to screen brightness and the top button, and to see if I can get audio to work.  I hope to turn this back into an alarm clock that auto-dims at night.

I can't say that any of my code is great, but I would be willing to post source code and/or binaries if anyone is interested.  If there is a level of interest, it might influence me to make the code more share-able, but if there isn't any interest, I'll probably just keep things as the hack job they are.

Re: My HTML Viewer Project

This is a great idea and one that I think Chumby was looking into.  It actually reminds me a lot of the current Chromecast device, since that's effectively running a build of the Chrome browser that's being remotely controllled to go view content that's "cast" from devices.

Re: My HTML Viewer Project

The NeTV device pretty much works this way.

It's effectively an Webkit browser with a small web server on localhost that took commands to manipulate and report on device settings.

Re: My HTML Viewer Project

I'm absolutely interested.  I actually have a similar project and have had a couple iterations of similar things for the I8.

I run a page specifically for my chumby.  It was a complete custom "information station" for me that displayed calendar events, weather, and I have plans to add integration to automated lighting, my sprinklers (opensprinkler pi), my alarm integration, etc.

It sounds like you're a better HTML coder than me.  My photo solution for the I8 was written in C.

Linux Guy - Occasional Chumby Hacker

Re: My HTML Viewer Project

Interesting. I remember a similar project here about a year ago. This one has volume and brightness controls, so (with 9072997's permission) you could probably pluck some of that code.

Re: My HTML Viewer Project

I'm not really ready to share anything at this point.  But to prove that I haven't forgotten about this, here is my source code:

For the HTML viewer application:

For the web application:

You won't find any documentation or instructions at this point, so I really don't expect this to be usable.  But I personally hate it when someone shares that they are doing something ambitious and never share anything ever again about it.  Here is something, just maybe not enough to actually be useful to anyone.

One major roadblock I've come across is that the Falconwing devices don't really have enough memory to run things the way I would like.  I'm uncertain whether this is because the webapp is too bloated (uses AngularJS) or if QtWebkit is just too memory hungry or both.

Re: My HTML Viewer Project

AngularJS is a pretty heavyweight JS framework -- it does lots of computation behind the scenes which can eat into memory, In my testing with JSCore last year, even an empty webpage is using about 3MB for its DOM and JS environment.

The 64MB that the C1 has is a really small footprint.  Our lowest memory webOS device, the Pixi, had about 192MB of working memory and a similar sized screen, and it had problems with multiple pages loaded often.  Have you tried setting up a swap partition?  Swapping on microSD isn't ideal, but it might give enough room to allow for some operation.

Re: My HTML Viewer Project

We did have QtWebKit running on Falconwing as a potential firmware update - as I recall, we had to create a swap partition.

Re: My HTML Viewer Project

unwiredben wrote:

Our lowest memory webOS device, the Pixi, had about 192MB of working memory and a similar sized screen, and it had problems with multiple pages loaded often.

Of course, with WebOS, EVERYTHING'S javascript, not just the web browser. "Too many cards", anyone? tongue

Re: My HTML Viewer Project

Wow, harmonic convergence! I'm reading this on my Pre 3 right after checking new posts on webOS Nation.

Re: My HTML Viewer Project

The suggestions about creating a swap file have helped immensely.  Whereas before I could see things slowing down after a couple dozen minutes, now things are running fine for at least many hours (I'm still testing it). 

Hopefully within the next undefined number of days or so I'll be able to post some binaries so other people can try it out if they wish.

Here is a screenshot of what it looks like.  It still needs a little refinement, but it is starting to come together:

(The background picture doesn't have anything to do with the Flash Flood Watch, it is just a random photo out of a Picasa gallery that I like)

Re: My HTML Viewer Project

Do you have a memory leak?

Linux Guy - Occasional Chumby Hacker