[quote=“akbooer, post:80, topic:187412”]Very excited… have just got openLuup (a fairly complete implementation of the Vera environment) up and running on an Arduino Yun.
The Arduino Yun is a microcontroller board based on the ATmega32u4 and the Atheros AR9331. The Atheros processor (400 MHz) supports a Linux distribution based on OpenWrt (so very much like a VeraLite) and that’s what runs openLuup.
The board has built-in Ethernet and WiFi support, a USB-A port, micro-SD card slot, 20 digital input/output pins , … so should be a fabulous platform for the Arduino Bridge plugin. I am close to completing an adequate implementation of the luup.io module, so from there the Arduino Bridge should be plug’n play (not to be confused with UPnP!)
Start up time is very fast:
[ul][li]less than half a second before it starts running the user startup Lua,[/li]
[li]another second to load ALTUI, VeraBridge, and a complete DataYours installation,[/li]
[li]about six more seconds for each remote VeraBridge connection with about 50 devices on each.[/li][/ul]
ALTUI is very responsive (but then, it runs mostly on the browser.)
Happy days.[/quote]
great work… will the arduino plugin require another arduino or will the RPI still be the only thing you need?
My hope would be that the Yun would replace both the Vera and the gateway Arduino, so what you’d need is a radio connected to the Yun and then some remote sensors communicating with that… at least, I THINK that’s the way it should work. I haven’t built any MySensor devices yet so couldn’t be sure! You could probably attach some sensors directly to the Yun board too, but that seems less useful, and would probably require some customisation.
There is some old thread on the MySensors board discussing running the gateway software on that, but nothing recent, so I’m hoping to stir things up there a bit and see whether anyone has done anything more. I’d rather not have to delve into the Arduino sketch. If you have expertise along those lines, we could perhaps continue the discussion in that forum.
Edit: Just re-read your comment again (!) and note that you mention RPi. With openLuup running on the Linux cpu on the Yun board, you wouldn’t need an RPi at all.
My hope would be that the Yun would replace both the Vera and the gateway Arduino, so what you’d need is a radio connected to the Yun and then some remote sensors communicating with that… at least, I THINK that’s the way it should work. I haven’t built any MySensor devices yet so couldn’t be sure! You could probably attach some sensors directly to the Yun board too, but that seems less useful, and would probably require some customisation.
There is some old thread on the MySensors board discussing running the gateway software on that, but nothing recent, so I’m hoping to stir things up there a bit and see whether anyone has done anything more. I’d rather not have to delve into the Arduino sketch. If you have expertise along those lines, we could perhaps continue the discussion in that forum.
Edit: Just re-read your comment again (!) and note that you mention RPi. With openLuup running on the Linux cpu on the Yun board, you wouldn’t need an RPi at all.[/quote]
I already have a gateway and several sensors built and deployed (working great)
i guess what i was trying to ask was as far as running openluup. would that still run on the rpi or does it now run on an arduino?
my thinking (correct me if i’m wrong) sensor - > gateway → → vera
where is a rpi2 (or maybe a yun if I’m understanding correctly)
correct?
Can be almost anything… RPi, Mac, even a Windows machine… Anything that runs Lua. Given that openLuup plus ALTUI does (will do, in due course) almost everything that Vera does (except Zwave) then you might not need Vera at all.
@akbooer - can you please help me find a Lau sockets binary for Mac OS 10.10 ? I have googled but can only seem to find source (I don’t have Xcode installed so can’t compile). Thanks!
I’m actually using the excellent ZeroBrane Studio as an IDE, and that comes with all sorts of flavours of Lua, including the LuaSocket library. However, just trying it, I notice that it doesn’t out-of-the-box provide the command line hooks for running Lua. On the Mac, I’m only running Lua within the IDE.
How have you installed Lua in the first place? My first port of call would be the pre-compiled libraries at sourceforge, but I don’t know if that includes LuaSocket.
I’ve installed quite successfully on Debian (BeagleBone Black) and OpenWRT (Arduino Yun) using [tt]apt-get install lua-socket[/tt] and [tt]opkg install luasocket[/tt], respectively, but that’s apparently not applicable to the Mac.
lua5.1 openLuup_release.lua /dev/null from /etc/cmh-ludl
i get the error:
lua5.1: error loading module 'socket.core' from file '/usr/local/lib/lua/5.1/socket/core.so':
dlopen(/usr/local/lib/lua/5.1/socket/core.so, 2): Library not loaded: @executable_path/../lib/liblua.dylib
Referenced from: /usr/local/lib/lua/5.1/socket/core.so
Reason: image not found
stack traceback:
[C]: ?
[C]: in function 'require'
/usr/local/lib/lua/5.1/socket.lua:13: in main chunk
[C]: in function 'require'
./openLuup/logs.lua:6: in main chunk
[C]: in function 'require'
./openLuup/init.lua:19: in main chunk
[C]: in function 'require'
openLuup_release.lua:6: in main chunk
[C]: ?
I have been at it for hours and i am stumped. I hate to bother you but can you offer any help? I suspect i have not installed things in the right place or set the necessary variables (which i do not know how to do) but i can’t figure it out. Thanks again for your help.
[code]bash-3.2$ brew update
Already up-to-date.
bash-3.2$ brew install lua
==> Downloading https://homebrew.bintray.com/bottles/lua-5.2.4_1.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring lua-5.2.4_1.yosemite.bottle.tar.gz
==> Caveats
Please be aware due to the way Luarocks is designed any binaries installed
via Luarocks-5.2 AND 5.1 will overwrite each other in /usr/local/bin.
This is, for now, unavoidable. If this is troublesome for you, you can build
rocks with the --tree= command to a special, non-conflicting location and
then add that to your $PATH.
[/code]
bash-3.2$ luarocks install luasocket
Installing https://luarocks.org/luasocket-3.0rc1-2.src.rock...
Using https://luarocks.org/luasocket-3.0rc1-2.src.rock... switching to 'build' mode
...
Updating manifest for /usr/local/lib/luarocks/rocks-5.2
No existing manifest. Attempting to rebuild...
luasocket 3.0rc1-2 is now built and installed in /usr/local (license: MIT)
Now, with luck, you have a Lua install with the socket library too:
Well, I got it wrong. This, by default, appears to install Lua5.2, and you need 5.1 for Vera Luup compatibility (and, in fact, openLuup uses 5.1 features to manage environments.) Need to read the docs further!
Edit: However, all this mucking about screwed up my ZeroBrane Studio install, so I was left with a non-functioning IDE
… but now fixed, so all is well.
This is the version which should be able to run the MySensors Arduino gateway (ethernet only, not serial, sorry.) I have not been able to test it fully since I do not have any Arduino sensors constructed (yet.) However, I have it linked to an Arduino Uno with an Ethernet shield running the latest 1.5 gateway sketch. When the openLuup Arduino plugin starts it receives the “Gateway startup complete” log message as the openLuup log extract below shows:
It’s also able to send start/stop commands for inclusion.
The major change in this release has been the addition of an asynchronous I/O module to support the luup.io calls (open / write / etc.) and the device code in the tag. The scheduler has been changed to accommodate this and the server restructured to run as a number of standard Luup jobs using the new I/O structure. It works beautifully with ALTUI and also writes a special log file so that variable and scene history can be displayed there.
I have tested it extensively under Debian (on BeagleBone Black), OpenWRT (on Arduino Yun), and Mac OS.
I’d be really keen to hear feedback on anything, but particularly whether this works with a fully functioning set of Arduino MySensors. Also, anyone willing to try on Windows?
Edit: This release has been superseded. Please see link on post #1 of this thread for latest
x = require “socket”
stdin:1: module ‘socket’ not found:
no field package.preload[‘socket’]
no file ‘./socket.lua’
no file ‘/usr/local/share/lua/5.1/socket.lua’
no file ‘/usr/local/share/lua/5.1/socket/init.lua’
no file ‘/usr/local/lib/lua/5.1/socket.lua’
no file ‘/usr/local/lib/lua/5.1/socket/init.lua’
no file ‘./socket.so’
no file ‘/usr/local/lib/lua/5.1/socket.so’
no file ‘/usr/local/lib/lua/5.1/loadall.so’
stack traceback:
[C]: in function ‘require’
stdin:1: in main chunk
[C]: ?[/code]
The output from ‘luarocks-5.1 install luasocket’ is attached as a text file (I can not find anything on the ‘dyld: Symbol not found: _NETSCAPE_X509_it
error’ with google)
is it possible i am trying to install a version of luasocket for lua 5.2 rather than 5.1 somehow? (this is just a wild guess, i of course have no idea what i am talking about )
i really appreciate your help… i think i am sooo close. Thanks!
[code]dyld: Symbol not found: _NETSCAPE_X509_it
Referenced from: /usr/local/bin/openssl
Expected in: /usr/lib/libcrypto.0.9.8.dylib
in /usr/local/bin/openssl
Error: Failed producing checksum: Failed to compute MD5 hash for file /usr/local/lib/luarocks/rocks-5.1/luarocks/2.2.0-1/bin/luarocks
make: *** [bootstrap] Error 1[/code]
i do have the libcrypto file
bash-3.2$ ls -lsa /usr/lib/libcrypto.0.9.8.dylib
2536 -rwxr-xr-x 1 root wheel 2637984 Mar 19 19:16 /usr/lib/libcrypto.0.9.8.dylib
Yes, several times. Do you happen to have the sockets binary(ies) you could share so i can install them without compiling ? That would be a life saver! (And where do I put them?) thanks again