You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
At the moment, the temperature key in the config file (within the sensors section) will use the MLX90614 wrapper. I've written untested support for a different temp sensor as an example in some new documentation I'm writing and we could even make it a supported sensor. The issue is that temperature is hardcoded to mlx90614.
Describe the solution you'd like
We could change it to mlx90614 of course, that would fix the problem. This would mean using the sensor name as the key in the JSON file for sensors. So, bme280 for the new type of temperature sensor and mlx90614 for the type we use.
However, this still doesn't allow for multiple sensors of the same type.
My proposed solution would be to change the sensors section of the config file to an array.
Here's an example of how the sensors section will look. Note how we have multiple of one type of sensor, as well as multiple different types of temperature sensors.
Additionally, this means we can implement proper sensor management.
sensor_stream.py needs to look through the config file, find active sensors, lookup their respective SensorWrapper class (we need to make a basic lookup table) and create a new instance of that class and append it to the sensors array
The lookup table basically needs to function like this, that takes the type key from the configuration file and returns the appropriate class:
Is your feature request related to a problem? Please describe.
At the moment, the
temperature
key in the config file (within thesensors
section) will use the MLX90614 wrapper. I've written untested support for a different temp sensor as an example in some new documentation I'm writing and we could even make it a supported sensor. The issue is thattemperature
is hardcoded to mlx90614.Describe the solution you'd like
We could change it to
mlx90614
of course, that would fix the problem. This would mean using the sensor name as the key in the JSON file for sensors. So,bme280
for the new type of temperature sensor andmlx90614
for the type we use.However, this still doesn't allow for multiple sensors of the same type.
My proposed solution would be to change the
sensors
section of the config file to an array.Here's an example of how the
sensors
section will look. Note how we have multiple of one type of sensor, as well as multiple different types of temperature sensors.Additionally, this means we can implement proper sensor management.
sensor_stream.py
needs to look through the config file, find active sensors, lookup their respective SensorWrapper class (we need to make a basic lookup table) and create a new instance of that class and append it to thesensors
arrayThe lookup table basically needs to function like this, that takes the
type
key from the configuration file and returns the appropriate class:The text was updated successfully, but these errors were encountered: