Code Monkey home page Code Monkey logo

weather-vs-cpu's Introduction

Weather vs CPU

Electron, React application to display current, local weather and computers CPU temperature

Preview

Changes

Version 0.01

  • README boilerplate added
  • Basic project structure created
  • Initialised basic dependencies
  • React with electron integrated
  • Added UI waves
  • Icon designed and added
  • Added application grid and some dummy data

Version 0.02

  • Project structure optimised
  • Added OpenWeatherMap API
  • Implemented ability to pass Location data as props
  • Obtained API Keys, Stored and Secured
  • Added ability to read API from pc data

Version 0.03

  • Project structure and size reduced
  • Added ability for front-end to communicate with backend
  • Added Bat script to read the temperature on Windows (need admin rights)
  • Added Custom Menu, submenu options
  • Added Shortcuts for menu items
  • Added Ability to package the application for production
  • Added Openhardwaremonitor https://github.com/openhardwaremonitor/openhardwaremonitor

Version 0.04

  • CPU Temperature Monitoring function added
  • Added Start and Stop auto-monitoring from the main menu
  • Added ability to stop monitoring from app
  • Add ability to identify and quit running processes

Things to do

  • [-] Add ability to identify processors cores
  • [-] Add ability to Change town or get location data (store in config)
  • [-] Add support for React dev tools
  • [-] Optimise for different OS (MacOS, Linux)
  • [-] Collected data need to be pushed to db (or on users machine as app logs)
  • [-] Load and Display collected data side by side for (visual representation)
  • [-] Add Notifications for CPU Temperature Warnings, Errors

Running instructions

  • Copy project to your directory ( git clone https://github.com/ibnzUK/weather-vs-cpu )
  • If you are Running a Windows Subsystem for Linux (WSL), it is recommended to install the project using PowerShell, GitBash or Command Prompt terminal (Concurrently dependency related)
  • Make sure to have Node.js Version >= 12.13.0. For Electron Forge
  • Install project packages (npm install)
  • Get your API key from https://openweathermap.org/api
  • create .env file in root directory and store your API key:
BROWSER=none
REACT_APP_API_KEY=Your_OpenWeatherMap_API_Key
  • BROWSER=none option is for not opening the application in a browser window

  • To Start electron application project (npm run dev)

  • Default weather location is set to UK London, you can change it in src/components/UI/Card.js ln:10 myTown = 'London'

  • To Package application for distribution (npm run make) (NOTE: Make sure to rename application and lose '-' dash symbols, because of File Naming Conventions)

Known Issues

  • Not optimised for Mac or Linux OS (feel free to contribute)
  • OpenHardwareMonitor software requires Administrator rights
  • If CPU temperature is not displayed, check current date log file saved in scripts/OpenHardwareMonitorLog-XXXX-XX-XX.csv and get required column name for cpu temperature stats, for example column for 'CPU Package' has a name of '/intelcpu/0/temperature/4' this value is than imported in scripts/tempChecker.js ln:7 optionFromCSV = '/intelcpu/0/temperature/4'; Logs
  • If Log File is open, OpenHardwareMonitor software throws an error for not being able to update logs
  • If OpenWeatherMap application is not killed after the process is stopped, change scripts/stop.js ln:40 'TSKILL' to 'TASKKILL /PID'

Resources used

weather-vs-cpu's People

Contributors

ibnzuk avatar

Watchers

 avatar  avatar  avatar

Forkers

royzhao7

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.