The first time the system is turned on some additional configuration steps must be taken:
-
Launch the start_System.py script which will automatically update some configuration parameters in the ESP32 Firmware (more info in the firmware readme), build all the system's docker containers and then compose up the system.
-
Open in your browser the Home Assistant Interface on the same computer where docker is running and follow the registration steps.
-
After reaching the Home Assistant dashboard the after_HA.py script must be run to setup the MQTT and localIP integrations needed for Home Asistant to work with the system.
-
Follow closely the steps given by the after_HA.py script.
-
Now in the dashboard the IP of the system will be shown, take note of it as it will be useful to open the Home Assistant interface from other devices.
This can be achieved by opening the urlhttp://systemIP:8123
. -
Some features will not be available until at least one esp32 is flashed with the firmware and turned on.
-
Enjoy
!
To run the system again one must only run the command docker compose up
inside the smart-power-module root directory.
Running the code in "modulesEmulator.py" it is possible to generate data and register devices.
To register devices for the first time these two lines of code should be used:
self.deviceReg()
json.dump(self.devices, open('modulesEmulator/devices.json', 'w'))
If the devices are already registered instead this line is needed:
self.devices = json.load(open('modulesEmulator/devices.json'))
To publish data instead, this function should be used:
self.publishApp('normal')
Different types of data can be created, simulating many possible scenarios. The different modes are:
faulty
: some appliances are broken \blackout
: a blackout is taking place \maxpower
: a module exceeds its power consumption limit \contatore
: the power consumption of the house exceeds the limit of the electric meter \normal
: no anomalies \standbypower
: parasitic consumptions are detected \
https://docs.google.com/presentation/d/1cvTFww02qiSiqT2pnZ6O6KxKMdXNd0_R-qigwHpraIU
Promo : https://youtu.be/lid0qi2tw2s?si=_4skZYMqz2Kq8BCT
Demo : https://youtu.be/WwddRuyb4sg
- The Home Assistant integration used to calculate the cost of the consumed energy seems to not work in the current version of Home Assistant.