I have also a Shelly Plug S near the pool.
So could I use this as Bluetooth gatway for Home Assistant?
If yes, then I have to use your option 1 in the listing, right?
Your way to read out the data from the blue connect is not working, because shelly is not esp32 or what is the difference if a shelly is used instead of esp32?
Is it working with shelly in your case?
Actually, some Shelly devices are esp based and could be flashed with an esp image. Considering the gen 2 and 3 devices also have Bluetooth, if they are esp based then they could very well be esp32. But I have not personally looked into it.
The video I posted though describes using a Shelly gen 2 as a BLE proxy without flashing it with an esp image. So, Shelly gen 2 (and probably 3) can be a BLE proxy in HA and relay BLE messages which the BlueConnect integration can pick up. So, all the talk about esp solutions are not relevant for a Shelly setup. You will just need the BlueConnect HACS Integration to get the BlueConnect sensor data.
Thanks for the explanation.
Then Iâll have to reconsider. Your solution with the ESP32 seems âsimplerâ to me.
And, above all, Iâm not dependent on an integration.
If the integration is no longer maintained and there are changes, the functionality may no longer be available.
What temperatur sensors do you use?
Are the made of PVC or spaecial material for pool?
DS18B20 Sensors. They are waterproof and support a wide temperature range.
For outdoor temperature it is simple by just letting the end hang out in a shaded area. For the pool water temperature you either hang the end in the pool or get a pipe fitting.
This is the temperature sensor from Amazon Germany:
https://amzn.eu/d/eWtDklg
And this is a thermal pocket for use with a 1/2â tapping clamp:
https://amzn.eu/d/4fUO0I3
it doesnt work. ich found with the shelly gen3 ble proxy: Adresse : 00:A0:50:87:93:E7
Name : B201FF0CCD
Quelle : E4:65:B8:FA:52:62
i think this is the Blue Connect., but with the integration it says:
Blue Connect Go
Keine Geräte im Netzwerk gefunden
Iâve now done it with an ESP32 following your instructions. Itâs working really well now.
Do you have a nice dashboard card that looks good and is easy to use? Maybe something where you can directly see if the value is within the set limitsâkind of like in the Blue Connect app.
I use gauge cards. You will have to modify the ranges for your colors. I have them set for my hottub. In particular the temperature coloring will be different for a normal pool. My temperature coloring differentiates between âtoo cold for the Mrs.â (blue), âOK for refreshing in summerâ (green), âperfect for hottub bathingâ (orange) and âtoo hot for the Mrs.â (red)
Hereâs my dashboard YAML:
type: horizontal-stack
cards:
- type: gauge
entity: sensor.esp_ble_proxy_blueconnect_temperature
needle: true
segments:
- from: 0
color: "#0000FF"
- from: 29
color: "#008000"
- from: 38
color: "#FFA500"
- from: 41
color: "#FF0000"
name: Temperatur
max: 45
min: 0
- type: gauge
entity: sensor.esp_ble_proxy_blueconnect_ph
needle: true
segments:
- from: 6
color: "#FF0000"
- from: 6.6
color: "#FFA500"
- from: 7.2
color: "#008000"
- from: 7.6
color: "#FFA500"
- from: 8.4
color: "#FF0000"
max: 8.8
min: 6
name: pH
- type: gauge
entity: sensor.esp_ble_proxy_blueconnect_orp
name: ORP
needle: true
segments:
- from: 0
color: "#FF0000"
- from: 400
color: "#FFA500"
- from: 650
color: "#008000"
- from: 750
color: "#FFA500"
- from: 900
color: "#FF0000"
max: 1050
min: 300
visibility:
- condition: state
entity: sensor.esp_ble_proxy_blueconnect_temperature
state_not: unknown
- condition: state
entity: sensor.esp_ble_proxy_blueconnect_ph
state_not: unknown
- condition: state
entity: sensor.esp_ble_proxy_blueconnect_orp
state_not: unknown
This is what it looks like on my dashboard:
But you can use the values from the BlueRiiot App. I do think those values vary depending on how you set it up in your app. IIRC you can determine whether it is in a pool or whirlpool. That may change the values.
Thanks @sh-guy
It works fantastic- great work
Thank you for your good instruction.
Getting started and the first flash with esp32 was not so easy for me, but now my ble scanner is running.
In your script is:
blueriiot_mac: !secret blueriiot_mac
blueriiot_name_prefix: !secret blueriiot_nameprefix
blueriiot_id_prefix: !secret blueriiot_idprefix
So:
blueriiot_mac = mac adress that I get from the ble scanner
But:
âblueriiot_name_prefixâ and âblueriiot_id_prefixâ I donât understand.
Could they for example 1234 and 6789 or must I use values form the ble scanner or something else?
Yeah, those last two are just an ID and Name you can choose. For me they are just âblueconnectâ for the ID and âBlueConnectâ for the name. I should have just put them in the YAML as substitutions instead of using the secrets file. So feel free to just change the YAML to reference a substitution instead of the secret and define the two substitutions in your YAML.
Thank you.
"
web_server:
port: 80
version: 2
auth:
username: admin
password: !secret web_server_password
"
This part with the web_server is not necessary?
And for my understanding.
Can you tell me what this part do:
std::string rawhex = format_hex_pretty((uint8_t *) x.c_str(), x.size()).c_str(); ESP_LOGD(âraw_hexâ, â%sâ, rawhex.c_str());
Yeah, both are strictly not necessary. The web server is an internal web server on the ESP, allowing you to connect directly to in a web browser and see logs and control sensors etc. The last part you mention basically just logs the full hex response.
Technically, both are unnecessary if everything works fine and no troubleshooting is necessary. But, I havenât noticed that either really do any harm.
Tank you for your help and thank you for the great work. It works really perfect.
Only I get the following failed messages:
[11:37:56][D][esp-idf:000][BTU_TASK]: E (244452) BT_BTM: BTM_BleScan scan not active
[11:37:56][D][esp-idf:000][BTU_TASK]: W (244461) BT_APPL: bta_dm_ble_scan stop scan failed, status=0x6
But everything works so I think it is OK.
Has anyone tested yet, if meassurements every 15 minutes stress the battery a lot?
And has anyone tried yet to plug the Blue Riot on an power supply to measure for example every 5 minutes?
I think the battery voltage should be 3,6 V âŚ
Hello,
Iâve been testing with the BLE proxy since today.
When comparing measurements between the ESP32 and the app, I noticed significant deviations in the ORP.
APP: 816 mV
ESP: 798 mV
Difference: 18 mV
Then I remembered that I had recalibrated the ORP electrode using the app last year.
I reset the calibration in the app to factory calibration and now get the following values.
APP: 790 mV
ESP: 798 mV
Difference: 8 mV
The script uses the following formula:
float orp = (float)( (int16_t) (x[6]<< 8) + x[5]) / 3.86 - 21.57826;
Is the solution simply to add the 18 mV to the float value as an offset?
For example:
float orp = (float)( (int16_t) (x[6]<< 8) + x[5]) / 3.86 - 21.57826 + 18.00;
Or will this be incorrect for other ORP values ââbecause the calibration factor is no longer 18 mV?
Or is there a way to incorporate the appâs calibration data here? Is this included in the Blu Connectâs raw value?
is it also possible to integrate a OSPA pool control via this integration to Home Assistant?
Hey @sh-guy! Thank you for your great explanations. I have one question about that: do you use the official app for calibration?
Yes I did use the app to calibrate. But I didnât compare values between the app and the integration like @saveNAT mentions above. So, maybe after calibration there is a value that needs to be added or subtracted from the value returned by the integration (ESP).
If what @saveNAT says is correct, then the value retrieved via BLE is always the factory default and calibrated values are always corrected in the app.
Works the Blue Connect over cloud? I am not in the same wifi Network.