Page 1 of 1

ESP32 PH & TDS

Posted: Tue Nov 10, 2020 1:40 am
by Freemaniac
I am trying to get a Dfrobot PH sensor and EC sensor into HA. Since there are no direct esphome integrations for these what is the best way to bring the values in? Is MQTT the only simple option?

Re: ESP32 PH & TDS

Posted: Tue Nov 10, 2020 5:32 pm
by LEDG
MQTT isn't too bad to add into your Arduino code. I think I would go that route.

Re: ESP32 PH & TDS

Posted: Tue Nov 10, 2020 8:40 pm
by Freemaniac
Can I hassle you for an example of your MQTT esp32 code. I cannot get the publish function to send calculated values from my sensors.

Re: ESP32 PH & TDS

Posted: Wed Nov 11, 2020 5:45 pm
by LEDG
Sure thing. Here's my ESP32 code. Mind the noobiness of it.

Feel free to post your code as well and I can see if the problem stands out to me.

Re: ESP32 PH & TDS

Posted: Fri Nov 13, 2020 1:29 am
by Freemaniac
That was extremely helpful, made me realize I needed to convert my float values to strings in order for MQTT to publish them.

Thank you!

Re: ESP32 PH & TDS

Posted: Fri Nov 13, 2020 3:33 am
by LEDG
Great!

Re: ESP32 PH & TDS

Posted: Tue Dec 15, 2020 8:20 pm
by Baylos
Hi,

without any detail, it is difficult to provide you an answer. At least what kind of code you use and what you have tried so far would be nice to know.

I use ESP32 with SEN0169. There are some examples at GitHub. I used greenponik together with additional ADC.

I posted my code here:
viewtopic.php?f=35&t=5696&start=20

I get an MQTT response. Maybe later I will improve the code.

Hope that helps.


BR

B

Re: ESP32 PH & TDS

Posted: Mon Dec 28, 2020 3:21 am
by stud
I'm not running DF PH/EC Sensors ,i'm using Atlas EZO ,after doin a little search i found this that might be useful :
https://community.dfrobot.com/makelog-308339.html
DF Sensors with MQTT on ESP
hope it helps you