Edmon Begoli's profilehGadget Project SpacePhotosBlogLists Tools Help

Edmon Begoli

Occupation
Interests
IT Professional
Judoka
Family man
Project  
Photo 1 of 1

hGadget Project Space

A project notebook for the process of building the gadget for the automation and monitoring the household using MS Express tools
August 07

What a Complex Piece of Work

That I knew that I would end up building such a beast I would probably give up.
 
 
Just kidding.
 
Actually, I am not. We Judoka never give up when faced with the challenge. It is all part of the mindset.
 
So what did I finally build. A little monster hiding behind three innocent web pages.
 
I ended up implementing a motion detector, X10/INSTEON controller, web services bridge for INSTEON DeviceManager and webcam area monitor.
 
My little hGadget component has a relational backend, webservices interface, integrated security and bunch of other bells and whistles.
And you can barely tell ... all because of that awful CSS that I love and hate so much.
 
I've spect 20% of the project time implementing all these wrinkled features such as WebServices, image recognition, device controls ... and 80% tweaking UI. I discovered along the road that Visual Studion Express has some strange feature where it overrides the style of the component if for instance image is bigger than expected.
 
Uuu, that really messed me up.
 
All in all, the biggest discovery of the project was ASP.NET. It is amazing how productive that technology is. With the browser open and Google handy I was just flying through the API. I never spent more than 30 min on an issue (except for CSS that just ate me alive).
 
I am just too tired to type any more.
 
Just to mention that my daughter is doing much better.
 
One more thing:
 
I wish all finalists the best of luck and lots of success in the final "grading" as well as in their professional careers. I wish all my projects are this much fun. 
 
 
 
August 04

Utterly Impressed

First quick update on my family situation. My daugther is fine, no more bleeding. Thank you all for support.
Her results came in. It is a form of a bacterial infection that is supposedly causing the bleeding. I am noping that her hearing will not be affected.
 
Now back to the topic ...
 
I have been  developing in J2EE, Java and Web technologies now for about eight years, but this is my first experience using
ASP.NET, SQLServer and C# from begining to end (.NET 2.0).
 
As the project is wrapping up I must say that I am utterly impressed by the framework and capabilities of the tool.
 
Project started little bit rocky. I managed to crash my Windows on the laptop twice by using WIA.
That was a little but surprise knowing how difficult would be to crash the operating system on for example Solaris or Linux.
 
I was worried that I might be heading for some nasty surprises, and that I might be dealing with the wrong technology.
 
My worries did not materialize.
 
 
As I was moving through the project I discovered that MS Express tools are quite powerful,
that .NET framework is very rich and incredibly easy to work with, and that
there is plenty of documentation for everything I was trying to do (e.g. Working with WIA, motion recognition,
Web Services, Timers, ASP.NET components, ...).
 
I found MSDN documentation and specially Code project web site extremly helpful.
 
Of all the things the only flakey part of the whole project was this site.
Sometimes the blog edit interface would not work, sometimes the layout would look crazy in Firefox,
sometimes, like right now, the fonts on the editor would not look right.
Maybe all of that happened because I use IE 7 or Firefox.
 
Another issue was my orthodox use of CSS. Explorer and Firefox simply could  not agree to render things in the
same way. For that reason I had to tone down the use of orthodox CSS and fancy UI features.
 
All in all, with few days of the project left I feel pretty good about the overall project experience.
Actually, I feel great about it.  
August 02

While we are waiting ...

We did not have any results yet regarding my daughter. She is doing fine but only lab results will tell us complete story.
 
Went to bed last night around 4:00 AM, maybe 4:30 AM.
 
Woke up around 10:00 AM. Could not go to work because we had to wait for the doctor to call. I also could not be on a conference call for the same reason.
 
While waiting, in a half-asleep state I was writing some web services and UI component for device management.
 
I was once again reminded and impressed how simple and easy is to do web services in .NET (my primary skill was always J2EE).
 
Here is the class that delegates device management operations to INSTEON's objects:
 

[WebService(Namespace = "http://tempuri.org/")]

[

WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]

public

class DeviceManagerWS : System.Web.Services.WebService {

...

 
and here is one method that allows me to verify status of my home devices/appliances:
 

[

WebMethod]

public String GetStatus(String deviceID)

{

    return sdm3.GetOnLevelText( deviceID );

}

To test it from the browser just right click on the WebSerbice and select "View in Browser"

WebService interface opens in the browser:

 

then select the service. It opens the very handy form for testing of the service, plus it gives the SOAP 1.1, 1.2 and REST interface descriptions. 

 

 

 
 

Medical trouble with my daugther

My three year old daughter was admitted to the emergency room in the local children's
hospital after the significant bleeding from her left ear.
 
At this point causes of the bleeding are still unknown.
They've done a culture testing so we should hopefully know something by tomorrow (actually later today because it is 3:39 AM now).
 
You may ask how will this affect my project.
 
I honestly don't know.
I was on track so far, but I am not sure how will the upcoming days look like.
July 30

INSTEON simplified my life ...

INSTEON is a new X10 compliant home automation standard.
 
All of the equipment I purchased for this project, including the development kit was INSTEON based.
 
The best part of all was actually the implementation of the INSTEON development kit.
 
I was fortunate to discover that INSTEON supplies the DeviceManager .NET kit that provides a direct API for the manipulation of the X10/INSTEON devices:
 

using SDM3Server;

//prior to using this code execute SDM3.EXE with the /regserver parameter

SDM3Class sdm3 = new SDM3Class();

//turn the lamp link device on 

sdm3.SetOnLevelText( "04.9B.CA", "ON" );

//interrogate the device

String level = sdm3.GetOnLevelText("04.9B.CA");

Console.WriteLine("Level is " + level);

 
Furthermore, INSTEON also provides a web server that responds to POST/GET entries that can manipulate and query devices as well:
 
 
This is all very important because it pretty much helps me realize my webservices based API for the project, both SOAP based and pure RESTful.