Blue Connect pool measurements

Thanks @Peerke - what I thought might be possible (for someone with coding skills) would be to start with an existing integration that uses BLE to form an active connection with a device (either directly or via a proxy - this part is handled by HA I think) and then issue some commands and disconnects again. For example the Yale lock integration seems to operate this way - core/homeassistant/components/yalexs_ble at dev · home-assistant/core · GitHub

As I understand it, and I may be wrong, but the BLE “infrastructure” that is now part of HA includes both the on-board BLE adapter, and also the BLE Proxies. I think choosing which proxy has the strongest signal to connect to the end device is abstracted away by HA, so the writer of the integration can just focus on the BLE interaction coding. I could also be very wrong about all of this :slight_smile:

Hi all,
Is there a git repository with the latest esphome configuration?
Its difficult to skim all posts in here, and the marked as answer post just has the salinity

1 Like

Here is mine : wt32eth01.yaml

2 Likes

Here is mine: GitHub - Peerke1/homeassistant-pool: esphome configuration to read pool sensor data

@nheinemans also created one: esphome/blueriiot.yaml at a5961e6383b6f592bc8706597d7f1917a941cf43 · nheinemans/esphome · GitHub

Hi all,
I have successfully connected my Blue Connect Plus to ESP32 over BLE. I am going to control my pool solonization unit based on the ORP value by HA. On the manufacturer’s website, they say that the lifespan of the probe is two years, depending on how it is used. Does anyone have experience with how often it is appropriate to start the measurement so that the probe does not wear out quickly? My idea is every 30 minutes, but I don’t know if it’s not too often.

Hi, I note you have the CL level (ppm) in the screenshots you included there. Where does that come from, and can we calculate it from the data we get from the sensor? I don’t see it in any of the integrations posted here.

Thanks!

Hallo, ich habe seit heute meinen Blue connect go mit premium und Wifi Extender
aber ich bin zu doof um mir Werte im Home Assistant anzeigen zu lassen. Ich hab schon alles probiert aber ich glaube das Addon verbindet nicht.

Kann mir bitte jemand helfen?

Danke

Hi, I have a pool with salt chlorinator. I have found that the relationship between what’s measured on S = x[6]<<8 + x[5] and the salt level reported in the app is more complicated than just dividing by 25:

  1. The salt level depends on the pool temperature. For example, I noticed that when starting my pool for the season, temperature went from to 16 to 26 Celsius (and then up to 29C) while the S went from 184 to 150 despite constant salt level of 3.5 ppm

  2. The measured S is negatively correlated with salt level. For example, when adding salt to my pool, S went from 144 to 66 (temporary) to 100 while salt level went from 3.9 to 8.2 (temporary) to 5.1. Temperature roughly constant at 29 Celsius.

One can of course come up with a linear equation for this. I am just not sure the relationship is linear.

Until further, I continue to use the MQTT/app value for salt level. I have my Blueriiot probe indoors and I use Home Assistant to control the filter pump based on electricity prices. This means that temperature and ORP values from MQTT/app don’t work, but the salt level is stable also when the filter pump is not running.

I got a blueconnect for this season and restarted my pool last week or so and i noticed the same thing.

I have tried to accumulate as many data points from here and my own measurements to try to fit something sensible

y = [1.4, 2.5, 2.5, 2.6, 3.5, 3.5, 3.9, 5.1, 8.2]
s = [373, 270, 263, 233, 184, 150, 144, 100, 66]
temp = [25.7, 18.6, 18.85, 22.05, 16, 26, 29, 29, 29]

I combined the s value with temperature as x = s * np.log(temp) (the data curve looks sensible ish with this combination), then fitted this with y = a * np.log(x + b) + c:

y = -1.828 * np.log((s * np.log(temp)) - 197.369) + 14.076, then converted this back to c++ for the lambda:

float salt = (float)( -1.828 * log(( ((int16_t)(x[8]<< 8) + x[7]) * log(temperature)) - 197.369) + 14.076 );

Entirely possible this is completely wrong, ymmv! I set up this conversion this morning and will keep tabs on the readings.

Obviously as we are really only interested in the 2-3g/L range its still hard to know if its right. It would be good to take some more measurements at low and high salt concentrations, and a few more spread in the 2-3g/L range.

1 Like

I don’t quite understand the issue you mention about a permanent BT connection and not being able to connect with the app anymore.
I have an ESP32 with the mentioned ESPHOME YAML for the BlueConnect and I don’t have this issue. I must say, I don’t have BLE Proxy enabled on my ESP32, only BLE Client and BLE Tracker. The connection to the BlueConnect is initiated when the BLE Client Switch is turned on. That switch is automatically turned back off after values have been retrieved. With this you can create an automation that just turns the switch on at the interval you want to retrieve data from the BlueConnect (I retrieve value every hour).
I’ve never experienced a situation where I couldn’t connect with the BlueRiiot app from my mobile. Maybe if I happen to use the app at exactly top of the hour when the ESP32 is retrieving data. But that wouldn’t bother me.
Maybe you did something in your ESPHOME code that keeps the connection. But, using the code from the 2-3 people that have posted theirs on Git I don’t see this happening. BTW: the different versions posted in this thread basically only differ in the ESP board they are using and whether Salt and Conductivity values are retrieved. If using the the BlueConnect Go, you can just comment out the Salt and Conductivity parts or use the one that doesn’t have those included from the start.

Anybody using the ESP BLE version (maybe it’s the same with the MQTT version as well) experience very low battery readings? Although I replaced the battery, I’m still getting a battery reading of only 20%. Are we sure the value from hex is % (considering the value is taken as is without any conversion)? Or is it possible this value is an analogue value reading that needs to be converted into % somehow? I can hardly imagine that my new battery is only 20% capacity.

thanks for this. can you share the full yaml please?

My old blue connect died after one year and I sent it back to Amazon. Since I got the new one, i found two things:

  • battery raw value is reported as 32, which is translated to 88 and this seems consistent with a new device. who knows.
  • raw_orp is completely different and I had to divide by 5.9126984 to get an approsimated values similar to the one showed in app. Maybe a new hw revision?

Yeah… the full yaml would be great.
I have now the MAC adress found from the blueriiot, i think.
It starts with 00:A0:50 and i think this is the right vendor?
I can’t connect with the esp32 an the ble_client.

If i connect with the App over BT it is needed that i have a S/N and e key.
Did i need this ifnos for the yaml?

image

from where do you trigger this command?

a automation that lauch every hour, and launch the service mqtt:publish

like this?


my mqtt server is the same where homeassistant runs. the docker with the bluerioot mqtt plugin has another ip. are you sure I need to enter the homeassistant one?

No.
IN THE topic put this: blueriiot/commands/release_last_unprocessed/YOUR_DEVICE_ID

replace “YOUR_dEVICE_ID” for your ID (usually 8 caracters)

and disable all the options

if you have mqtt server configured in the home assistant. the rest of parameters are not necesary because the home assistant knows the mqtt server