Premise considering premise, couple questions

Motorola Premise

bcg27

Member
Hello everyone, I am new here and to the world of home automation and I am strongly considering using Premise for the brains behind my condo. Premise seems like a well hidden gem in the HA world, and while small the community here looks extremely helpful. I wanted to come here and make sure it can do everything I want it to before I spend the time diving into this stuff though. My motivation for using premise comes from etc6849's post about his system, which sounds pretty much exactly like what I want, except instead of using URC remotes to send commands I want to use iRule plus an ipad and do everything over IP.

My system is pretty simple right now, a single room with TV, receiver, cable box, and HTPC, but I will be expanding it to including multi room lighting control, thermostat, blinds and a second room of A/V control over time. It sounds like premise should be able to do all of that easily but I have a couple things I would like to run by the experts. First, has anyone done windows media center control over IP? I haven't read much about it but I do all my music and movie watching through media center and being able to control that well is a must. I found a program called MCE Controller (sorry I would post a link but apparently noobs can't do that - if you google 'MCE Controller' you will find it easily enough) while doing some searching which seems like what I would want. Is it easy to implement that in premise, or better yet is there a native solution? Second iRule is capable of two way feedback, and I would like to be able to display all that information on the ipad. Would that information have to be passed through premise or can it go straight to irule? If it has to be passed through is that something that can be accomplished easily?

I have not done anyone programming in VB.net but I am quite familiar with programming in general and have used java, python, fortran, C, matlab, and labview in varying degrees so while there will be a learning curve for me I am confident I will be able to pick up the required skills. Thanks for taking the time to answer my questions.
 
Welcome to Cocoontech and the Premise forum!

I'll let etc6849 answer your question about Media Center because he has integrated it with Premise.

I viewed iRule's tutorial videos and it certainly does a very nice job of simplifying the tedious process of creating attractive and functional user-interfaces. You'll find similarities between iRule's Builder and Premise's Builder in the way information is presented (multi-pane, treeviews, property lists, etc).

Given that iRule's communicates directly with equipment, I'm not sure how you want Premise to fit in the picture. IRule's two-way communications is designed to accept feedback from the controlled device; it doesn't need a middleman. From what I've read (admittedly very little so far) iRule will let you control a wide variety of devices, using attractive user-interfaces, on Apple and Android devices. The only component it lacks is automation logic (if this then that, scheduling, etc) and that's where Premise can fill the void for $0.

IRule and Premise can co-exist and operate independently or in combination. For example, you might not want to use Premise to control your TV, you'll use iRule's superior UI for that, but you might want Premise to be aware of when the TV is turned on. For example, Premise can turn on room lights to 50% when it detects the TV is on and it is evening. The two products can be loosely coupled as opposed to tightly-integrated; aware of changes caused by the other but can operate independently.

Premise's scripting language is a slightly customized version of VBScript. Everything in Premise is object-oriented so your Java and Python background is helpful. I doubt you'll have any trouble wrapping your head around it plus it is documented in the online help.

BTW, I'm going to investigate iRule more closely. I like what I see so far.
 
Thanks for posting about iRule, I might go a similar route and use iRule for controlling devices and Premise for logic based control. I wanted to do everything with Premise and still might, but it is good to have options.

