overthesun / simoc-sam

Live backend for SAM at Biosphere 2
2 stars 1 forks source link

Sensor Manager / Plug-and-Play #56

Open granawkins opened 1 year ago

granawkins commented 1 year ago

Last year, we made the sensor_manager.py, which tries to start every type of supported sensor and fails gracefully if they're not found.

It's still functional, but not part of the main workflow. In order to use it:

  1. Start up the server from the main directory with python3 simoc-sam.py run-server
    • This will start index.html, which you can view at localhost:8081
    • This does NOT work if you launch the server with python -m simoc_sam.sioserver
  2. In a separate terminal window, switch to the src directory (cd src), then start the sensor manager with python -m simoc_sam.sensor_manager
  3. Back at localhost:8081, click the Refresh Sensors anytime to add or remove sensors.

If I recall correctly, the goal was to add this Refresh Sensors button to the frontend. I think there was an issue with communication being one-way currently. Not sure.