{"id":3782,"date":"2023-04-29T17:17:37","date_gmt":"2023-04-29T15:17:37","guid":{"rendered":"https:\/\/www.sigalou-domotique.fr\/?p=3782"},"modified":"2024-04-21T12:59:21","modified_gmt":"2024-04-21T10:59:21","slug":"migration-jeedom-vers-home-assistant-le-lien-des-esp-sous-esp-easy-vers-ha","status":"publish","type":"post","link":"https:\/\/www.sigalou-domotique.fr\/en\/migration-jeedom-vers-home-assistant-le-lien-des-esp-sous-esp-easy-vers-ha","title":{"rendered":"Jeedom migration to Home Assistant, ESP link under ESP-Easy to HA"},"content":{"rendered":"<h3>State of play on Jeedom<\/h3>\n<p>For now, my ESP (mostly Sonoff) is under ESP-Easy with the link to Jeedom via the plugin:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-51\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2018\/03\/espeasy_icon.png\" alt=\"espeasy icon\" width=\"132\" height=\"149\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2018\/03\/espeasy_icon.png 309w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2018\/03\/espeasy_icon-266x300.png 266w\" sizes=\"auto, (max-width: 132px) 100vw, 132px\" \/><!--more--><\/p>\n<h3>Integration in Home Assistant<\/h3>\n<p>At this point, I don't want to reflash ESPs (with ESPHome for example) because I would like ESPs to be able to dialogue with Jeedom. <strong>and<\/strong> with HA.<\/p>\n<h3>Adding a new controller in ESP-Easy<\/h3>\n<p>I helped myself with Dapolux's tutorial on <a href=\"https:\/\/forum.hacf.fr\/t\/integration-desp-sous-espeasy-via-mqtt\/2326\" target=\"_blank\" rel=\"noopener\">https:\/\/forum.hacf.fr\/t\/integration-desp-sous-espeasy-via-mqtt\/2326<\/a>.<\/p>\n<p>To add a controller, go to the \u2018controllers\u2019 tab and add a second \u2018Home Assistant MQTT\u2019 controller.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3809\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe1.png\" alt=\"\" width=\"522\" height=\"302\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe1.png 522w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe1-300x174.png 300w\" sizes=\"auto, (max-width: 522px) 100vw, 522px\" \/><\/p>\n<p>192.168.1.21 corresponds to the MQTT broker, on my config it is on the same machine as Zigbee2MQTT but depending on the configuration you can decide to have the MQTT broker elsewhere.<\/p>\n<p>Note: I used to put the end of the IP address in Unit Number to make sure I didn\u2019t have two identical Unit Numbers on my installation.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3811\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe2.png\" alt=\"\" width=\"408\" height=\"320\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe2.png 408w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe2-300x235.png 300w\" sizes=\"auto, (max-width: 408px) 100vw, 408px\" \/><\/p>\n<p>On each device on the \u2018Devices\u2019 tab, tick \u2018Send to Controller 2\u2019 so that the information is sent to controller 2 (i.e. MQTT to HA)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3787\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/aspirateur3.png\" alt=\"\" width=\"271\" height=\"57\" \/><\/p>\n<p>In the \u2018Tools\u2019 tab and then \u2018Advanced Settings\u2019, tick these boxes:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3788\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/aspirateur4.png\" alt=\"\" width=\"386\" height=\"201\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/aspirateur4.png 386w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/aspirateur4-300x156.png 300w\" sizes=\"auto, (max-width: 386px) 100vw, 386px\" \/><\/p>\n<h3>Checking MQTT Frames on MQTT Explorer (Invoicing)<\/h3>\n<p>I like to check step by step that everything works.<\/p>\n<p>I launch MQTT Explorer, I connect to my broker in 192.168.1.21, I check that the frames of my equipment \"Pump Watering\" (in my example) appear well.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3812\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe3.png\" alt=\"\" width=\"344\" height=\"225\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe3.png 344w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe3-300x196.png 300w\" sizes=\"auto, (max-width: 344px) 100vw, 344px\" \/><\/p>\n<p>So I know that my ESP sends the information well.<\/p>\n<h3>Configuration on the Home Assistant side<\/h3>\n<p>Automatic discovery <a href=\"https:\/\/www.home-assistant.io\/integrations\/mqtt\/#support-by-third-party-tools\" target=\"_blank\" rel=\"noopener\">Not foreseen from ESP Easy<\/a>, we're going to have to<a href=\"https:\/\/www.home-assistant.io\/integrations\/switch.mqtt\/#set-the-state-of-a-device-with-espeasy\" target=\"_blank\" rel=\"noopener\"> configure manually<\/a> MQTT equipment in HA.<\/p>\n<p>I chose this ESP as an example for this tutorial because I have 3 different pieces of equipment to recover: a switch, a binary _sensor, a sensor<\/p>\n<h4>The Juice Switch<\/h4>\n<p>The ESP GPIO12 corresponds to the control of the relay that powers or does not power the pump.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3813\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe4.png\" alt=\"\" width=\"1027\" height=\"87\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe4.png 1027w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe4-600x51.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe4-300x25.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe4-1024x87.png 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe4-768x65.png 768w\" sizes=\"auto, (max-width: 1027px) 100vw, 1027px\" \/><\/p>\n<p>I have often used the same word in <strong>name<\/strong> and in <strong>value<\/strong> (\u201cJuice\u201d in the example) to avoid confusion, be careful if you do not do this. The order to be followed in the HA configuration is [UNIT]\/[NAME]\/[VALUE]<\/p>\n<ul>\n<li>In the file<strong> \/config\/configuration.yaml<\/strong><\/li>\n<\/ul>\n<p>Check that there is this line:<\/p>\n<blockquote>\n<p>mqtt: !include mqtt.yaml<\/p>\n<\/blockquote>\n<ul>\n<li>In the file <strong>\/config\/mqtt.yaml<\/strong><\/li>\n<\/ul>\n<blockquote>\n<p>switch:<br \/>\u00a0\u2013 Name: Juice Pump Watering<br \/>\u00a0 \u00a0single _id: switch.jus_pump_watering<br \/>\u00a0 \u00a0command_topic: Pump Watering\/gpio\/12<br \/>\u00a0 \u00a0state_topic: Watering\/Jus\/Jus Pump<br \/>\u00a0 \u00a0payload_on: \"1\"<br \/>\u00a0 \u00a0payload_off: \u20180\u2019<br \/>\u00a0 \u00a0retains: true<br \/>\u00a0 \u00a0device_class: outlet<br \/>\u00a0 \u00a0device:<br \/>\u00a0 \u00a0 \u00a0name: Watering Pump<br \/>\u00a0 \u00a0 \u00a0Identifiers: \"Pump watering\"<\/p>\n<\/blockquote>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3814\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe7.png\" alt=\"\" width=\"336\" height=\"162\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe7.png 336w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe7-300x145.png 300w\" sizes=\"auto, (max-width: 336px) 100vw, 336px\" \/><\/p>\n<h4>The binary _sensor \" Floater\"<\/h4>\n<p>The ESP GPIO5 is an analogue input that corresponds to the position of my float in my water reserve. I switch off the pump if the float switches to 0.<\/p>\n<p>[Note that \u201cGPIO5\u201d is the name and value in my example, I could very well have put \u201cFloater\u201d too]<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3818\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe5.png\" alt=\"\" width=\"1027\" height=\"87\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe5.png 1027w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe5-600x51.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe5-300x25.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe5-1024x87.png 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe5-768x65.png 768w\" sizes=\"auto, (max-width: 1027px) 100vw, 1027px\" \/><\/p>\n<blockquote>\n<p>binary_sensor:<\/p>\n<p>\u2013 Name: Float Pump Watering<br \/>\u00a0 \u00a0single _id: binary_sensor.floater_pump_watering<br \/>\u00a0 \u00a0state_topic: Water Pump\/GPIO5\/GPIO5<br \/>\u00a0 \u00a0payload_on: \"1\"<br \/>\u00a0 \u00a0payload_off: \u20180\u2019<br \/>\u00a0 \u00a0device_class: moisture<br \/>\u00a0 \u00a0device:<br \/>\u00a0 \u00a0 \u00a0name: Watering Pump<br \/>\u00a0 \u00a0 \u00a0Identifiers: \"Pump watering\"<\/p>\n<\/blockquote>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3817\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe8.png\" alt=\"\" width=\"386\" height=\"186\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe8.png 386w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe8-300x145.png 300w\" sizes=\"auto, (max-width: 386px) 100vw, 386px\" \/><\/p>\n<h4>The \"Consumption\" Sensor<\/h4>\n<p>The ESP I use is equipped with a CSE7766 chip that allows me to retrieve the pump consumption information.<\/p>\n<p>What interests me is the W consumption of the pump, I will recover \u2018Power\u2019<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3819\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe6.png\" alt=\"\" width=\"1036\" height=\"125\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe6.png 1036w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe6-600x72.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe6-300x36.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe6-1024x124.png 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe6-768x93.png 768w\" sizes=\"auto, (max-width: 1036px) 100vw, 1036px\" \/><\/p>\n<blockquote>\n<p>sensor:<br \/>\u00a0 \u2013 Name: Consumption Pump Watering<br \/>\u00a0 \u00a0 \u00a0single _id: sensor.consumption_pump_watering<br \/>\u00a0 \u00a0 \u00a0state_topic: Watering\/Consumption\/Power Pump<br \/>\u00a0 \u00a0 \u00a0_of _measurement unit: W<br \/>\u00a0 \u00a0 \u00a0device_class: power<br \/>\u00a0 \u00a0 \u00a0device:<br \/>\u00a0 \u00a0 \u00a0 \u00a0 name: Watering Pump<br \/>\u00a0 \u00a0 \u00a0 \u00a0 Identifiers: \"Pump watering\"<\/p>\n<\/blockquote>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3820\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe9.png\" alt=\"\" width=\"380\" height=\"136\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe9.png 380w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe9-300x107.png 300w\" sizes=\"auto, (max-width: 380px) 100vw, 380px\" \/><\/p>\n<h3>Result in Home Assistant<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3822\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe10.png\" alt=\"\" width=\"657\" height=\"557\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe10.png 657w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe10-600x509.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/pompe10-300x254.png 300w\" sizes=\"auto, (max-width: 657px) 100vw, 657px\" \/><\/p>\n<p>\u00a0<\/p>","protected":false},"excerpt":{"rendered":"<p>State of play on Jeedom For the moment, my ESP (mostly Sonoff) is under ESP-Easy with the link to Jeedom via the plugin:<\/p>","protected":false},"author":1,"featured_media":51,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[14,53,23],"tags":[61],"class_list":["post-3782","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-domotique","category-home-assistant","category-jeedom-2","tag-esp"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/posts\/3782","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/comments?post=3782"}],"version-history":[{"count":0,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/posts\/3782\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/media\/51"}],"wp:attachment":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/media?parent=3782"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/categories?post=3782"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/tags?post=3782"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}