Arduino Yun, Linino, OpenWRT
-
Resurrecting a slightly old thread here, but I was wondering if there was any progress on the gateway running on a Yun?
A particular reason for asking is that I now have a fairly complete emulation of the Vera platform's Luup environment running on any generic Unix machine. I've recently put it on a Yun and it works a treat. Most Vera plugins work without modification, and I'm keen to integrate this with the MySensors gateway running on the Arduino processor on the same board.
As an aside, the 400 MHz cpu running OpenWRT is more than fast enough to make this an excellent controller. The web interface is provided by the excellent ALTUI plugin written by @amg0 on the Vera forum.
-
Just to close the loop on the question in the original post...
@humblehacker said:
I wonder how difficult it would be to integrate the MySensors library with the bridge Library? In theory, doing so would eliminate the need for a separate controller altogether.
It turns out that it was not too difficult to add support for the Yún's Bridge library, details here: Ethernet Gateway on Arduino Yún
@humblehacker also said:
Support for Linino/Yun/OpenWRT would not only free up MiniPC hardware for use elsewhere but it would also allow you to merge together the gateway and the controller functions into a single board.
This also works, details of the controller I'm using in openLuup - a Vera emulator for all platforms
And to address this concern...
@daulagari said:I think [...] Linino/Yun/OpenWRT would be too thin.
...it turns out that, in this case, it's not.
I am currently moving my 'production' HA system to a Yún where the Linux processor itself is running a configuration managing the MySensors network (yet to be fully populated), two WiFi connected Netatmo systems, the DataYours plugin suite logging key events to a Whisper (RRD) database on a CIFS-mounted remote NAS, the ALTUI interface, and a remotely bridged Vera with around 70 devices.
Even with the relative low-power processor the Linux cpu is only running at about 5% average loading and the whole system fits in around 10 Mbytes. Also, unlike Vera, it runs continuously and does not spontaneously reset.
Just by way of demonstration, here's an ALTUI-produced map of the current device network handled by the Yún (the purple spot in the middle.)

-
Wow! I had forgotten about this thread until I just checked in today... Thank you @akbooer for your excellent follow up!
Its interesting to look back on what was being discussed a year ago as the idea of truly low-cost wifi via the ESP8266 was only just taking hold. Nevetheless, as some of the original replies to this thread illustrate, a lot of people still have a hard time imagining how a home network could go beyond a typical microcontroller=client/microPC=host configuration. While OpenWRT/ATMEGA boards like the YUN might have been eclipsed by the ESP8266 as a cheaper/more popular wifi CLIENT, I still see the Bridge Library as a very relevant example of the where the IOT needs to evolve if we're ever going to move beyond the cluttered incompatible state of the present automation market.
@akbooer- your network is a great example of how we can start to move out of the hub and spoke model! I like the graphic you posted too! Might I ask what you used to create it! I've been having a heck of a time simply finding graphing tools that would help me visualize a more distributed automation network. Mind Mapping tools can get me part of the way, but mind mapping is still inherently heirarchical. I need something more like context mapping, but these are much more difficult to find... -
It's a force-directed graph, see https://en.m.wikipedia.org/wiki/Force-directed_graph_drawing
Actually built into the UI that I'm using (AltUI by @amg0) as part of my controller ( openLuup, see Controllers page) and it also runs on a Vera controller.
It's implemented in JavaScript in a browser.
-
@akbooer: very nice work you've done! I will look at it more carefully when I will be ready, as I am working on a new board. At first, I started to design it with esp, but I needed more features, and for same reason humblehacker mentioned , I moved to dragino/openwrt.. can't wait to finish it and test your great work :)
-
I remember when the Yun first came out, everybody seemed to be using the Raspberry Pi as a microcontroller through its GPIO pins... Now with the ESP8266, we have a device which was originally designed to function like an RF module with wifi capabilities, being pushed into a role it wasn't designed for. As a major advoc ate of affordability, I see much to love in the ESP8266... Yet I still can't shake the thought that the Linino-Yun approach still makes the most efficient use of a CPU and MPU together.
If the ESP popularity has one important lesson however its that affordability can outweigh accessibility and capability. And unfortunately, at $70, its looking like the Yun is becoming the LEAST affordable IOT option... I wonder if there are more cost-effective means of deploying the Bridge Library and Linino/OpenWRT? The closest I have yet found are the Dragino HE Modules which at $21 each, are still pretty pricy for a bare surface mount component. My original idea was to make a custom Yun by mounting an HE Module with a Pro Micro. This would probably require a custom breakout design however. I did notice a new OpenWRT dev board called the WRTnode. While it also uses a MIPS CPU the WRTnode is based on an MTKMT7620N chipset instead of the AR9331... I wonder if Linino or the Bridge Library would run on this alternate chip? -
Resurrecting a slightly old thread here, but I was wondering if there was any progress on the gateway running on a Yun?
A particular reason for asking is that I now have a fairly complete emulation of the Vera platform's Luup environment running on any generic Unix machine. I've recently put it on a Yun and it works a treat. Most Vera plugins work without modification, and I'm keen to integrate this with the MySensors gateway running on the Arduino processor on the same board.
As an aside, the 400 MHz cpu running OpenWRT is more than fast enough to make this an excellent controller. The web interface is provided by the excellent ALTUI plugin written by @amg0 on the Vera forum.
@akbooer: I'm currently running the SerialGateway sketch on my Yun.
Simply replace the Serial calls with Console, and add in the relevant includes at the top.
Performance isn't stellar, but it's "good enough" for most use-cases. OTA firmware updates are quite slow - you could speed these up significantly by replacing the Yun Bridge with a PySerial bridge at 250kbps.
-
@akbooer: I'm currently running the SerialGateway sketch on my Yun.
Simply replace the Serial calls with Console, and add in the relevant includes at the top.
Performance isn't stellar, but it's "good enough" for most use-cases. OTA firmware updates are quite slow - you could speed these up significantly by replacing the Yun Bridge with a PySerial bridge at 250kbps.
-
@pdey So what controller are you running on the OpenWRT processor, or are you just using this as a serial gateway?