FANDOM


For the past couple of weeks, it was the Easter break and we all continued with our work on this project while revising. I have completed the gathering data of the energy usage. A new energy database table is being created to store the energy value (in watts) and also the time and date of the energy value being retrieved from the energy monitor. So that the user can get the data by entering a pair of timestamp and a graph will be shown displaying the energy usage. The system will be constantly listening for the energy every 30 seconds. A thread will also be created to store this data in the database periodically.

I've also done the updating of the Raspberry Pi's IP automatically on cloud as the cloud service has to always have the correct RPi's IP address. For a user using the system for the first time, it will have to get the ID of the Raspberry Pi and store it into a .txt file. After it is once stored, the ID will remain the same. The system then polls its IP address to check if it has changed.

'http://robohome.co.uk/ip/ip_update.php?id=' + my_id + '&ip=' + my_ip

In order to check if the ID has already been saved before, it will first check the size of the file (id_RPi.txt). If its zero, it means that the file has just been created and so we get the ID returned from

'http://robohome.co.uk/ip/rpi_id.php?ip=' + my_ip

and the ID will be written in the txt file. In another case where the file is not zero, the open the file and read the ID and send a request to update the IP if it is different.

Also, I did the documentation of the RESTful API early this year and I updated the documentation with the latest version. This few days we will be finishing our writing up on the reports and also preparing for the presentation on Wednesday!

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.