Tuesday, March 16, 2010

Watts For Sensors: New Beginnings

Last week we saw the conclusion of the Wattdepot-Apps group, our two month going project. This week I pick up a new group that has already begun development of their project, so I will be as they say hitting the ground running.

My new group for this next milestone will be the Dorm Energy Simulation group. Our task is to develop a simulated energy program that will send simulation data into the actual Wattdepot servers we were working with.

We haven't had much time to meet or discuss our plans which we will hopefully get together by our first meeting this week, but so far from what I've heard, our two goals right now is to get a working conversion from the data of the meters into actual data that the Wattdepot servers use. The next goal is the actual simulated data in which we are currently doing research on appliances and other items found in dorms that we can base our simulated data on. Once this research is completed we can plug in actual numbers and get this data written into wattdepot to be visualized and queried by all sorts of applications.

Not much else to report this week as I'm still getting my sea legs. This is always a problem that I believe anyone would encounter when joining an existing project. Half the members in our group were already working on this project when I had joined, they will be the more productive members until the rest of us can get it together. In the mean time I hope they continue to be supportive and take lead in the project to direct us new members until we can be a fully functional part of the team.

Tuesday, March 9, 2010

Wattdepot v.2: Overcoming Challenges

It is now almost four O'clock in the morning and I am still waiting in front of my computer half asleep. Trouble seems to strike at the most inconvenient time these days, but I guess anytime trouble hits it becomes an inconvenient time.


Its been a little over two hours since my internet cut out on me, disconnected from my group and unable to contribute anymore progress into the overall system. Lets recap this previous week and hopefully by the end of this textedit post the internet will be back up.


This project is finally coming to an end. We started off with 3 applications in mind, we've only seen the completion of 2. Not the best, but considering the amount of time spent in refining the other applications we've accomplished plenty in the two months we were given.


This past week we've been scrambling quite a bit, what should have been a week to do finishing touches on our public release of the Monitor application and the next version of the Visualization application met with some road blocks.


In our last weekly meeting we were given comments on a code review that Professor Johnson did… and it was a disaster. There were many comments that issues presented in the meeting that really opened our eyes to the messy code that we have presented.


The first issue was our previous wiki pages. We had slapped together wikis as a placeholder using base from our previous coding assignments. I had use my groups Developers Guide from a previous semester and I had thought all the references to to old project was removed, but Professor Johnson managed to find some. I had forgotten to remove all the links that lead back to the wrong project page.


This week we've had a complete overhaul on the wikis based on the suggestions by Robert and Professor Johnson. It should now be comprehensive and informative enough for both users and developers each on their on level.


The second issue discussed was a package we were using in our code. This semester isn't the first time we are working with Wattdepot. In a previous semester we had written a command line interface for users to quickly query some data based on preset commands. When we first started our project we had though this old code would be useful and save time, so we reused it turning it into a "Command" package. Turns out that instead of directly accessing Wattdepot with all the nice methods presented to us by Robert, we were using this faux command line on top of it and having to do all this extra work before we actually did any calls. This was very inefficient and from a outside developer's standpoint almost impossible to understand.


This week, we did a total overhaul and re-factored the code. We looked at the command methods took what we needed and scarped the rest. Now completely gone is the Command package, each application now only uses what it needs to rather than importing the entire package.



Other than the code clean up, comments, and documentation for the release, we were able to squeeze in some extra enhancements to the Monitor application.







Last week I talked about going portable, so we've added in a proof of concept parameterized link for users to send to others.




Although there are issues with it that I would like to see get fixed in the future, it is a very neat feature to have and I believe it will be useful to users.



Tuesday, March 2, 2010

Wattdepot Portable: Rounding 3rd!

Another week and a step closer to our second milestone. We are currently in the third week of milestone two. With one more week to go, just how close are we to completion?

This past week has seen some work from each member of the team. At last week's meeting, it has been decided that we are close to the completion of the project. The only thing left on the visualizer is a small issue with loading and column naming issues, along with testing. For the monitor page, we needed to have some error checking and do dynamic type conversions.

One great enhancement that will be useful for both applications is portability. We would like to make the urls portable by allowing users to share urls that pass parameters into the pages. Since this deals with both the monitor page is the visualizer page, as the middle man between both projects, I was assigned this task.

So far its been difficult. I do have portable urls working and the parameters being passed. Below we take a look at the new Urls being use for the applications.

Old Url: Very ugly, What the heck is "wicket:interface=:0:"?

  • http://localhost:8003/wattdepotapps/home?wicket:interface=:0:MonitorPageButton::ILinkListener::

New Url: Nice url, 1.1 does represent the pageID, hoping to get rid of it in a future release.

  • http://localhost:8003/wattdepotapps/monitor.1.1

