Blueriiot pool analyzer

I’m trying to integrate my blueriiot pool analyzer (a sensor for various water quality values in pools). I’ve seen a lot of info on the protocol on other forums and wanted to get this working with OMG, but unsure if we can achieve this with the write and read commands.

On nRFConnect tool I wrote the 01 byte to the F3300002 characteristic, and shortly after got the reading back on F3300003. It works as expected, and as I’d read about, but only because nRFConnect is listening to all notifications back from that device.

I then tried to write to the device from OMG as follows:

mosquitto_pub -t home/OMG_ESP32_BLE/commands/MQTTtoBT/config -m '{
  "ble_write_address": "MY_MAC_ADDRESS",
  "ble_write_service": "f3300001-f0a2-9b06-0c59-1bc4763b5c00",
  "ble_write_char": "f3300002-f0a2-9b06-0c59-1bc4763b5c00",
  "ble_write_value": "01",
  "value_type": "hex",
  "ttl": 4,
  "mac_type":0,
  "immediate": true
}';

it seemed to work, and shows success:true on the console, but I do wonder if “01” hex is actually the 0x01 I should be sending.

I tried to immediately trigger a read on the correct characteristic, but it never got anything back:

mosquitto_pub -t home/OMG_ESP32_BLE/commands/MQTTtoBT/config -m '{
  "ble_read_address": "MY_MAC_ADDRESS",
  "ble_read_service": "f3300001-f0a2-9b06-0c59-1bc4763b5c00",
  "ble_read_char": "f3300003-f0a2-9b06-0c59-1bc4763b5c00",
  "value_type":"STRING",
  "ttl": 5  }';

I wonder if this is because it is now a different connection, or if maybe my original “01” message wasn’t right?
Any ideas?

Hi @ggggh ,

That should be correct.

Wouldn’t the READ command also expect a HEX return? Have you tried it with

"value_type":"HEX",

or possibly an INT, if the values can be 00 and 01?

After your OMG WRITE command, doesn’t the changed value also show up in nRFConnect?

Also wondering if the above stated WRITE command should have an ALL CAPS HEX - not sure if the casing matters right now :wink: no, seems to be done in code (vt.toUpperCase())

f3300003-f0a2-9b06-0c59-1bc4763b5c00

seems to be NOTIFY only. What are you getting READING

f3300004-f0a2-9b06-0c59-1bc4763b5c00

also is there any advertised service/manufacturerdata shown?

Thanks! I’ll try with the READ on HEX; it’s a HEX returned. There’s a lot of info on this homeassistant thread

I haven’t been able to check with nRFConnect after the WRITE, as I believe I can only have one connection open to the device. I’ll try again, but I think if nRFConnect is connected I can’t issue the write, but I’ll try to connect with it straight after issuing the WRITE from OMG, as the return value takes a few seconds to come back and might give me enough time. At least that’d help validate the WRITE works.

Unfortunately I don’t think the READ will work even with HEX, as I said in the previous post, f3300003-f0a2-9b06-0c59-1bc4763b5c00 is NOTIFY only, so no READ for it. I saw it in another thread/screenshot, where I also saw that f3300004-f0a2-9b06-0c59-1bc4763b5c00 can be READ, so was just wondering what info you might get there.

That might work if you can quickly enough register for the NOTIFY :wink: but ideally in the end you’d want the information in OMG, So I was just wondering if there might be any broadcasts after issuing the WRITE command, by just monitoring the device in OMG. The HEX info which comes back in the NOTIFY all seems to have been decoded already with the temperature, ph etc.