Need some assistance on coding

Hi all,

Just want to set the scene… I do not know the first thing about coding so asking for some help (or someone to take on a job which i am happy to pay for).

I have managed to extract the Service UUID, Characteristic UUID and Values for some bluetooth commands of a pool controller I have, using wireshark. I would like some assistance to create something, ESP, MQTT, whatever… that will be able to send these commands from HA to the pool controller.
I would be extremely grateful if someone could provide a template or example of something they have that can do this sort of thing, which i can (scriptkiddy) copy - paste - update a couple of values to get working. I am also happy to pay someone to do this for me if i provide the values.

I understand this will be one way communication for now, and I am happy with this at this stage and can look to expand the functionality later on.

Any help is appreciated.

Thanks

This page has a example of connecting, writing and reading to BLE device.

1 Like

This is amazing. I was not aware this was available. I will try it tomorrow. Thank you.

1 Like

Thank you for the guidance to the ESPHome pages. Just an update that this connected and found the characteristics, but for some reason would not run an action when the value was passed. If anyone knows, I am using the following code:

switch:
  - platform: template
    name: "Auto"
    turn_on_action:
      - ble_client.ble_write:
          id: POOL01
          service_uuid: 45000001-98B7-4E29-A03F-160174643001 
          characteristic_uuid: 45000003-98b7-4e29-a03f-160174643001 
          value: [0x86, 0x68, 0x3a, 0x6d, 0x3d, 0xb4, 0x85, 0x56, 0xd5, 0xd8, 0xaa, 0x3d, 0x28, 0xd8, 0xfa, 0x4a]

The service UUID and Characteristic UUID are located as per the log, these were extracted from wireshark as 4500000198B74E29A03F160174643001 and 4500000398b74e29a03f160174643001 and I updated to match the code above. The value was extracted as 86683a6d3db48556d5d8aa3d28d8fa4a (no errors are presenting) and updated to match the above. Did i correctly apply the 0x?

Hi Mikkaat,

I was wondering whether you have a table of what each service does and what commands to send to each service ?

Did you need to use the bluetooth access code anywhere to “login” before executing any of the commands ? Have you tried manually doing the steps with nRF Connect ?

I have the same device that you have, and would love to integrate it into HA as you would.

Cheers,

Damien

Table is in this post with all the values I have extracted.

As for the bluetooth access code login, I have no idea what that is (i struggle to code).

Ragrding trying on nRF, I have tried this, howerver tried this, but when i click Connect in nRF, I am not afforded enough time to add the code befor i am disconnected from the controller and I have to then reconnect again (and this could potentially be the issue as I also see the disconnect reconnect in the esp logs)