Skip to main content

Shed Pi

Project description

shed-pi

Introduction

A package to run a Raspberry Pi in an outbuilding such as a garden shed, for the internet of sheds.

Automated use cases:

  • Weather station
  • Garden lighting
  • Security

TODO:

  1. Fix: Bug: The script startup gets an incorrect time (Hasn't yet got the internet time)
  2. Instructions on pinout

Wish list:

  • Poetry (Not started)
  • ASGI backend server (Daphne)
  • Native webcomponent FE with Bootstrap
  • pip install raspberry pi
  • modular components that are easy to install from a software and hardware perspective
  • Provide systemd script to 3rd parties
  • venv is crucial before installing any third party packages!
  • Pre commit config with ci integration

Installation

Enable interfaces

For any temperature sensors the 1 wire interface is required

sudo raspi-config
  1. Select the option: "Interface Options"

  2. Select the Option I7: "1-Wire"

  3. Agree to installing the 1-Wire script

  4. Reboot

sudo reboot

Sanity check that the 1 Wire data is available:

ls /sys/bus/w1/devices/

Check the value read, be sure to change "28-000003ebbf13" to the values listed above:

cat  /sys/bus/w1/devices/28-000003ebbf13/w1_slave

Script auto start with systemd

Create a file in systemd

nano /lib/systemd/system/shed-pi.service

With the contents

[Unit]
Description=Shed-Pi
After=multi-user.target
StartLimitIntervalSec=0
 
[Service]
Type=simple
ExecStart=/usr/bin/python3 /home/shed-pi/temp_logger.py
StandardInput=tty-force
 
[Install]
WantedBy=multi-user.target

Enable the service, (CAVEAT: didn't work when manually starting, works on reboot)

sudo systemctl daemon-reload
sudo systemctl enable shed-pi.service
sudo systemctl start shed-pi.service
sudo systemctl status shed-pi.service

Read the logs

tail -f /var/log/shed-pi.log

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shed_pi-0.0.1.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

shed_pi-0.0.1-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page