Development workflow advice on info-beamer hosted?

I’ve been using info-beamer for years with the stand-alone license on Raspberry Pi 3s, and doing my development locally by building the open source version on Linux. This lets me rapidly edit/run/debug my node on the desktop, so I can develop even when I don’t have a Raspberry Pi available. I’ve had my own mess of tools that handle deployment and services that is terrible when compared to the features of info-beamer hosted. So, I’m getting ready to transition of the stand-alone licenses to the hosted version.

However, I can’t seem to find a convenient way to speed up the edit/run/debug lifecycle, unless I’m developing on the Pi itself, which is pretty awkward. Or maybe constantly git pushing? How does everyone develop their nodes for the hosted platform? It seems like once my node is production ready, it will be an ideal solution, but I have to get there first. Is there anyway to develop offline? Thanks!

I personally mostly do that with a mix of occasional on-device vi usage for making single line changes to rapidly make tiny modifications to stuff like layout or so.

There is also the dev-mode feature together with this python program intended to run locally on your dev machine. The idea is to push changes rapidly to the Pi on each local file change.

While that is a bit faster, the disadvantage is that it’s more difficult to make use of the auto-generated config.json file and assets normally based on what’s specified in node.json and configured on the dashboard. Instead you’ll have to provide your own config.json file and assets while making sure they match what info-beamer hosted would produce later.

I guess a similar approach is to develop on Raspberry Pi OS itself having info-beamer Pi running and occasionally git push to hosted to test on hosted. The info-beamer program is basically the same so there shouldn’t be a lot of surprises. That too then required you to provide a config.json and assets as hosted normally does.

If you have any ideas on how to improve this, let me know.

I didn’t know about dev-mode. I have to give that a try. I think that would be a lot faster than commits/pushes, and it would avoid my commit history being a mess.

I think my preferred way would be to develop with an info-beamer VM (if a native cross-platform version isn’t possible), but I don’t know if the low level graphics optimizations used for info-beamer would complicate that.

Really, it’s the selfishness that if I’m developing at home for a non-profit convention, I can’t watch TV in the background because the raspberry pi is hogging it. :slight_smile:

Is there a way to see the terminal log live without downloading? That would be nice to avoid setting up SSH.

Edit: Being able to configure the SSH keys with the web GUI is great, and dev-mode is much nicer than constantly git pushing. I did have to add ~/.ssh/config with:

Host my-device-IP-addr
    User root
    PubkeyAcceptedAlgorithms +ssh-rsa
    HostkeyAlgorithms +ssh-rsa

I also kind of wish when you ssh in it would remind you of the log commands. Is there a way to filter the log to only see info-beamer node errors?

I could’ve sworn I tried this and it didn’t work, but the following helps filter the logs:

logread -f | grep info-beamer:

It would still be nice if there was a “just the node’s Lua errors” filter.

So, I’m back to using the open source version to build out the node, but then I’m using info-beamer hosted config options to provide end-user configuration. It would be really cool if there was a button in the configuration web page that would let me download my settings as a config.json to use when developing offline. I’m trying to figure out where to find it via ssh.

Edit: It looks like the node lives in /space/root.

1 Like

You could actually do that: First make the info-beamer process reachable across the network. There’s a setting for that on the device’s configuration editor in the “Advanced/Development” tab: Expose info-beamer port. You might then write a short program using to query the current error status of the root node in a loop:

import ibquery, sys, time
root_node = ibquery.InfoBeamerQuery(sys.argv[1]).node("root")
last_error = None
while 1:
    error = root_node.error
    if error != last_error:
        last_error = error
        print(error or '<no error>')

Then run with python <device-ip> and you should see an almost real time update of the current status.