Intégration IPX800 Home Assistant

oui c’est bien ce que j’avais compris et voulais dire si toutefois je n’étais pas clair!

Bonjour à tous,

Tout d’abord un énorme merci à Mati24 pour cette super intégration !

Je test Home Assistant pour remplacer mon Eedomus et la compatibilité de mes 2 IPX800V4 était un prérequis indispensable.

Merci aussi à tous ceux qui ont partagé leur code, cela ma permis jusqu’ici de trouver les solutions à mes problèmes de débutant sur HA :sweat:

J’ai donc 2 IPX800V4 pour lesquels les relais sont bien contrôlés par HA, en revanche je n’ai aucune remontée d’info de mes entrées analogiques et analogiques virtuelles. Je parle pas des remontées via le Push, juste de la mise à jour toutes les 10 minutes…

elles sont à la fin du code, j’ai mal fait quelque chose ? :upside_down_face:

# configuration IPX800V4
ipx800v4: 
    # IPX800V4 GARAGE
  - name: IPX800_V4
    host: 192.168.0.28
    port: 80
    api_key: XXXX
    devices: 
     # Relay
     - name: Eclairage portail et entrée
       type: relay
       component: light
       id: 1
     - name: Déclanchement portail
       type: relay
       component: switch
       id: 2
     - name: Spots extérieurs entrée
       type: relay
       component: light
       id: 3
     - name: Déclanchement porte de garage
       type: relay
       component: switch
       id: 4
     - name: Ouverture portillon
       type: relay
       component: switch
       id: 6
     # X8R 2 : gestion bouches de climatisation
     - name: Bouche Climatisation Garage
       type: relay
       component: switch
       id: 18
     - name: Bouche Climatisation Salon
       type: relay
       component: switch
       id: 19
     - name: Bouche Climatisation Séjour
       type: relay
       component: switch
       id: 21
     - name: Bouche Climatisation Chambre parantale
       type: relay
       component: switch
       id: 22
     - name: Bouche Climatisation Chambre Salomé
       type: relay
       component: switch
       id: 23
     - name: Bouche Climatisation Chamnbre Juliette
       type: relay
       component: switch
       id: 24
     # IPX800V4 PISCINE
  - name: IPX800_PISCINE
    host: 192.168.0.22
    port: 80
    api_key: xxxxx
    username: xxxxx
    password: xxxxx
    devices: 
     # Relay
     - name: Spots Terrasse
       type: relay
       component: light
       id: 1
     - name: Pompe Piscine ON OFF
       type: relay
       component: switch
       id: 2
     - name: Pompe Piscine vitesse 1
       type: relay
       component: switch
       id: 3
     - name: Pompe Piscine vitesse 2
       type: relay
       component: switch
       id: 4
     - name: Pompe Piscine vitesse 3
       type: relay
       component: switch
       id: 5
     - name: Lumière balustrade piscine
       type: relay
       component: light
       id: 7 
       # Entrées analogique
     - component: sensor
       name: Temparature Piscine
       unit_of_measurement: "°C"
       type: analogin
       id: 1
       # Entrées virtuelles analogique
     - component: sensor
       name: PH-Piscine
       unit_of_measurement: "PH"
       type: virtualanalogin
       id: 29
     - component: sensor
       name: REDOX
       unit_of_measurement: "mv"
       type: virtualanalogin
       id: 30

du coté HA :

image


Édit : je viens de voir que si le Relay 1 (spot terrasse) fonctionne bien, les autres ne fonctionnent pas…

il faudrait des logs en debug

Merci pour ton retour,

voici des logs, dis moi si cela n’est pas ça

KeyError: 'A1'
2024-10-04 09:42:55.499 ERROR (MainThread) [homeassistant.components.sensor] Error adding entity sensor.ph_piscine for domain sensor with platform ipx800v4
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 909, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1366, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 542, in state
    value = self.native_value
            ^^^^^^^^^^^^^^^^^
  File "/config/custom_components/ipx800v4/sensor.py", line 125, in native_value
    return self.coordinator.data[f"VA{self._id}"]
           ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'VA29'
