This implements the sensor manager class, which will run on all devices with connected sensors (i.e. Mac Mini and Raspberry Pi's).
It also implements a 'refresh' route on sioserver which will automatically check for and activate all connected sensors on devices with the sensor manager class running.
To test:
1) Start the server as usual, with python simoc-sam.py run-server
2) In a separate terminal, activate the virtual environment
3) Start sensor-manager with python -m simoc_sam.sensor_manager
4) At this point any connected sensors should begin broadcasting readings to the server.
Timeline moving forward:
Today (Saturday): Implement a way for Raspberry Pi's to get the host and port of the server (environmental variables or config), validate by running a raspberry pi.
Sunday: Implement server config, which will add metadata (sensor name and description) to broadcast sensor data for displaying in simoc-web.
Monday: Implement .csv data logger, test the whole system at the casita with Mac Mini and Raspberry Pi.
Tuesday: Get the whole thing running at SAM; evaluate different locations for sensors/devices; take pictures for the blog
This implements the sensor manager class, which will run on all devices with connected sensors (i.e. Mac Mini and Raspberry Pi's).
It also implements a 'refresh' route on
sioserver
which will automatically check for and activate all connected sensors on devices with the sensor manager class running.To test: 1) Start the server as usual, with
python simoc-sam.py run-server
2) In a separate terminal, activate the virtual environment 3) Start sensor-manager withpython -m simoc_sam.sensor_manager
4) At this point any connected sensors should begin broadcasting readings to the server.Timeline moving forward:
simoc-web
.