Premise Premise newbie seeking answers

Motorola Premise
Too much time has passed and even re-reading the post doesn't jog my memory. :D

Can you explain, in greater detail, what you want to have in the MiniBrowser?
 
Understandable. The minibrowser has a toggle on/off button. I'd like to be able to discretely have an on button and an/off button. I'm tying this into my HTPC which uses wget_ to hit the Premise webserver for turning lights on off. Right now I cannot discretely turn the lights on or off but rather can only toggle between the current state.

As a side note, I can not include the word wget_ without the _ when replying. I keep getting an error POST to /forums/index.php not supported. I guess that's some sort of security built into the forum software?
 
...The minibrowser has a toggle on/off button. I'd like to be able to discretely have an on button and an/off button. ...
Thanks for refreshing my memory!

Goal
You want MiniBrowser to display discrete Power-On and Power-Off buttons for each Light object. In Internet Explorer, by right-clicking a Light's Power-On button and choosing Copy Shortcut you can acquire its URL. The URL can be used by another application (your HTPC) to turn on the Light.

Solution
The attached zip archive contains "MiniBrowserDiscretePowerButtons.xdo". This XDO appends modifications to the existing Minibrowser module. The modifications add discrete Power-On and Power-Off buttons to a Light object. The attached image shows how MiniBrowser's code and a displayed Light appear before and after the modifications.

Installation
  1. Ensure you already have the Minibrowser module installed (it is included with AutomationBrowser). If you wish, you can export Modules/MiniBrowser in order to save the original version.
  2. Import the attached XDO file.
Acquire the Power-On and Power-Off URLs for all the lights you wish to control using the technique mentioned above. For example, here are the URLs for a Lamp on my test PC:

Code:
http://localhost:86/sys/%7BFDEFEC61-ED66-4035-AF16-F4B222453D14%7D?d??mbPowerOn(IDF9970277595E45879A7E958364ACFDD3)
http://localhost:86/sys/%7BFDEFEC61-ED66-4035-AF16-F4B222453D14%7D?d??mbPowerOff(IDF5746D43557F40AC98C5F84FD8689C8A)

What does the XDO do?
The XDO adds two new methods to the mbLightEx class:
  1. mbPowerOn
  2. mbPowerOff
and it adds the following lines of code to the existing mbRenderPage method:
Code:
' Add an ON button
Output = Output & (mbGetAnchor("mbPowerOn", "PowerOnSmall.gif") & "   ")
' Add an OFF button
Output = Output & mbGetAnchor("mbPowerOff", "PowerOffSmall.gif")

You now have enough information to allow you to add discrete power buttons to the mbApplianceEx class.
 

Attachments

  • MiniBrowserDiscretePowerButtons.png
    MiniBrowserDiscretePowerButtons.png
    73.1 KB · Views: 16
  • MiniBrowserDiscretePowerButtons.zip
    1.3 KB · Views: 10
Back
Top