One program generates a home power consumption value, and the other receives it, gets a Photovoltaic power value based on the hour, and outputs the sum. All of this is printed to the consoles. These values are written to a .csv file with a timestamp.
- python 3.7 (type "python --version" in the terminal)
- rabbitmq 3.6.10 (type "sudo rabbitmqctl status" in the terminal, followed by your password)
- pika 1.1.0 (Type "sudo pip install pika" in the terminal)
2. Open two terminals, go to the directory containing homepowerproducer.py and homepowerconsumer.py.
4. In the other, type 'python3 homepowerconsumer.py'. Messages will be received, and an output of the sum of the PV values and the home power consumption wattage will be printed.
5. A wattage.csv file will be created. Feel free to open this as a spreadsheet, or use pandas to work with the data in a dataframe.
At any time in either terminal, press CTRL + C to stop the program.