Niko’s Status Report for 4-5

Niko’s Status Report for 4-5

This week I did a lot of work on the interaction layer in preparation for the demo on Monday. Here are the following areas I worked on:

  • Setup / install scripts:
    • While user-friendly device commissioning is not in the scope of our project, the fact remains that we still have to “commission” devices during development. This involves creating an aws VM, cloning the appropriate repos, installing dependencies, setting up python virtual environments, initializing device configs, initializing the database, etc. Since this is not something anybody wants to do more than once or twice, I created setup scripts for both the frontend webapp and the interaction layer. I also made a top level script that will clone all the repos and run all their setup scripts. That way after starting a fresh vm, all you need to do is scp the top level script and run it, and then wait for it to finish.
  • Integration:
    • I spent a lot of time this week working to integrate the interaction and frontend webapp layers. Currently, the interaction layer is able to start and run the frontend, and I have written the setup scripts for both layers. For next week, I still need to tie the webapp’s backend into the interaction layer so that it no longer has hardcoded dummy data.
  • Master process:
    • I initially wrote the master process in python, since that is what the rest of the interaction layer is written in. However, I quickly realized that all I was doing was running shell commands from python, such as checking if a process was up and then starting it if not. It doesn’t really make sense to be runningĀ only bash commands from within Python, and Python wasn’t making my life easier. I decided it would be better to implement the master in bash as a script. This greatly simplified its logic, and made it a more elegant program. The master is in charge of starting and keeping alive the frontend webapp, node process, and mqtt broker. Once the interaction layer is integrated with the hardware layer, it will also be in charge of starting and keeping alive the hardware simulation webapp.
  • Node interactions:
    • I got the nodes to be able to subscribe and publish to each other, and react to data from other nodes. While the actual definition of an “interaction” needs to be ironed out a bit between me and Richard (front end webapp), the infrastructure is now in place.

Leave a Reply

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