I am looking for an easy way to communicate (send messages and maybe attachments) from the device behind a router in my house to a public website. Trying to have a project where I can get notifications from my house when not there to a website. What is the easiest way to achieve this? (using FEZ CERBERUS)
Generally, TCP/IP over ethernet. For Cerberus, this means ENC28J60.
There are several existing websites that may or may not meet your needs. Things like Cosm, Thingspeak, etc. You might want to look into those. I believe there might be code already in Codeshare for some of them.
Thanks very much. I have the ENC28 (is J60 required or the regular ENC28 will work?), will it work over Internet? how can it go beyond my router? as for a website, I have a MSDN subscription and with it come 10 Microsoft Azure websites for free so I intend to use it for the website. Just still wondering how TCP/IP will work across my router to the internet.
The router is designed to allow TCP connections to be setup from the LAN side to the Internet side.
The ENC28 will work. The ENC28J60 is the chip used. The module, containing the chip, is called the ENC28.
The easiest way might be to send yourself an email with the information. Have the device connect to some SMTP server and send a message. If you’re good you can even send attachments.
Another option you can consider is to run a simple SCADA webserver from your own machine. (assuming it is online all the time)
One such solution is this.
This can run without the need for any IIS or Apache etc. It has it’s own built in server. You can send data to it via HTTP protocol and can then access from external by simply setting up PORT forwarding on your router. You then have a self contained system.
I have also used this with a GoDaddy virtual server and it works really well. It would of course cost you money per month but you have the freedom to run your own software on the server.
Since you are using AZURE, I recommend you checkout this article…
I’m using NodeJS and works great as server and dispatcher to web and android systems from spider.
Share your Code on Codeshare if you don’t mind
@ Gad, If you have a website already that you are paying hosting for, then all you need is a page that accepts post requests, stores them and displays them. The Fez then just sends a POST request to the page and it’s done.
I will put it on codeshare
I have problem with putting the NodeJS code on codeshare, because it does not have project file, and it’s not just one file solution. Anyway, it’s in link bellow. I didnt tested this version but it should work. You have to run NodeRunServer.bat file to start server. The server listens for UDP requests from FEZ. When request arrives it saves some data to sql server (common.AddSensorDataToDb function), and forwards message to Android client (common.SendDataToClient).
In attachment there is also Android.txt file with callback example, when data arrived from NodeJS server.
There must be NodeJS installed on computer, with express, msnodesql, socket.io and tedious node modules.
On Android, there must be socketio.jar library included.
Hope it helps someone…
@ Gad, sorry I didn’t see your Yammer post about this (@ Jay Jay, are you on that Yammer group?) Do you have enough to go on from here, or do you want more specific options/thoughts?
If I break this kind of problem down, there’s two things I see. A need to get notification of some event to you, via a method that is reliable; this might be an SMS text message to your phone (assumption: you have a phone that you’ll carry with you) or it might be an email or tweet to you, or it might be a toast notification to an active app on your phone for instance - but you usually need something to “own” the delivery to you, that you don’t control (ISP email, relay service etc). Then there’s the aspect of getting the information you need into the hands of the 3rd party, and that depends on the mechanism. So try to think about how you want notification to work first, and then think about how you’ll get the notification to you.
Thanks very much Brett. I am putting ASP.NET Web API on Azure and then will try to POST to it. For messaging I am thinking maybe SMTP service on IIS that I will host in Azure. Trying now to put it all together. BTW - you mention SMS text message. What would be a good way to send a text?
it’s been a while since I looked for an actual service to do this, but I used an email-to-sms gateway provider when I needed it, or you could use a cellular module if you wanted. @ Architect posted this a little while ago https://www.ghielectronics.com/community/codeshare/entry/536 using http://www.cdyne.com/ (for casual use, $11/mo may not fly, you may be able to find alternatives) HTH!
Edit: I’ve found the one I’d use…