Portable Url: All parameters passed using slashes in url encoding.

  • http://localhost:8003/wattdepotapps/monitor/Source/SIM_AES/Type/Power%20Consumed/Interval/5%20sec

One problem I am currently running into is finding a way for the url to update without having the page refresh. Since the monitor does do a query or "monitor" in its case on load, I cannot just send all the parameters to a new page for the url and have it start. It is however possible for the visualizer which loads on start so I can apply my current code to the visualizer.

Hopefully I will run across a fix for this, or someone from the wicket mailing list will have an idea. For far no luck, but hopefully we will have a fix within the next week.

One last issue for the overall system is to have a dynamic host uri and port number arguments. This will be helpful because Robert wants to install a second Wattdepot server and using this command argument in the cli, we will be able to have both servers running. This does not seem too hard so it has been set to low priority, it is also there since we have nothing to test it with until Robert add this second server.

It has been recently decided that since we are approaching our next milestone and only two out of the three applications will be ready by then, it is a waste of resources of three people to be working on just the Browser application in the third milestone, so most likely we will be parting ways or if we share similar interests, we will be switching to new projects.

There are already a list of projects to choose from and many do look interesting, hopefully we are able to complete the two required applications we do have left to its fullest before we take our next step.

Tuesday, February 23, 2010

Wattdepot Monitor:1..2..3..4..5..Change!

Today marks the second week of the second milestone.

After a brief meeting last week, since we didn't have as much to show, we were sent on our way to continue work on our project.

Our current checklist of to do items stands as:

TO DO
  • Visualizer multi-select of sources
  • Small layout changes
  • Monitor base functionality
Our current progress stands with all of the above items completed. A successful week as I would say.

This week I focused mostly on helping the Monitor team. The base page and drop down was up, so what we needed to complete from last week was to link the page to the Wattdepot servers and display the data. Ed was able to link up to Wattdepot and grab all the data. For man job I was assigned to format the returned data for display. It was initially thought of as a simple job, but the task was slightly more complicated with both of the time values displayed being in a different format. I had to break each one down and rebuild them into something usable for display.

There were two problems that we ran into. The first being a thread issue in which caused what seemed to be a double update whenever we hit the interval. This issue took a somewhat large chunk of time from both Ed and I, and Ed was finally able to resolve it through a time comparison. The second issue which is similar to the first issue is a delay in update, this issue is going to be mark as such because at the current moment we are unsure how to approach it. The issue is caused by a delay from the Wattdepot server when we request data from large sources. Most of the time we have a small 1 second delay for the initial connection and then it runs fine, but in the case with a large source, in our case SIM_OAHU_GRID, the delay time is as much as 10 seconds added to our interval sleep time, so at minimum it was updating everything 15 seconds even when set to 5 second intervals. We've talked to Robert about this issue and he has recommended a fix, but it requires us to update in advance for compensate for each source's delay.

On the visualizer side, we are finally complete with all functionality working. Hopefully this will be or somewhat final release version. There might be small layout issues that need fixing but all functionality is currently working.

On current plans for this coming week is up in the air. Since we might be finishing up with the Visualizer project, we will either be working on enhancements for the monitor or continuing on with the browser project we had put on hold for the monitor. It will play out depending on our weekly meeting.

Here's hoping a finalized visualizer!

Monday, February 15, 2010

Milestone Two Goals Set! Engage~

We are now in the second milestone of our project. With new goals and priorities set we are ready to engage in phase two of our Wattdepot-apps project... after a short intermission.

This past week has been a very busy and eventful week. After reaching our first milestone last week Tuesday, we have come up with some new goals for this next milestone.

During our regularly scheduled meeting with Professor Johnson we have discussed some new enhancements for our visualizer project which is now out in its public release of version 1.0, but he rejected our layout for a more simple layout. We also discussed our new subproject priorities which has had wattdepot-monitor moving up to the top of the list. In the meeting we also discussed about splitting off into two teams, one leading the development of the monitor, while the other completes the enhancements to the layout and our final requested feature for our visualizer. With only three members on our team we decided to split it evenly with one and a half members on each project. With the group indecisive about the middle man, I've volunteer to work with both projects. Although at this point I do not know if I can be a fully functioning member of the team or become a assistant to the dedicated members.

This week also brought about the harsh reality of life and school into our overall goals, the group is hitting some major midterm road blocks in the past and upcoming weeks. Although I do expect the new split in the project to get off to a somewhat slow start. The two(three) holiday weekend, with Valentines Day, Chinese New Years, and Presidents Day, coupled with the busy schedules of each of the projects members have cause the project to lag behind a little.

Currently we have completed a new layout for our visualizer page, although a weird problem in which our html/javascript formatting(mainly the spacing) cause quite a few hours of headaches, we finally resolved most of our issues and have started to focus on the final two enhancements on the visualizer page.

On the other project we have completed a base page for the monitor. Although not functional yet, the foundations for the drop-down menus and the selection in all there. We hope to see a functional application by the next meeting.

Tuesday, February 9, 2010

Checkpoint Reached: Milestone Pitstop

Its been four weeks since we started the Wattdepot apps project and we are now entering the first of our monthly milestones. At the end of each milestone the groups will present on their progress and it is decided of the project is completed or will be continued.

So the first deadline of February 9th approaches and there have been major modifications to our original plans.

When we first started the project, I felt that we would have all three items : the visualizer, browser, and monitor; completed by the time the milestone came, but this is not the case. Within the first week of our project we were able to get the basic visualizer up and I thought that although with some minor adjustments we were done with it, but that project ended up evolving the encompass the entirety of the milestone.

We are very far from our original basic visualizer and the current version. There are many enhancements and this is the one thing that is "almost" complete, there are a few issues that we will be updating in the future, while all the other projects were pushed back to future mile stones.

I have come to realize now that this one project that are currently one, to refine it to a professional quality may be at least one or two more milestones, but that may have been the original intention.

In the last week we have made many strides since our previous meeting. Not only was it a busy school week for the group members but it was also a super bowl weekend, much which have hindered some of our work time, but we managed to pull through with a decent amount of effort and work put into polishing up the "almost" final version of the visualizer.

While the others worked on refining the code and adding last minute touches, and added in the error checking to prevent and warn users when they are using the product incorrectly. I've also allowed users to query both types of data (calculated and sensor) in this new version. As a group we were able to implement a cancel button to allow users to cancel queries if they wished to. Other than those two big changes most of the time was used to polish up the remainder of the code and get the documentation and wikiPages ready for a distribution onto the public servers.

The one item that we were not able to implement was allow the comparison between multiple sources on the same graph or allow users to view sub-sources of a large source. We hope to be able to complete these features in the future, but for now in the upcoming milestone, I believe we plan to focus our attention on completing the next piece of our three planned applications for wattdepot, the browser. We already have a base page up and it is half working, so we hope to be able to complete it within the week and use the remaining time refining and making enhancements like we've done in the previous milestone.

As far as group work is going, for the most part it has been going smoothly, each member is contributing to the overall goal, although there are still those times were we get into disagreements. We have no plans to split up and work on a different project for the next milestone so hopefully it will go as planned.

One down, three to go!

Tuesday, February 2, 2010

Three Weeks Down! One to Go! Scramble For The FInish Line!

We are now entering the fourth week of school and the third week of out first project, Wattdepot-Apps. Its been a bumpy trip, but an overall good experience.

Continuing on from last weeks post, we are still currently working on the first two parts of our three part design, the visualizer and the browser page.

In the previous week, the entire team was busy with other classes taking up their time, and two out of the three of use were unavailable during the entire weekend. This delayed the progress of the overall project a little bit, but I believe we were able to churn out a decent amount of enhancements.

The first new thing that we've added to the project is the base page for the WattDepot browser. Ed, our wicket hero has put up the base layout and the ball is now in Kendyll's court to implement the call for the source summaries. We are currently hitting some snags at this point in the browser development as we haven't yet completed the basic functionality of the page for public users. We hope to have this resolved as soon as Wednesday.

Last week Ed and I had finished completing the base page for the visualization and implementing the basic functionality, Ed working most of the wicket and the page layout, and I doing most of the javascript. Since Ed and I were busy during the weekend, we handed the visualization to Kendyll who converted the annotated time line we used into tabular form. To further add upon this we implemented many suggestions that arose during our weekly meetings with Professor Johnson. One of the things we have progressed on so far is having combination box selection for items. Although only the datatypes are currently functional with multiple selection.

Ed and I have also been able to resolve the problem of granularity of the sampling intervals. The problem arose last week when we noticed that when sampling the smallest time frame (during that implementation), one day, it would take well over five minutes and counting and even possibly time out one the data query, when the sampling interval was set to lower than 10~ minutes. We discussed our plan of action with Robert and Johnson at the meeting and we came to the conclusion that we would keep the small interval, but allow the user to choose a smaller time period such as one hour~. So, yesterday morning, Ed had added in time picker drop downs for us to use, and I was able to link them into the timestamp generation functions. We are now able to pick right down to the minute. (Although it is unwise to choose 1 min)

Overall, we are still on track to completing on time, although we have fallen behind a slight bit. We hope to be able to resolve the issues we are facing and plan to switch our focus on the problems with the browser ahead. We can delay enhancements on the visualization in order to have complete functionality of the other two items, but as it stands, we are still waiting on user data for the browser and real time updates from wattdepot, but that area is still waiting confirmation from Robert.