Homeapps is a collection of custom web apps I run on my local network through a Raspberry Pi.
All web apps can be deployed independently and only require a recent version of PHP to run. Configuration is done using environment variables.
Documents is a simple documents manager where you can upload, tag, search and view your documents. If you own a Brother DS-940DW document scanner you can scan documents right within the web app and convert them to the Portable Document Format (PDF).
Required PHP extensions:
sqlite3
: for document storagesockets
: for accessing TCP stackgd
: for image operations
Example:
env BASE='/docs' DEVICE='192.168.178.2' php -S localhost:8080 docs.php
Roborock is a simple web app that can be used to control a Xiaomi Roborock vacuum cleaner. Only the most basic functionality is currently implemented.
Required PHP extensions:
sockets
: for accessing UDP stackopenssl
: for encrypting/decrypting UDP packages
Example:
env BASE='/robo' DEVICE='192.168.178.2' TOKEN='440e2c...' php -S localhost:8080 robo.php
WiFi is a simple on/off switch for a hostapd
controlled access point.
Required PHP extensions:
sockets
: for accessing unix UDP sockets
Example:
env BASE='/wifi' IFACE='/var/run/...' QRCODE='iVBORw0KGgo...' php -S localhost:8080 robo.php
The following environment variables must be set to configure the various web apps.
All web apps must be launched with a base URI. This may be useful when running behind a reverse proxy.
Example:
env BASE='/docs' php -S localhost:8080 docs.php
The IP address of the Brother DS-940DW document scanner on your network.
Example:
env DEVICE='192.168.178.2' php -S localhost:8080 docs.php
The IP address of the Xiaomi Roborock S5 robot vacuum on your network.
Example:
env DEVICE='192.168.178.2' php -S localhost:8080 robo.php
The secret token of the Xiaomi Roborock S5 robot vacuum encoded in HEX.
Example:
env TOKEN='440e2c...' php -S localhost:8080 robo.php
The path to the hostapd
control interface/socket that should be used.
Example:
env IFACE='/var/run/hostapd/wlan0' php -S localhost:8080 wifi.php
A Base64 encoded Portable Network Graphic (PNG) containing WiFi credentials.
Example:
env QRCODE='iVBORw0KGgoAAAANSUh...' php -S localhost:8080 wifi.php