Premise Premise WebClient Protocol documentation

Motorola Premise
doczaius said:
Volunteering to test an IOS app if needed.  ^_^  My hope was to eventually write a native iPhone/iPad app (and finally put my developer subscription to use) once I finished writing drivers for all of my devices and getting everything integrated w/Premise.  Great to hear someone with much more experience is headed in the same direction! :pray:
 
I don't currently have a Mac in the house so I can't actually build a test app using Xamarin for iOS. However, given how easy it was to use my library in Xamarin for Android I'm sure that it will work. This means that anyone with reasonable C# knowledge can build a Premise client app for iOS pretty easily.
 
I spent some time in the past few days on this project.
 
I haven't updated the code on github yet but I did achieve something significant:
 
I built a fully functional Windows Phone 8 app using this library that is 100% asynchronous and driven by Premise notifications. 
 
Compared to my previous Windows Phone app for Premise, which used polling to get state changes, this new architecture is amazing. Updates are near instantaneous and operation is much smoother.
 
I've posted a video of a demo of the app on YouTube.
 
 
In the next few days I'll be packaging this up and pushing an update of the library to github. This will include the full source code to this demo app. 
 
Now that I've built command line, Android, and Windows Phone apps using this library I'm pretty confident an iOS version will work well too.
 
Next steps for me are to port all of the functionality of my old app to the new library. I'm keeping with Windows Phone as my primary phone and getting the new Nokia Icon next week. For work I need to use an Android device frequently so I will build an app with the most important functions (garage doors and security) for that.
 
Let me know your thoughts.
 
thanks Charlie.
 
I sit here tonight somehow dwarfed by a fact of the enduing use of Premise platform. I guess we have met the measure of time and can legitimately invoke platform and Premise in the same sentence.
 
Few people realize (except perhaps you Charlie) the amazing set of talent we were able to join to attended the problem of device integration over IP.  Charlie, you said to me once that "Premise is an amazing software engineering effort".  True, and it is. Though I am surely biased, those technically responsible parties Jim Springfield, Christian Beaumont and Tim Chipman along with all the other 37 Premise-folk that contributed their fair measure, still amazes me... with their individual and team efforts
 
Our roots were truly blessed by them - acknowledged by your continued support for the Premise "platform".
 
Thanks!
Dan
 
Charlie, this looks great!  I really like what you've done.
 
How generically will the final app work?  Will it use recursion to find all home objects and automatically display them or is the app customized for your home only?  In other words, when the app displays a home object, does it use the various selectors and control panels for home object types that work with the automation browser to do it?  If so, I'm guessing custom home objects using custom selectors might display automatically?
 
Right now the app is custom, as is my original WP app. It does SOME dynamic loading (e.g. it queries the server for a flat list of lighting scenes).
 
I don't believe in automatically generated UI. I think the AutomationBrowser is fine for rudamentary interaction, but I think it is horrible for general purpose use. I have 5 or 6 specific scenarios that me & my family care about and I want the UI for those to be perfect.
 
That said, there's no reason why my framework couldn't be used to dynamically build a generic UI; I just am not working on that.
 
Dan,
 
You and your team designed Premise very well.  Of course it's stood the test of time!  I too am very impressed with the engineering and thought that went into making Premise so versatile.  
 
I and several others built a z-wave module that works great and includes support for both new device types (door locks with keypads) and old device types (dimmers, door switches, motion sensors, etc...).  The class based approach made this a lot easier than it'd be on a different "platform."  I don't think there's any PC based automation program like it.  That's not to mention to 100 or so other modules folks have built after the demise of Premise.
 
Other offerings such as Homeseer are not as well thought out compared to Premise's cleaver layered architecture.  Of course, I'm a late comer, so I never was active during Premise's prime as I was still in college then.
 
danq said:
thanks Charlie.
 
I sit here tonight somehow dwarfed by a fact of the enduing use of Premise platform. I guess we have met the measure of time and can legitimately invoke platform and Premise in the same sentence.
 
