https://github.com/tomosatop/raspberrypi-amedas
Indoor environmental monitoring using RPZ-IR-Sensor for Raspberry Pi 3 A+
https://github.com/tomosatop/raspberrypi-amedas
bme280 fastapi poetry raspberry-pi tsl2572
Last synced: 3 months ago
JSON representation
Indoor environmental monitoring using RPZ-IR-Sensor for Raspberry Pi 3 A+
- Host: GitHub
- URL: https://github.com/tomosatop/raspberrypi-amedas
- Owner: tomosatoP
- License: mit
- Created: 2024-03-18T08:45:06.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-28T06:20:07.000Z (almost 2 years ago)
- Last Synced: 2025-06-03T10:00:16.921Z (about 1 year ago)
- Topics: bme280, fastapi, poetry, raspberry-pi, tsl2572
- Language: Python
- Homepage: https://tomosatop.github.io/raspberrypi-amedas/
- Size: 2.77 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Monitor indoor environment like AMeDAS.
Indoor environmental monitoring using RPZ-IR-Sensor for Raspberry Pi 3 A+
Referenced Books: "動かして学ぶ!Python FastAPI 開発入門" ISBN978-4-7981-7771-7
## Hardware
* [Raspberry Pi 3A+](https://www.raspberrypi.com/products/raspberry-pi-3-model-a-plus/)
* [RPZ-IR-Sensor](https://www.indoorcorgielec.com/products/rpz-ir-sensor/)
* uSD-CARD 16GByte
## Setup Raspberry Pi 3A+
[setup](RASPI3APLUS.md)
## Download & Install
~~~sh
git clone --depth 1 https://github.com/tomosatoP/raspberrypi-amedas.git
cd raspberrypi-amedas
mkdir .dockervenv
docker compose build --pull --no-cache
# create "poetry.lock"
docker compose run --entrypoint "poetry update --lock --only main" amedas
# install packages
docker compose run --entrypoint "poetry install --no-root --only main" amedas
~~~
## Run
~~~sh
cd raspberrypi-amedas
docker compose up -d --remove-orphans
~~~
## Check
### node
~~~sh
curl -X GET http://localhost:8000/node
~~~
~~~json
{
"cpu": "aarch64",
"platformname": "Linux-6.6.20+rpt-rpi-2712-aarch64-with-glibc2.36",
"hostname": "f9f29ef5bc4a",
"soc_temperature": 49.6,
"date_time": "2024-03-18T11:17:04.958436"
}
~~~
### sensors
~~~sh
curl -X GET http://localhost:8000/sensors
~~~
~~~json
[
{
"name": "MOUNTED TSL2572",
"i2c_address": 57
},
{
"name": "EXTERNAL BME280",
"i2c_address": 118
},
{
"name": "MOUNTED BME280",
"i2c_address": 119
}
]
~~~
### sensors/{i2c_address}
~~~sh
curl -X GET http://localhost:8000/sensors/118
~~~
~~~json
{
"sensor": {
"name": "EXTERNAL BME280",
"i2c_address": 118
},
"list_dataset": [
{
"name": "TEMPERATURE",
"date_time": "2024-03-18T11:23:08.952919",
"data": 22.0
},
{
"name": "HUMIDITY",
"date_time": "2024-03-18T11:23:08.952938",
"data": 33.7
},
{
"name": "PRESSURE",
"date_time": "2024-03-18T11:23:08.952940",
"data": 1016.4
}
]
}
~~~
---