Pool Monitor Device Yieryi BLE-YC01

I having trouble connecting to my BLE-YC01. Here is the logs:

[14:03:54][D][esp32_ble_client:053]: [1] [C0:00:XX:XX:XX:XX] Found device
[14:03:54][D][esp32_ble_tracker:215]: Pausing scan to make connection...
[14:03:54][D][esp32_ble_tracker:303]: End of scan.
[14:03:54][I][esp32_ble_client:069]: [1] [C0:00:XX:XX:XX:XX] 0x00 Attempting BLE connection
[14:03:55][I][ble_sensor:031]: [ble_yc01_sensor] Connected successfully!
[14:03:56][I][esp32_ble_client:201]: [1] [C0:00:XX:XX:XX:XX] Connected
[14:03:56][W][esp32_ble_client:220]: [1] [C0:00:XX:XX:XX:XX] esp_ble_gattc_get_descr_by_char_handle error, status=10
[14:04:02][D][sensor:094]: 'ESP32 Free Memory': Sending state 51996.00000 B with 1 decimals of accuracy
[14:04:04][D][sensor:094]: 'BLE-YC01 Temperature': Sending state 33.20000 Ā°C with 1 decimals of accuracy
[14:04:04][D][sensor:094]: 'BLE-YC01 pH': Sending state 7.50000 pH with 2 decimals of accuracy
[14:04:04][D][sensor:094]: 'BLE-YC01 ORP': Sending state 463.00000 mV with 0 decimals of accuracy
[14:04:04][D][sensor:094]: 'BLE-YC01 Battery': Sending state 95.62044 % with 0 decimals of accuracy
[14:04:04][D][sensor:094]: 'BLE-YC01 EC': Sending state 800.00000 ĀµS/cm with 0 decimals of accuracy
[14:04:04][D][sensor:094]: 'BLE-YC01 TDS': Sending state 400.00000 ppm with 0 decimals of accuracy
[14:04:04][D][sensor:094]: 'BLE-YC01 Chlorine': Sending state 0.10000 mg/L with 2 decimals of accuracy
[14:04:04][D][sensor:094]: 'ble_yc01_sensor': Sending state 0.00000  with 0 decimals of accuracy
[14:04:04][W][component:214]: Component esp32_ble took a long time for an operation (0.13 s).
[14:04:04][W][component:215]: Components should block for at most 20-30ms.
[14:04:30][D][time:045]: Synchronized time: 2024-01-26 14:04:30
[14:04:33][D][sensor:094]: 'ble_yc01_sensor': Sending state nan  with 0 decimals of accuracy
[14:04:33][W][ble_sensor:130]: [ble_yc01_sensor] Error sending read request for sensor, status=259
[14:04:42][D][sensor:094]: 'ESP32 Uptime': Sending state 2555.11206 s with 0 decimals of accuracy
[14:05:02][D][sensor:094]: 'ESP32 Free Memory': Sending state 57124.00000 B with 1 decimals of accuracy
[14:05:03][D][sensor:094]: 'ble_yc01_sensor': Sending state nan  with 0 decimals of accuracy
[14:05:03][W][ble_sensor:130]: [ble_yc01_sensor] Error sending read request for sensor, status=259
[14:05:33][D][sensor:094]: 'ble_yc01_sensor': Sending state nan  with 0 decimals of accuracy
[14:05:33][W][ble_sensor:130]: [ble_yc01_sensor] Error sending read request for sensor, status=259

In summary, the sensor connects and read data sometimes, but occasionally it disconnects and canā€™t connect anymore, showing this ā€œError sending read request for sensor, status=259ā€ error on logs. It just back to work after manually turn off/on many times later. The yaml configuration is pretty basic as described in this post before. Any ideas?

I used connection problem months ago and it was resolved by reducing distance between device and ESP. Not more than 15 meters.

My ESP is two meters from sensor. I did this to make sure that distance is not the problem here.

Whatā€™s the proper way to turn off comms with sensor to prevent any problem?

Iā€™m interested it how to disable the comms momentarily as well. Iā€™m using the HA integration with an ESP32 ble proxy.

esp32_ble_tracker:
  scan_parameters:
    active: true
             
bluetooth_proxy:
  active: true

When I restart HA for an upgrade my BLE-YC01 goes Unavailable and Iā€™m guessing Iā€™m going to have to go outside and turn it on/off a few times from the physical button to get it detected again.

If using my integration, it should connect the next time the device advertises. May have to wait a bit. To disable temporarily, disable the integration. You can do that from the GUI (Setting->Integrations->ble_yc01). Reenable it when you want it on again.

When I had my pool up in the summer, that didnā€™t help, look like my device was freezed somehowā€¦ sometimes I need to take out batteryā€¦

My ESP was also a few meters away, so it was not a connection issuz

