- A standard mechanism is required to control appliances using Micro Controller, Network and Desktop PC to build Smart Home, Office and Production houses.
- The solution should provide Transparent, Secure, Extendible and Reliable communication between devices.
- Reusability of approach to further enhance implementation in similar scenarios.
- A SPOT (Smart Personal Object Technology) Services framework that allows Micro Controller devices to host and consume services supporting Remote Method Invocation.
- SPOT Services framework is available for standard .NET Framework as well as .NET Micro Framework to host and consume services in any combination of host and client.
- Uses TCP protocol for network communication.
- Service calls can control output on Micro Controller GPIOs which in turn controls switches that can be connected to Appliances appropriately.
Source Code Documentation
Here is a brief description of all projects in this solution.
- Kaushik.Spot.Library.MF : This is the actual SPOT Services Class library for .NET Micro Framework.
- Kaushik.Spot.Library.Windows : This is the actual SPOT Services Class library for .NET Regular Framework.
- Kaushik.Spot.Library.WinPhone : This is the actual SPOT Services Class library for Windows Phone 7.1.
- Kaushik.Spot.CodeGenerator : This project provides a desktop based tool to be used to code generate Proxy Class in C# for client application
- Kaushik.Spot.MicroServer : This is a sample server project that is deployed on Netduino Plus in the demo video.
- Kaushik.Spot.ControllerApp : This is a sample client project for PC that is used to control operations on Netduino Plus in the demo video.
- Kaushik.Spot.PhoneControllerApp :This is a sample client project for Win Phone that is used to control operations on Netduino Plus like a PC version does.
- Kaushik.Spot.ConsoleClient.TestApp : This project was simply added to do some very basic performance evaluation of the work.
For further details of code please refer to
SPOT Library Documentation and
Sample Server Documentation
Here is 5 Step simple process to write and consume SPOT Services.
- Define an Interface that acts as a Service Contract. Interface should be marked with attribute SpotService and respective RPC/RMI methods should be marked SpotMethod
- Implement interface defined in step 1 in a class
- Register the class defined in step 2 using SpotServices.RegisterService(new <serviceclassname>());
- Start Spot Services server using SpotServices.StartServer(<socketport>);
- Code Generate proxy class using Kaushik.Spot.CodeGenerator (steps are explained in Demo Video) and include in your client app (like Kaushik.Spot.ControllerApp)