Page 1 of 3
Browser client, OS independant
Posted: Wed Dec 01, 2010 9:50 am
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
Re: Browser client, OS independant
Posted: Wed Dec 01, 2010 11:09 am
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.
Re: Browser client, OS independant
Posted: Wed Dec 01, 2010 4:39 pm
by PT
This sounds interesting. Like the idea of using the ipads.good luck and keeps us posted
Re: Browser client, OS independant
Posted: Fri Dec 03, 2010 8:45 am
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
Re: Browser client, OS independant
Posted: Fri Dec 03, 2010 10:16 pm
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
Re: Browser client, OS independant
Posted: Sat Dec 04, 2010 4:04 pm
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
Re: Browser client, OS independant
Posted: Sat Dec 04, 2010 8:42 pm
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.
Re: Browser client, OS independant
Posted: Sun Dec 05, 2010 10:16 am
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
Re: Browser client, OS independant
Posted: Mon Dec 06, 2010 5:30 pm
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
Re: Browser client, OS independant
Posted: Mon Dec 06, 2010 6:05 pm
by ScottBot
It doesn't appear to be. Maybe your browser has the font sizes adjusted from 'normal' (setting somewhere).
Re: Browser client, OS independant
Posted: Fri Dec 10, 2010 12:55 pm
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
Re: Browser client, OS independant
Posted: Tue Dec 21, 2010 10:39 am
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.
- SWRemote
- swremote1.PNG (412.36 KiB) Viewed 20397 times
- Browser
- browser1.PNG (545.17 KiB) Viewed 20396 times
- SWRemote
- swremote2.PNG (386.79 KiB) Viewed 20397 times
- Browser
- browser2.PNG (519.42 KiB) Viewed 20396 times
Tim
Re: Browser client, OS independant
Posted: Tue Dec 21, 2010 12:21 pm
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
Re: Browser client, OS independant
Posted: Tue Dec 21, 2010 6:53 pm
by edgar
Tim,
Absolutely fantastic so far! Very impressive! Can't wait for it!
Happy Holidays!
Kevin
Re: Browser client, OS independant
Posted: Tue Dec 21, 2010 9:27 pm
by James D
I am eagerly waiting on the update too.