<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[pH mètre connected to domoticz]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I précise that I’m noob in programmation. That’s the raison why I post here. I need help from professional.</p>
<p dir="auto">I find this link on the web : <a href="https://bestengineeringprojects.com/arduino-ph-meter-using-ph-sensor/?fbclid=IwAR2c-q-eo6_WixzqXvJ7Jquw_AwNhnWwyWAUiZBnr_mNQhV5_bewe9Wg4DI" rel="nofollow ugc">https://bestengineeringprojects.com/arduino-ph-meter-using-ph-sensor/?fbclid=IwAR2c-q-eo6_WixzqXvJ7Jquw_AwNhnWwyWAUiZBnr_mNQhV5_bewe9Wg4DI</a></p>
<p dir="auto">I would like to have ph value on my domoticz.</p>
<p dir="auto">Do you think I can adapt this code with mysensors ?</p>
<pre><code>
//Header declearation Start
#include &lt;LiquidCrystal_I2C.h&gt; //Library for I2C lcd
#include &lt;OneWire.h&gt; //One wire library
#include &lt;DallasTemperature.h&gt; //Library for DS18B20 Sensor
#include &lt;math.h&gt;// Library for math function 
//Header Declearation End

//Pin Assignment and declearation Start
#define ONE_WIRE_BUS 5 //data pin  DQ pin of DS18B20 connected to digital pin D5
LiquidCrystal_I2C lcd(0x27,20,4);  //set the LCD address to 0x27 for a 20 chars and 4 line display
const int analogPhPin = A0; //PH module pin P0 connected to analog pin A0
const int analogTemPin = A2; //PH module pin T1 connected to analog pin A1

OneWire oneWire(ONE_WIRE_BUS); //Ste up one wire instance
DallasTemperature sensors(&amp;oneWire); //pass one wire reference to DS18B20 library

long phTot, temTot;
float phAvg, temAvg;
int x;
const float C = 21.34; //Constant of straight line (Y = mx + C)
const float m = -5.70; // Slope of straight line (Y = mx + C)
//Pin Assignment and declearation end

// start for generate custom character
byte customChar[] = {
  B00100,
  B00100,
  B11111,
  B00100,
  B00100,
  B00000,
  B11111,
  B00000
};
//End for generate custom character

//Setup Function Start 
void setup() {
  lcd.init(); //initialization the lcd
  lcd.backlight(); 
  sensors.begin(); //Start the DS18B20 Library
  lcd.setCursor(0,0);
  lcd.print("PH and Temperature");
  lcd.setCursor(0,1);
  lcd.print("Meter Using");
  lcd.setCursor(0, 2);
  lcd.print("Arduino");
  delay(3000);
  lcd.clear();
}
//Setup Function End

//Main function Start
void loop() {
  phTot = 0;
  temTot = 0;
  phAvg = 0;
  temAvg = 0;

  //taking 10 sample and adding with 10 milli second delay
  for(x=0; x&lt;10 ; x++)
    {
        phTot += analogRead(A0);
        temTot += analogRead(A1);
        delay(10);
    }
    float temAvg = temTot/10;
    float phAvg = temTot/10;
    float temVoltage = temAvg * (5000.0 / 1023.0); //convert sensor reading into milli volt
    float phVoltage =  phAvg * (5.0 / 1023.0); //convert sensor reading into milli volt

    sensors.requestTemperatures(); // Send the command to get temperatures
    float Etemp = temVoltage*0.1; //convert milli volt to temperature degree Celsius
    float pHValue = phVoltage*m+C;
    float Wtemp = sensors.getTempCByIndex(0);
    float TempDif = fabs(Etemp-Wtemp); //calculating the absolute value of floating
   // lcd.clear();
    lcd.setCursor(0,0);
    lcd.print("Env.Tmp.");
    lcd.setCursor(12,0);
    lcd.print("Sol.Tmp.");
    lcd.setCursor(1,1);
    lcd.print(Etemp);
    lcd.setCursor(6,1);
    lcd.write(B11011111);
    lcd.setCursor(7,1);
    lcd.print("C");
    lcd.setCursor(13,1);
    lcd.print(Wtemp);
    lcd.setCursor(18,1);
    lcd.write(B11011111);
    lcd.setCursor(19,1);
    lcd.print("C");
    lcd.setCursor(0,2);
    lcd.print("PH Value of Solution");
    lcd.setCursor(3,3);
    lcd.print(pHValue);
    lcd.setCursor(9,3);
    lcd.print("PH");
    if (TempDif&lt;= 5)
    {
      lcd.setCursor(11,3);
      lcd.write(customChar);
      lcd.setCursor(14,3);
      lcd.print("0.1PH");
      }

    if (TempDif&gt; 5)
    {
      lcd.setCursor(11,3);
      lcd.write(customChar);
      lcd.setCursor(14,3);
      lcd.print("0.2PH");
      }
      delay(1000);
}

