YCPRadioTelescope / YCP-RT-ControlRoom

The main repository for the York College of Pennsylvania Radio Telescope control room software.
8 stars 2 forks source link

Integrate new sensors into the sensor network and implement sensor customizability #427

Closed DanPalm5 closed 2 years ago

DanPalm5 commented 3 years ago

We will need to integrate and successfully collect data (and likely display it) from the new sensors we have acquired. This will be able to be completed after the encoders are put on.

tfranks31 commented 2 years ago

Fasten your seatbelt... two new devices need to be integrated into the Sensor Network and a new feature that needs to be added. The new devices are a DHT22 ambient temperature sensor and an internal fan, and the new feature is sensor customizability from the Control Room.

The DHT22 will need to have its data parsed from the incoming packet and displayed on the Sensor Data tab of the Diagnostics form. Also, we need to store this data in the database for future analysis. Make sure to update the Simulation Sensor Network, associated unit tests, and the Sensor Network Testing Suite.

Integrating the internal fan will take a bit more work. The Control Room needs to tell the fan when to turn on and turn off. After the Control Room connects to and initializes the ESS, it only listens for incoming sensor data packets. We need it to send requests to turn on or off the fan when a certain temperature/humidity reading is reached, so we either need to refactor our communication protocol with the ESS to be 2-way or we can restart the ESS every time we toggle the fan. Discuss with the clients and the ECE team which approach they prefer. The incoming sensor data packet will have a new bit, saying whether the fan is currently on or off, which needs to be parsed and displayed on the diagnostics form's Sensor Data tab. Depending on how we decide that the fan should be turned on, we may need to allow the user to change the temperature and humidity thresholds from a form and store them in the database so that information persists over.

The Simulation Sensor Network will need to simulate the fan toggling and unit tests will need to be updated. The Sensor Network Testing Suite needs to be updated and allow the user to send requests to start and stop the fan through initial configurations. We need to store when the fan is used in the database.

We should also allow the Control Room to customize and store sensor settings as the ESS is running. This will involve changing the Sensor Overrides/Init tab on the Diagnostics form. Find out what the clients want to do first. Then find out all of the different customization options that our sensors offer and allow the user to change them from the form. Make sure to validate all user inputs before letting them submit. Also, check if we need the sensor network sensor overrides for anything because they are not doing anything right now, and removing them could clear up some space.

The Simulation Sensor Network shouldn't need too many changes because the simulated data produced will still be the same. Just make sure that nothing breaks when changing sensor settings on the simulation. Add and modify units tests for these changes as well. Modify the Sensor Network Testing Suite to the send sensor configurations as well. Lastly, we need to store the configurations in the database so that they persist over after the Control Room Application is closed.


That was a whole lot of info! Here is a task list to help keep track of everything that needs to be done.

DHT22

Internal Fan - Find out what conditions toggle the fan

Sensor Custimizability