{"id":1971,"date":"2021-08-02T23:14:32","date_gmt":"2021-08-02T21:14:32","guid":{"rendered":"http:\/\/jeedom.sigalou-domotique.fr\/?p=1971"},"modified":"2024-04-21T14:41:41","modified_gmt":"2024-04-21T12:41:41","slug":"detecter-lallumage-dune-led-dalarme","status":"publish","type":"post","link":"https:\/\/www.sigalou-domotique.fr\/en\/detecter-lallumage-dune-led-dalarme","title":{"rendered":"I check the Redox production of the salt electrolyser in my pool"},"content":{"rendered":"<h2>Objective<\/h2>\n<p>On my salt electrolyser, I have a blue LED that indicates that production is ongoing, if it goes out, I would like my home automation system (Jeedom or Home Assistant) to know to warn me.<\/p>\n<p>I was not going to disassemble the electrolyser to recover a power supply or not from the LED, even if I was itchy, I looked at how to recover rather the \u2018visual\u2019 info of the LED on or off.<\/p>\n<p>My idea was to find out if there was a brightness detector, which was simple to interface on my computer. <a href=\"http:\/\/jeedom.sigalou-domotique.fr\/controle-domotique-redox-orp-ou-ph-dune-piscine-vers-jeedom-80e\" target=\"_blank\" rel=\"noopener\">Existing control management system for my pool<\/a>. My system using an I2C port, I looked for this type of chip and it had to be interfacing on Esp Easy for simplicity.<\/p>\n<p><!--more--><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4567\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/electrolyseur-redoxled.png\" alt=\"\" width=\"306\" height=\"171\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/electrolyseur-redoxled.png 306w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/electrolyseur-redoxled-300x168.png 300w\" sizes=\"auto, (max-width: 306px) 100vw, 306px\" \/><\/p>\n<h2>Material used<\/h2>\n<p>In addition to the <a href=\"http:\/\/jeedom.sigalou-domotique.fr\/controle-domotique-redox-orp-ou-ph-dune-piscine-vers-jeedom-80e\" target=\"_blank\" rel=\"noopener\">equipment of the existing pool management system<\/a> :<\/p>\n<ul>\n<li class=\"product-title-text\" data-spm-anchor-id=\"a2g0o.detail.1000016.i1.1af472b4ykj65L\"><strong>BH1750<\/strong> (or GY-302) A brightness sensor<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1973\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/BH1750.png\" alt=\"\" width=\"1117\" height=\"199\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/BH1750.png 1117w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/BH1750-600x107.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/BH1750-300x53.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/BH1750-1024x182.png 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/BH1750-768x137.png 768w\" sizes=\"auto, (max-width: 1117px) 100vw, 1117px\" \/><\/p>\n<p>I ordered two for 0.83\u20ac x 2 + 0.73\u20ac port + 0.48\u20ac Taxes = 2.86\u20ac<\/p>\n<h2>Connection of the probe<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-1975\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/1750-1.png\" alt=\"\" width=\"203\" height=\"203\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/1750-1.png 450w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/1750-1-300x300.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/1750-1-100x100.png 100w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/1750-1-150x150.png 150w\" sizes=\"auto, (max-width: 203px) 100vw, 203px\" \/><\/p>\n<ul>\n<li>The probe is in I2C so two connectors SDA and SCL to connect without making a mistake to the <a href=\"http:\/\/jeedom.sigalou-domotique.fr\/controle-domotique-redox-orp-ou-ph-dune-piscine-vers-jeedom-80e\" target=\"_blank\" rel=\"noopener\">existing bus<\/a>.<\/li>\n<li>VCC to 5v and GND to mass.<\/li>\n<li>Addr makes it possible to change the address, we will keep the default value and therefore not connect it.<\/li>\n<\/ul>\n<h2>Positioning of the probe on the Alert Led<\/h2>\n<p>You have to position the brightness sensor (green arrow) on the LED and hold it with black scotch that covers well.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1976\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/17502.png\" alt=\"\" width=\"450\" height=\"450\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/17502.png 450w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/17502-300x300.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/17502-100x100.png 100w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/17502-150x150.png 150w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-4570\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/20230702_164737_resized.jpg\" alt=\"\" width=\"471\" height=\"353\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/20230702_164737_resized.jpg 2000w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/20230702_164737_resized-600x450.jpg 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/20230702_164737_resized-300x225.jpg 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/20230702_164737_resized-1024x768.jpg 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/20230702_164737_resized-768x576.jpg 768w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/20230702_164737_resized-1536x1152.jpg 1536w\" sizes=\"auto, (max-width: 471px) 100vw, 471px\" \/><\/p>\n<p>It is not that bad, and it is very convenient to have the information on the proper functioning of the production.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-4571\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/20230702_164654_resized.jpg\" alt=\"\" width=\"468\" height=\"351\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/20230702_164654_resized.jpg 2000w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/20230702_164654_resized-600x450.jpg 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/20230702_164654_resized-300x225.jpg 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/20230702_164654_resized-1024x768.jpg 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/20230702_164654_resized-768x576.jpg 768w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/20230702_164654_resized-1536x1152.jpg 1536w\" sizes=\"auto, (max-width: 468px) 100vw, 468px\" \/><\/p>\n<h2>Configuring Esp Easy<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4572\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/electrolyseur1.png\" alt=\"\" width=\"761\" height=\"399\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/electrolyseur1.png 761w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/electrolyseur1-600x315.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/electrolyseur1-300x157.png 300w\" sizes=\"auto, (max-width: 761px) 100vw, 761px\" \/><\/p>\n<p>I admit that I did not do too many tests on the setting of the resolution or other, I left everything by default and it works well.<\/p>\n<ul>\n<li>When the LED is on, I have Lux: between 25000 and 30000<\/li>\n<li>When the LED is turned off, I have Lux: 0<\/li>\n<\/ul>\n<p>That suits me very well.<\/p>\n<h4>Add a rule to have a True\/False instead of a Lux value<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/\/\/ \/\/ Turns LedProduction's value in Lux into True\/False on Pool#Electrolysis \/\/\/\/ on LedProduction#Lux do if [LedProduction#Lux]&gt;10000 and [Water#WaterOff]=0 \/\/ If LedProduction AND pump works \/\/Light=Production works TaskValueSet 8.1 \/\/ Pool Update#Electrolysis=1 else \/\/Light=Production does not work TaskValueSet 8,4,0 \/\/ Pool Update#Electrolysis=0 endif endon<\/pre>\n<p>\u00a0<\/p>\n<p>As a reminder, TaskValueSet will initialise the Dummy Device variables I use and retrieve in Jeedom<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4573\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/electrolyseur2.png\" alt=\"\" width=\"827\" height=\"154\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/electrolyseur2.png 827w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/electrolyseur2-600x112.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/electrolyseur2-300x56.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2021\/08\/electrolyseur2-768x143.png 768w\" sizes=\"auto, (max-width: 827px) 100vw, 827px\" \/><\/p>\n<p>So in the code, TaskValueSet will assign the result 0 or 1 to the 8th row of the table \/ 4th value (so Electrolysis).<\/p>\n<p>Note: I added a small control in the rule so that an alarm will only go up if the electrolyser is powered.<\/p>\n<h2>Recovery in Jeedom or Home Assistant<\/h2>\n<p>For Jeedom, this is explained in:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.sigalou-domotique.fr\/en\/controle-domotique-redox-orp-ou-ph-dune-piscine-vers-jeedom-80e\/\" target=\"_blank\" rel=\"noopener\">Redox Home Automation Control (ORP) or Ph d&amp;#8217;a pool to Jeedom (80\u20ac)<\/a><\/li>\n<\/ul>\n<p>For Home Assistant, follow the explanations in this plugin:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.sigalou-domotique.fr\/en\/migration-jeedom-vers-home-assistant-le-lien-des-esp-sous-esp-easy-vers-ha\/\" target=\"_blank\" rel=\"noopener\">Jeedom migration to Home Assistant, ESP link under ESP-Easy to HA<\/a><\/li>\n<\/ul>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>","protected":false},"excerpt":{"rendered":"<p>Objective On my salt electrolyser, I have a blue LED that indicates that production is ongoing, if it goes out, I would like my home automation system (Jeedom or Home Assistant) to know to warn me. I wasn\u2019t going to disassemble the electrolyser to get a power supply or not from the LED, even if I was itching, [\u2026]<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[14,53,23],"tags":[61,59],"class_list":["post-1971","post","type-post","status-publish","format-standard","hentry","category-domotique","category-home-assistant","category-jeedom-2","tag-esp","tag-piscine"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/posts\/1971","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=1971"}],"version-history":[{"count":0,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/posts\/1971\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/media?parent=1971"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/categories?post=1971"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/tags?post=1971"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}