</code></pre>
<p dir="auto">I have a gateway mysensors on my pi3b+.</p>
<p dir="auto">Thank you.</p>
]]></description><link>https://forum.mysensors.org/topic/11678/ph-mètre-connected-to-domoticz</link><generator>RSS for Node</generator><lastBuildDate>Thu, 12 Mar 2026 19:39:10 GMT</lastBuildDate><atom:link href="https://forum.mysensors.org/topic/11678.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 02 May 2021 05:55:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to pH mètre connected to domoticz on Wed, 05 May 2021 12:45:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nagelc" aria-label="Profile: nagelc">@<bdi>nagelc</bdi></a> Thank you for your example.<br />
I think that i have to customize void setup() ?</p>
]]></description><link>https://forum.mysensors.org/post/110175</link><guid isPermaLink="true">https://forum.mysensors.org/post/110175</guid><dc:creator><![CDATA[Diazovitch69]]></dc:creator><pubDate>Wed, 05 May 2021 12:45:28 GMT</pubDate></item><item><title><![CDATA[Reply to pH mètre connected to domoticz on Mon, 03 May 2021 08:13:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/diazovitch69" aria-label="Profile: Diazovitch69">@<bdi>Diazovitch69</bdi></a> Converting to mysensors is not difficult for this one reading you want to use - but whether or not domoticz will be happy I don't know as I don't use it.</p>
<p dir="auto">Best to go to the 'build' page (see top of this page) and look at the door/window sensor. This is fairly basic and should give you a clue to start experimenting with.</p>
<p dir="auto">First add my sensors to the code, then a message construct, then presentation function and then send message in code. Sounds worse that it is. Try it and post your code if it doesn't work.....</p>
]]></description><link>https://forum.mysensors.org/post/110148</link><guid isPermaLink="true">https://forum.mysensors.org/post/110148</guid><dc:creator><![CDATA[skywatch]]></dc:creator><pubDate>Mon, 03 May 2021 08:13:35 GMT</pubDate></item><item><title><![CDATA[Reply to pH mètre connected to domoticz on Mon, 03 May 2021 02:45:49 GMT]]></title><description><![CDATA[<p dir="auto">There is an example in the MySensors examples.</p>
<p dir="auto"><a href="https://github.com/mysensors/MySensors/tree/master/examples/PHSensor" rel="nofollow ugc">https://github.com/mysensors/MySensors/tree/master/examples/PHSensor</a></p>
]]></description><link>https://forum.mysensors.org/post/110145</link><guid isPermaLink="true">https://forum.mysensors.org/post/110145</guid><dc:creator><![CDATA[nagelc]]></dc:creator><pubDate>Mon, 03 May 2021 02:45:49 GMT</pubDate></item><item><title><![CDATA[Reply to pH mètre connected to domoticz on Sun, 02 May 2021 17:34:48 GMT]]></title><description><![CDATA[<p dir="auto">I'm happy to read you that you think that is possible.<br />
But i'm a noob and I don't understand what you write.<br />
Does exist a program I can adapt ? Where can I find it ?<br />
I need some help please. Thank you.</p>
]]></description><link>https://forum.mysensors.org/post/110140</link><guid isPermaLink="true">https://forum.mysensors.org/post/110140</guid><dc:creator><![CDATA[Diazovitch69]]></dc:creator><pubDate>Sun, 02 May 2021 17:34:48 GMT</pubDate></item><item><title><![CDATA[Reply to pH mètre connected to domoticz on Sun, 02 May 2021 14:48:10 GMT]]></title><description><![CDATA[<p dir="auto">This should be fairly straight forward as long as you just want to send the values to Domoticz and don't need the LC display.  MySensors supports a water quality sensor that includes temperature and pH variables.<br />
You would present S_WATER_QUALITY and send the temperature values as V_TEMP messages and the pH values as V_PH messages.<br />
See table here:  <a href="https://www.mysensors.org/download/serial_api_20#variable-types" rel="nofollow ugc">https://www.mysensors.org/download/serial_api_20#variable-types</a></p>
<p dir="auto">I checked the Domoticz release notes and it says this type of meter is included for MySensors.  But, I have not tried it.</p>
]]></description><link>https://forum.mysensors.org/post/110137</link><guid isPermaLink="true">https://forum.mysensors.org/post/110137</guid><dc:creator><![CDATA[nagelc]]></dc:creator><pubDate>Sun, 02 May 2021 14:48:10 GMT</pubDate></item></channel></rss>