Name is a tad misleading. This application is a clock and weather display (based off of this). It also has the capability to receive messages from a client and display them underneath the clock. This is a good present for long distance relationships or anyone you want to send fun messages to. In order to send messages from seperate networks without opening ports and all that jazz you can utilize NGROK. I will not be showing how to do that in this README, please look at their website: www.ngrok.com.
Items Recommended:
No Message Displayed:
Message Displayed:
Open Weather API Needed, as well as other misc. items:
pip install openweather
pip install pygame
pip install Pillow
pip install requests
Once these are all installed you will need to put your OpenWeather API Key into a constant file. Follow these steps for that:
1) Obtain OpenWeatherAPI Key: https://openweathermap.org/
2) Create constant.py file in the server directory
3) Enter "WEATHER_API_KEY = [Your API Key]"
You should be done. Then move on to usage and test.
Server:
format:
python3 main.py <host> <port> <zipcode>
Example:
cd server/
python3 main.py localhost 4556
cd server/
python3 main.py localhost 4556 85251
NOTE: Zipcode is optional. It is used to gather weather data about that location. Default value is 91604 (Studio City).
Client:
format:
python3 main.py <host> <port> <message>
Example:
cd client/
python3 main.py localhost 4556 "This is a test"
Response from server:
connecting to localhost port 4556
sending 'This is a test'
Message sent successfully :D
closing socket
Shortcut for automated start:
-
right-click and hit "create shortcut" for start.sh
-
Drag that shortcut wherever you wish
-
Double click and it should start the application
NOTE: This is automating an ngrok TCP tunnel processes as well. The tunnel is connected to localhost port 4556. In order to get NGROK working go to www.ngrok.com.
Thank you to AbnormalDistributions for the idea / basecode: https://github.com/AbnormalDistributions/e_paper_weather_display
Thank you to Erik Flowers for the icon design: https://erikflowers.github.io/weather-icons/
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.