Help


PowerEYE should run "out-of-the-box" if you already java a Java JDK installed.
Java Logo


If not, check the FAQ, see if your issue is being discussed on the Discussion Forum and/or email powereye@webarts.ca .

Downloading

All PowerEYE files are kept on the Files page of this website.
You can get:

PRE-Requisite  - a Java JDK installed.

Installing

There are two ways of installing:
  1. All-In-One PowerEYERunner.zip that has an embedded Jetty WebAPP engine with PowerEye
  2. Install the WAR file
    • UNZIP the powereye.war into your favourite Web/Servlet engine
      • because the PowerEYE app needs to create its own EagleDB directory [ default is the user.home dir]... deploy the unzipped powereye directory, NOT the actual war file 
    • You will need to adjust your context and permission files as needed 
      • sample context and config files are in the WEB-INF dir
    • It has been successfully dropped into: 
      • Jetty 6
      • Jetty 9, 
      • httpd/Tomcat, 
      • Synology NAS running the Tomcat application 

Jetty Notes

PowerEYE has been/is successfully run on Jetty 6 & 9 without any required changes.

An example context file is in the powereye/WEB-INF directory.
If you want to use it:
  • put it in the jetty context directory to help configure its deploy.
  • Change the resourceBase and virtual hostnames.
It looks like this:
<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">

<!-- ================================================================
This context file
Configures and deploy the PowerEYE web app in $(jetty.home)/webapps

You can save your files anywhere BUT you need to change the
resourceBase property below.
===================================================================== -->

<Configure class="org.mortbay.jetty.webapp.WebAppContext">


  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- Required minimal context configuration :                        -->
  <!--  + contextPath                                                  -->
  <!--  + war OR resourceBase                                          -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <Set name="contextPath">/powereye</Set>
  <Set name="resourceBase">/opt/jetty/webapps/powereye</Set>
  <!--Set name="war">/opt/webapps/static.war</Set-->

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- Optional context configuration                                  -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <Set name="extractWAR">false</Set>
  <Set name="copyWebDir">false</Set>

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <!-- These set the hostnames PowerEYE will answer to.                -->
  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  <Set name="virtualHosts">
    <Array type="java.lang.String">
      <Item>yourServer.yourDomain.ca</Item>
      <Item>
yourServer</Item>
      <Item>firewall.
yourDomain.ca</Item>
      <Item>12.0.0.200</Item>
    </Array>
  </Set>

  <!--Set name="setPersistTempDirectory">true</Set-->

</Configure>



Tomcat Notes

Two things to note, with the details below:
  1. Deploying PowerEYE using a context file makes configuring the file locations much easier and maintainable
  2. Catalina policy file needs to be updated to allow writing to the filesystem - required to write the Eagle messages to the PowereEYE EagleDB.

The discussion group has more comments and details.

Context File
A sample context.xml file, called tomcat-context.xml is included in the war file in the WEB-INF dir.  It is also available in the Files page file-cabinet.

You will need to change the path for the two parameters:
  • the codebase for the powereye.war file
  • the derbyDBDir Init Param for the directory to store the EagleDB dir/files.

Then save it in $CATALINA_BASE/conf/[engine]/[hostname] directory. 

<?xml version="1.0" encoding="UTF-8"?>
<!-- TOMCAT Context configuration file for my PowerEYE web application               -->
<!--   This lets you put your PowerEYE war files anywhere you want (if you want)     -->
<!--     1- Install an exploded WAR directory somewhere outside Tomcat's appBase,    -->
<!--        let's assume it is in /opt/webapps                                       -->
<!--        [You can use a WAR file for this step instead of WAR directory, if you   -->
<!--         also define an init param for derbyDBDir so it writes the files         -->
<!--         elsewhere.]                                                             -->
<!--     2- Copy the this context configuration file into                            -->
<!--        $CATALINA_BASE/conf/[engine]/[hostname] directory.                       -->
<!--        This file will point to the location of the application:                 -->