After a while of using this device (and this integration), I have to share my disappointment in the device itself. Not the integration, I think everybody that has this device are grateful for that.
But, to be totally honest, this device is the biggest piece of crap. I really tried hard for months to manage my garden hot tub / whirlpool water with this, but the measurements just arenā€™t reliable. I even purchased calibration buffer solution for EC and ORP to calibrate those values in addition to the pH (the vendor only supplied buffer solution for pH).
My experience is that this device not only does crazy measurements at times, it is also constantly unavailable in HA. There were times where I would get measurements regularly as expected, but most of the time it shows as unavailable. So, I couldnā€™t get the current values to reliably take care of my water quality. God forbid anybody tries to actually automate something based off the sensor values in this device.
Before people start educating me about distance to the ESP BLE proxy etc. - I have since purchased a Blue Connect from BlueRiiot that connects to the exact same ESP BLE Proxy and it is absolutely reliable. The only difference is that the BLE-YC01 is connecting to HA through the ESP BLE proxy and the integration is taking the data while my Blue Connect is having the data processed in the ESP BLE Proxy directly and presenting itself as the respective sensors to HA. In any case both are connecting to the ESP BLE Proxy via Bluetooth.
In addition to the unreliability of the connection, the BLE-YC01 sends crazy measurements sometimes. For instance, with ORP I would never get a sensible reading above 350 mV. Often times (and currently always) I would get values in the area of 65,000 mV!! Thatā€™s crazy.
But, even my pH readings were crazy. The device could have been sending a reasonable value like 7.5 pH and without anything changing in the whirlpool (no people bathing of temperature changes) all of the sudden I had a constant reading of 10 pH or on the other side 5 pH. I would go and gradually increase of decrease pH and then the sensor sent values way in the other direction. I just couldnā€™t rely on what I was receiving.
Well, long story short. Now that I have the Blue Connect my water quality values are constant and very reliable. I will add a few screenshots from HA history stats that shows either crazy sensor values of the BLE-YC01 compared to Blue Connect or you can see totally spotty readings where the device is constantly unavailable.
Iā€™m putting this in here, not to demise this integration, but to warn people that good water quality is worth paying the approximately $300 for the Blue Connect and not worth the savings for a $50-$60 sensor. (side note: I actually got s Blue Connect Go for $60 used, but I would have paid more if that opportunity didnā€™t come along at the time I was looking).
Here you can see the spottiness of the BLE-YC01 (sensor name is its MAC address here):

Here is the pH (unfortunately the sensors present the value differently to HA, which is why two diagrams show). I can live with such differentiation, if it wasnā€™t for the situations where the device when berserk as well as the spottiness of availability:

And here is one of those crazy ORP readings. You can see that Blue Connect is within the 650-750 mV I try to maintain. The BLE-YC01 would always go between 0-350 mV most of the time and currently up that crazy area. I never know whether my disinfection is in a good state. The graph only looks like the Blue Connect has a constant value because of that crazy high number of the BLE-YC01. Actually the Blue Connect has values between 650-780 in this time frame.

To close this long post, I want to also emphasize that this device is very poor quality, as can be seen in a lot of posts above. Mine also got water inside at one point. Luckily it only effected the lower area where the sensors were and not board that is in the lid. I would also not rule out that some of the sensors got damaged from. Maybe that is the reason for the crazy ORP values even after everything was dried out inside and no more water came in. Another point to call out: the manual mentions that the lid is removed by turning it CLOCKWISE (which actually does apply to the Blue Connect BTW), but in reality it is taken off like expected counter-clockwise. I wondered why I couldnā€™t take the lid off at first and am glad I didnā€™t break the thing by applying too pressure clockwise.

I can only subscribe 1000% the above. I have been running Blue Connect for more than 4y and is a complete different history. This BLE-YC01 is crap and only valid for playing. My BLE-YC01 is currently saying my water is at 65ĀŗC in Feb in Europe. Water quality is health, i would never trust that to this device while my Blue Connect is managing the pumps feeding the chemicals to my pool for years without a simple issue.

2 Likes

Hi, Iā€™m new to the community, but I hope I can make some contributions. I live in Brazil and have an outdoor pool and a few months ago I bought the BLE-YC01 and I always had problems with the measurements, which started to fail, to the point of stopping the measurements completely, losing communication with the HA. In fact, the integration appears to be working perfectly. Congratulations to whoever developed it. Then I started doing some tests. The first was to take the BLE-YC01 device out of the water and leave it working for a few days close (2 meters) to the BLE proxy. It worked perfectly for days. Then I increased the distance to 8 meters, still out of the water, and everything remained perfect for several days. At no time was communication with the HA lost. It was then that I realized that the device worked correctly and continuously out of water. When I put it back in the water, after 2 or 3 days it started to fail to communicate until it stopped completely. When opening the device I noticed several water droplets on the printed circuit board, especially on the top of the PCB, on the control buttons, including signs of corrosion (probably due to the chlorine in the pool water), most likely due to the the fact of the temperature difference and the lack of having a pressure equalization device, commonly used in electronic devices that are exposed to the weather. So I bought a specific varnish (conformal coating) for PCBs and applied several layers to the PCB (on the top and bottom) in order to create a good waterproofing layer on the PCB. Additionally, I applied a layer of sunlight- and chlorine-proof silicone (specific for use in swimming pools) to the top of the device lid, between the outer edge of the lid and the blue film that covers the lid, as I also noticed that there was a little water coming in there). As a result, everything has been working perfectly for more than 3 weeks, including the measurement values (I only use temperature, chlorine, ORP and PH). The distance now from BLE Proxy to the device is around 9 meters. I just recently had to do a PH recalibration and everything was ok. I compare the PH and Chlorine value with the measuring tape normally used for this once a week and the BLE-YC01 values are very plausible.

