https://github.com/tsak/bude-seapool-temperature
Bude Seapool Temperature Signage
https://github.com/tsak/bude-seapool-temperature
iot monnit signage
Last synced: 5 months ago
JSON representation
Bude Seapool Temperature Signage
- Host: GitHub
- URL: https://github.com/tsak/bude-seapool-temperature
- Owner: tsak
- Created: 2024-11-04T10:38:00.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-08-31T17:57:17.000Z (10 months ago)
- Last Synced: 2025-08-31T19:31:11.156Z (10 months ago)
- Topics: iot, monnit, signage
- Language: Go
- Homepage: https://spt.tsak.dev
- Size: 1.32 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bude Seapool Temperature
Read temperatures from an [iMonnit](https://www.imonnit.com/) temperature sensor embedded in the pool
and generate an image for digital signage by the pool.

## Public API
This service exposes two endpoints:
### Latest reading
`GET /api/v1/temperature`
```bash
$ curl -s https://spt.tsak.dev/api/v1/temperature
```
```json
{
"temperature": 13.4,
"datetime": "2024-11-07T22:30:00Z"
}
```
### List of last measurements
`GET /api/v1/temperatures`
```bash
$ curl -s https://spt.tsak.dev/api/v1/temperatures
```
```json
[
{
"temperature": 13.4,
"datetime": "2024-11-07T22:30:00Z"
},
{
"temperature": 13.6,
"datetime": "2024-11-07T22:19:58Z"
},
{
"temperature": 13.5,
"datetime": "2024-11-07T22:09:58Z"
}
]
```
## Prerequisites
- Go 1.23
- [Air](https://github.com/air-verse/air)
- iMonnit API details
## Setup
Copy `.env.sample` to `.env` and fill in `MONNIT_SENSOR_ID`, `MONNIT_API_KEY_ID` and `MONNIT_API_SECRET_KEY`
## Development
Run `air` and connect to [localhost:3001](http://localhost:3001)
```bash
# Continuously build and reload
air
```
## Building
Create `bude-seapool-temperature` binary
```bash
go build
```