<!-- The docs have lots of other config options:                                     -->
<!--     http://tomcat.apache.org/tomcat-8.0-doc/config/context.html                 -->

<!--   Just change  docBase path to the powereye war or dir                          -->
<Context
    docBase="e:/PATH/TO/WEB/APPLICATION/powereye"
    path="/powereye"
    privileged="true"
    antiResourceLocking="false"
    antiJARLocking="false">

<!-- This param mirrors (and overrides) the same param found in the PowerEYE web.xml -->
<!--   Just change  value attribute                                                  -->
  <Parameter
      name="derbyDBDir"
      value="e:/PATH/TO/DIR/FOR/EagleDB"
      override="true"
      description="The directory where the EagleDB dir and files will be created; MAKE SURE IT IS WRITABLE."/>

</Context>


Catalina Policy
The tomcat default catalina policy file does not grant web applications the necessary permissions to  write  to the file system. This needs to be changed becasue PowerEYE needs to create a database file(s) for the stored readings.
The setting change can be specific to a single webapp (powereye) or even a specific class in a web app.

Add the following 2 directory permissions to the end of the $CATALINA_BASE/conf/catalina.policy file and restart Tomcat.
Make sure you customize the directories you expect to write the EagleDB directory to.

grant codeBase "file:${catalina.home}/webapps/powereye/-" {
  permission java.io.FilePermission
    "${catalina.home}/-", "read,write,delete";
};

grant codeBase "file:${catalina.home}/webapps/powereye/-" {
  permission java.io.FilePermission
    "${user.home}/-", "read,write,delete";
};

Once that gets it working...
you could then further restrict write access to the file:
${catalina.home}/webapps/powereye/WEB-INF/classes/ca.bc.webarts.tools.rainforest.EagleDB.class
to lock down the security as much as possible.
This should not really be a required issue, unless you expose this to the outside world.

Adding your specific configuration experience  notes to the discussion forum would be appreciated.

Using PowerEYE

Generally, you start it and let it collect the Eagle power data. You can then visit PowerEYE WebApp pages to see how & when you are using power.

When you want to dig into your usage data further, there are many ways to get to your data:

  1. detailed chart views
    • select from & to dates
    • specify numReadings on the chart URL
      For Example:
      /powereye/jsp/goto.jsp?page=DemandChart&numReadings=20000

  2. data table views

  3. Exporting your data to CSV, XML, JSON, XLS

  4. RESTful style queries to help other applications or systems get your data in a standardized form

UDI ISY-994 setup

Visit the options page and fill in your ISY details:

  • ISY IP address
  • ISY login userID
  • ISY login password

PowerEYE should automatically connect and start talking to it.

You will also see the connectivity status along the right side of the options page.

FAQ

