Need some help to get started with my Spinneret
Don M
Posts: 1,652
I have an idea for my Spinerret but am somewhat confused by some of the terminology and different code objects presented here.
My project involves remotely reading temperatures from several XBee nodes. The Spinneret will have its own XBee to connect with the others. I will read the temperatures at preset intervals to be sent as a message and also monitor for readings that fall into an alarm zone to have a message sent immediately.
What I am looking to do is have the Spinneret store a simple webpage on the SD card that only needs to be available within the network that it is connected to. It doesn't need to be visible outside of this network to the outside world.
The purpose of the webpage is just to set some parameters for setting the frequency of temperature readings and the email address in which to send the data, etc.
The Spinneret will need to be able to send a email message. I also see that Beau (and others) have made it possible to set the clock from the internet time source as well which I would also use to time stamp the readings and messages.
So which objects would be needed here to get me started with say showing a webpage and being able to send a email message?
I want to be able to plug in the Spinneret into a router. Do I need to know anything about the network that it is plugged into in order to send these messages? I would like for it to be as simple as "plug and play" (within reason) if possible.
I need to take this in baby steps to get started.
I apologize for my ignorance here. Thanks for any help.
Don
My project involves remotely reading temperatures from several XBee nodes. The Spinneret will have its own XBee to connect with the others. I will read the temperatures at preset intervals to be sent as a message and also monitor for readings that fall into an alarm zone to have a message sent immediately.
What I am looking to do is have the Spinneret store a simple webpage on the SD card that only needs to be available within the network that it is connected to. It doesn't need to be visible outside of this network to the outside world.
The purpose of the webpage is just to set some parameters for setting the frequency of temperature readings and the email address in which to send the data, etc.
The Spinneret will need to be able to send a email message. I also see that Beau (and others) have made it possible to set the clock from the internet time source as well which I would also use to time stamp the readings and messages.
So which objects would be needed here to get me started with say showing a webpage and being able to send a email message?
I want to be able to plug in the Spinneret into a router. Do I need to know anything about the network that it is plugged into in order to send these messages? I would like for it to be as simple as "plug and play" (within reason) if possible.
I need to take this in baby steps to get started.
I apologize for my ignorance here. Thanks for any help.
Don
Comments
Congratulations for getting a Spinneret. I can't claim to know the content of the entire site but I have not seen any projects that send E-mails. I would start with getting a webpage running that tells the time. That can be done with a little work. I do not yet have working code to set the clock & serve a webpage. I got the clock set with one piece of code and then worked out a webpage to show it sepreatly. My work has been based mainly on this:
http://forums.parallax.com/showthread.php?128747-LOVING-Spinneret-Web-Server-DEMO-v1.2.
As far as e-mailiing there are a few ways to work this out. One is to write a e-mail server, that would be awesome, the other is monitor a value on your webpage and have some other device handle the alert. For my project I will have the information on a webpage but I've also attached a 4 line LCD that can display information. So to boil all this down - you could design your webpage with a box to indicate the status and readings from each Xbee sensor. The background color of the box could represent the temperature range. If the background color went red a script watching the boxes on a PC could send a e-mail, text message & write a log of when the event took place. I would break it down to the simplest points and start there. There are 2 types of web demos I've seen. Ones that store webpages on the memory card and ones that build the webpage in memory. As for network routing - you will need to decide if you can manually assign a IP address, or if you want the Spinneret to self assign one with DHCP. Is this for a specific network or all networks? Keep in mind the current configuration ( meaning the network port in the Spinneret ) can only handle IPv4 - meaning ip addresses with 4 octets, like 222.222.222.222.
I hope you find this helpful. If you have any questions about my input please feel free to ask.
Thanks
Brandon_L
Ok that should get me started to display a webpage. I am confused about the email server. I was looking at this thread-
http://forums.parallax.com/showthread.php?131983-What-s-eating-my-DAT-data&highlight=smtp
and it looks to me as though Jeff is accessing an email application using the propeller. I was guessing that he was writing some sort of script that the propeller would go to a certain url address on the web, log in and then compose a message and send it. Could it be that simple in theory? Maybe I am looking at this wrong.
I found this information. Might be useful here-
http://blog.arvixe.com/how-to-manually-test-smtp-authentication/
I can send SMTP message via my ISP. I'm a little hesitant to publish the entire working code as that could lead to SPAM. Here's the method that sends an SMTP message.
A little explanation about the code. My Spinneret uses all 4 sockets for TCP and UPD. The line takes one of the sockets out of rotation so that it can send a client request while the other sockets do their thing. The socket is returned to a TCP listener at the end of the method.
This piece of code just initializes the socket to connect to my ISP's SMTP server.
The rest should be self explanatory. I hope this helps, let me know if you have any questions.
I can tell you that Google's mail servers require TLS authentication. I dont know too much about it though. The Propeller would have to be programmed to go through some key generation algorithm...something like that.
I've just recently started with the Spinneret myself. I've created a blog, Spinneret Resources, where I have collected a lot of the resources that I found useful while first starting out. It's a work in progress, you may find it helpful:
My nerdDoro.spin might help some. It accomplishs some things you may need to do. Currently it will
- Display a Spinneret web page from memory
- Read and display the RTC on the web page and 4 line LCD
- Read temperature from Sensirion and display on the web page
- Allow for an 'LED' button to be clicked toggling the state of the onboard usr led
The entire project is available on github https://github.com/jhalbrecht/nerdDoro I'm updating it a lot right now as I rough in the parts I need.