Hi,
I am looking at the yun as a cost-saving component in an automation system I am currently building.
The system uses an embedded Linux system (BeagleBone) to host Web Services for front end devices (iPhone, Android, and browser) to control various home components, particularly Hot water timers. The Web Services talk to a Pub/Sub hub called Mosquitto, which then uses the open-source MQTT protocol to communicate with downstream nodes. In most cases, these nodes are Arduino Mega2560 s, with Wi-Fi shields. (Mega2560 because the software stack for MQTT, WiFi, JSON, and application exceeds 32K)
I would like to produce a cheaper version, without the hub, and I thought the Yun might be the answer. But having looked at it, I don't think so. Perhaps someone with more extensive knowledge of the device can either validate my reason, or (hopefully) point out the error of my ways.
While my model uses the Arduino in "Slave" mode, the design philosophy behind the Yun seems to put the Arduino / Linux SOC in a Client-Server relationship. The Arduino code uses the C++ half of the Bridge to invoke a Python Server program on the Linux system, by effectively keystroking into the Linux console, and then listens for replies on the console.
I could, I think, just forget the Bridge, and write a Serial listener on the Arduino, which would listen for incoming requests on the Serial (eg Read Existing Timers), and then answer these requests over the same Serial port. Then on the Linux side I would have a Web Service which would handle incoming requests from the world, invoke the Aruino API (Using the Console) , read the reply, and answer the Web Service.
But.... the flaw, at least as far as I can see. This is the Linux Console. Linux will generate messages on the console from time to time. These messages will be picked up by my Arduino listener, and could cause havoc.
Surely using the Linux Console as an inter-processor bus is a bad idea?
Cheers,
Con