Close

More work on libraries and a list!

A project log for IOTA the brain of the house

IOTA is an attempt to bring smart homes back to it's roots. Data accessibility. Knowing what the house is doing not just controlling it.

TheBestJohnTheBestJohn 06/15/2017 at 02:270 Comments

So sblua ran the libraries just fine. When I moved over to sbengine to run the UI and the Lua scripts at the same time I had some issues. Every time I tried to run what worked in sblua I was getting a error running the sockets core.so file. It was complaining about not being able to find lua_gettop. This is one of the core Lua library functions and should have been found just fine... Why is it working in sblua but not sbengine?

Well sblua is essentially Lua, of course it has gettop available. It wouldn't run otherwise. sbengine loads libsblua.so on runtime and doesn't announce it to anyone. These Lua libraries are assuming that they are being run directly by something that makes liblua.so (in our case libsblua.so) available to them by default. I had to go back and clone each library to my local disk, edit the rockspec file to have libraries = "sblua" added to each .so that is exported, run luarocks make "INSERT ROCKSPEC FILENAME HERE".

What this did was linked storyboards libsblua.so to each library so that it knew where to get the basic functions it needed and re-installed them into their respective folders. With those changes we were golden and I am now able to serve you the following:

in order to get this i had exported my todoist api key to the environment variable todoistKey. This is pretty static right now but it uses the colors you set it to in todoist and doesn't sync passed the first grab yet. I'm building out the todoist api in Lua as I go so there will always be more to do.

EDIT: For some reason hackaday wants to send you to websites for .so files

Discussions