First post here. While this is a a "project ideas" sort of post, it's quite specific to the Yun so I hope it belongs here and not in the general project ideas forum. I'm sorry for the length, but I figure it's better to get the background in first, rather than providing it later after inappropriate suggestions are made (trying to avoid the "why didn't you say that before?" situation.)
I'm working on a distributed data collection and control system that I will be putting in my motorhome. It will consist of several modules placed around the motorhome with various sensors and inputs, and relay outputs. There is too much total I/O, and it would require too many difficult to run long wires, to do it all with a single board. The distributed modules will communicate with a master control module to report input states and respond to output change requests. The Yun seems ideal for my system concept: hard real time and hardware intefacing done on the Arduino side, while the communications processing is done on the openWRT side. One Yun will be the master, and serve as a Wi-Fi access point that the other Yuns will associate with. The master Yun will also have a wired ethernet connection to a router to give it access to the outside world.
I have over 30 years embedded system development and I think I have the hardware end of it sorted out pretty good, along with the low level control code. However, while I have done lots of serial communications, and a little bit of network sockets programming, and I understand the principles of TCP/IP, I'm not an expert on network communications and I need some communications suggestions.
Embedded programming is my life, so I'm looking for easy solutions for this project, I don't need this to be a science project and write code for the sake of writing code. I just want to make this thing work. Therefore, I'm really looking for established solutions wherever possible. One big limitation is that the Internet connection through the router is not full-time: there will be long periods where no connection is available. And when it is available, it will be through a cellular connection with expensive and limited bandwidth. So a cloud based service (Xively, ThingSpeak, etc.) is NOT going to be a solution. Temboo may have some utility for sending unusual event notifications, but not for data collection or storage.
There will be lots of inputs, but the data rates don't need to be very fast: somewhere around once a second to once every ten seconds should be enough. Mostly, I want to collect and log values/statistics of the input data. But I also need a little bit of logic to watch for various input occurrences, and control some output relays accordingly. I want to be able to see the current status locally and remotely, and remotely control various outputs or initiate automated sequences. (Yes, I know I won't be able to do that when the Internet connection is not available.)
This thread on collectd is very interesting: HOWTO for simple monitoring and WWW graphs - Arduino Yún - Arduino Forum That could be a solution to gathering data from all of the nodes and storing it at the master using round robin databases that give high resolution for a short period, and lower resolution for longer periods. It also gives some historical trend plotting abilities. Is there a different option out there that would be more appropriate?
Something like that seems good for the statistics side of things. For the control side, I'm picturing something along the lines of the Arduino code collecting input data and using Bridge.put() to store the current state. Then, a Python script on the master side would access http:/ /arduino.local/data/get to fetch the entire input state at once. The master does this for each remote node, and collates the data. It then decides if any outputs need to change, and sends bridge mailbox messages to the proper Yun to make the output happen.
Does this sound like a reasonable approach? Are there better options?
I'm not looking to make a career out of developing this code. I don't need super high data rates, so efficiency is not the prime motivator. Ease and reliability, and low development effort are the prime considerations.
Any suggestions are very much appreciated.