diff --git a/README.md b/README.md index 5343c2003d59e61dec0eca4b7574807b597e7771..eb738e53594289692cb1eaa6d8406b3e9201634c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,46 @@ # projctl -Projector Control is a web (HTML + REST) interface for Optoma projectors. +Projector Control is a web (HTML + REST) interface for Optoma projectors running on e.g. a Raspberry Pi. It has been tested with a Optoma ZU820TST, but should probably work with other projectors as well + + + +## Hardware + +Raspberry Pi using a RS-232 Adapter. Both GPIO-RS-233-to-TTY adapters and USB RS-232 adapters should work out of the box. Default ports to be searched for are `/dev/serialx` and `/dev/USBx` where `x` is a number between 0 and 9. The RS-232 adapter is connected to the port of the Optoma projector + +## Software + +- Python + Fastapi +- SQLite +- Rye + +## Features + +- web interface and REST interface with the ability to + - switch the power off and on + - open and close the Shutter ("AV Mute") + - activate and deactivate a test pattern +- the web interface is connected via websockets, status changes of the projector are shown in real time +- logging of events and lamp hours into a SQLite database +- realtime display of system temperature and lamp hours +- resilient design with automatic reconnects to the RS-232 connector, status of said connector is also displayed in realtime + +## Installation + +This project is based on python and uses [rye](https://rye.astral.sh/) for dependency managment. + +1. install Rye as listed in the instructions on [their website](https://rye.astral.sh/). +2. Clone this repo onto the raspi +3. Install nginx (`apt install nginx`) +4. Copy the configuration from `examples/projctl.nginx` to `/etc/nginx/sites-available/` and adjust to taste +5. Copy the directory `static` to `/var/www/` +6. Fix the ownership of the directory using `chown -R www-data:www-data static` +7. Consider doing the same with the permissions if needed +8. Symlink the nginx config to `sites-enabled` to activate the site: `ln -s /etc/nginx/sites-available/projctl.nginx /etc/nginx/sites-enabled/projctl.nginx` +9. Test the configuration using `nginx -t` +10. Install the service by copying the service file: `cp example/projctl.service /etc/systemd/system/` +11. Enable the service so it starts on boot: `systemctl enable projctl` +12. Start the service: `systemctl start projctl` +13. View the logs and check if it manages to connect to the serial adapter: `journalctl -fu projctl` +14. Restart nginx: `systemctl restart nginx` +15. Check on port 80 on the IP of your Raspi if you can see the interface diff --git a/images/screenshot.jpg b/images/screenshot.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7f1ed1726c749b53ae05a7c20fddda50b2aa6eca Binary files /dev/null and b/images/screenshot.jpg differ