2 Likes

Hmmm interesting findings. Do you have a link to the items you used to seal off/protect the BLE-YC01?

Sometimes the bluetooth connection drops and then no value is shown,
is there any way to display ā€œoldā€ value until a new one is published?

So, this is my first ESP32 adventure as the BLE signal seems to weak for the distance.
15 meters through walls as well. Itā€™s somewhere around the house and not in the pool yet. What concerns me are the two latter lines, should I adapt something in the yaml ?

[07:53:32][D][esp32_ble_client:110]: [0] [C0:00:00:02:D0:B8] ESP_GATTC_WRITE_DESCR_EVT
[07:54:31][D][esp32_ble_client:110]: [0] [C0:00:00:02:D0:B8] ESP_GATTC_READ_CHAR_EVT
[07:54:31][D][sensor:094]: 'BLE-YC01 Temperature': Sending state 37.04000 C with 1 decimals of accuracy
[07:54:31][D][sensor:094]: 'BLE-YC01 pH': Sending state 6.40000 pH with 2 decimals of accuracy
[07:54:31][D][sensor:094]: 'BLE-YC01 ORP': Sending state 31.00000 mV with 0 decimals of accuracy
[07:54:31][D][sensor:094]: 'BLE-YC01 batterie': Sending state 31.00000 % with 0 decimals of accuracy
[07:54:31][D][sensor:094]: 'BLE-YC01 EC': Sending state 0.00000 ĀµS/cm with 0 decimals of accuracy
[07:54:31][D][sensor:094]: 'BLE-YC01 TDS': Sending state 0.00000 ppm with 0 decimals of accuracy
[07:54:31][D][sensor:094]: 'ble_yc01_sensor': Sending state 0.00000  with 0 decimals of accuracy
[07:54:31][W][component:232]: Component esp32_ble took a long time for an operation (74 ms).
[07:54:31][W][component:233]: Components should block for at most 30 ms.

Furthermore temp is now 71.4000, changed the code to ((temp-32)/1.8) but with no success, temp remains 71.4

Happy pooling!

Thank you for your update.
I am following the sealing guidance here on my second unit after my first one died from leakage.

Iā€™m curious about this statement ā€œ[ā€¦] taking readings only every 30s [ā€¦]ā€. Where and how did you change that exactly?

I have to share my frustration with the non-existing quality of this device (the device itself, not the integration which is awesome).

After my first unit died from water leakage I decied to get a second one. I got it after waiting for all the shipment time, followed all the careful sealing advice here ā€¦ only to have it die again two days later, even before it ever got into the swimming pool!
It suddenly turned off to never turn on again. It had pretty new batteries at the time. I tried new ones tono avail. It will simply not turn on anymore.

The price difference with other alternatives is staggering (almost 10x) and availability outside of US and Europe of other options is scarce. Still, I need to turn and recommend others also to turn to better solutions because this one is just not worth the effort. The device doesnā€™t work.

In the ESP code, I have

- platform: homeassistant
    id: homeassistant_time
    on_time:
      - seconds: 0
        minutes: /30
        then:
          - switch.turn_on: ble_switch
          - delay: 5min
          - switch.turn_off: ble_switch

But Iā€™m not using the integration, but the earlier version so the code floating around in this thread.

1 Like

I might have missed it, but did anybody successfully fix the issue that ORP has readings >65500? I checked the device and it shows negative readings (which will then obviously translate into these high values). Anything else than a recalibration?

Guys, i saw an HACS update, but changelog is not quite clear?
whats new? :^-)

i see an error with the new update:


2024-06-03 16:24:36.044 ERROR (MainThread) [homeassistant.components.sensor] Error adding entity sensor.c0_00_00_01_a5_c4_free_chlorine for domain sensor with platform ble_yc01
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 580, in _async_add_entities
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 892, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1359, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1009, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1132, in _async_write_ha_state
    state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1015, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 676, in state
    raise ValueError(
ValueError: Sensor sensor.c0_00_00_01_a5_c4_free_chlorine has device class 'None', state class 'measurement' unit 'ppm' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-finite value: 'nan'

Hmm, PH is now 8.2 , but still meter gives ---- for Chorine?
Is my meter defect?