55A package to run a Raspberry Pi in an outbuilding such as a garden shed, for the internet of sheds.
66
77Automated use cases:
8+
89- Weather station
910- Garden lighting
1011- Security
1112
13+ ## Design Principles
14+
15+ The Hub contains a Protocol, and can utilise modules
16+ A device contains a protocol, and can utilise modules
17+
1218## TODO:
19+
13201 . Fix: Bug: The script startup gets an incorrect time (Hasn't yet got the internet time)
14212 . Instructions on pinout
22+ 3 . Tests for the utils and base protocol
23+ 4 . Extend Baseprotocol with a reusable run method
24+ 5 . General Integration test for the logger using a fake module
25+ 6 . Test default endpoint address settings work in theory, because the test above overrides them
26+ 7 . Device startup and shutdown needs a unit test
27+ 8 . Temp probe should be a fixture
28+ 9 . CPU temp probe should be a fixture
1529
1630### Wish list:
31+
1732- Poetry (Not started)
1833- ASGI backend server (Daphne)
1934- Native webcomponent FE with Bootstrap
@@ -40,6 +55,7 @@ sudo raspi-config
40553 . Agree to installing the 1-Wire script
4156
42574 . Reboot
58+
4359``` shell
4460sudo reboot
4561```
@@ -51,6 +67,7 @@ ls /sys/bus/w1/devices/
5167```
5268
5369Check the value read, be sure to change "28-000003ebbf13" to the values listed above:
70+
5471``` shell
5572cat /sys/bus/w1/devices/28-000003ebbf13/w1_slave
5673```
@@ -67,20 +84,21 @@ With the contents
6784
6885` ` ` ini
6986[Unit]
70- Description= Shed-Pi
71- After= multi-user.target
72- StartLimitIntervalSec= 0
87+ Description = Shed-Pi
88+ After = multi-user.target
89+ StartLimitIntervalSec = 0
7390
7491[Service]
75- Type= simple
76- ExecStart= /usr/bin/python3 /home/shed-pi/temp_logger.py
77- StandardInput= tty-force
92+ Type = simple
93+ ExecStart = /usr/bin/python3 /home/shed-pi/temp_logger.py
94+ StandardInput = tty-force
7895
7996[Install]
80- WantedBy= multi-user.target
97+ WantedBy = multi-user.target
8198` ` `
8299
83100Enable the service, (CAVEAT: didn' t work when manually starting, works on reboot)
101+
84102```shell
85103sudo systemctl daemon-reload
86104sudo systemctl enable shed-pi.service
@@ -89,6 +107,7 @@ sudo systemctl status shed-pi.service
89107```
90108
91109Read the logs
110+
92111```shell
93112tail -f /var/log/shed-pi.log
94113```
@@ -100,18 +119,19 @@ tail -f /var/log/shed-pi.log
100119Install pre-commit: https://pre-commit.com/
101120
102121Configure precommit on your local git for the project by running the following at the root of the project:
122+
103123```shell
104124pre-commit install
105125```
106- Pre-commit will then automatically run for your changes at commit time.
107126
127+ Pre-commit will then automatically run for your changes at commit time.
108128
109129To run the pre-commit config manually, run:
130+
110131```shell
111132pre-commit run --all-files
112133```
113134
114-
115135## Release
116136
117137Generate the release
0 commit comments