FAQ Items (10 recent)

  • Why doesn't my Eagle connect? I do find that the eagle is "touchy" when adding a provider. Sometimes it works right off, other times I had to delete the entry, confirm it was deleted, go back to the home page and start again.Mine also only took the IP address not the hostname. ie. 10.0.0.239It won't send to a SSL https server with self-signed certificate. This is if you deploy in your own app server.Give it 30-60 seconds. touchy, but once it is added... it is saved.
    Posted Mar 27, 2015, 4:42 PM by Tom Gutwin
  • How much data gets saved? Lots. PowerEYE saves 3 sets of messages from the Eagle.PowerEnergyPricingThe power comes every ~8 seconds;  Energy and pricing... less frequent. Maybe every 30-60 seconds.This adds up.4 months of readings is about 1 million records.That's 450 power readings an hour, 10800 a day, 75600 a week.These or the 'numReadings' to use with the rest/db/table/readings/  call
    Posted Jul 16, 2015, 9:38 PM by Tom Gutwin
  • How do I get my data out of the PowerEYE database? Currently there are 2 ways:Using the Export buttons on the WebApp Data Table or Direct SQL pages.Using one of the REST requests.I will be adding and enhancing these with more 'customizations' 
    Posted Feb 16, 2015, 5:11 PM by Tom Gutwin
  • What does the REST request result look like? Example Rest style URL:  http://your.powereye.servername/powereye/rest/power/currentXML response:  <RestResponse succeeded="true">    <power unit="watts" timetamp="current">4061.0</power></RestResponse>You can request "your" data using any of the following http request URLs that have been implemented:       http://localhost:8080/powereye/rest/price/current       http://localhost:8080/powereye/rest/price/recent       http://localhost:8080/powereye/rest/price/<timestamp>       http://localhost:8080/powereye/rest/power/current       http://localhost:8080/powereye/rest/power/recent       http://localhost:8080/powereye/rest/power/<timestamp>       http://localhost:8080/powereye/rest/energy/current       http://localhost:8080/powereye/rest/energy/recent       http://localhost:8080/powereye/rest/energy/<timestamp>The 'recent' query return the last 10000 values in the same XML format as ...
    Posted Jul 17, 2015, 9:05 PM by Tom Gutwin
  • Will it co-exist with Bidgely or other cloud provider? No, not in the current version. PowerEYE consumes all the eagle messages.But once you switch to PowerEYE, you might not want to go back ;) I have thought about implementing a pass-through mode that would consume the messages and then pass them on to bidgely or wattvision. I have NOT built that functionality yet, but Iam investigating it. Once the eagle has powerEYE added as a cloud provider, it is easy to temporarily switch between other service providers. You can try PowerEYE for a short time then go back to Bidgley or Wattvision if you want. I do find that the eagle is "touchy" when adding a provider. Sometimes it works right off, other times i had to delete ...
    Posted Feb 27, 2015, 10:12 PM by Tom Gutwin
  • Will it run on the Raspberry PI? Yes, I have now fully tested the PowerEYERunner (embedded Jetty version) on my Pi2 running Fedora 21.It should work, however, I have not tried it.I have done a bit of research myself though and do not see any reasons why it should NOT work. - A JDK is available (and well documented) on the PI - Jetty WebAPP server also runs. (see http://raspberrypi.stackexchange.com/questions/3710/running-jetty-webserver)so based on that it should work fine.PowerEYERunner all-in-one package has Jetty embedded so if you get a JDK installed the "Quick-start" instructions should work without any problems.
    Posted Jul 15, 2015, 9:32 PM by Tom Gutwin
  • How do I connect my ISY-994? Go to the options page and enter your:IP address for your ISY-994your ISY login IDyour ISY passwordAfter a few seconds it should take that info and automatically connect.When connected, the right side of the options page should reflect that you are connected.
    Posted Feb 10, 2015, 8:20 PM by Tom Gutwin
  • How to chart older data? There are 2 ways:Use the From and To date selector on the chart page and click refreshmanually specify the number of readings to chart using the un-exposed numReadings parameterFor Example:/powereye/jsp/goto.jsp?page=DemandChart&numReadings=20000
    Posted Feb 9, 2015, 1:55 PM by Tom Gutwin
  • Can I run PowerEYE on a SSL server? You can run it BUT the Eagle HAN did NOT want to use my SSL URL,although I have a self-signed certificate so you might be able to get it to work.Let us know if you do - on the PowerEYE discussion forum.
    Posted Feb 7, 2015, 8:02 PM by Tom Gutwin
  • What version of Java do I need? You need either version 7 or 8 of the Java Development Kit - JDK. I suggest the latest JDK 8 version from:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.htmlNOTE:The regular JRE runtime is not enough because PowerEYE needs to compile the included Java JSP files as it serves you its web pages. You can test what version you have by opening a command prompt and typing:javac -versionIf you get an error, then you need to update your JDK.
    Posted Feb 7, 2015, 2:51 PM by Tom Gutwin
Showing posts 1 - 10 of 17. View more »
Subpages (1): FAQ
Comments