Premise [download] Module: MiniBrowser - supports mulitple user-interfaces

Motorola Premise
The first step I would recommend is dissecting a great standalone module that works with the minibrowser such as 123's new WeatherUnderground module. Study the mbRenderPage method found under sys://Schema/Modules/WeatherUnderground/Classes/Weather.

What's neat is all you need to do then is copy mbRenderPage to the sys://Schema/Modules/Linksys/Classes/WVC54GCA and modify sHTML (replace lines 4 to 85) to display the video. You'll have to google to find out what HTML code to use (can't use the camera's activex object if you want it to work with non-windows devices) to display the video. You could also view the source page source while using your camera in firefox.
 
Thanks. I have the code to use that is not Active X. After I get a few things working and get a better understanding of Premise, I plan on creating an HTML5/Jquery UI so that you can have one display for all modern browsers and devices. I have an iPad, iPhone, WebOS tablet, Android tablet, and Android phone, so I have plenty of test subjects. I might have to invest in a Windows Phone just to cover all the bases.

My "real" job is as a web developer, so I was pleased to find HA software that I could program and understand so easily.
 
Awesome! I hope you're willing to share what you come up with. The Linksys camera module was one of my first Premise modules. I progressively worked on more and more complex drivers since I posted it. It took some time (since I'm not a programmer), but I'm finally starting to understand Premise very well. I think you'll find that the more you use it, the more you'll like its cleaver architecture and great Builder application.

We could use more developers on here, so welcome aboard! My background is electrical engineering, but I don't learn the stuff in school you programmers learn.
 
I would love to be able to rewrite the automation browser so it didn't run as an activex control. I guess the only way that will happen is if it is opened sourced.
 
W84no1 - welcome to the cult! Snacks are on the table to the left, kool-aid on the table to the right, although it seems you have already hit the kool-aid table.. ^_^

HTML5/jQuery...awesome...I used HTML5 as my method for an in-browser audio player (so I can stream music from my home to wherever I might be where they cut off access to known streaming sites)..I used SoundManager2 in the MediaShortcutEx.(started with Yahoo' YUI - changed due to the better functionality in SM2) .I also used HTML5 for the video, although I haven't posted it. jQuery was a piece of both of those; I also used jQuery for the clock; dynamic interface (adjustable layout (iFrames)), and have been fiddling around with carousel, a dial for volume adjustment, and some of the other cool jQuery plugins. 123 built a phenom foundation for bringing Web 2.0 into that fold. I also have an 'ajaxify' jQuery plugin that gives the functionality of AJAX without the rewrite...looking foward to your contributions...

Kool-aid refills are free...
 
W84no1, welcome aboard!

Premise can certainly use a modern, multi-client, UI renderer. Both AutomationBrowser and MiniBrowser have strengths and weaknesses (see http://cocoontech.com/forums/topic/21274-100-customizeable-browser-ui) so feel free to improve one or the other or create a new one. You might want to join forces with Timoh and Chuck. I can answer questions about AB and MB because I've enhanced AB and revised MB. Please start a fresh thread or join the new one created by Timoh. I look forward to participating in the brainstorming.
 
Is there a way to pass a value to a custom function in MB. As I am redoing the lights with a slider, I want to be able to pass the value to a function that changes the brightness. Right now, I am using mbUp and mbDown in the mbLightEx class. I would like to create mbSetValue and pass a value for brightness.
 
Look in: Modules > MiniBrowser > Globalscripts > MiniBrowserFunctions > gMBRenderHeaderEx().

The <head> section contains Javascript functions that are used by the SecuritySystem for data-entry of the security code. You can refer to that to get an idea of how to pass values.
 
I have a problem that I can figure out how to fix. If I add a fan then call mbState(2) it doesn't return the PowerState or Speed. If I call mbstate(2) it returns both PowerState and Speed. If I use all lowercase in my code the Fan status works, but then the lights don't work as expected anymore.
 
No clue. Given a fan, it returns its XML status if called with mbState(2) or mbstate(2) (confirmed with Chrome). Premise's web server is not case-sensitive.
 

Attachments

  • Fan State as XML.png
    Fan State as XML.png
    14.1 KB · Views: 4
Weird, I get home from work and it works fine here. Must have been something with my machine at work.
 
Back
Top