From ERP projects to Home Assistant: building a complex system with ChatGPT without being a programmer

First some background: For many years I worked as a consultant implementing ERP systems in the B2B area.

In nearly all these projects there was one bottleneck: transferring business requirements to the programmers.

Whenever the software standard could not fully cover company-specific processes – and this was actually the case in nearly every larger project – requirements had to be described, understood by developers, programmed and afterwards checked again by the business side.

And exactly at this interface we regularly had problems.

Quite often we only saw from an incorrect implementation that the business side and the programmer had understood different things. Then the next iteration started. This cost time, delayed projects and created frustration on both sides.

In my private Home Assistant project I have now experienced something which feels fundamentally different to me.

As a knowledgeable user I can discuss my requirements directly with ChatGPT, develop them further and then implement them technically, although I cannot program myself. The previously necessary interface to a programmer has therefore largely disappeared.

And exactly because of this I sometimes feel a little bit unleashed in my private Home Assistant project – some chains have been broken!

I can discuss an idea directly, change it, try it and test it. If the result is not correct, I return with the real results and we continue from there.

Here I want to describe how this worked for me.

One more thing in advance: AI did not build all this while I was comfortably sitting in my chair and watching. Behind the current system are around five months of intensive work. I went into dead ends, rejected solutions, changed architecture decisions and tried different versions – always in dialogue with the AI.

The old IT rule is still valid: Garbage in, garbage out. A bad or incomplete requirement will also produce a bad solution with ChatGPT. Maybe only much faster than before.

And another point is important to me: In my opinion this does not work without some IT knowledge.

I do not need to write YAML, Jinja or Python myself. But I need to understand what entities, states, integrations or services are, how systems basically communicate with each other and how to interpret error messages, logs or sensor values.

So without programming experience you can get surprisingly far. Without technical understanding I would not recommend a project of this size.

What did I actually want to achieve?

Like probably many Home Assistant users, I first wanted to bring my different independent home systems together at one central point.

In my case these include following integrations:

  • Daikin cooling and heating system
  • E3DC PV system with battery storage
  • Homematic IP wall and heating thermostats and lighting
  • Blink home monitoring
  • Landroid robotic lawn mower
  • Solcast PV Forecast
  • OpenAI
  • Ollama running locally

But my goal was not to automatically switch a few lights on and off. Personally I do not need a Home Assistant system of this size for that.

It became interesting for me where the possibilities of the individual manufacturer apps end and the different systems can start working together.

One important part became the Daikin cooling and heating control. I already published a separate post about my summer cooling control.

But what started as a relatively simple idea has now become a much larger project.

How did I work with ChatGPT?

At the beginning I built the technical basis: UTM, Home Assistant, InfluxDB, Grafana and Studio Code Server.

I did not build the actual code of my automations, templates and Pyscripts with the visual Home Assistant editor. The code was mainly developed in dialogue with ChatGPT and then implemented directly in Home Assistant. Depending on the task, I inserted the YAML into automations or helpers, or edited the corresponding configuration and Python files with Studio Code Server.

Nevertheless I started with simple things to get familiar with Home Assistant – switching on a light after sunset and switching it off again at a certain time.

Quite quickly there was the temptation to simply tell ChatGPT: “Program this function for me.”

For simple things this works surprisingly well. And exactly this can be a little dangerous. You quickly get the impression that more complex requirements will work in the same way. But with increasing complexity I learned that generating code was no longer the main challenge. The more important question was how the different parts should work together. So my most important lesson became: first clarify the function and architecture, then program. The architecture of my system was not created because I once told ChatGPT: “Design a good Home Assistant architecture for me.” We developed it over many conversations in dialogue.

I described what I wanted to achieve. ChatGPT proposed technical possibilities. I questioned them, changed them or rejected them. Findings from real operation went back into the discussion.

Questions such as which sensor should be leading, which decisions Home Assistant should make, what should remain inside the device logic and which data should only be used for analysis were discussed before programming started.

As the project grew, some old IT principles became important again: do not build the same logic several times if it can be centralized, make one change at a time and do not destroy a working version too early.

New control methods were therefore first tested in my home office, which became my test room. New versions could run in parallel while the working version remained available as a fallback.

And ChatGPT had to be confronted with reality again and again: logs, error messages, screenshots, sensor values and unexpected device behaviour. “It does not work” is bad input. “Target is 22 °C, sensor A reports 21.5 °C, sensor B reports 23.2 °C and the unit is still cooling” is much better input.

Historical data from Home Assistant and InfluxDB also became part of testing. I wanted to know whether a change really improved the control or whether it only felt better.

I also changed how I organize the work with ChatGPT.

The complete Home Assistant topic is inside one ChatGPT project. Larger subjects such as summer control, winter control, PV forecast or Blink have their own conversations. This keeps the individual conversations manageable while decisions and information from other conversations in the same project can still be used.

ChatGPT also became a research tool for me. If a problem occurs, I ask it to search the Home Assistant Community, GitHub and other technical sources for similar experiences. Especially with integrations it is very useful to know whether I am debugging my own mistake or whether other users already have the same problem.

I use the same idea before important updates. Before installing an available Home Assistant update or an important integration update, I first ask ChatGPT what changed and whether there could be conflicts with my installation.

Of course this cannot prevent every problem. But with a system containing many dependencies I do not want to install updates completely blind anymore.

