Home automation using a Cloud Platform - c#

I'm trying to make a prototype of my next application, and before I can start, I wanted to know your feedback about it.
The user will be able to control his home remotely using a mobile phone.
First, the mobile phone will send a request to the cloud plateforme wich is going to do some authentifications (username, ip-address, password) and send the user request to his office laptop (home storing a Web Service WCF) and this one will ask the CM15 to do the rest of the job (switch on/off a light, ...)
And just wanted to know if this thing seems correct to you.

You need to specify if you are using a polling or push model for cloud to home communications.
Polling is easier, and would handle home network disconnection better but you could also use Azure Service Bus to provide a way to call down from the cloud to the laptop as well.

Related

How do I create a Live Support chat application in C#?

I'm attempting to build a live support chat application in C# using a WCF microservice and after endless searches I still can't find the answer, hopefully someone here can point me in the right direction.
My problem is that rather than a typical chat room a where users broadcast messages to all connected clients, I need the application to be more like a Live Support app found on websites such as Amazon or eBay.
Ideally multiple customer support agents will have a pre installed WinForms chat application on their machines, when a customer opens a chat window (aspx page) it will connect to a server/service and the server/service will then call all connected customer support agents until one answers. At this point the customer and agent will be connected in a private chat window.
Could somebody please give me some insight or ideas on how to do this?
Thanks,
Owen
You can use ASP.NET SignalR which is a library for ASP.NET developers that makes developing real-time web functionality easy. SignalR allows bi-directional communication between server and client. Servers can now push content to connected clients instantly as it becomes available.
Here you can find more details and many tutorials about SignalR.
The first resoult in google
A WCF-WPF Chat Application
Video tutorial
WCF Chat Application
ASP.NET Chatting using WCF Services and JSon
A simple peer to peer chat application using WCF netPeerTcpBinding
usefull lectures
HTML 5 Web Sockets
Always first ask google, above you have few ready to use projects that you can copy to your solution
EDIT:
Also as tip I can recommend bi-directional message queues at application level, then make index for messages with session and users identifier. Next step would be WCF with pop and push logic based on wait objects. At low cost you will need to lock queue. WCF will do heavy job. Also problems can occure inside app with proxy management and message sending so dedicated proxy for chat would be great and safest idea. And read about Duplex Services that can be usefull here DUPLEX SERVICE
These are my findings, not checked though:
Live Support Chat using SignalR
Parle
A tutorial from ASP.NET team:
Real-time chat with SignalR 2
The first one looks very early development stage, Parle is somewhat more promising.
Anyway, since I continue my research on the topic maybe I'd need to augment my answer. Until then the links could be a good starting point.

How can I achieve communication between a windows desktop service and a windows desktop application?

