Malavika Status Report 11/6/21

Continuing from last week’s status report, this week entailed presenting the use cases for the website as well as the layout for the graphical controls interface users can interact with in order to control the lights as well as the sensors in the system. I showed Professor Yu and our TA the vision I had in mind which includes four separate switches on the webserver which can turn each of the four light switches on or off. The controls page will also contain a switch to override the automatic weighting of the PIR and microphone sensors and allows users to turn a knob and specify the relative weights of the sensors when deciding to turn on or off a light.

Professor Yu suggested that when the webserver is not overriding the Raspberry Pi, users should be able to view what the control weight settings currently are in automatic mode to allow them to make a more informed decision when manually setting the sensor weights.

I also established in our weekly meeting that there will be a bidirectional communication channel between the webserver and the Raspberry Pi, which serves as the broker in the Mosquitto communication protocol our system uses.

The rest of the week I was going through the MQTT tutorial to interact from the web server to the Raspberry Pi. I established that the next immediate step was to communicate to the Raspberry Pi, and worry about the other direction later. I got the dummy website I was building through the tutorial to connect with the Raspberry Pi after debugging with Ryan, Diva, and Professor Mukherjee (see images below). While the webserver can establish a connection with the Pi through the websockets protocol on a specific port and subscribe to the pir/data topic, it is unable to actually send messages, which I will debug after the demo. As of now, it is simply a matter of transferring the functionality from the dummy server to the controls user interface on the actual website and editing the current JavaScript to support this action.

For the demo, I will display the website and graphical interface itself as well as its ability to connect to the Raspberry Pi.

Leave a Reply

Your email address will not be published. Required fields are marked *