User Tools

Site Tools


webremote

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
webremote [2013/07/30 16:29] – external edit 127.0.0.1webremote [2023/05/09 13:42] (current) – [Video Stream Thumbnail] James Sentman
Line 1: Line 1:
 =====Web Remote===== =====Web Remote=====
- 
-XTension has had web integration through [[X2Web|X2Web]] forever. And when I say forever I mean since MacOS Classic forever. While the AppleScript development system of X2Web is versatile and reasonably fast and very capable, it can’t easily do things that we expect in a live updating apps as web page type world. It’s also a pain to install properly and keep running across OS updates as it relies on Apache configuration that can get overwritten or changed. Enter the new web interface, that I’m currently creatively calling “Web Remote”. It no longer requires Apache but runs as an interface in XTension. You assign is a high port to run on and pass that port through your router (or not if you only want it local) and your setup in the computer is done. A lot of configuration can be done on the pages themselves to customize your data display. Here’s an example of the demo page I use to show what it’s capable of: 
  
 {{ :webremotehero.png?500 |}} {{ :webremotehero.png?500 |}}
  
-{{indexmenu>webremote#1|js#IndexMenu+ajax}} +{{indexmenu>webremote#1|js#doku noscroll}}
- +
-As of this alpha not everything we had working in X2Web is working, and not everything is easy to configure or properly working, but basic control and monitoring is all there and many nice features for customization and giving yourself a very easy to setup and useful landing page for control. During the alpha and beta periods I will not be restricting access to the program, but it will eventually be a paid plugin. Anyone purchasing X2Web in the last year or from now on will get upgraded at no charge and I may do upgrade pricing for previous users of X2Web. +
- +
-==requirements== +
-Web Remote requires an Intel based mac running 10.5 or later. XTension itself still runs on PPC back to 10.4 but the web remote requires newer system support.+
  
 ==starting it up== ==starting it up==
-To create an instance of WebRemote go to XTension’s preferences window. In the Interface tab click “new interface” and select “Web Remote” select a high port number to run it on (tradition dictates 8080 or something, but anything above 1024 will likely work depending on what else you have installed) click save and enable the interface to start it. In it’s alpha state only a single instance of the interface can be run at a time, when complete you will be able to start as many instances as you wish all with different interfaces. One customized for your laptop, another for your iPhone another for your iPad, another for the touch screen in the kitchen another for the iMac in the den... whatever makes most sense to have available at any place, all running on a separate port+To create an instance of WebRemote go to XTension’s preferences window. In the Interface tab click “new interface” and select “Web Remote” select a high port number to run it on (tradition dictates 8080, but anything above 1024 will likely work depending on what else you have installed) click save and enable the interface to start it. You can create as many different web remote interfaces as you wish to have different interfaces into your system.
  
 ==Initial configuration and setting the password== ==Initial configuration and setting the password==
-After enabling the interface you’re done as far as XTension is concerned and you can now connect to the interface in a browser. Since this is all cutting edge web stuff with dynamic content it goes without saying that a modern browser, probably the most recent version, is required for it to operate properly. Connect via the url something like http://IP.Address.of.machine:8080/ or whatever port you selected. Upon connecting you’ll see a pretty much blank page with a menu bar across the top. Click on the “admin” menu and turn on the “require a password for access to this site” and set a password. (or if you never plan to make it accessible from the outside world perhaps you dont want a password)+After enabling the interface you’re done as far as XTension is concerned and you can now connect to the interface in a browser. Connect via the url i.e. http://IP.Address.of.machine:8080/ or whatever port you selected. Upon connecting you’ll see a mostly blank page with a menu bar across the top. Click on the “admin” menu and turn on the “require a password for access to this site” and set a password. If you don’t plan to make the site available from the outside world perhaps a password is not necessary.
  
 Click save and return to the main (blank) page. If you’re on a machine that you’ll be using with it regularly you can place a cookie on that machine which will bypass the password authorization. There is no extra security in being forced to log in from the kitchen iMac all the time. Select “Save This Browser Session” you can give it a name “kitchen iMac” or something meaningful and set the cookie. Now this machine will be able to connect without a password. You can clear the cookie from the same screen anytime. Click save and return to the main (blank) page. If you’re on a machine that you’ll be using with it regularly you can place a cookie on that machine which will bypass the password authorization. There is no extra security in being forced to log in from the kitchen iMac all the time. Select “Save This Browser Session” you can give it a name “kitchen iMac” or something meaningful and set the cookie. Now this machine will be able to connect without a password. You can clear the cookie from the same screen anytime.
  
 ==Viewing the Log== ==Viewing the Log==
-The second menu item it “log” and here you can view the log in realtime. You cannot yet load the older log entries or search through them. At the bottom of this page is the checkbox so you can turn off auto scrolling if you’re trying to look at something as well as a “command line” which is identical to the command line in the XTension app. try typing: write log “this came from the web remote!” and watch it scroll up. (alpha warning: sometimes the encoding chokes on curly quotes that are sometimes inserted here automagically by the browser. This will cause a javascript error, just reload the page to get working again if this happens.)+The second menu item is “log” and here you can view the log in realtime. At the bottom of this page is the checkbox so you can turn off auto scrolling if you’re trying to look at something as well as a “command line” which is identical to the command line in the XTension app. try typing: write log “this came from the web remote!” and watch it scroll up.
  
 ==Controlling Units== ==Controlling Units==
-The next menu item is called “units” and pops up a menu of all the lists you have configured in XTension. You can manage which lists are available here under the admin menu “manage list menu” there are probably only a few that you really want to see and control this way. After selecting a list you’ll have a window much like the one in XTension showing at a glance the status of the unit, the last activity date, the current state label (on/off or a value or a custom description set in the onLabel or offLabel fields in XTension) and buttons to turn each unit on or off. In between them is a button labeled “more” that brings up another window with more controls for the unit. From there you can set in and for parameters (turn on “my office” for 10 * minutes) as well as block and unblock the unit, dim the unit or remove other events that you’ve set via in/for parameters. Click Done to do nothing, or control the unit with a different button+The next menu item is called “units” and pops up a menu of all the lists you have configured in XTension. You can manage which lists are available here under the admin menu “manage list menu” there are probably only a few that you really want to see and control this way. After selecting a list you’ll have a window much like the one in XTension showing at a glance the status of the unit, the last activity date, the current state label (on/off or a value or a custom description set in the onLabel or offLabel fields in XTension) and buttons to turn each unit on or off. In between them is a button labeled “more” that brings up another window with more controls for the unit. From there you can block and unblock the unit, dim the unit or remove other events that you’ve set via in/for parameters. Click Done to do nothing, or control the unit with a different button.
- +
-If you make changes to your unit lists in XTension you will likely have to disable and re-enable the web remote interface in the preferences window to make those changes show up. You can do this from the admin menu of the web remote if you wish via the “reboot webremote” menu item.+
  
 ==Running Global Scripts== ==Running Global Scripts==
-the next menu it called scripts, and at startup it will popup a list of all your global scripts. You probably dont want all your scripts to show up here. You can manage this menu in the same way as the list menu under the admin menu “Manage Script Menu”+the next menu it called scripts, and at startup it will show a list of all your global scripts. You can manage this menu in the same way as the list menu under the admin menu “Manage Script Menu” as displaying only the most used subset of scripts you want accessible from this web interface instance is a good idea.
  
 ==Video== ==Video==
Line 36: Line 27:
  
 ==Motion Reports== ==Motion Reports==
-The next menu item will load a list of units in the form of a motion report. This section is unfinished but will display a report of the current day more or less.  The lists offered in the menu are configurable from the admin menu same as the other menus previously discussed.+The next menu item will load a list of units in the form of a motion report. The lists offered in the menu are configurable from the admin menu same as the other menus previously discussed.
  
 ==Dynamic Pages== ==Dynamic Pages==
Line 42: Line 33:
  
 ==Managing Dynamic Pages== ==Managing Dynamic Pages==
-The real power of the system is that it lets you create custom layouts of controls and displays. The controls can be placed either individually onto the page, or you can create a “grouping rectangle” control and place more controls inside of it (but dont nest grouping rectangles at this time) Grouping and moving of controls is currently rather rudimentary so I recommend that you mostly place them inside grouping rectangles for ease of re-arranging. There is currently no way to move a control already setup onto or out of a grouping rectangle or to or from a different dynamic page.+The real power of the system is that it lets you create custom layouts of controls and displays. The controls can be placed either individually onto the page, or you can create a “grouping rectangle” control and place more controls inside of it (but dont nest grouping rectangles at this time) Grouping and moving of controls is currently rather rudimentary so I recommend that you mostly place them inside grouping rectangles for ease of re-arranging.
  
 Return to the “main” tab which is your entry point into the system and we’ll build some controls from there. This is a custom dynamic page that is always available and cannot be deleted. Return to the “main” tab which is your entry point into the system and we’ll build some controls from there. This is a custom dynamic page that is always available and cannot be deleted.
  
-Select the admin menu again and select the first menu item to “add control”. The “Create a New Control” dialog will appear. You can move this around so as to better see whats behind it if necessary. If you wish to add a control to a grouping rectangle instead of the admin menu you control-click on the rectangle and choose new control from the contextual menu. Select “grouping rectangle” which is the first control in the popup of available control types+Select the admin menu again and select the first menu item to “add control”. The “Create a New Control” dialog will appear.  If you wish to add a control to a grouping rectangle instead of the admin menu you control-click on the rectangle and choose new control from the contextual menu. Select “grouping rectangle” which is the first control in the popup of available control types.
- +
-     alpha note:  +
-      it is sometimes hard to get the control-click to bring up the controls contextual menu as opposed to the system one.  +
-      If it’s not working for you try clicking just inside the border of the control or on the text header of the control.+
              
-      controls are always created at the same default offset, either on the page itself or inside a grouping rectangle+      Controls are always created at the same default offset, either on the page itself or inside a grouping rectangle
       you may need to move your edit windows around to see them and if your gropuing rectangle is very small it may not        you may need to move your edit windows around to see them and if your gropuing rectangle is very small it may not 
       be visible until you expand it or move the control up and to the left.       be visible until you expand it or move the control up and to the left.
    
 ==Selecting a control for editing, moving and re-sizing== ==Selecting a control for editing, moving and re-sizing==
-Control-click on the control you wish to edit or move, or in the case of a grouping rectangle the one you may wish to add more controls to. As noted above in this alpha it’s sometimes hard to hit the sweet spot where it will popup the menu. Once you select edit the edit window will appear with buttons for moving the control around as well as re-sizing it. You can also use your arrow keys to move the control around. Hold down the shift key to move a larger amount of space with each click or button press, hold the option key down to resize while using the arrow keys.+Control-click on the control you wish to edit or move, or in the case of a grouping rectangle the one you may wish to add more controls to. Once you select Edit the edit window will appear with buttons for moving the control around as well as re-sizing it. You can also use your arrow keys to move the control around. Hold down the shift key to move a larger amount of space with each click or button press, hold the option key down to resize while using the arrow keys.
  
 Give your grouping rectangle a title and position it somewhere useful and now we’re going to add another control to it. Control-click on the grouping rectangle and select “add controls” The same window with the control type popup will display but this time any control you create will go into the grouping rectangle. Create a small unit value display and experiment with moving it around. try changing the unit status in XTension and watch the web interface update to show the new status in realtime.  Give your grouping rectangle a title and position it somewhere useful and now we’re going to add another control to it. Control-click on the grouping rectangle and select “add controls” The same window with the control type popup will display but this time any control you create will go into the grouping rectangle. Create a small unit value display and experiment with moving it around. try changing the unit status in XTension and watch the web interface update to show the new status in realtime. 
- 
-There is currently no way to automatically line up controls or select and move more than one at a time except if they are inside a grouping rectangle. 
- 
-     alpha note: it is sometimes impossible to get things lined up perfectly after editing and not all  
-     changes are reflected right away. This is a bug and will get sorted out but if you find that you  
-     simply can’t make things stick where you want them click save in the edit dialog and reload the page.  
-     This gets everything setup again from scratch and you should be able to continue to edit from there. 
-      
-     also your changes are not saved until you close the edit dialog. So be sure to close that window before 
-     reloading the page to force any updates to reload. 
  
 ===Small Unit Value Display=== ===Small Unit Value Display===
Line 93: Line 70:
 ===Video Stream Thumbnail=== ===Video Stream Thumbnail===
 This displays a slowly updated thumbnail from any VideoPitcher video stream. You can then click on this to go directly to the dynamic page for that video stream to view it fullsize and use any controls you’ve created around it. This displays a slowly updated thumbnail from any VideoPitcher video stream. You can then click on this to go directly to the dynamic page for that video stream to view it fullsize and use any controls you’ve created around it.
-     alpha note: there seems to be a bug here that the edit page doesn’t automatically come up after  + 
-     you create one but it sticks on the new control dialog. Control click on the thumbnail again and +It has a title like everything else, a popup to select the video stream you wish to display and a field to configure how often you want it updated when you’re viewing the page. You could set this to 1 second and get a pretty good live video feed in the main window, but I recommend 3 seconds or more to keep it updated but not waste a lot of bandwidth.
-     select “edit” to force it to appear. +
-it has a title like everything else, a popup to select the video stream you wish to display and a field to configure how often you want it updated when you’re viewing the page. You could set this to 1 second and get a pretty good live video feed in the main window, but I recommend 3 seconds or more to keep it updated but not waste a lot of bandwidth.+
  
 ===Global Script Button=== ===Global Script Button===
Line 108: Line 83:
 ===Thermostat Control=== ===Thermostat Control===
 This is a full sized full featured thermostat control. You select from a large list of units for each of the various functions. The furnace status unit must show 0 for off, 1 for heat and 2 for AC, if your thermostat setup doesn’t provide this you’ll have to do so via pseudos and scripts from the various other units that it uses to display it’s status.  This is a full sized full featured thermostat control. You select from a large list of units for each of the various functions. The furnace status unit must show 0 for off, 1 for heat and 2 for AC, if your thermostat setup doesn’t provide this you’ll have to do so via pseudos and scripts from the various other units that it uses to display it’s status. 
-     alpha note: the cool setpoint set buttons aren’t working and the heat setpoint ones send the change with each  + 
-     click rather than waiting for you to reach the desired temp. So click and wait for the reading to reflect your +
-     change before clicking again or odd things happen. This will all get cleaned up.+
  
 ===Ninja Mount Control=== ===Ninja Mount Control===
Line 120: Line 93:
 ===XTdb Graph Display=== ===XTdb Graph Display===
 displays a live updating graph from your XTdb install. Select the graph from the list and make any sizing changes to make it look usable. displays a live updating graph from your XTdb install. Select the graph from the list and make any sizing changes to make it look usable.
-     alpha note: this is another of the controls that doesn’t resize properly yet and wont display the  +
-     graph until after you close the edit window and reload the page. Do your best to get it where you want it and then reload the page.+
  
 ==Making an SSL/HTTPS connection== ==Making an SSL/HTTPS connection==
-The framework that this is built in will someday support native SSL connection, but for the moment that waits in beta stage unreadyness so until then you can create a secure connection to this, and the older X2Web system via [[http://www.planetarygear.org/2013/07/sslhttps-passthrough-server-for-xtension.html|my ssl passthrough server]]+Use the Certificate Manager window from XTension’s Window menu to create self signed SSL certificate. You can then setup an SSL connection from the Interface Configuration window for this interface.
webremote.1375201747.txt.gz · Last modified: 2023/02/13 14:51 (external edit)