Auto-update blog content from Obsidian: 2025-06-25 15:27:27
All checks were successful
Blog Deployment / Check-Rebuild (push) Successful in 6s
Blog Deployment / Build (push) Has been skipped
Blog Deployment / Deploy-Staging (push) Successful in 10s
Blog Deployment / Test-Staging (push) Successful in 2s
Blog Deployment / Merge (push) Successful in 6s
Blog Deployment / Deploy-Production (push) Successful in 9s
Blog Deployment / Test-Production (push) Successful in 2s
Blog Deployment / Clean (push) Has been skipped
Blog Deployment / Notify (push) Successful in 3s

This commit is contained in:
Gitea Actions
2025-06-25 15:27:27 +00:00
parent 0be3fe6ec1
commit 3d34e7f5ee
4 changed files with 97 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
---
slug: home-assistant-node-red-ac-automation
title: home-assistant-node-red-ac-automation
description:
date:
draft: true
tags:
categories:
---
## Intro
Dans mon appartement, jai un système de climatisation Daikin, qui me permet de rafraîchir en été mais aussi de chauffer en hiver. Il est composé de 3 unités intérieures :
- Salon
- Chambre parentale
- Couloir (juste en face de mon bureau et de la chambre de mon fils)
Jai toujours trouvé ça pénible de devoir les allumer manuellement quand jen avais besoin, et joubliais souvent de les éteindre ensuite, sans parler de la télécommande que je passais mon temps à chercher.
Et si je pouvais automatiser tout ça ? Après tout, jutilise déjà Home Assistant pour piloter beaucoup de choses chez moi, alors contrôler la clim, ça me semble logique.
### Home Assistant
Home Assistant, cest le cerveau de ma maison connectée. Il relie tous mes appareils (lumières, capteurs, volets, etc.) dans une interface unique. Sa vraie force, cest la possibilité de créer des automatisations : _si quelque chose se passe, alors fais ça_. Des actions simples comme “allumer la lumière de la cuisine quand un mouvement est détecté” se mettent en place en quelques clics. Et pour des scénarios plus avancés, Home Assistant propose un système de scripts en YAML avec des conditions, des minuteries, des déclencheurs, et même du templating.
Mais dès quon commence à faire des automatisations un peu complexes, qui dépendent de plusieurs capteurs, dhoraires spécifiques ou de la présence de quelquun, ça devient vite difficile à lire. Les blocs de code YAML sallongent, et on ne sait plus trop ce qui fait quoi, surtout quand on veut corriger un petit détail plusieurs semaines plus tard.
### Node-RED
Cest exactement pour ça que je suis passé à Node-RED. Cest un outil visuel qui permet de construire des logiques avec des blocs appelés “nœuds”, quon relie entre eux avec des flèches pour créer un **flow**. Chaque nœud fait une petite action : déclencher à une certaine heure, vérifier une condition, envoyer une commande à un appareil, etc. Au lieu décrire du YAML, on glisse les éléments, on les connecte, et cest tout.
Node-RED ne remplace pas Home Assistant, il le renforce. Je ne détaillerai pas l'installation de Node-RED ni son intégration à HA, je l'ai fait il y a deux ans, mais de mémoire c'est assez simple.
## Previous Workflow
I was already having a good solution to control my AC from Home Assistant with Node-RED, but I wanted to enhance it to also handle the humidity level at home. My current workflow, despite being functional, was not really scalable and quite hard to maintain.
![Ancien workflow Node-RED du contrôle de la climatisation](img/node-red-ha-ac-automation-before.png)
Instead of tweaking this workflow, I created a new one from scratch, with the same goal in mind: control the AC system by taking into account all available sensors: thermometers, humidity, door sensors, occupant presence, time of day, etc.
## New Workflow
![node-red-new-ac-workflow-with-legend.png](img/node-red-new-ac-workflow-with-legend.png)

View File

@@ -0,0 +1,49 @@
---
slug: home-assistant-node-red-ac-automation
title: home-assistant-node-red-ac-automation
description:
date:
draft: true
tags:
categories:
---
## Intro
In my apartment I have a Daikin air conditioning system, to cool it down in summer, but also warm it up in winter. It is composed of 3 indoor units:
- Living room
- Master bedroom
- Hallway (in front of my office and my kid's room)
I always find it boring to have to turn them on when I needed, I forgot to turn them off when I should and I was constantly chasing the remote.
What if I could automate it? After all, I already use Home Assistant to control many devices at home, controlling the AC seems natural to me.
### Home Assistant
Home Assistant is the brain of my smart home. It connects all my devices (lights, sensors, shutters, etc.) under a single interface. What makes it so powerful is the ability to create automations: if something happens, then do something else. Simple things like “turn on the kitchen light when the motion sensor is triggered” are a breeze. For more advanced workflows, it offers YAML-based scripts with conditions, delays, triggers, and templates.
That said, once automations start getting more complex, like reacting to multiple sensors, time ranges, or presence detection, they can quickly turn into long, hard-to-follow blocks of code. Its easy to lose track of what does what, especially when you want to tweak just one small part weeks later.
### Node-RED
Thats exactly why I turned to Node-RED. Its a visual tool that lets you build logic using blocks called “nodes,” which you connect with wires to create flows. Each node performs a small task: trigger at a certain time, check a condition, send a command to a device, etc. Instead of writing YAML, you just drag, drop, and connect.
Node-RED does not replace Home Assistant, it empowers it. I won't cover the installation of Node-RED neither the integration in HA, I've done that 2 years ago, but for that I remember, this is quite straightforward.
## Previous Workflow
I was already having a good solution to control my AC from Home Assistant with Node-RED, but I wanted to enhance it to also handle the humidity level at home. My current workflow, despite being functional, was not really scalable and quite hard to maintain.
![Ancien workflow Node-RED du contrôle de la climatisation](img/node-red-ha-ac-automation-before.png)
Instead of tweaking this workflow, I created a new one from scratch, with the same goal in mind: control the AC system by taking into account all available sensors: thermometers, humidity, door sensors, occupant presence, time of day, etc.
## New Workflow
![node-red-new-ac-workflow-with-legend.png](img/node-red-new-ac-workflow-with-legend.png)