Pool Monitor Device Yieryi BLE-YC01

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:
image

This is the formula I put inside Lambda, but it gives me nan:

        auto cloro = pow (  0.23 * (1.0 + 0.0 / 100.0 ) * ( 14.0 - ph) ,
                  1.0 / (400.0 - orp) ) * 
                 pow ( ( ph - 4.1 ) , ( ( orp - 516.0) / 145.0 ) ) +
                 pow ( 10.0 , ( ( orp + ph * 70.0 - 1282.0) / 40.0 ) );

        id(ble_yc01_cloro).publish_state(cloro);

I have created other sensor:

  - platform: template
    name: "BLE-YC01 CL"
    id: ble_yc01_cloro
    unit_of_measurement: "ppm"
    accuracy_decimals: 0
    state_class: measurement
    icon: mdi:water-opacity

Any suggestion for clorine calculation?

I have read also that device will go to sleep if not pool in, I think 5 minutes, but you say that your pool is every 30 minutes. Is that working?

Thanks in advance.
Ruben
Edit: I didn’t realized on the formula to transform to F :man_facepalming:

1 Like

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 :frowning:

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.

1 Like

I use this :

The formula comes from raspipool github: https://github.com/segalion/raspipool

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!

1 Like

Have you ever figured out how to keep it on? Thanks

1 Like

Cheers for the sensor setup!
I added it to a TTGO-display works decently using the esphome/esp-idf framework.

Sir, do you have the full C++ codes for this one? Thank you.

Hello.
I don’t know match about python but how can I install “decodeint” ?

root@jeedom:/home/ble-c600# pip3 install decodeInt
ERROR: Could not find a version that satisfies the requirement decodeInt (from versions: none)
ERROR: No matching distribution found for decodeInt

Would someone be able to confirm if either or both of those red squares have an installed capacitor. I possibly knocked one or both off without noticing.

Thanks!

EDIT:
Well I managed to resurrect this. Those two red squares in the image do not have caps installed. My problem was the power switch had corroded. Replaced the switch and it is alive again. Hopefully it won’t flood again, as I added some super glue to the lid and filled the shaft with silicone…

1 Like

Any chance you could publish your esphome config?

Are you looking for something specific?
I posted a working version although it has display stuff intermingled.

here

Could you share your ESPHOME code please?

Hi, I am not very skilled in this area and I got the following message

Any ideas??

I got it sorted out. I just needed to add a line in

  • platform: ble_client #### Sensor required to manage values coming from the BLE device ####
    type: Characteristic
    ble_client_id: ble_yc01

Just thought I wouild leave it here in case anyone has the same issue.

Is there an adjustment to the above formula. I mean the 0.0/100.0 doesn’t look like it shold be there obviously?

Hi,
Anyone has problems with communication? I need to push ON/OFF button every 3 days, It doesn’t connect anymore.
Additionally I want to supply directly 3V and remove the battery, have you checked it out? I put it in the skimmer under a floatating surface.

BR

I was having similar problems with the ttgo display and ended up moving it to a different esp32, which had much better BT range.

It’s not really HA related, but it is BLE-YC01 related.

Just a question. I have had mine in the pool for quite a while, but the data I get from it is rubbish (as in very inaccurate). The only thing that seems good is the PH. The ORP value is way off, and I eded up lifting my chlorine levels to 18 mg/l (instead of 3).

Is anyone else experiencing the same issue?

My pool doesn’t get a lot of use so there are often big step changes in the readings. I was wondering if that is because it has floated into some sort of dead spot in the pool??

Just looking for peoples user experience with this device.

That device is crap. If you want to have really accurate measures of your pool and a flawless integration with HA you need to go for the Blue Connect Go Smart Pool Water from Blueriiot. There is obviously a huge price difference but it is the price of good measures against what the BLE-YC01 delivered. I have been running the Blueriiot for more than 4 years now as many other HA users and it is a super high quality device. I bought a BLE-YC01 just to play with in case my Blueriiot die and was a waste of money…

1 Like

Do you try to calibrate device?
On Aliexpress you can buy ORP/PH buffer powder and calibrate your device (see instruction)

I heve no problems over half a year…