Home / Pyxis Applications

Introduction

All applications developed for Pyxian are essentially locally-stored single-page 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.

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: Application 1
version: '1.0'

Loading 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/pi/.inox/apps/ location, after which execute the following:

$ echo LOAD > /tmp/pyxis-fifo/admin_commands

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:

REMOTE DEBUGGING

Once uploaded to the device, applications can be debugged remotely with Chrome DevTools. You will need SSH access to the device 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: