Bachelor's Thesis

Control of a Photovoltaic System Using Home Assistant

Final Thesis 4.73 MB

Author of thesis: Václav Schubert

Acad. year: 2025/2026

Supervisor: Ing. Zdeněk Materna, Ph.D.

Reviewer: prof. Dr. Ing. Pavel Zemčík, dr. h. c.

Abstract:

The aim of this bachelor’s thesis is to optimize the utilization of electrical energy in a smart household. To accomplish this goal effectively, a photovoltaic system with the option to store generated energy is required. Additionally, such a system needs to be able to import and export electrical energy in line with market prices. The energy purchase price is either dynamic (spot) or fixed, and the proposed solution accounts for both. Selling energy is strictly based on the state of the market. The proposed implementation takes into account predicted photovoltaic production, household consumption, and the battery's state of charge to achieve a mathematically optimal strategy for the 24-hour horizon. The optimal solution is obtained using Mixed-Integer Linear Programming (MILP), where the objective function is defined and the constraints are derived from physical laws, such as conservation of energy in a closed system. The implementation, built into the Home Assistant ecosystem, works as an autonomous custom integration that helps minimize electrical costs and reduce strain on the electrical distribution network.

Keywords:

Home Assistant, automation, photovoltaic system, MILP, optimization, smart home, custom integration, Home Energy Management System

Date of defence

17.06.2026

Result of the defence

Defended (thesis was successfully defended)

znamkaBznamka

Grading

B

Process of defence

Student nejprve prezentoval výsledky, kterých dosáhl v rámci své práce. Komise se poté seznámila s hodnocením vedoucího a posudkem oponenta práce. Student následně odpověděl na otázky oponenta a na další otázky přítomných. Komise se na základě posudku oponenta, hodnocení vedoucího, přednesené prezentace a odpovědí studenta na položené otázky rozhodla práci hodnotit stupněm B.

Topics for thesis defence

  1. Please, would it be possible to explain the meaning of Figure 5.1 and Figure 5.2, ideally including a description of the axes?
  2. Please, as part of the evaluation of the work, would it be possible to provide a simple, specific example of price savings that can be achieved by using its results?
  3. Please, what would it involve to expand the work so that it also works with inverters other than the Solax brand?
  4. Můžete okomentovat prezentovaný graf?
  5. Jaké má Vaše řešení význam, když už existují jiné používané nástroje?
  6. Jakým způsobem řešíte záporné ceny energií?

Language of thesis

English

Faculty

Department

Study programme

Information Technology (BIT)

Composition of Committee

doc. Ing. František Zbořil, CSc. (předseda)
doc. Ing. Michal Španěl, Ph.D. (místopředseda)
Ing. Jan Pluskal, Ph.D. (člen)
Ing. Aleš Smrčka, Ph.D. (člen)
Ing. Josef Strnadel, Ph.D. (člen)

Supervisor’s report
Ing. Zdeněk Materna, Ph.D.

Celkově práci hodnotím jako kvalitní a technicky obhajitelnou bakalářskou práci. Student vytvořil reálnou implementaci pro Home Assistant a text práce logicky vysvětluje motivaci, návrh, implementaci i ověření. Hlavní rezervy vidím v nepravidelné komunikaci během řešení a ve způsobu ověření výsledků. U řízení domácí FVE je plně reprodukovatelné testování v reálném provozu obtížné, ale metodika a podklady k hlavním výsledkům mohly být popsány přesvědčivěji. V implementaci zůstávají také dílčí technické rezervy v robustnosti optimalizační části a v ošetření okrajových stavů.

Evaluation criteria Verbal classification
Informace k zadání

Zadání hodnotím jako nadprůměrně náročné pro bakalářskou práci, protože vyžadovalo propojení rešerše, návrhu optimalizačního řízení, implementace pro Home Assistant a ověření v reálném prostředí FVE. Pan Schubert vytvořil vlastní integraci pro Home Assistant s optimalizačním jádrem a celkově kvalitní praktický výsledek. Zadání považuji za celkově splněné. Testování takového systému je v reálném provozu obtížné, přesto zde zůstávají dílčí rezervy ve způsobu doložení metodiky a hlavních výsledků.

Práce s literaturou

Student pracoval s relevantními zdroji k platformě Home Assistant, systémům řízení energie v domácnosti, fotovoltaice, komunitní energetice a existujícím komerčním i open-source řešením. Práce s literaturou je přiměřená prakticky zaměřené bakalářské práci; slouží hlavně k vymezení problému, srovnání dostupných přístupů a návrhu vlastního řešení.

Aktivita během řešení, konzultace, komunikace

Průběh řešení nebyl ideální. Zpočátku konzultace probíhaly, poté se student delší dobu ozýval jen omezeně a komunikace nebyla pravidelná. V závěru nicméně dodal kvalitní výsledek.

Aktivita při dokončování

Při dokončování práce proběhlo několik iterací připomínek a student na ně v podstatné míře reagoval. Práce se tak dostala do ucelené a obhajitelné podoby.

Publikační činnost, ocenění

K této části nemám další komentář.

Points proposed by supervisor: 82

Grade proposed by supervisor: B

Overall, this is a successful work. The text of the work is well-written and the implementation part also appears to be functional and useful. Despite the reservations mentioned above, I rate the work as very good (B).

Evaluation criteria Verbal classification Points
Náročnost zadání

Evaluation level: obtížnější zadání

I consider the assignment to be rather more difficult. It is focused on minimizing the cost of energy through the control of a photovoltaic power plant. I consider the assignment to be more difficult because it required the student to study power plant control systems and a number of subcomponents and their interfaces. In addition, the assignment was written in English.

Prezentační úroveň technické zprávy

The presentation level of the work is good. The work summarizes the current state quite concisely. It also describes the proposed solution, implementation and evaluation. However, the author described the proposed optimization method somewhat briefly. He illustrated it with pictures, but they do not "help" much in understanding the proposed procedures. (The axes are not described in Figure 5.1 or 5.2, so one can only guess what they are supposed to represent.) However, the concept of integrating the method is already described well. In the description of the implementation itself, the author did not avoid providing not entirely necessary details that make the work difficult to read. In the testing and evaluation, a number of details are provided, but I do not see any simple example of calculating savings that would be suitable.

75
Formální úprava technické zprávy

In terms of formal and typographical aspects, the work is very nicely done and there is almost nothing to criticize, except perhaps for the small text in the illustrations, especially in Figure 3.1.

95
Realizační výstup

According to the attached documentation, video presentation and source files, the implementation output appears to be fully functional, but realistically I did not have the opportunity to verify it. In my opinion, it would have been good to give a better example of the "value" of the output in the text of the work. However, I still rate it as fully functional.

90
Využitelnost výsledků

I believe that the output of the work, although currently probably limited to Solax inverters, is well usable in practice (Solax inverters are very widespread). However, it would be appropriate to extend it to other inverter models.

Rozsah splnění požadavků zadání

Evaluation level: zadání splněno

I believe that the assignment has been completed.

Rozsah technické zprávy

Evaluation level: je v obvyklém rozmezí

The text of the thesis is within the usual range and safely meets the requirements.

Práce s literaturou

The work contains a number of literary references that represent good sources of information for the work, but unfortunately, many of them cannot be considered references to literature (for example, references [1], [3], [4], [7]... are links to Wikipedia and online documents that do not show signs of literature), some references are incomplete (for example, reference [5] is missing almost everything, similarly [17], [19]), etc. In general, I do not consider the section of references to literature to be well-written.

70
Topics for thesis defence:
  1. Please, would it be possible to explain the meaning of Figure 5.1 and Figure 5.2, ideally including a description of the axes?
  2. Please, as part of the evaluation of the work, would it be possible to provide a simple, specific example of price savings that can be achieved by using its results?
  3. Please, what would it involve to expand the work so that it also works with inverters other than the Solax brand?
Points proposed by reviewer: 83

Grade proposed by reviewer: B

Responsibility: Mgr. et Mgr. Hana Odstrčilová