Before being able to communicate with the sensors, the Chrome App MUST be installed.
Chrome App setup >>
Explanation of the buttons:
'
Read and download flash memory' will read the memory of the sensor, download the
measurements as .cvs-files and upload them to the Firebase DB. Currently no indication is given (except
the downloading of the files) and logging in the console, when this has finished.
'
Read flash memory' Like above but without the downloads.
'
Begin recording' will set the sensor into record mode, i.e., once removed from the
cradle, the sensor will begin recording after the specified delay with the specified parameters
'
Undo record command' will revert any previous sent record commands (e.g. if the button
was accidentally pressed). The sensor will shut off after removing it from the cradle.
Other things to know:
- When a sensor is connected, it's status is queried every second and displayed on the website.
This can be used to verify that the time crystal of the sensor still works, the temperature
measurements are sensible, etc.
- Once a sensor is connected to the cradle, it's time is automatically reset to 01.01.1970.
However, the first thing this web utility does upon connecting to a sensor is setting it's time
to the current UTC time.
Sensor Operation
The EcoSync sensor measures occupancy (using a passive infra-red - PIR - detector), temperature (using
two temperature sensors), and light level (by reverse biasing the LED indicator on the front panel). The
sensor is configured through a USB cradle. The following settings can be configured via USB:
- The interval between measurements
- The total number of measurements to make
- The length of the initial installation period (during which the LED indicates PIR events)
- Whether the red or green LED should be used to indicate PIR events
- Whether PIR events should also be indicated during data collection
- The number of days which the sensor should wait before starting to collect measurements
- The hour of the day at which measurement collection should start
The normal operation on deploying a sensor would be to (i) wait for the sensor to connect to the
computer via USB, (ii) set the time on the device, (iii) read the status of the device once per
second in a GUI to confirm correct operation and to allow the user to set relevant parameters above,
and finally (iV) to instruct the sensor to start recording if indicated by the user (probably
through a single large 'Record' button).
If the sensor is removed from the cradle without instructing it to start recording, it will power-off
and wait until it is placed in the cradle again before restarting.
Sensor state indication
The operational state of the sensor can be determined by the state of the LED on the front panel of the
sensor.
When the sensor is placed in the USB cradle it will immediately wake-up (and stop recording if it was
recording - writing any completed measurements to the flash first). The green LED will pulse
approximately once per second whilst in this state. The sensor will enumerate on any connected computer
as a USB HID device and will respond to USB messages.
If the sensor is removed from the USB cradle at this point, the red LED will flash rapidly ten times,
before the sensor goes back to a low-power sleep state. Hence, the sensor can be put back into a
low-power sleep state at any time by placing it in the USB cradle until the green LED begins to pulse,
and then removing it again.
If the sensor is not removed from the USB cradle and is instructed to record (via a USB message), the
green LED will turn amber for two pulses indicating that the serial flash is being erased ready for new
data to be written to it. When the sensor is now removed from the USB cradle, the green LED will flash
rapidly ten times to indicate that recording will start.
Recording starts with an initial installation period during which PIR events will be indicated by a
green or red LED flash (the colour of the LED and the length of the installation periods is determined
in the USB message). This installation is either followed by a sleep period while the sensor waits for
the appropriate time to start recording, or recording will start immediately, with a short calculated
delay to ensure that all measurements are rounded to the interval between samples. For example, if the
interval between measurements is 5 minutes, the time of the first measurement will occur at a time
divisible by 5 minutes (i.e. 12:05 and not 12:04).
The sensor may be instructed to flash the LED in response to a PIR event during normal recording
(outside of the installation period) but this is only intended for testing purposes and will
significantly increase the energy consumption of the sensor.
It is possible to cancel a record measure before the sensor is removed from the USB cradle by sending a
shutdown message. But it is also possible to simply cancel recording, by removing and replacing the
sensor in the USB cradle as described above.
When the maximum number of recording events is reached, or the serial flash is full, recording will stop
and the sensor will flash the red LED rapidly 10 times, before going back to a low-power sleep state.