Auto-update blog content from Obsidian: 2025-06-27 07:24:19
All checks were successful
Blog Deployment / Check-Rebuild (push) Successful in 5s
Blog Deployment / Build (push) Has been skipped
Blog Deployment / Deploy-Staging (push) Successful in 9s
Blog Deployment / Test-Staging (push) Successful in 3s
Blog Deployment / Merge (push) Successful in 6s
Blog Deployment / Deploy-Production (push) Successful in 9s
Blog Deployment / Test-Production (push) Successful in 3s
Blog Deployment / Clean (push) Has been skipped
Blog Deployment / Notify (push) Successful in 2s
All checks were successful
Blog Deployment / Check-Rebuild (push) Successful in 5s
Blog Deployment / Build (push) Has been skipped
Blog Deployment / Deploy-Staging (push) Successful in 9s
Blog Deployment / Test-Staging (push) Successful in 3s
Blog Deployment / Merge (push) Successful in 6s
Blog Deployment / Deploy-Production (push) Successful in 9s
Blog Deployment / Test-Production (push) Successful in 3s
Blog Deployment / Clean (push) Has been skipped
Blog Deployment / Notify (push) Successful in 2s
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
---
|
||||
slug: ac-automation-home-assistant-node-red
|
||||
title: home-assistant-node-red-ac-automation
|
||||
description:
|
||||
date:
|
||||
title: Full AC Automation with Home Assistant and Node-RED
|
||||
description: How I automate my AC with Home Assistant and Node-RED to react to temperature, humidity and all daily events.
|
||||
date: 2025-06-27
|
||||
draft: true
|
||||
tags:
|
||||
- home-automation
|
||||
- home-assistant
|
||||
- node-red
|
||||
categories:
|
||||
- automation
|
||||
---
|
||||
## Intro
|
||||
|
||||
@@ -662,8 +666,36 @@ The second node is another `call service node` which will start the lock timer o
|
||||
|
||||
#### 17. Manual Intervention
|
||||
|
||||
Sometime, for some reason, we want to use the AC manually. When we do, we don't want the workflow to change our manual setting, at least for some time.
|
||||
Sometime, for some reason, we want to use the AC manually. When we do, we don't want the workflow to change our manual setting, at least for some time. Node-RED is using its own user in Home Assistant, so when an AC unit change state without this user, this was manually done.
|
||||
|
||||
The first node is a `trigger state node`, which will send a message when any AC unit is changing state:
|
||||

|
||||
|
||||
The second is a `function node` which willassociate the unit with its timer:
|
||||
```js
|
||||
const association = {
|
||||
"climate.clim_salon": "timer.minuteur_clim_salon",
|
||||
"climate.clim_chambre": "timer.minuteur_clim_chambre",
|
||||
"climate.clim_couloir": "timer.minuteur_clim_couloir"
|
||||
};
|
||||
|
||||
msg.payload = association[msg.topic];
|
||||
return msg;
|
||||
```
|
||||
|
||||
The third is a `switch node` that will let through the message when the user_id is not the Node-RED user's one:
|
||||

|
||||
|
||||
The fourth is another `switch node` which checks if there are any `user_id`:
|
||||

|
||||
|
||||
Lastly, the final node is a `call service node` using `start` service on the unit's timer with its default duration (60 minutes):
|
||||

|
||||
|
||||
## TL;DR
|
||||
|
||||
With this setup, my AC system is fully automated, from cooling in summer to warming in winter, while keeping in check the humidity level.
|
||||
|
||||
This required quite a lot of thinking, tweaking and testing, but finally I'm now very happy with the results, that's why I'm sharing it with you, to give you some ideas about what you can do in home automation.
|
||||
|
||||
If you think I could have done things differently, please reach out to me to discuss about it, do not hesitate to share your ideas as well!
|
@@ -1,11 +1,15 @@
|
||||
---
|
||||
slug: ac-automation-home-assistant-node-red
|
||||
title: home-assistant-node-red-ac-automation
|
||||
description:
|
||||
date:
|
||||
title: " Automatisation complète de la clim avec Home Assistant et Node-RED"
|
||||
description: Comment j’automatise ma clim avec Home Assistant et Node-RED pour réagir à la température, l’humidité et à tous les évènements quotidiens.
|
||||
date: 2025-06-27
|
||||
draft: true
|
||||
tags:
|
||||
- home-automation
|
||||
- home-assistant
|
||||
- node-red
|
||||
categories:
|
||||
- automation
|
||||
---
|
||||
## Intro
|
||||
|
||||
@@ -644,7 +648,62 @@ Le premier nœud est un autre `call service node` utilisant le service `set_temp
|
||||
|
||||
Encore une fois, ce nœud est suivi d’un `delay node` de 5 secondes.
|
||||
|
||||
#### 15.
|
||||
#### 16.
|
||||
#### 17.
|
||||
#### 15. Vérification
|
||||
|
||||
L’action `check` est utilisée presque tout le temps. Elle consiste uniquement à vérifier et comparer la vitesse de ventilation souhaitée, et à la modifier si nécessaire.
|
||||
|
||||
Le premier nœud est un `switch node` qui vérifie si la valeur `speed` est définie :
|
||||

|
||||
|
||||
Le deuxième est un autre `switch node` qui compare la valeur `speed` avec la vitesse actuelle :
|
||||

|
||||
|
||||
Enfin, le dernier nœud est un `call service node` utilisant le service `set_fan_mode` pour définir la vitesse du ventilateur :
|
||||

|
||||
|
||||
#### 16. Arrêt
|
||||
|
||||
Lorsque l’action est `stop`, l’unité de climatisation est simplement arrêtée.
|
||||
|
||||
Le premier nœud est un `call service node` utilisant le service `turn_off` :
|
||||

|
||||
|
||||
Le deuxième nœud est un autre `call service node` qui va démarrer le minuteur de verrouillage de cette unité pour 45 secondes.
|
||||
|
||||
#### 17. Intervention Manuelle
|
||||
|
||||
Parfois, pour une raison ou une autre, on souhaite utiliser la climatisation manuellement. Dans ce cas, on ne veut pas que le flux Node-RED vienne écraser notre réglage manuel, du moins pendant un certain temps.
|
||||
Node-RED utilise son propre utilisateur dans Home Assistant, donc si une unité change d’état sans cet utilisateur, c’est qu’une intervention manuelle a eu lieu.
|
||||
|
||||
Le premier nœud est un `trigger state node`, qui envoie un message dès qu’une unité AC change d’état :
|
||||

|
||||
|
||||
Le deuxième est un `function node` qui associe l’unité avec son minuteur :
|
||||
```js
|
||||
const association = {
|
||||
"climate.clim_salon": "timer.minuteur_clim_salon",
|
||||
"climate.clim_chambre": "timer.minuteur_clim_chambre",
|
||||
"climate.clim_couloir": "timer.minuteur_clim_couloir"
|
||||
};
|
||||
|
||||
msg.payload = association[msg.topic];
|
||||
return msg;
|
||||
```
|
||||
|
||||
Le troisième est un `switch node` qui laisse passer le message uniquement si le `user_id` **n’est pas** celui de Node-RED :
|
||||

|
||||
|
||||
Le quatrième est un autre `switch node` qui vérifie que le champ `user_id` **est bien défini** :
|
||||

|
||||
|
||||
Enfin, le dernier nœud est un `call service node` utilisant le service `start` sur le minuteur de l’unité, avec sa durée par défaut (60 minutes) :
|
||||

|
||||
|
||||
## TL;DR
|
||||
|
||||
Avec cette configuration, mon système de climatisation est entièrement automatisé, du refroidissement en été au chauffage en hiver, tout en gardant un œil sur le taux d’humidité.
|
||||
|
||||
Cela m’a demandé pas mal de réflexion, d’ajustements et de tests, mais au final je suis vraiment satisfait du résultat. C’est pourquoi je le partage ici, pour vous donner des idées sur ce qu’on peut faire en domotique.
|
||||
|
||||
Si vous pensez que certaines choses pourraient être faites autrement, n’hésitez pas à me contacter pour en discuter ou me proposer de nouvelles idées !
|
||||
|
||||
|
BIN
static/img/node-red-call-service-node-start-unit-timer.png
Normal file
BIN
static/img/node-red-call-service-node-start-unit-timer.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
BIN
static/img/node-red-switch-node-check-user-id.png
Normal file
BIN
static/img/node-red-switch-node-check-user-id.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
BIN
static/img/node-red-switch-node-user-id.png
Normal file
BIN
static/img/node-red-switch-node-user-id.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
Reference in New Issue
Block a user