ClimateNetTumoLabs / raspberry_soft

0 stars 0 forks source link

Change Device reader code #10

Open eriktumosaryan opened 7 months ago

eriktumosaryan commented 7 months ago

You need to change code of the sensors.

For example

NeedToWork = True/False if we want to turn on or turn off selected sensor ConnectionParamaters ....

ApinHovo commented 7 months ago
  1. DEVICE_ID:

    • Purpose: Unique identifier for the device.
  2. MEASURING_TIME:

    • Purpose: Duration for reading data from sensors and the frequency of sending data to the database.
    • Note: Recommended to be equal to or greater than the sum of maximum reading time, wind direction reading time, and an additional buffer of 10 units.
  3. MAX_READING_TIME:

    • Purpose: Maximum time it can take to read data from all sensors at once.
  4. SENSORS:

    • Purpose: Dictionary containing configurations for various sensors.

    • "light_sensor":

      • working: Indicates if the light sensor is operational.
    • "tph_sensor":

      • working: Indicates if the TPH sensor is operational.
    • "air_quality_sensor":

      • working: Indicates if the air quality sensor is operational.
      • address: Communication address for the sensor.
      • baudrate: Baudrate for sensor communication.
      • pin_enable: Pin for enabling the sensor.
      • pin_reset: Pin for resetting the sensor.
    • "wind_speed":

      • working: Indicates if the wind speed sensor is operational.
      • pin: Pin used for wind speed sensor readings.
    • "wind_direction":

      • working: Indicates if the wind direction sensor is operational.
      • reading_time: Time required for wind direction sensor readings.
    • "rain":

      • working: Indicates if the rain sensor is operational.
      • pin: Pin used for rain sensor readings.