Browser client, OS independant

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Timoh
Advanced Member
Posts: 260
Joined: Thu Feb 02, 2006 12:56 pm
Location: Montreal - Canada

Browser client, OS independant

Post by Timoh »

Hi folks,
I just started on a project that's been rattling around in my head for a while, but before I get too far down the road, I just wanted to make sure no-one else is working on a similar thing.

I've currently started to write a javascript based Housebot client. My goal is to replace the windows client, so you can run your themes in any browser... Without the pain of setting up a webserver or designing your Housebot web page.

The concept it simple... The javascript client reads the yourtheme.xml file and builds up your panels as the windows client would. This will give you the same look and feel of the native win clients for HB and also HB control from your browser. It will also expand HB themes to devices such as tablets, ipads, Archos, etc. (Phase 2 is to do a smartphone version for smaller screens.)

I've already got my panels loading, and am currently working on button functionality. Before I get too far down the path, I just want to make sure that I'm not duplicating efforts with anyone... Or even Scott.

Tim
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: Browser client, OS independant

Post by ScottBot »

I'm not working on it, but it sounds great. Let me know if there's information you need to help the project.
Scott
PT
Senior Member
Posts: 147
Joined: Wed Apr 13, 2005 12:32 pm
Location: Hampshire.UK

Re: Browser client, OS independant

Post by PT »

This sounds interesting. Like the idea of using the ipads.good luck and keeps us posted
Regards

PT

If it isn't broke,fix it till it is!
Timoh
Advanced Member
Posts: 260
Joined: Thu Feb 02, 2006 12:56 pm
Location: Montreal - Canada

Re: Browser client, OS independant

Post by Timoh »

It should be a fun project. And the more I think about it, the more interesting it becomes. For example, instead of trying to shoe-horn an existing theme onto a small screen smartphone, just write a new theme specifically for the smartphone. This morning, I had another cool idea... big screen... TV! Many new TVs come with a browser built in, so one could write an extra big theme for doing Housebot from their TV!

Of course all this stuff is dependant on how well javascript, html & css works on those devices. I fully expect quirks, but at least there will be a solid base to work from.

Thanks for the offer of info Scott. I think the only piece I will need will come later on some of the communication between the client & HB. I am planning on using the external control, but I don't think that will give the functionality to pull theme images, buttons, etc.

Tim
edgar
Member
Posts: 95
Joined: Tue Mar 24, 2009 11:14 pm
Location: Springfield, VA

Re: Browser client, OS independant

Post by edgar »

Hi Tim,

I think your idea for this is exactly what HB needs right now, especially with Windows Mobile so slow out of the gates. It really allow for the flexibility...Very much looking forward to seeing what you come up with!

v/r

Kevin
Timoh
Advanced Member
Posts: 260
Joined: Thu Feb 02, 2006 12:56 pm
Location: Montreal - Canada

Re: Browser client, OS independant

Post by Timoh »

Good progress today folks.

All the panels are loading and working beautifully. I've add the button functionality for flipping between the panels. Is is smooth and seemless. :)

I'm going to start working on the code to lay out other panel elements such as text, labels, sliders, indicators, etc in the next couple of days. I suspect it'll be another week or two to get all that stuff behaving & displaying properly.

Tim
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: Browser client, OS independant

Post by ScottBot »

Timoh wrote:... I think the only piece I will need will come later on some of the communication between the client & HB. I am planning on using the external control,...
That's where things get challenging. The interface between HB and the client is a binary protocol that will be very difficult to re-implement. If I had to do it over again, it would have been an ASCII protocol (although transferring images would have been a challenge).

However, the external control plugin does support ASCII and that might be your best option. It doesn't support nearly all of the things that happen between the server and the client natively, but it might be enough to get things done.
Scott
Timoh
Advanced Member
Posts: 260
Joined: Thu Feb 02, 2006 12:56 pm
Location: Montreal - Canada

Re: Browser client, OS independant

Post by Timoh »

Thanks Scott I suspected as much.
My plan b was indicating to users they need to copy all there theme files, images, etc to the local device. But I suspect that might be a problem for "locked down" devices such as the ipad.
My plan c was to set up a small ultralight webserver on the HB machine for handling anything the external control cannot handle.

At any rate, those pieces are probably a couple months out at least. So I'll worry about them later.

Tim
Timoh
Advanced Member
Posts: 260
Joined: Thu Feb 02, 2006 12:56 pm
Location: Montreal - Canada

Re: Browser client, OS independant

Post by Timoh »

Hi Scott,
Are you doing any adjusting of the font sizes in the swremote?
All of my fonts are coming out slightly too big. Could the swremote font size include some padding or margins somewhere?
Tim
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: Browser client, OS independant

Post by ScottBot »

It doesn't appear to be. Maybe your browser has the font sizes adjusted from 'normal' (setting somewhere).
Scott
Timoh
Advanced Member
Posts: 260
Joined: Thu Feb 02, 2006 12:56 pm
Location: Montreal - Canada

Re: Browser client, OS independant

Post by Timoh »

The font size issue seems to be either javascript or the HB client top/bottom margins issue. It's consistently off by 2 pixels. Measuring it doesn't really help because we can't see the actual margins to measure on the screen. At any rate, subtracting 2 px solves the problem in all cases.

It also looks like I'm going to write my own version of the external control with an embedded webserver. :s That should be fun... not, but there is some code out there that will help. There are a few issues with native the HB external control...
1) no support for pulling images.
2) Internet Exlorer Javascript will only actually read files from a web server. This makes it impossible for IE to read local files in JS, such as the yourtheme.xml file.
3) No support for getting yourtheme.xml file and loading dependencies.

There are some nice side effects to going this route such as not requiring to copy any files at all to the local device & improved http security/password protection of an http server. I'll make it tightly integrated, it will show up as a device, and all config will be done through device properties.

The server piece is months away, but I will release the "copy all files to your device and launch" code much sooner for the daring to use. Of course some features such as dynamic images/not supported by HB external control, will not work.

Tim
Timoh
Advanced Member
Posts: 260
Joined: Thu Feb 02, 2006 12:56 pm
Location: Montreal - Canada

Re: Browser client, OS independant

Post by Timoh »

Update...

All of the items I am using in my theme have been implemented in a javascript UI! I've included some screenshots of my native HB remote and my javascript remote. Keep in mind this is only the user interface, which is why you see numbers where there should be text; and also why the indicators show all image states. There is no data coming from the Housebot server yet.

I was going to release this javascript with some basic functionality for using the native HB external control component, but I have decided not to release it. I will not be using the HB external control, so to add that functionality for an interim release would be a waste of time. I've also discovered some complexities that would probably prevent the javascript from working in quite a few cases. Rather than spend time answering questions and helping folks, I will put my energy into writing the plugin that will allow this browser client to work flawlessly.

I suspect it will take me another month to write the plugin, it might a be a bit quicker now that I am off work for xmas. :D
SWRemote
SWRemote
swremote1.PNG (412.36 KiB) Viewed 20396 times
Browser
Browser
browser1.PNG (545.17 KiB) Viewed 20395 times
SWRemote
SWRemote
swremote2.PNG (386.79 KiB) Viewed 20396 times
Browser
Browser
browser2.PNG (519.42 KiB) Viewed 20395 times
Tim
roussell
Advanced Member
Posts: 268
Joined: Wed Dec 15, 2004 9:07 am
Location: Pelham, AL

Re: Browser client, OS independant

Post by roussell »

Great job Tim! Man, youre really moving on this! Although I doubt you'll need it, please let me know if you need any help.
Terry
edgar
Member
Posts: 95
Joined: Tue Mar 24, 2009 11:14 pm
Location: Springfield, VA

Re: Browser client, OS independant

Post by edgar »

Tim,

Absolutely fantastic so far! Very impressive! Can't wait for it!

Happy Holidays!

Kevin
James D
Senior Member
Posts: 134
Joined: Wed Jun 06, 2007 3:30 pm
Location: Baja California

Re: Browser client, OS independant

Post by James D »

I am eagerly waiting on the update too.
Post Reply