yun to my desktop computer communication

I've recently got a yun, and I'm designing a weather station (yes, a typical thing we do) that should wirelessly transmit data about every 15 minutes to my desktop computer (debian) both to log the data and to display current conditions. I'm embarrassed to ask, but how do I do that? I've seen tutorials for transmitting data to a temboo account and a gmail account, etc., but all I want to do is transmit data to my desktop computer. I've seen how to get the yun connected to a wireless router, but I don't know where to go from there. Perhaps the yun could mail data text files to the desktop host, but I would have to figure out how to configure mail (assuming yun has mail/exim, etc.), or perhaps the data could be temporarily stored on the yun and I could do something like ftp through a script and a cron. I've been searching these forums, and I'm just confused. Maybe the answer(s) should be obvious, or maybe I really haven't been sufficiently exposed to client, server, etc. networking stuff.

brief background of my knowledge/skillsets to best help you answer my question
I'm fairly comfortable on command line, and I often write simple bash scripts including a little gawk
I'm just a beginner at C
I don't know python and would rather work more on C than start another language
I've built a functioning standalone system with an atmega328 similar to a "bareduino"
My last project used a couple moteinos to wirelessly transmit weight from a scales from one mote to another and display results.
Networking - just a beginner with my biggest project building a simple network including three outside netcams using poe
webpage development/html - none

thanks very much

Welcome to the Arduino forum and what you write and ask is clear, which is a great start.

Just a thought I want to throw your way.
Rather than thinking along the lines of getting the Yún to transmit to your computer, how about thinking in terms of having the Yún setup as a server and then having your computer access the Yún when it needs.

This way, you can use the capabilities of what the Yún can offer you, a small Linux based server that can store all the data you need and be there ready and waiting for any connection from beyone the router.

For an example, let your Yún be a simple HTTP server, so all you need is a web browser to see your data, and that can be on any device, from smartyphone to large screen desktop.

If you end up going this way, I can offer you some assistance with some nice web app gauges I use that also are used by others for weather displays.

A weather station is a great project to start with, I'll be interested to watch your progress.


Paul

Hello,

Paul gave you a good solution, because you can access to data with every device with a browser.

If you want to keep your server on your computer you can use the Yunclient class provided by the Bridge library

With this class you can connect to a server and send to it data.

Have you decided how you're going to log the data on your desktop machine? One idea is to install collectd on both computers. On the Yun, you can use the exec plugin to get your sensor data into collectd, and the network plugin to send it to the desktop computer. You could optionally include the RRD plugin to also store data locally.

On the desktop, you also install collectd, add the network plugin to receive the data, and the RRD plugin to store the data. Together, this solves both your communications and logging problems.

http://forum.arduino.cc/index.php?topic=238693.msg1948386#msg1948386
http://forum.arduino.cc/index.php?topic=267847

To keep things simple, and if you were wanting to do a small amount of programming in C for the Yún, I would suggest using the SQLite3 library, and then simply log your data to it as and when you need.

You could have the Linux part request data from the Arduino side at a set periodic interval and just pop your data into the SQLite database.

I have done this and have been suprised at how easy it was and finding I can do many things with the data to get it sorted and organised into different ways for displaying in charting tools like Highcharts.com

Some easy to read info on SQLite3
Some easy to read examples in C http://milky.manishsinha.net/2009/03/30/sqlite-with-c/
And, a popular spot to read more www.tutorialspoint


Paul

I have just posted an example of a vivarium controller using DS18B20 sensors and a REST API to access the information. If you combine that with my previous example of using collectd to report data, you can end up with a sophisticated monitoring application which should work well for your weather station.

Here is the collectd example:

Yes, cydergoth, I noticed your post on the vivarium controller and looked at the graphs and just now at your documentation on github. Good to see people developing such systems.

I notice your charts don't appear to have axis labels.
I can see the x axis is time, and am guessing the y axis is temperature, but maybe in ˚F, not sure.

I'd be interested to know what other functions can your setup do, in terms of collecting data and setting setpoints? Are you activily developing it?

I like using highcharts for my charting, after looking at many options over the past year or two.
They are really configurable and versitile.

I'd be interested if someone was wanting to try the SCADA software I am developing on a Yún sometime.
I have developed it to operate on GNU/Linux systems, but only have tested it on Cubieboards (ARM) and Intel CPUs.


Paul

rockwallaby:
Yes, cydergoth, I noticed your post on the vivarium controller and looked at the graphs and just now at your documentation on github. Good to see people developing such systems.

I notice your charts don't appear to have axis labels.
I can see the x axis is time, and am guessing the y axis is temperature, but maybe in ˚F, not sure.

I'd be interested to know what other functions can your setup do, in terms of collecting data and setting setpoints? Are you activily developing it?

I like using highcharts for my charting, after looking at many options over the past year or two.
They are really configurable and versitile.

I'd be interested if someone was wanting to try the SCADA software I am developing on a Yún sometime.
I have developed it to operate on GNU/Linux systems, but only have tested it on Cubieboards (ARM) and Intel CPUs.


Paul

Left hand Y axis is temperature in F, as you correctly assumed. Right hand Y axis is 0-10 to allow me to overlay the 0-1 switch status on the bottom of the graph. I use graphite because it is one of the systems we monitor our openstack cluster with.

The main functions are timer control of the lighting, as well as the temperature control and reporting.

I am currently working on the web UI to provide a nicer interface than manual URLs. I'm using polymer for that, and I have it working for display but I need to add the URL calls to change the settings. I also have a set of patches for Luci to correctly set the HTTP header to allow the REST API to be called from the web UI without them being served from the same server.

Future improvements would be a more sophisticated control algorithm such as PIL, and I intend to add email alerts for extreme temperature to the Yun side via the collectd alerting mechanism - that's mostly configuration I've not gotten around to.