HTML5 iPhone/Android access tips

Simple advice that you may find useful. Feel free to discuss or add your own.
berez
Member
Posts: 9
Joined: Fri Sep 22, 2006 10:20 am

Re: HTML5 iPhone/Android access tips

Post by berez »

Thanks for your reply.

Indeed, It will be very helpful if you could post an example of some buttons, sliders, and levels.
Since my knowledge in html and java scrips is minor, I am unsuccessfully struggling to incorporate sliders.

Thanks
Erez
PServais
Member
Posts: 29
Joined: Tue Feb 03, 2009 6:13 am
Location: Maastricht, Netherlands

Re: HTML5 iPhone/Android access tips

Post by PServais »

Hi Terry,

how is your progress with the sencha touch framework?
This framework is much better than iWebkit but also much more difficult to understand.
If you manage to make a page with Sencha I would like to see your sourcecode, I've tried to make something but it is very difficult.
Hopefully you can make more sense of it than I do.

Greetings,

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

Re: HTML5 iPhone/Android access tips

Post by Timoh »

There could be a very interesting integration path here with iphone/android apps and my javascript client.

The cool thing about my javascript client, is you use the theme designer as you normally would, and you're done. You now have a client in the web browser. Terrry, we probably use a similar approach for a no graphics/simple-native iphone app. We could use some of my code to pull the yourtheme.xml file, strip away all the graphics & layout, and just display simplisticly the panels, buttons, etc the user has included in their theme.

I expect my JS client alpha version to be ready sometime in January. With another couple of months of bug fixing. After that we could look at re-using parts of it for native iphone/android.

ts
roussell
Advanced Member
Posts: 268
Joined: Wed Dec 15, 2004 9:07 am
Location: Pelham, AL

Re: HTML5 iPhone/Android access tips

Post by roussell »

I was going your way with attempting to re-create a swremote in HTML/javascript but got discouraged and dropped it when I found out that the swremote <-> server communication was all binary. I have thought about writing a plugin that would offer a restful interface to HB but it became easier to just hardcode in HTML what I was looking for.

It sounds like the best corse of action would be to try and combine our efforts, I still like the idea of an HTML based swremote. I just bought 4 Insignia Infocast displays. They're run Chumby's browser (Flash apps on Linux) but you can launch a webkit browser for HTML goodness. Anyway, I've now got to rewrite my html apps for the new screens so its a good time for it.

Terry
jacco van der Ven
Senior Member
Posts: 136
Joined: Tue Oct 21, 2003 4:16 pm
Location: The Netherlands

Re: HTML5 iPhone/Android access tips

Post by jacco van der Ven »

I have your example working, from my Ipad I can control the 'Test Light' but when I change this for an device in my house it will change the power state on/off but I have to reload the browser to see the change of the On/Off indicator.
What goes wrong?
I changed only the property "test light" in "Light livingroom"

Regards,
Jacco
roussell
Advanced Member
Posts: 268
Joined: Wed Dec 15, 2004 9:07 am
Location: Pelham, AL

Re: HTML5 iPhone/Android access tips

Post by roussell »

This was just a quick example to show how to use iWebKit. To enable automatic updates you'll need to write your own AJAX code.
jacco van der Ven
Senior Member
Posts: 136
Joined: Tue Oct 21, 2003 4:16 pm
Location: The Netherlands

Re: HTML5 iPhone/Android access tips

Post by jacco van der Ven »

Yes, off course it was an example, but It was strange to me that the example only works well with the "test light"
I made some new code an now it is working well. :D

Thanks,
Jacco
lostdreamer
Member
Posts: 54
Joined: Sat Apr 18, 2009 8:53 pm

Re: HTML5 iPhone/Android access tips

Post by lostdreamer »

Sometimes when you tell HB to turn of a light, it will take about a second for the property to actually change.
If your page refreshes within this time, it will still show the old state.

The example probably worked well because it was a NULL device (and thus, no delay when switching on / off)
jacco van der Ven
Senior Member
Posts: 136
Joined: Tue Oct 21, 2003 4:16 pm
Location: The Netherlands

Re: HTML5 iPhone/Android access tips

Post by jacco van der Ven »

Ok, stupid o from me, now I understand.
Timoh
Advanced Member
Posts: 260
Joined: Thu Feb 02, 2006 12:56 pm
Location: Montreal - Canada

Re: HTML5 iPhone/Android access tips

Post by Timoh »

Hi Terry,
Yep, Maybe a a combined effort is warranted.
The UI is coming along, I'm currently working on gauges, with sliders and images left to do.
My next step was to start writing the server side plugin (=webserver). I envision the webserver needing four functions... Serve yourtheme.xml, serve properties, serve images and act on button presses. However, I was looking at some other theme files and the plugin will need to do some preprocessing on the theme.xml file before handing it off to the browser. For example, users can user the "Symbol" font in their themes. This is not supported by the browser, so it needs converting. Likewise, it is possible to have &, <, > in the theme file, which breaks the xml as well. I've also seen duplicate attributes for an element.

The architecture is AJAX. I don't know if I'll go pure RESTful at this point. I suspect so.

Tim
berez
Member
Posts: 9
Joined: Fri Sep 22, 2006 10:20 am

Re: HTML5 iPhone/Android access tips

Post by berez »

Hi

Can anyone post some more examples for housebot control through html5. Specifically the usage of buttons and sliders.

Many thanks,
Erez
cocochen
Member
Posts: 4
Joined: Wed Apr 06, 2011 3:52 am

Re: HTML5 iPhone/Android access tips

Post by cocochen »

berez wrote:Thanks for your reply.

Indeed, It will be very helpful if you could post an example of some buttons, sliders, and levels.
Since my knowledge in html and java scrips is minor, I am unsuccessfully struggling to incorporate sliders.

Thanks
Erez
how is your progress with the sencha touch framework?
This framework is much better than iWebkit but also much more difficult to understand.
If you manage to make a page with Sencha I would like to see your sourcecode, I've tried to make something but it is very difficult.
Hopefully you can make more sense of it than I do.
cocochen
Member
Posts: 4
Joined: Wed Apr 06, 2011 3:52 am

Re: HTML5 iPhone/Android access tips

Post by cocochen »

berez wrote:Thanks for your reply.

Indeed, It will be very helpful if you could post an example of some buttons, sliders, and levels.
Since my knowledge in html and java scrips is minor, I am unsuccessfully struggling to incorporate sliders.

Thanks
Erez
Sometimes when you tell HB to turn of a light, it will take about a second for the property to actually change.
If your page refreshes within this time, it will still show the old state.

The example probably worked well because it was a NULL device (and thus, no delay when switching on / off)
Post Reply