The tools also have their limits

I later also tried ChatGPT Work.

With the Work system integration, ChatGPT could access my Home Assistant system directly. At first I found this quite impressive. The AI could inspect states, entities or files instead of me constantly copying them into the chat.

In practice the first excitement disappeared quite quickly. For larger tasks the performance of the Work system integration was extremely poor for me. Today I therefore use Work mainly for smaller, clearly separated tasks. Architecture, larger changes and error analysis I mostly do in the normal dialogue.

A similar problem appears sooner or later in a normal ChatGPT conversation.

If one conversation grows for weeks and receives more and more decisions, code, logs and error analysis, it eventually becomes difficult to manage and, in my experience, the performance also starts to suffer.

My solution was surprisingly traditional: create a handover, continue in a new conversation and archive the old one. I ask ChatGPT to summarize the architecture, important decisions, productive components, open points and also things which should explicitly no longer be used.

Basically this is exactly what I used to do when responsibilities changed inside a project team. Even when working with AI, a complex project needs documentation, structure and clean handovers.

What has come out of it?

At some point I realized that my private experiment had become a rather complex Home Assistant project. By now several thousand lines of YAML, Jinja and Python code have been created. But the number itself is not really the important point. The complexity comes from the dependencies between real systems.

The Daikin units are controlled in summer using external room temperatures. For winter there is a separate heating strategy which also considers energy prices, PV and forecast information.

The robotic lawn mower does not simply follow a schedule. Its operation is also combined with weather information.

Blink home monitoring is fully integrated into Home Assistant and used in daily operation. Camera events can be processed there and connected with other functions of the house.

PV system, battery storage and Solcast provide information for analysis and other decisions. There are also historical evaluations, push notifications, a central control dashboard and AI-based analysis.

One point is important here: The AI does not autonomously control my house. The actual control decisions remain rule-based in Home Assistant and therefore understandable for me. AI receives structured data and supports analysis, plausibility checks and optimization. This separation was a very deliberate architecture decision.

And despite all this, I still cannot program in the classical sense. I could not write the larger Python code which is now part of the system myself. But I can judge quite precisely what the system should do, why it should do it and whether the implementation is functionally correct.

So my role is less the role of a programmer and more the role of an architect, knowledgeable user and tester.

And where is the real benefit?

This is very important to me.

I do not want to build a technically complex system only because it is possible. If I end up with thousands of lines of code and only do something which could also be done with a simple schedule, then I have missed my goal.

With Blink, for example, camera events can be processed in Home Assistant and notifications can be created according to my own requirements. AI can additionally check whether an event really contains a person and only then trigger the corresponding notification. So I do not need to get out of bed at night because of every spider.

With climate control the benefit is comfort. In summer I want the requested temperature to be reached in the actual room, not only at an unfortunately positioned internal sensor of the air conditioner.

In winter the benefit becomes even more concrete. My Daikin units can heat as air-to-air heat pumps. At the same time I have district heating. Home Assistant should therefore be able to evaluate when one kWh of heat can be produced at lower cost with the Daikin than with district heating. Outdoor temperature, efficiency, electricity cost, PV production and forecast data are some of the factors involved. This has a direct financial benefit.

How large this benefit really is over a complete heating season I will only be able to say seriously after the coming winter. I want to measure such numbers, not ask an AI to estimate them.

There is also another benefit which has become almost as important for me: transparency. I do not only want to see that something is happening. I also want to understand why Home Assistant made this decision.

This is why the project now also contains diagnostic information, push notifications and a central control dashboard.

Where did it go wrong?

ChatGPT can formulate wrong solutions just as convincingly as correct ones. For somebody without programming experience this is not harmless. A piece of code can look very professional and still be functionally wrong.

So AI does not replace testing. Quite the opposite: The more complex the system becomes, the more important testing becomes.

Another interesting experience for me was that ChatGPT can apparently also run into a dead end itself. Once we had decided on a solution path, sometimes this solution was improved further and further. New problems were repaired inside the same approach.

At some point I occasionally started to wonder: Maybe we are repairing something which should be solved differently from the beginning?

A surprisingly useful prompt was: “Please critically review the current approach.”

Sometimes the result was quite remarkable. Assumptions were suddenly questioned and solutions which ChatGPT itself had proposed before were rejected again. This reminded me of my former projects. Sometimes you need somebody who does not continue optimizing the existing solution, but asks again whether you are on the right path at all.

Only today I can also ask ChatGPT to do this review.

My conclusion so far

My conclusion after five months is not that “with ChatGPT everybody can now program.” That would be too simple for me and, from my experience, also wrong.

My conclusion is rather that with AI, a knowledgeable user with sufficient technical understanding can today develop systems for which a programmer would have been necessary before.

The interface between the functional idea and the technical implementation does not disappear completely. But it changes fundamentally.

I can discuss an idea directly, try it, test it, reject it and improve it. ChatGPT does not take away the thinking, testing and decision making. And sometimes I even have to ask ChatGPT explicitly to critically review its own previous approach.

But AI allows me to implement things myself where in the past I would have reached the end of the road when programming started.

And this still feels a little bit to me as if some chains have been broken.

Disclosure: This post describes my own project and experiences. I also used ChatGPT to help me structure the article and translate my German draft into English.

2 Likes