GithubHelp home page GithubHelp logo

idcrook / timetemp3 Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 188 KB

Monitor and display time/temp with RasPi and log to cloud (python3, 2020 refresh)

Home Page: https://idcrook.github.io/timetemp/

License: MIT License

Python 96.02% Shell 3.98%
python3 adafruit-library

timetemp3's Introduction

timetemp3

Monitor and display time/temp with RasPi and log to cloud

qrcode for https://idcrook.github.io/timetemp/chart/presstemp-hourly/

Photo of two LED displays with time and temperature

Based on https://github.com/idcrook/timetemp - See original project for additional hardware details, setup, and more, including a webpage that displays live charts of data.

Install

Install pre-reqs and dependencies

# python and build system dependencies
sudo apt install -y git build-essential python3-setuptools python3-dev \
    python3-pip python3-venv python3-wheel

now for the fun part

mkdir ~/projects
cd ~/projects
git clone https://github.com/idcrook/timetemp3.git
cd ~/projects/timetemp3

#
python3 -m venv .venv
source .venv/bin/activate

# workaround for pyowm dependencies (move to build dependencies??)
pip install geojson requests

# perform the python setup, which also includes dependencies
pip install .
# for development, use instead
pip install -e .

Run

The i2c addresses in the scripts and config files may need to be updated for your hardware.

cd ~/projects/timetemp3
cp conf/weather_logging_config.example.json conf/weather_logging_config.json
# edit conf/weather_logging_config.json
touch conf/phant-config.json
# replace conf/phant-config.json with a phant data source config file

Using venv, can run the timetemp_* wrapper scripts the Python setup.py installed

cd ~/projects/timetemp3
source .venv/bin/activate

timetemp_7segment_clock
# <Ctrl-C> to exit

timetemp_weather_logging conf/weather_logging_config.json conf/phant-config.json
# <Ctrl-C> to exit

Run as systemd service

On my Raspberry Pi OS system, groups includes "gpio i2c" so these services do not need to run as root user.

Install user unit file. Assumes git clone at /home/pi/projects/timetemp3/ and has been installed

# needed for `host` command that does network connectivity check
sudo apt install bind9-host
cd /home/pi/projects/timetemp3/
conf/install_services.sh

journalctl --user --identifier="my_7segment_clock"
journalctl --user --identifier="my_weather_logging"

Test

# run tests from setup
python3 setup.py test

# manually run tests (pynose is nose fixed to run in >=python3.10)
pip install pynose
nosetests

TODO

See TODO.org

timetemp3's People

Contributors

idcrook avatar

Watchers

 avatar  avatar

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.