Be careful to switch off the comm with the BLE device before uploading in the ESP32. The BLE device seems to freeze sometimes if the connection isnāt properly disconnected. You will have to remove the batteries to restart the deviceā¦ A little bit annoying.
Great!!!
Iām looking for a orp and ph sensor for my swimming pool, Iām automating everything. do you recomend it? It looks so good but in amazon there are terrible descriptions.
Please let me know.
Thanks
I would personally take a look to the Blueriiot products. I bought the BLE-YC01 just for testing given its price and can see massive differences in the measures even enough I made the calibration (which I am pending of repeating just in case). The Blueriiiot is perfectly integrated with HA too although it is far more expensive. Take a look to the integration and forum and make your own decision. I have been running the Blueriiot for +2y and my pool have never been better. I have a full automation of the pumps for filtering and chemicalās (bleach, etc).
Thanks, Iāve built an automated system with injectors of ph and chrorine,pumps with vvd and also ph sensor but with orp sensor I have some problems and after checking 2 orp electrodes nothing works, i used drobot kit but after several hours working, values get crazy.
This is why iām looking for something different without invest too much money.
Iāve taked a look blueriot devices but they are quite expensive and the probe need to be changed every 2 years with more than 100ā¬ for this part.
If the values of ble-yc01 are correct and it works at least 1 year it deserves it.
So the code that was posted by kymote125 also works for my BLE enabled yinmik branded pH/ec handheld tester. Everything worked with essentially no modification required.
The model I have is BLE-9908, though there are several other BLE models with slightly different features that may also work.
There is potential in modifying these handheld testers to function as part of a hydroponics system or possibly an aquarium. I may make a new thread if Iām able to reliably have mine return 24/7 pH, EC, and temp readings from my hydroponic system into HA.
Iāve also received my BLE-YC01, and Iāve integrated it in my swimming-pool.
Iāve calibrated PH and also ORP, but I donāt know why the ORP value doesnāt match with the expected, with the stripes the value of free chlorine is 1 and here is 0,1, PH is ok but orp is lower than normal.
Wow, sorry for not response, I was not able to watch the forum from my last post. I have my unit now on pool using with his app. I try to test the code with EspHome, thanks so much for your work. By now, seems that my unit power on button is not working very properly after two weeks on pool.
Do you know how much last battery using a regular BTLE pooling? Because is seems that is not very much time as I read on some coments.
Hello RubenKona,
Iām interested by all the information you could have from the brands of the device, can you share an archive of all the documents you have ?
You have talked about excel files : "I donāt know how to share the information, as canāt attach the excel with the information. Probably better to send to interested people? "
does they result from reverse engineering or direct from manufacturer ?
I search some of the probably ābuildersā of the device, and ask to him. Surprisingly they send to me that Excel, that only have the information that I posted on the two posts before with this, no more information on that Excel, for that is not useful to post it. Only two sheets with the two codes that I have posted.
PD: The seller that send me the information arenāt āexactlyā the same as the device that I have, but in Aliexpress there are some clone devices probably made by same manufacturer.
Ruben
PD: I have just compiled the code, I try to connect to my device. It is true that no clorine information
Well; I finally connect to the device using the sample above from @kymote125 (thanks a lot).
I also have tried (unsuccesfully) to calculate clorine using the given formula.
All values seem to match, except battery that tell me 70% as app tell me 100%.
Also doesnāt seem to work the 30 minutes pool (I am not using HA as clock origin, but SNTP as I am not using HA. It seems that is pooling all time (or 60 seconds more or less). Also have to convert temp to C as it seems that default is F.
This is my MQTT posted by Esp32:
This is the formula I put inside Lambda, but it gives me nan:
Hi again, I was debbuging the information send by my BLE-YC01 comparing to the vaules that App show on screen, and seems to be some error on the values readed by before code based on possitions of the received data. Also seems that the device sends the calculated chlorine, so doesnāt need to calculate with a formula (that in any case, seems very inacurate as I have read on other places posts).
This is the information I received. Later post my corrected ālambda codeā:
[10:22:19][D][ble_client.receive:204]: value received at 3: 750 [2, 238] -> ORP mV
[10:22:19][D][ble_client.receive:204]: value received at 5: 661 [2, 149] -> EC uS/cm
[10:22:19][D][ble_client.receive:204]: value received at 7: 330 [1, 74] -> TDS ppm
[10:22:19][D][ble_client.receive:204]: value received at 9: 762 [2, 250] -> pH / 100
[10:22:19][D][ble_client.receive:204]: value received at 11: 18 [0, 18] -> 11, 12 Cloro / 10 mg/L
[10:22:19][D][ble_client.receive:204]: value received at 13: 260 [1, 4] -> 13, 14 Temperatura / 10 ĀŗC
[10:22:19][D][ble_client.receive:204]: value received at 15: 3151 [12, 79] -> Battery
[10:22:19][D][ble_client.receive:208]: value received at 18: 999 [3, 231] -> ??
[10:22:19][D][ble_client.receive:208]: value received at 20: 762 [2, 250] -> pH again?
This is corrected code (only ORP/pH was incorrect based on app readings), and also added CL:
auto temp = ((message[13]<<8) + message[14]);
auto ph = ((message[3]<<8) + message[4]);
auto orp = ((message[9]<<8) + message[10]);
auto battery = ((message[15]<<8) + message[16]);
auto ec = ((message[5]<<8) + message[6]);
auto tds = ((message[7]<<8) + message[8]);
auto cloro = ((message[11]<<8) + message[12]);
// #### Sensors updated with new values
id(ble_yc01_temperature_sensor).publish_state(temp/10.0);
id(ble_yc01_ph_sensor).publish_state(ph/100.0);
id(ble_yc01_orp_sensor).publish_state(orp);
id(ble_yc01_battery).publish_state(battery / 31.51); //Por prueba y error
id(ble_yc01_ec_sensor).publish_state(ec);
id(ble_yc01_tds_sensor).publish_state(tds);
id(ble_yc01_cloro).publish_state(cloro/10.0);
I am doing more testsā¦ not sure of all values
Edited again, initial values seems to be ok, only added Chlorine.
Edited 2: With this final version all seems to work correctly including Chlorine calculated by device.The only thing that I donāt know how to do, is not asking for values every little time instead of suposed 30 minutes interrogation.
Hiya all, I just received my BLE-YC01 and managed to connect it to my ESP32. However, my BLE-YC01 keeps turning off after a couple of minutes which kinda defeats the purpose. Has anyone figured out how to keep it on?
Thanks a bunch!