Introduction

All applications developed for Pyxis are essentially locally-stored web applications. The operating system provides full web runtime, which allows the use of HTML5, CSS, JavaScript, and most of the popular front-end frameworks for application development. The runtime provides JavaScript APIs to access hardware interfaces and system functions. You can find source code for API examples and demo applications in our GitHub repo.

Each application with all its resources needs to be placed into a separate directory with index.html file and app.yaml file formatted as in this example:

name: 'My Application'
version: '1.0'

Initial loading of applications to the device

Applications can be loaded from the following sources:

  • a flash drive,
  • over SSH,
  • from a cloud storage (coming soon).

LOADING FROM A FLASH DRIVE

Copy the directory with your application into the root directory of a flash drive and insert it into the device. In several seconds the Settings page will open. You can now go to the USB drive page and see your application in the list, along with the install button. After the application is installed, it will appear on the Installed Applications page, from where it can be started.

LOADING OVER SFTP AND SSH

You can use secure shell access to upload applications (see How-To). To install an application this way, copy it into /home/pyxis/.inox/apps/ location, after which execute the following:

$ sudo systemctl restart adminprocess

Your application will appear on the Installed Applications page, from where it can be started.

Debugging applications

LOCAL DEBUGGING

Because Pyxis applications are web pages, most of the debugging can be done locally on a developer workstation using the standard tools available for web development. You can test your applications in Chrome browser and expect the exact same behavior on the target hardware.
Chrome DevTools allow you to create an emulated device with a specific screen size, which is helpful for evaluation of the exact look of the application:

UPDATING APPLICATION FILES OVER SFTP

You can set up an SFTP client in the development environment of your choice to upload files directly to the device. You will need SSH access for this to work (see How-To). Application files are located at /home/pyxis/.inox/apps/ on the device, and you can set your tools to map them to your local files.

REMOTE INSPECTION WITH CHROME DEVTOOLS

Once uploaded to the device, applications can be debugged remotely with Chrome DevTools. You will need SSH access for this to work (see How-To). On your workstation, in a terminal, execute the following command:

$ ssh -NL 9222:localhost:9222 pi@<ADDRESS>

Then, in Chrome browser, navigate to chrome://inspect/#devices and, if everything is right, you must see the application available for remote inspection: