Skip to content

Commit

Permalink
Get SETUP docs finished, should be ready
Browse files Browse the repository at this point in the history
  • Loading branch information
R0NAM1 committed Apr 7, 2024
1 parent 0d4f1de commit 0fc15c8
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 32 deletions.
35 changes: 8 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,17 @@ For use anywhere that wireless casting akin to a ChromeCast is wanted, but with
Not a replacement for an HDMI cable if one can be ran. Depending on hardware ran on it might be able to display 4K, it cannot STREAM 4k,
has a hard time with 1080p, defaults to 720p for balance between framerate and resolution.

Try different display resolutions between 720p, 1080p and 4K and see how smooth the slideshow transition is, usually a good gauge.
Try different display resolutions between 720p, 1080p and 4K and see what the debug FPS is to see what your hardware can handle.


Features (will) include:
- Show a slideshow by default, will be customizable to either show a static image or a screenshot of a webpage, like AP NEWS headlines
Features include:
- Showing a slideshow by default, with the option of a screenshot of a webpage
- Pin Authentication, with a PSK bypass for certain clients
( For instance, Students have to type in a PIN, while Teachers can auto connect)
( For instance, Students have to type in a PIN, while Teachers can auto connect)
- PSK clients can kick other clients and toggle castability to the server
- Optional Audio Redirection
- Ability to pause casting
- PSK clients can kick other clients and toggle castability to the server
- Windows, Mac and Linux clients (Python Script Bundled into Native Execution Format)
- Individual application window capture if I can find a cross platform library for it
- Broadcast traffic for passive discovery and mDNS for active discovery
- Browser based clients (Maybe OS based in the future)
- Broadcast traffic for passive discovery and mDNS for active discovery (May make broadcast obselete)


## SimpleCast Config Keys & Possible Values
Expand All @@ -44,24 +42,7 @@ Features (will) include:


## TODO
- ✓ Tell client server timeout
- ✓ Make github page for quick downloads (r0nam1.github.io/simplecast, put into link shortener)
https://bit.ly/simplecast-client -> https://r0nam1.github.io/SimpleCast/
- ✓ TransItion all 'globals' to myGlobals
- ~✓ Add sigint handling (Work's better, issues with AioHTTP and AioRTC, but on 'open' it works)
- ✓ Allow PSK to kick connection
- ✓ Allow PSK to disable/enable casting
- ✓ Fix image resizing on server
- ✓ Do info drawing scaling
- ✓ Allow option to make connecting text 'bit.ly link', 'to connect', or just 'info'.
- ✓ Website grabbing for slideshow, add thread to do screenshots every 60 seconds
- ✓ Allow option to flip info and text on screen every 120 seconds for burn in protection
- ✓ Add debug for server, will show all relevent debug data, time to draw frame, receiver frame, resolution other
- ✓ Logging to file in home directory or local directory: Format ## Month/Day/Year 13:00 (Severity) Action
- ✓ Test all edgecases. Should be fine, worst case hotpatch later

Receiver seems to be done, add systemd service and should be finished! Create setup docs as well

- Implement mDNS discovery for browser client
- Finish Browser Extension Clients, glow up and CSS overhaul
- README overhaul

28 changes: 23 additions & 5 deletions SETUP.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
How to setup the SimpleCast receiver script.

1. Install requirements, the APT coturn package, PIP3 requirements
2. Setup avahi to respond to simplecast.local
3. Setup systemd service
4. Install browser client
5. Flesh this out when sigint and systemd service is finished
1. Clone the GIT repo from github to your user running X's home directory (On Raspi this would be /home/pi)
-- git clone https://github.com/R0NAM1/SimpleCast.git

2. cd into SimpleCast, Install requirements
-- For debian packages, install the coturn, avahi and python3 package (sudo apt install coturn avahi-daemon python3)
-- Also install chrome for the Selenium driver to work (wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb), (sudo apt install ./google-chrome-stable_current_amd64.deb)

-- For Python Libraries, make a virtual environment (mkdir venv && python3 -m venv venv),
activate it (source venv/bin/activate), and install from requirements.txt (pip3 install -r requirements.txt).
Exit the venv with 'deactivate'.

3. Setup receiver/simpleCastConfig.json however you like, make sure to assign either a static IP or a static leased one!

4. Setup avahi to respond to simplecast.local
-- Copy the provided simplecast-mdns.service to /etc/avahi/services/

5. Setup the systemd service
-- Open simplecast.service
-- Adapt WorkingDirectory with the git repo location
-- Adapt User with the user running X, on a Raspi this would be pi
-- Adapt ExecStart with the directory that leads to the repo
-- Copy the file to /etc/systemd/system/
-- Run 'sudo systemctl daemon-reload', 'sudo systemctl enable simplecast.service' and 'sudo systemctl start simplecast.service'
38 changes: 38 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
aiohttp==3.9.3
aiohttp-cors==0.7.0
aioice==0.9.0
aiortc==1.7.0
aiosignal==1.3.1
attrs==23.2.0
av==11.0.0
certifi==2024.2.2
cffi==1.16.0
cryptography==42.0.5
dnspython==2.6.1
frozenlist==1.4.1
google-crc32c==1.5.0
h11==0.14.0
idna==3.6
ifaddr==0.2.0
mss==9.0.1
multidict==6.0.5
numpy==1.26.4
outcome==1.3.0.post0
pillow==10.3.0
PyAudio==0.2.14
pycparser==2.21
pyee==11.1.0
pygame==2.5.2
pylibsrtp==0.10.0
pyOpenSSL==24.0.0
PySocks==1.7.1
screeninfo==0.8.1
selenium==4.19.0
sniffio==1.3.1
sortedcontainers==2.4.0
trio==0.25.0
trio-websocket==0.11.1
typing_extensions==4.10.0
urllib3==2.2.1
wsproto==1.2.0
yarl==1.9.4
9 changes: 9 additions & 0 deletions simplecast-mdns.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">Simplecast</name>
<service>
<type>_http._tcp</type>
<port>4825</port>
</service>
</service-group>
17 changes: 17 additions & 0 deletions simplecast.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[Unit]
Description=SimpleCast Service
After=network.target
StartLimitIntervalSec=0

[Service]
Environment="DISPLAY=:0"
Type=simple
Restart=always
RestartSec=1
WorkingDirectory=/home/pi/SimpleCast
User=pi
ExecStart=/home/pi/SimpleCast/venv/bin/python3 /home/pi/SimpleCast/receiver/receiverServer.py
KillSignal=SIGKILL

[Install]
WantedBy=multi-user.target

0 comments on commit 0fc15c8

Please sign in to comment.