Skip to content

PI code for weather idle screen for when the tv is not in use#111

Open
plsdoant wants to merge 6 commits into
SCE-Development:devfrom
plsdoant:20260603-weather_idle_screen_switcher
Open

PI code for weather idle screen for when the tv is not in use#111
plsdoant wants to merge 6 commits into
SCE-Development:devfrom
plsdoant:20260603-weather_idle_screen_switcher

Conversation

@plsdoant

@plsdoant plsdoant commented Jun 4, 2026

Copy link
Copy Markdown

Creates a receive.py client which switches the pi to play a weather channel when the tv is idle.

  • get_stream_state function returns whether or not the player is "playing" or "idle". there is an idle thread that is locked when it is playing and unlocks when it is idle
  • stream_switcher and switch_stream switch to the weather stream when the idle thread is unlocked
  • the idle weather stream only plays when a weather rtmp url is passed which is optional otherwise it just works like normal

in order for the weather stream to play make sure to loop a video using ffmpeg:
ffmpeg -re -stream_loop -1 -i videos/VIDEO_PATH.mp4 -c copy -f flv rtmp://localhost:1935/live/weather

@vietnguyen2358

Copy link
Copy Markdown
Member

Could you provide some screenshots of this? Would be great to see the results of the implementation.

@plsdoant

plsdoant commented Jun 5, 2026

Copy link
Copy Markdown
Author

Could you provide some screenshots of this? Would be great to see the results of the implementation.

It's a little hard to provide screenshots as the PI code doesn't show a visual on macOS but it still provides audio. I tested this by hearing the audio switch between the weather channel and the queued video. I could record a video showing that maybe?

@vietnguyen2358

Copy link
Copy Markdown
Member

Do you know how to setup VLC to display what the PI would see and run the server locally?

@plsdoant

plsdoant commented Jun 5, 2026

Copy link
Copy Markdown
Author

Do you know how to setup VLC to display what the PI would see and run the server locally?

From my understanding it's starting the server locally with docker, putting in the rtmp URL into VLC, then running the code for the PI but when I do this VLC only pops up with a visual for the playing video not the weather video.

@vietnguyen2358

Copy link
Copy Markdown
Member

That is correct. I might have time tmr to see if it works on my side. Will let you know.

@vietnguyen2358

Copy link
Copy Markdown
Member

We have a recieve.py currently running on the PI. Are you able to ssh into the PI and see the contents of that file? I don't believe we ever commit them, just used vim or echo to update the files directly. I recommend checking in with Evan or Adarsh on how they want to proceed with this. I tried it on my end as well, was not able to get a visual on VLC either.

@plsdoant

plsdoant commented Jun 9, 2026

Copy link
Copy Markdown
Author

Checked in with Evan, he says if it's possible we should commit it and change the readme to show "see file_name for how the raspberry pi is run" instead of the python code that runs on the pi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants