Compare commits
3
Commits
b129854f54
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3eaeeaf644 | ||
|
|
0a285ecba6 | ||
|
|
ad7c0ac596 |
@@ -0,0 +1,59 @@
|
||||
# Bug AppDaemon 4.5.10 : trafic HASS constant (~400-450 KB/s)
|
||||
|
||||
## Symptôme
|
||||
Après ~10 minutes de fonctionnement (temps depuis le démarrage d'AppDaemon,
|
||||
pas de Home Assistant), le trafic réseau du container grimpe à ~400-450 KB/s
|
||||
et reste stable indéfiniment, même sans aucune app chargée.
|
||||
|
||||
## Cause
|
||||
Bug upstream corrigé par [AppDaemon/appdaemon#2429](https://github.com/AppDaemon/appdaemon/pull/2429),
|
||||
inclus depuis la version **4.5.12**. Dans `plugin_management.py`,
|
||||
`update_plugin_state()` appelle `refresh_update_time(plugin)` (l'objet plugin)
|
||||
au lieu de `refresh_update_time(plugin.name)` (la string). Le timestamp utilisé
|
||||
par `time_since_plugin_update(plugin.name)` n'est donc jamais remis à jour :
|
||||
une fois le `refresh_delay` par défaut (10 min) dépassé, AppDaemon redemande
|
||||
l'état complet de Home Assistant (`get_states`) à **chaque tick de la boucle
|
||||
utilitaire (1x/seconde)**, indéfiniment.
|
||||
|
||||
## Statut
|
||||
- Corrigé depuis AppDaemon 4.5.12 (12 oct. 2025). Si l'image utilisée est en
|
||||
4.5.12+, ce fix n'est plus nécessaire.
|
||||
- Toujours utile si on reste bloqué sur une version < 4.5.12.
|
||||
|
||||
## Comment réappliquer le patch (si toujours sur AppDaemon < 4.5.12)
|
||||
|
||||
Fichier concerné : `/usr/local/lib/python3.12/site-packages/appdaemon/plugin_management.py`
|
||||
|
||||
Chercher (dans la méthode `update_plugin_state`) :
|
||||
|
||||
```python
|
||||
finally:
|
||||
await self.refresh_update_time(plugin)
|
||||
```
|
||||
|
||||
Remplacer par :
|
||||
|
||||
```python
|
||||
finally:
|
||||
await self.refresh_update_time(plugin.name)
|
||||
```
|
||||
|
||||
Une seule ligne à changer. Une commande one-liner pour l'appliquer dans le
|
||||
container :
|
||||
|
||||
```sh
|
||||
sed -i 's/await self.refresh_update_time(plugin)$/await self.refresh_update_time(plugin.name)/' \
|
||||
/usr/local/lib/python3.12/site-packages/appdaemon/plugin_management.py
|
||||
```
|
||||
|
||||
⚠️ Ce patch vit dans l'image du container (site-packages), pas dans `/conf`.
|
||||
Il est donc perdu à chaque recréation du container et doit être réappliqué
|
||||
manuellement tant que l'image reste en 4.5.10/4.5.11.
|
||||
|
||||
## Comment vérifier que le patch est actif
|
||||
|
||||
```sh
|
||||
grep -n "refresh_update_time(plugin" /usr/local/lib/python3.12/site-packages/appdaemon/plugin_management.py
|
||||
```
|
||||
|
||||
Doit afficher `refresh_update_time(plugin.name)` (pas `refresh_update_time(plugin)` seul).
|
||||
@@ -139,7 +139,7 @@ living_room_heatpump:
|
||||
virtual_sensors:
|
||||
sensors:
|
||||
binary_sensor.living_room_any_window_open: binary_sensor.living_room_french_door or binary_sensor.living_room_window
|
||||
binary_sensor.living_room_cant_open_window: binary_sensor.is_living_room_sleeping or binary_sensor.projector_on
|
||||
binary_sensor.living_room_cant_open_window: binary_sensor.is_living_room_sleeping or binary_sensor.projector_on or sensor.ext_back_humidity > 65
|
||||
value_selector.living_room_heatpump_fan_mode:
|
||||
auto: binary_sensor.heatpump_winter_mode or room_temperature > target_temperature + 1
|
||||
quiet: True
|
||||
@@ -173,3 +173,46 @@ living_room_heatpump:
|
||||
quick_resume:
|
||||
sensor: binary_sensor.living_room_heatpump_quick_resume
|
||||
reset_events: good_morning
|
||||
|
||||
guestroom_heatpump:
|
||||
module: smartheatpump
|
||||
class: SmartHeatpump
|
||||
entity: climate.guestroom_heatpump
|
||||
|
||||
templates_library: smart_heating_templates_library
|
||||
|
||||
constants:
|
||||
window_open: binary_sensor.guestroom_window
|
||||
ext_temperature: sensor.ext_front_temperature
|
||||
room_temperature: sensor.guestroom_temperature
|
||||
room_occupancy: binary_sensor.guestroom_occupancy
|
||||
target_temperature: sensor.target_temperature_heatpump
|
||||
cant_open_window: binary_sensor.is_guestroom_sleeping
|
||||
sleeping_in_the_room: binary_sensor.is_guestroom_sleeping
|
||||
quick_resume: binary_sensor.guestroom_heatpump_quick_resume
|
||||
occupied_tonight: input_boolean.guestroom_occupied_tonight
|
||||
stay_on_while_sleeping: false
|
||||
|
||||
virtual_sensors:
|
||||
sensors:
|
||||
value_selector.guestroom_heatpump_fan_mode:
|
||||
auto: binary_sensor.heatpump_winter_mode or room_temperature > target_temperature + 1
|
||||
quiet: True
|
||||
|
||||
target_temperature: sensor.target_temperature_heatpump - 0.5
|
||||
hvac_mode: "binary_sensor.heatpump_winter_mode ? 'heat' : 'cool'"
|
||||
fan_mode: sensor.guestroom_heatpump_fan_mode
|
||||
|
||||
smart_conditions:
|
||||
callback_delay: 10 # on the morning it can happen that we ask to start and stop the heat pump immediately afterwards which in result in the heat pump ignoring the second command
|
||||
template_conditions: <clim_conditions>
|
||||
|
||||
quick_resume:
|
||||
sensor: binary_sensor.guestroom_heatpump_quick_resume
|
||||
reset_events: good_morning
|
||||
|
||||
control_mode_selector:
|
||||
sensor: input_select.guestroom_heatpump_override
|
||||
reset_events:
|
||||
- good_morning
|
||||
- good_bye
|
||||
@@ -56,6 +56,9 @@ occupancy_sensors:
|
||||
binary_sensor.bedroom_occupancy:
|
||||
trigger_conditions: binary_sensor.is_bedroom_sleeping or binary_sensor.day_interval_night
|
||||
blocking_conditions: not binary_sensor.someone_home
|
||||
binary_sensor.guestroom_occupancy:
|
||||
trigger_conditions: binary_sensor.is_guestroom_sleeping or binary_sensor.day_interval_night
|
||||
blocking_conditions: not binary_sensor.someone_home or not input_boolean.guestroom_occupied_tonight
|
||||
retain_condition.desk_occupancy:
|
||||
retain_time: 5 * 60
|
||||
conditions:
|
||||
|
||||
Reference in New Issue
Block a user