2024-10-04 09:42:55.502 ERROR (MainThread) [homeassistant.components.sensor] Error adding entity sensor.redox_piscine for domain sensor with platform ipx800v4
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 909, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1366, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 542, in state
    value = self.native_value
            ^^^^^^^^^^^^^^^^^
  File "/config/custom_components/ipx800v4/sensor.py", line 125, in native_value
    return self.coordinator.data[f"VA{self._id}"]
           ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'VA30'
2024-10-04 09:42:55.511 INFO (MainThread) [custom_components.ipx800v4] No push_password parameter provided in configuration, skip API call handling for IPX800 PUSH
2024-10-04 09:42:55.614 WARNING (MainThread) [homeassistant.components.climate] Platform intesisbox not ready yet: Controller hasn't finished initializing device; Retrying in background in 30 seconds
2024-10-04 09:42:56.061 DEBUG (MainThread) [custom_components.ipx800v4] Finished fetching ipx800v4 data in 0.096 seconds (success: True)
2024-10-04 09:42:56.085 DEBUG (MainThread) [custom_components.ipx800v4] Finished fetching ipx800v4 data in 0.102 seconds (success: True)
2024-10-04 09:42:56.086 ERROR (MainThread) [custom_components.ipx800v4] Unexpected exception from <bound method DataUpdateCoordinator.async_refresh of <homeassistant.helpers.update_coordinator.DataUpdateCoordinator object at 0x7f81905280>>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 137, in _handle_timer_finish
    await task
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 330, in async_refresh
    await self._async_refresh(log_failures=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 453, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 168, in async_update_listeners
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 533, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 542, in state
    value = self.native_value
            ^^^^^^^^^^^^^^^^^
  File "/config/custom_components/ipx800v4/sensor.py", line 107, in native_value
    return self.coordinator.data[f"A{self._id}"]
           ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 'A1'
2024-10-04 09:43:01.042 DEBUG (MainThread) [custom_components.ipx800v4] Finished fetching ipx800v4 data in 0.091 seconds (success: True)
2024-10-04 09:43:01.044 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 258, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 453, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 168, in async_update_listeners
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 533, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 542, in state
    value = self.native_value
            ^^^^^^^^^^^^^^^^^
  File "/config/custom_components/ipx800v4/sensor.py", line 107, in native_value
    return self.coordinator.data[f"A{self._id}"]

C’est l’IPX qui ne renvoie pas la valeur, est-ce que le polling/Refresh est trop fréquent ?

Alors j’avais toujours des appels de l’eedomus, j’ai donc tout coupé : pas mieux

J’ai fait une maj de mon ipx qui était pas vraiment à la dernière version : c’est bon , Tout remonte :wink:

Merci beaucoup !

1 « J'aime »

Hello, merci encore pour cette intégration que j’utilise depuis quelques années maintenant.

J’ai un petit truc qui m’embête, mais je ne sais pas si ça vient de HA ou de l’intégration ipx800V4:

  • lorsque HA redémarre (redémarrage manuel, mise à jour ou redémarrage du système) j’ai mes inputs qui sont re-détectées comme ayant changé d’état :

    ça m’a déjà valu de belles frayeurs quand je reçoit une détection d’intrusion par exemple !

est ce que vous avez pareil ?
y a t’il un moyen d’éviter cela ?

Merci !

1 « J'aime »

Oui c’est normal, home assistant recharge les états à chaque démarrage
Pour les scenarios, il faut préciser en trigger des changements d’état de off à on par exemple, pour éviter les changement de unknown/unavailable a on

1 « J'aime »

Pour ceux qui cherche la version ipx800 V3 pour HA:

Sans prise de tête, juste l’adresse,login et pass à renseigner, pas de yaml à ajouter!

2 « J'aime »