Bonjour,
Je suis tombé sur un Github qui explique comment modifier une pompe à chaleur Poolex pour une communication local en wifi avec un ESP8266. C’est expliqué pour Home Assistant. Pensez-vous que c’est faisable avec Jeedom ? Si oui comment ?
Oui c’est possible. Il faut modifier le fichier de config yaml pour y ajouter l’intégration mqtt.
L’esp sera capable de publier son état sur un topic mqtt, auquel il faudra souscrire depuis jeedom (grâce à un plugin comme JMQTT).
En 30sec avec chatgpt, voilà ce qu’il me sort :
substitutions:
device_id: "pool_heat_pump"
esphome:
name: eh_${device_id}
esp8266:
board: esp12e
# Enable logging
logger:
# Enable Home Assistant API (facultatif si MQTT est utilisé)
api:
encryption:
key: "EDIT_ME"
ota:
password: "EDIT_ME"
wifi:
ssid: "EDIT_ME"
password: "EDIT_ME"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "EDIT_ME"
password: "EDIT_ME"
captive_portal:
# Configuration MQTT
mqtt:
broker: "IP_DU_BROKER" # Remplace par l'adresse IP de ton broker MQTT (ex: Jeedom)
username: "MQTT_USER"
password: "MQTT_PASS"
discovery: false # Désactive le discovery Home Assistant si inutile
topic_prefix: "esphome/${device_id}"
birth_message:
topic: "esphome/${device_id}/status"
payload: "online"
will_message:
topic: "esphome/${device_id}/status"
payload: "offline"
uart:
rx_pin: GPIO4 # To this pin you will connect WBR3's RX.
tx_pin: GPIO5 # To this pin you will connect WBR3's TX.
baud_rate: 9600
tuya:
# On-off switch
switch:
- platform: "tuya"
name: ${device_id}_power
switch_datapoint: 1
id: power_switch
on_turn_on:
- mqtt.publish:
topic: "esphome/${device_id}/power"
payload: "ON"
on_turn_off:
- mqtt.publish:
topic: "esphome/${device_id}/power"
payload: "OFF"
mqtt:
command_topic: "esphome/${device_id}/power/set"
state_topic: "esphome/${device_id}/power"
# Target temperature
number:
- platform: "tuya"
name: ${device_id}_target_temp
device_class: temperature
unit_of_measurement: "°C"
number_datapoint: 2
min_value: 20
max_value: 40
step: 1
id: target_temp
on_value:
- mqtt.publish:
topic: "esphome/${device_id}/target_temp"
payload: !lambda |-
return to_string(id(target_temp).state);
mqtt:
command_topic: "esphome/${device_id}/target_temp/set"
state_topic: "esphome/${device_id}/target_temp"
# Current temperature
sensor:
- platform: "tuya"
name: ${device_id}_current_temp
device_class: temperature
unit_of_measurement: "°C"
sensor_datapoint: 3
id: current_temp
on_value:
- mqtt.publish:
topic: "esphome/${device_id}/current_temp"
payload: !lambda |-
return to_string(id(current_temp).state);
# Current mode
select:
- platform: "tuya"
name: ${device_id}_mode
enum_datapoint: 4
optimistic: false
options:
0: "ECO Heat"
1: "ECO Cool"
2: "Automatic"
3: "Boost Heat"
4: "Silent Heat"
5: "Boost Cool"
6: "Silent Cool"
id: mode_select
on_value:
- mqtt.publish:
topic: "esphome/${device_id}/mode"
payload: !lambda |-
return id(mode_select).state;
mqtt:
command_topic: "esphome/${device_id}/mode/set"
state_topic: "esphome/${device_id}/mode"
Il suffit ensuite de souscrire aux topics :
esphome/pool_heat_pump/power
esphome/pool_heat_pump/target_temp
esphome/pool_heat_pump/current_temp
esphome/pool_heat_pump/mode
et de publier sur sur les topics /set pour envoyer des commandes
Je n’ai pas fait la modification. Et depuis je suis passé sur Home Assistant aussi. J’utilise l’intégration Tuya Local sur Home assistant qui fonctionne très très bien sans modification hardware.