Also, I use VMCController to control MCE via IP(http://vmccontroller.codeplex.com/) instead of MCE Controller
 
For anyone wishing to use iRule as an interface to Premise, the easiest way is via MiniBrowser.

If you check MiniBrowser's documentation, the Remote Control Interface section describes how to use an URL to control an object. For example. This turns on a light called TrackLight:
http:// PremiseServerIPAddress /sys/home/firstfloor/foyer/tracklight?d??mbOn(1)


I haven't experimented with iRule just yet but my understanding is that you need to create an HTTP Gateway, add the commands you plan to use (like the URL shown above) and then assign them to buttons.

MiniBrowser adds an mbState() method to many Premise objects. It means that if you use:
http:// PremiseServerIPAddress /sys/home/firstfloor/foyer/tracklight?d??mbState(1)
http:// PremiseServerIPAddress /sys/home/firstfloor/foyer/tracklight?d??mbState(2)
It will reply with tracklight's current state.

I'm an iRule newbie but I think this URL can be used on an Entrance page to get feedback from devices in order to display their states correctly
 
Thanks for the response 123. I had originally planned to run everything through premise so that I would have state information and the ability to do logic for everything but the more I think about it the more I like the more loosely coupled system you described where I only use logic for things like lighting or scheduling temperature control.

I would highly recommend looking into iRule, they have come really far in only a couple of years of development from what I can tell. It also sounds like they have more advanced functionality coming such as variables and logic. I also think an ipad or android tablet shames a lot of the remotes from dedicated companies. The top of the line URC mx-5000 wand remote for example goes for around $500 on ebay, and much more than that retail. A base gen3 ipad is $500 new, and the devices aren't even in the same league with regards to functionality IMO.
 
I'm just looking into all this stuff as well 123 but I believe you are correct about the URL on an entrance or link. You could also put a dedicated button that would poll all your light's states and update a page with the info
 
I'm old school and like traditional remote controls bristling with dedicated buttons. I also like how Premise automagically creates a UI without me having to drag and drop a single button. However, I recognize the fact many people are never more than an arm's length from their smartphone, and MiniBrowser creates only a simplistic UI, so a product like iRule satisfies their need for a slick, custom UI.

There are probably ways to enhance MiniBrowser so it serves as a better gateway for iRule. Before diving in I'll wait for feedback from iRule users.
 
Whoops! I'm going to have to take back what I said about mbState(1).

mbState(1) simply returns the object's name; no status is returned.

mbState(2) replies with XML (typically not displayed by a browser) which usually contains the object's status and a few more details. The XML reply would need to be parsed and I have no idea if iRule can parse text strings let alone walk the nodes of an XML response.

Using Chrome, if I enter this URL:
http:// MyPremiseServerIPAddress /sys/home/family/floorlamp?d??mbState(2)

I need to use Chrome's Developer Tools (F12) to see the response:
<premise version="1.0">
<Object ID="{4F0116D1-ADF1-4B8C-84E8-3305EF85CA20}" Name="FloorLamp" Flags="512l" Class="sys://Schema/Device/Lighting/RelayLight" BoundObject="{A5156C61-5409-4276-B41F-F6889A52C38D}" PowerState="0" />
</premise>

FloorLamp's Class is RelayLight which means it is simply on/off and cannot be dimmed. Therefore it has only one main property which is PowerState and it is reported as "0" or off/false. "-1" would mean on/true.

Here's the response for a dimmable light:

<premise version="1.0">
<Object ID="{6187C1CD-AB19-4DF5-9F9D-3575751D4075}" Name="SinkLight" Flags="512l" Class="sys://Schema/Device/Lighting/RecessedLight" BoundObject="{84DA69A4-C09E-4FB4-951A-D22502F02BED}" RampBrightness="0.05" RampTime="160" RampStep="1" RampDirection="-1" Brightness="0.52" RampPlay="0" PowerState="-1" RampActive="0" />
</premise>

SinkLight's Class is RecessedLight. Anything other than RelayLight is dimmable therefore in addition to the requisite PowerState property, it has a Brightness property and this light is at 52%.



BTW, all those other properties, like RampTime, RampBrightness, etc are custom properties I added by "extending" Premise's stock Light class. Premise takes object-orientation to heart and allows you to augment ("extend") any of its existing classes. In other words, you can add functionality, in the form of new properties and behaviour, to any existing object. All of that Ramp stuff allows me to ramp a light's brightness over whatever time I wish (minutes or hours) regardless of the underlying lighting technology (X10/UPB/Insteon/zWave).
 
As far as I know iRule does not have the ability to parse strings. However if you really wanted to do it like that I'm sure you could throw in some intermediate script that would parse out the relevant information and send just that part up to iRule.
 
Back
Top