A rapid package development tool for info-beamer hosted
Learn more about this feature on https://info-beamer.com/lnk/dev-mode.
dev-mode tool allows you to rapidly develop new
packages. It works
by syncing local changes directly to an info-beamer hosted device of
your choice. That way you avoid the slower
git pull approach
and instantly see the effect of changes you make.
You can rapidly build new packages or tweak existing packages that way: Just edit their node.lua file or assets and they get instantly synced to the device.
Installation on Linux
You'll have to install the python3-watchdog and python3-pathspec packages. On Ubuntu/Debian they should be available out-of-the-box:
apt install python3-watchdog python3-pathspec
Installation on MacOS
If installing on Mac OSX please be sure to use python3 and
install the python watchdog module.
pip install watchdog
should be enough. Also if you have problems, use a virtual
env with python3 to run
dev-mode or specify the full path
to the interpreter on the command line
Installation on Windows
You need to install Python3 from python.org.
When installing, be sure to select the option to include python/pip in your
%PATH%. After that, start
cmd.exe as Administrator (enter
in the start menu, right click on "Command Prompt" and select "Run as administrator")
pip install watchdog. This will install the watchdog module
used to monitor file changes.
Setting up your development machine
dev-mode Python tool from this repository. It should work
with python2 or python3 out of the box if you followed the instruction for
your operating system above.
If you have any kind of firewall active you must allow incoming connections to TCP port 3333 to your development box. This is especially true on Windows where the firewall blocks incoming connections by default. When the firewall dialog opens, be sure to allow Python3.
Preparing your info-beamer device
The first thing you'll have to do is enable the rapid development
mode on your info-beamer device. For that, place an empty file
/config/dev-mode on the SD card of your device and restart it.
The device is now ready.
WARNING: Never enable developer mode in an untrusted network or for production devices: developer mode allows unauthenticated access to your device and anyone with network access to the device can upload any content to it. This might result in a complete device takeover.
Syncing your first package
If you're working on an info-beamer package you should have all
files for that package in or below a single directory. Run your
dev-mode tool like this:
$ dev-mode 192.168.1.101 /path/to/package
192.168.1.101 must be replace by the IP of the device you
prepared in the above step. On OSX or Windows you might have to
explicitly run the tool using Python3 like this instead:
c:\> python3 /path/to/dev-mode 192.168.1.101 /path/to/package
dev-mode will contact your info-beamer device and instruct it
to fetch the package files from your dev machine, just like
it usually fetches them from the info-beamer hosted file
If you don't have a package ready, you can use the included
minimal example in
dev-mode like this:
$ dev-mode <device-ip> example/
Then open the node.lua file in another terminal, edit the
gl.clear values and save the file. Your changes should
be visible immediately on the device.
The syncing process on the device directly fetches the files and doesn't do any of the syntax or semantic checks that info-beamer hosted usually enforces when importing or updating packages on info-beamer.com. So the development is less strict and it makes sense to push your code to info-beamer.com once you've completed a task using the rapid development mode.
Usually packages you develop don't include a
When using the
dev-mode tool, you'll have to write your own
file. You might even include it in the package source code
itself (unless it contains any secrets of course), as
files are ignored by the info-beamer.com import process.
It is always recommended to
ssh into your device to read the
info-beamer log output. Have a look at the
documentation to learn
how to do that.
Why is "dev-mode" blinking on my device?
This is there to remind you that your device is configured for developer mode and to prevent the device from accidentally used in production.
How can I create a config.json similar to the real one generated by info-beamer?
Have a look at the package reference.
All option types and their expected config.json output are documented. If you don't
want to generate a
config.json from scratch, the easiest way to get one is
to push your package to info-beamer.com, install it on your device and then
take a look at the generated