Skip to content

A web application agent for the Raspberry Pi

Vasilis Nicolaou edited this page Apr 10, 2016 · 8 revisions

pi-web-agent

The pi-web-agent is a web application that aims to provide a more user friendly way of interacting with the Raspberry Pi and performing basic tasks by eliminating the need of using the command line directly.

How to use

After starting the pi-web-agent service sudo /etc/init.d/pi-web-agent start , you can access the application with your browser via either https://raspberrypi:8003 or https://ip_address_of_your_pi:8003 if your internet router does not resolve hostnames to IPs. To access the application inside your pi just access the local host without https: http://127.0.0.1:8004

Provided functionalities

The web application currently provides the following functionalities:

  • Firewall management by controlling the iptables.
  • A package management system for installing useful applications easily.
  • Service management for starting or stopping services
  • Update management for updating the underlying Linux distribution with a simple click
  • GPIO management for controlling the pins on the Raspberry Pi (special thanks to the author of wiringPi for his excellent open source program)
  • File manager to browse through your home files, play audio files or interact with the Startup manager.
  • General purpose information of the system (memory usage, disk capacity, ip, cronjobs, swap usage)
  • Tightvnc is provided, by setting up a vncboot service and enabling users to use tightvnc java applet to access the system by the tightvnc viewer (special thanks to tightvnc for their open source tightvnc client)
  • Power management for rebooting or powering off the system with a simple click
  • Pi camera controller, including snapshots and live streaming
  • Radio application for streaming radio or other music from URL
  • A Startup manager to easily make your scripts start on boot time.
  • A Volume manager to control the output volume of your Pi.

Firewall management

View the rules for each chain, add new rules or flush all the rules of a single chain. Very friendly compared to the iptables.

Package management

The package management provides a list with useful packages and a short description. You can request an uninstall or install of the application by simply clicking on the switch button. As from pi-web-agent version 0.3 you can search for all packages in your system, but take care as the search may take some time.

Service management

Service management allows you to stop or start services. Only services with known state are shown.

Update management

The update management aims to arrange or the hassle about updates for you. It takes care of checking for updates and notifies you on the live information feed. The update section also provides information of weather there is an update or not and if yes, it provides a list of packages with there description that need update. The update can be initiated with a simple click of a button at the end of that list.

GPIO management

The GPIO management provides access to the General Purpose Input Output pins on the Raspberry Pi. You can convert a pin to input or output and activate outputs. The GPIO extension as from version 0.3 is generic and works on every Raspberry Pi model that pi-web-agent supports (Model B and model B+).

VNC

VNC is very important because most users want to access their pi from their laptop and have an image of the desktop in their screen. That's why the application has the tightvnc server as a dependency and provides the tightvnc client java applet. The whole vnc solution is pre-setup and only clicking at the vnc section should work. The tightvnc service on the RPi should be started manually because you need to setup a password.

Pi camera controller

You can click snapshot and the application will trigger the camera (if present) to take a new picture. Bare in mind that on reinstall the images are deleted. Images are placed in /usr/share/pi-web-agent/camera-media/ . To start live streaming click Live Stream . You need the vlc plugin for your browser and the vlc media player installed on your pi (installation process takes care of this). Use the buttons at the bottom to control the camera and video.

Radio application

Find a URL you want to stream from e.g. an internet radio channel. Put it in the text box provided. You can adjust the volume and audio output and then press Start Stream . While the radio is playing you can re-adjust the volume or configure the equalizer provided at the bottom.

Startup Manager

The startup manager allows you to set any executable script to start on boot time. If you find it difficult to write down the path of your script, go to the File manager, find your script (only for *.py and *.sh at the moment) and open it with the Startup Manager.

Requirements

Currently the web application agent supports the Raspberry Pi with Raspbian installed. Any debian based Linux distribution should also work but is not thoroughly tested yet. In order to access the application with all features available you need Firefox or Google Chrome with Java enabled (for VNC) and the vlc plugin present (for the live stream to work). The other features work on any other browser.

Authors

Vasilis Nicolaou, Andreas Galazis, Argyris Zardilis, Angelos Georgiadis, Georgios Chairepetis,

License

GPLv2. Imported projects have their own license.

Developer information

Please consult the README file in order to setup an environment for testing purposes of the application. Note that architecture specific code won't work (just the GPIO for the moment). The application is based on the micro-CernVM web appliance agent developed at CERN by Vasilis Nicolaou and documentation section contains documents for that web application but are highly relevant to the forked version (the pi-web-agent)

Documentation

New documentation is coming soon involving: API Documentation. Source code Documentation. Pi-web-agent framework documentation.

Any other documentation may be obsolete.