I'm writing a windows desktop service that is supposed to download content from a file server on a weekly basis, but it requires users login information to function.
I need the service to be able to "talk back" to the simple tray application I've developed to inform it when things have happened. Things like
Is the users login info good?
Did the content start downloading?
Did the content finish downloading?
I've seen posts on WCF, but, at a glance, WCF feels to me like it's just designed to go around web services. This is going to be a desktop service, not a web service, so unless I'm mistaken in my interpretation, I do not think that WCF is going to work for me? What's my alternative? (or, if I'm mistaken about WCF, can someone point me to a simple tutorial?)
You need to use either a Socket or a NamedPipe. Typically NamedPipe is preferred because it won't trigger some restrictive firewalls that monitor loopback interface as well.
Example of Named Pipes
Write a WCF service and configure a key in the web config(which specifies the user name and password" of the WCF service. Pass the same key from the windows service and authenticate it, once authentication is success, Download the files
eg:
http://www.codeproject.com/Articles/166763/WCF-Streaming-Upload-Download-Files-Over-HTTP

Setting up push notification for windows phone. MPNS and its role

I have read this:
http://msdn.microsoft.com/library/windows/apps/ff402558(v=vs.105).aspx
This is the API documentation of the push notification service I want to get pushes from: https://developers.podio.com/examples/push
How do I go about implementing push notifications with Podio if they do not support MPNS. It looks like (from the msdn documentation) that they will have to send the notifications to Microsoft Push Notification Service at stage 5.
Is there a way around this stage? Can I communicate directly with Podios PNS somehow? Why should Podio who are protected by Citrix have to send sensitive data through Microsoft's service when they have a service workflow of their own? I'm struggling to understand this!
Related documentation:
http://forums.wpcentral.com/windows-phone-8-guides-how-tos/234780-how-push-notifications-work-why-sometimes-they-might-not.html
EDIT
If I set up a service of my own that Microsoft's push notification service interacts with... I can then make interactions on behalf of Podio... Is this normal practice?... I'm assuming that the lag of double dosing requests is going to be pretty useless for something like a messaging application.
I noticed that Android seems to also now have a middle man service... But I assume that having the choice means large companies who do not want to make a handshake with a third party company do not have to?
http://developer.android.com/google/gcm/gcm.html

Push Notifications in windows 8 desktop app

Hey i have been developing a windows 8 desktop app using XAML and C#. I have to implement push notification functionality in it. But i cannot keep my database on cloud due to some security reasons. Is there any other solution so that i can keep my database inside my network only but still can write mobile service to implement push notifications. Any link or suggestion is welcome.
Typically in push notification scenarios there are three pieces:
App.
Cloud Service.
Push Notification Service
Where the app registers for notifications, passes the registration to the cloud service which can then use the PNS to send notifications.
However the Cloud Service component doesn't need to be in "the cloud" it can be anywhere the client app can connect to and send the registration. It's just a web service hosted somewhere, be in a cloud platform, your own hosting etc.
There is a company that provides this service for you for free called Notice Software. They provide push within apps at not cost and handle the cloud interaction etc. I think the product site is NativePush.com....also used UrbanAirship but not sure I want to pay that much! Frees always best :)

Communicating to Windows Mobile using C#.net over TCP/IP or HTTP?

We are building an application which is suppose to connect to the Support Engineer's Mobile phone and will alert him about any job to be done.
This application will be based on 2 parts. one is Control Centre part where the interface will be built using Silverlight 4.0 and ppl from Control Centre will be using it using normal pc over internet. The 2nd part is based on the Mobile Part where the support Engineer will be sent a communication via some magic that there is a job. And if the support Engineer will accept the job then the job will assigned to his tasks list...
Now the only issue is that how we communicate to the support Engineer on his mobile. We have couple of options...like SMS, Email over SMS etc...
SMS option is costly, so due to the cost management has refused the option, but actually SMS is fine as far as it is sent from the control Centre, but how we get the reply back from the support engineer. Coz we dont want the support engineer send us reply VIA sms coz this will cost him(thats why management refused this option). We have decided a solution that built a custom application for windows mobile which will intercept the coming SMS on the Support Engineer's mobile and will rasie a poupup detailing the job specs and on the same popup there will be couple of buttons like Accept, Reject. what ever the action will be taken it will update the control room via internet/WCF/HTTP. I have no idea how? and thats why I am here.
I am posting all this LOVE STORY so that any body senior can guide me abut the architect if it is ok or not...or any other options we can dig down further.
I appreciate your participation in this regard.
Thanks
Communication to the device is typically the hard part because the device rarely will have a routable network address. Sending an SMS is a reasonable way - so is sending an email (that's how the Microsoft email transport for WCF works). Another option is to have the device periodically "check in" to a server to see if it has any messages waiting.
Communication back is pretty simple. Build up a public web/WCF service that the devices communicate back to. Personally I'd probably lean toward a REST service to keep your mobile connection point a bit more open in the event you want to connect via something that maybe doesn't support WCF.
#Shax I've not done any mobile development but I think you need a WP7 app that will poll control center server over HTTP etc. if there is any job for the engineer. Another option will be to push any job notification from server to mobile. But I am not sure if this (push notification) is easier and/or cost effective.
Another option will be of setting up a website with details of jobs, then you can alert engineer with an SMS. Upon receiving SMS engineer can log into website and get details of the job.

Categories