06/15/2017 at 02:27 •
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
06/14/2017 at 01:27 •
So previously changing the cfg.lua was enough to make everything work. This time I had to open the Makefile and find all the locations where the "lua" bin was mentioned and change it to "sblua" and do the same in the configure file.
I made those changes then passed the sblua include file and /opt/crank/bin where sblua was located and boom, luarocks using a custom interpreter name.
Next up was installing some luarocks.
I installed luasockets, luasec, inspect, and lua-cjson off the bat.
In order to install luasec I needed to run:
sudo apt-get install libssl-dev
06/12/2017 at 23:05 •
Storyboard uses it's own flavor of Lua so I had to set up luarocks to use it for building libraries.
first thing I did was install zsh. I just like it better.
Next I went about cloning the luarocks repo and had to edit src/luarocks/cfg.lua to accept sblua as an acceptable lua binary.
I've done this in the past but the latest version is giving me issues.
I do however have the UI proof of concept running on the pi screen and it is interactive.
06/12/2017 at 21:44 •
I've been working on some of the UI considerations for my Hue lights. The plan for them is mostly to be an input node for events that get triggered. A task on todoist is due? They flash to remind me. The front door is open while my alarm is armed? They all flash red.
On the user facing side, something simple need to be vetted out. I imagine adding a floor plan onto my UI where you can select the location of the hue light and control it via the touch screen. I'd designed a proof of concept in the past that used something light this with this exact use in mind.
06/12/2017 at 21:35 •
So I was thinking about how I'm going to power this wall mounted pi and my first thought was to have mains go directly to a plug in usb power adapter. While that would work the solution is a little bit lackluster and kludgy. I realized that while the pi does have wifi on board it may not be the most reliable when built into a wall. Also, because this particular unit is going to remain stationary, there is no reason why I shouldn't just hook it up to ethernet. Thus PoE is probably the best way to go.
I have the following parts on order and will attempt to set it up when they get in.
- ANVISION 48V 0.5A Passive PoE Power Supply Injector
- GEREE Waterproof DC DC Converter Module 8-50V to 5V 3A/15W DC To DC Buck Converter
Those on top of the female ethernet plugs I have should make quick work of my power issues.
06/12/2017 at 20:55 •
In the overall grand scheme of things what do I want this project to do?
Well for too long IoT has been a buzzword that means "This thing is now connected to your phone". That's not in the spirit of what a smart home or an IoT home should be. A truly connected home means that there is a conglomeration of data in your home where you bring data together in meaningful ways.
My plan is to build IOTA. The epicenter of data. Somewhat like a local IFTTT. I have seen openHab but that is not what I'm looking for. What I want is something that can make components out of the various IoT devices out there and have them trigger events and respond to inputs in a simple way.
I am thinking of a block based event constructor like scratch that's written in my favorite scripting language, Lua. The UI will be extensible. I'm using some closed source software for the UI that I cannot release however I can release the Lua source for my project as well as all the project files. I will have to work out a way to add ui elements via Lua in the future to get others input but as it stands it should be something pretty neat in it's own right.
The main idea is that if there is an open API for the IoT device, we can write a translation layer for IOTA where we extend the block level event I/O
06/12/2017 at 20:45 •
Started planning out the project. A good scope first off is to get my electrical usage being monitored and reported to the system. I've been looking into how I want this to progress. Electrical and household thermal/humidity monitoring is a primary goal.
I've been thinking that for the room to room thermal I can make some form of RF monitors that sip amperage and report on their battery capacity.
Overall I've decided that my main interface will be with a wall mounted Pi that connects to my server where all the information is stored. Not sure how I want to handle synchronicity with the server and UI.
On the "convenient" side of things, I want to hook this up to my todoist account. The idea here being that the data in my house helps me populate my todo list automatically. I've got some work done on getting my todo list and keeping it locally in lua. I've also done a bit of work on a Telegram bot that can respond to commands in some form of meaningful way in the future.