Skip to content
This repository has been archived by the owner on Sep 7, 2024. It is now read-only.

Add Sensor management functionality #60

Open
1 task
christoff-linde opened this issue Mar 6, 2024 · 0 comments
Open
1 task

Add Sensor management functionality #60

christoff-linde opened this issue Mar 6, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@christoff-linde
Copy link
Owner

christoff-linde commented Mar 6, 2024

Description

Currently, the Sensor entries in the sensors table is hard-coded/created by hand. This is obviously not ideal, and should be addressed.

It would be nice to be able to register a new sensor, along with it's configured/attached sensors, and some additional information about the sensor.

Task List

The following endpoints will be required

  • Sensor management routes (create, update, list, remove)

🚧 Proposed Schemas 🚧

#[derive(Debug)]
enum DeviceType {
    Esp32,
    Esp8266,
}

#[derive(Debug)]
enum SensorType {
    Humidity,
    HumidityPressure,
    HumidityTemperature,
    Pressure,
    PressureTemperature,
    Temperature,
}

#[derive(Debug)]
struct Sensor {
    id: String,
    device_type: DeviceType,
    sensor_type: SensorType,
    name: String,
}

#[derive(Debug)]
struct Device {
    id: String,
    device_type: DeviceType,
    location_name: String,
    sensors: Vec<Sensor>,
}
@christoff-linde christoff-linde added the enhancement New feature or request label Mar 6, 2024
@christoff-linde christoff-linde changed the title Add ability to register new sensors Add Sensor management functionality Mar 6, 2024
@christoff-linde christoff-linde changed the title Add Sensor management functionality Add Sensor management functionality Mar 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant