Serious Apps

I want to use Corona to write serious apps. (Look up “serious game” on Wikipedia. It’s the same animal.) Part of my motivation is work-related, and part is hobby-related.

On the work-related side, I work for a company that makes an edge computer. It runs Debian on an ARM processor. No, it’s not a RPi – but I have a RPi 3B on my desk, for feasibility and prototyping work. Anyway, our computer has Ethernet access, both wired and WiFi. Users can connect to it through HTTP, HTTPS, SSH and an HTML-based REST API.

So as a skunk-works project, I’m writing two apps for it.

  1. The first is one that will allow a user to configure and manage a fleet of these devices. I thought this was an original idea, until I saw the RaspController app for Android.

  2. The second is an MQTT Listener, basically a client that subscribes to an MQTT broker and spews out all the messages that the broker receives. The Google app store already lists a lot of these as well. I just wanted to try to do it using Corona and Lua.

On the hobby-related side, I’m building my own garage door opener remote-control app. I’ve got a RPi connected to a Hall-effect sensor, a camera, and a relay, and I use a rudimentary webpage to check the status of the garage door and “push the button, Max”. I want to go from the webpage to a smartphone app. Corona would be perfect for this. So after I make significant progress on the skunk-works project, I’ll apply my learnings to the garage door.

Progress report, 19 Feb 2020

  1. The fleet manager is coming along great. I got the basic connectivity with the edge computer working great. Now I need to make the thing look less like an engineering project, and more like a real app. I’m using Ettore Gallina’s RaspController for inspiration. I love the styling, the look and feel, and the complete functionality of that app. (Se conosci Ettore, puoi dirglielo per me.)
  2. The MQTT Listener is not coming along so well.
  • The Lua MQTT modules currently available require Penlight and Luarocks, and I don’t know whether Corona (or, after Corona, Android and iOS) works with those two packages. Actually, Luarocks is an installer like Python’s Pip installer. Penlight is a package that fills in a lot of the gaps in Lua. I’ve tried running the basic MQTT test routines in straight-up Lua 5.3.2 (I think), and I haven’t been successful yet.
  • Then, I want to use Cirrus Link’s Tahu/Sparkplug B specification in conjunction with MQTT. Sparkplug B is a way to handle the data transmission needs of a low-bandwidth, unreliable-connectivity edge computing device. Unfortunately, the official Tahu drivers are written for Java, C, Python and Node.js, but not for Lua. I will have to completely rewrite the drivers for Lua. I thought of using the C drivers, but I’m afraid I would have to rewrite them, or at least write a wrapper layer for them, to get them to conform to the requirements in the official Lua documentation.

I could write the MQTT Listener in Java, like all of the other app developers on the Google Play Store have done. But the point of this exercise was to do it in Corona. It just looks like a horrific lot of work right now. I think my time would be better spent turning the fleet manager into something more official-looking.