Few people realize (except perhaps you Charlie) the amazing set of talent we were able to join to attended the problem of device integration over IP.  Charlie, you said to me once that "Premise is an amazing software engineering effort".  True, and it is. Though I am surely biased, those technically responsible parties Jim Springfield, Christian Beaumont and Tim Chipman along with all the other 37 Premise-folk that contributed their fair measure, still amazes me... with their individual and team efforts
 
Our roots were truly blessed by them - acknowledged by your continued support for the Premise "platform".
 
Thanks!
Dan
 
The AB may very well be horrible for general purpose use.  Honestly, I rarely use the AB, but use minibrowser, voice control and handheld URC MX-900 remotes that are custom programmed where hard and soft buttons send RS232 strings to Premise to control lighting, A/V, HVAC, etc...  
 
Of course, most other things are automated as I use a fully two-way Elk M1G security module for occupancy tracking, displaying weather updates on alarm keypads, two-way RF keyfobs/dongles, etc...
 
What would be handy is a WP app that passes a voice control string via a url (in addition to having the features your app has).  I've already built a Premise module that generically parses such a voice command based on a sentence containing a location name, object name or type, property name and/or value.
 
For example, the url may look like this:
 

http://192.168.1.2/sys/%7B340C8A31-D762-416C-933D-C722A8090093%7D?d??mbNaturalLanguage(turn_on_entry_sconce)
 
 
 
Currently, the module also returns an http response that can be read back using tts.  The response for the example above would be html text such as: "entry sconce is now on" or "entry scone was already on" and the phone would read this back.  However, with subscriptions working, I can envision the app reading back status updates automatically.  These updates could be reminders to close the front door, mailbox open alerts, etc...
 
You'd be very surprised at how accurate the speech parsing is.  It's much easier to tell Premise to set a light to 42% than to use a slider or buttons after browsing to the room and clicking on the light.  Same goes for setting the thermostat too.
 
I can send you the Premise module portion if you're interested in including it in your setup (PM your email).  It's built to be generic, but you can also use regex strings under each home object if you want to customize it.  Of course, your app would have to use some sort of api for the speech-to-text and text-to-speech.  I'm sure windows phone has something available...
 
Charlie Kindel said:
Right now the app is custom, as is my original WP app. It does SOME dynamic loading (e.g. it queries the server for a flat list of lighting scenes).
 
I don't believe in automatically generated UI. I think the AutomationBrowser is fine for rudamentary interaction, but I think it is horrible for general purpose use. I have 5 or 6 specific scenarios that me & my family care about and I want the UI for those to be perfect.
 
That said, there's no reason why my framework couldn't be used to dynamically build a generic UI; I just am not working on that.
 
Hmmm. I think I may be embarrassed to push out my jQuery Mobile version.

Charlie!!! This is wonderful! As a WP8 user, I'm excited about giving it a try...how?
 
Chuck, is your phone developer unlocked?
 
Once I get the app cleaned up a little so it doesn't have things like my password hard coded (!) I'll share it out.
 
Maybe I'll invest some time in making it more generic so it will work with just about any premise install...
 
No on the unlocked, but I'll get one...

question. If it maintains an open http session, what does that do for data usage?
 
chucklyons said:
No on the unlocked, but I'll get one...

question. If it maintains an open http session, what does that do for data usage?
 
The fact that the TCP port is held open doesn't impact data usage, per se. Unless properties are changing no data is being passed; this is no different that if the app were polling.
 
However, if the app weren't designed right and left the connection open when it was in the background/deactivated then it could have an adverse effect on battery.
 
The good news is I've designed it right :).  When the app gets deactivated/put in the background it closes the connection and then when it is re-activated it re-connects.  
 
I have not tested with hundreds of property subscriptions yet, so we'll see if this causes any significant delay...
 
Charlie - any new developments with this? I'm looking forward to see it, or more of it.
 
I'm still actively partying on it...whenever I get a chance I am adding more and more functionality to my 'new' WP app based on this, and using my 'old' app less.
 
I haven't pushed to git lately though. 
 
I'm quite happy with how it works.
 
Well, despite my best intentions, Im making a lot of progress on the UI front; particularly in landscape usage. Tailored for WP (I'm the holdout in my family), works for IOS, then spreads out for tablet. (Primarily done via CSS). So if you want to put on a UI, let me know via the usual means...
 
Back
Top