Viron Astral Pool ChlorinatorGo integration

The bluetooth adapter diagnostics suggest my fancy 'long range dongle' is somewhat garbage.


"name": "POOL01",
              "address": "CB:08:75:C3:4B:63",
              "rssi": -102,
              "advertisement_data": [
                "POOL01",
                {},
                {},
                [
                  "45000001-98b7-4e29-a03f-160174643001"
                ],
                null,
                -102,
                [
                  "/org/bluez/hci0/dev_CB_08_75_C3_4B_63",
                  {
                    "Address": "CB:08:75:C3:4B:63",
                    "AddressType": "random",
                    "Name": "POOL01",
                    "Alias": "POOL01",
                    "Paired": false,
                    "Bonded": false,
                    "Trusted": false,
                    "Blocked": false,
                    "LegacyPairing": false,
                    "RSSI": -102,
                    "Connected": false,
                    "UUIDs": [
                      "45000001-98b7-4e29-a03f-160174643001"
                    ],
                    "Adapter": "/org/bluez/hci0",
                    "ServicesResolved": false,
                    "AdvertisingFlags": {
                      "__type": "<class 'bytearray'>",
                      "repr": "bytearray(b'\\x06')"
                    }
                  }
                ]
              ],
              "details": {
                "path": "/org/bluez/hci0/dev_CB_08_75_C3_4B_63",
                "props": {
                  "Address": "CB:08:75:C3:4B:63",
                  "AddressType": "random",
                  "Name": "POOL01",
                  "Alias": "POOL01",
                  "Paired": false,
                  "Bonded": false,
                  "Trusted": false,
                  "Blocked": false,
                  "LegacyPairing": false,
                  "RSSI": -94,
                  "Connected": false,
                  "UUIDs": [
                    "45000001-98b7-4e29-a03f-160174643001"
                  ],
                  "Adapter": "/org/bluez/hci0",
                  "ServicesResolved": false,
                  "AdvertisingFlags": {
                    "__type": "<class 'bytearray'>",
                    "repr": "bytearray(b'\\x06')"
                  }
                }
              }
            },

Core logs:

the RPi with its ā€˜long range dongleā€™ is literately 8m from the chlorinator control box. I do have a spare ESP32, however, no weatherproof housing spare.

@xarmoda, does your long range dongle have a detachable antenna? Some do - often with SMA connectors. You could get an SMA extension cable (not too long) and try and get the antenna into an optimal position.

If you donā€™t have a convenient way of installing a proxy, at the very least you could fire it up temporarily, and verify whether it improves the situation.

PB, antenna is not detachable. i have tried putting the RPi within 8 metres of the chlorinator and in direct sight. it makes a difference, but alas not enough it seems to continue a link after discovery.

I have the ESP32 on my desk and intent to test it. Perhaps when the weather is better. I am yet to look up how to configure one to be a BT proxy.

putting an enclosure around my pool pump is on the cards and I suspect this is going to make the matter worse. :upside_down_face:

@xarmoda, yeah Iā€™m surprised you arenā€™t having more luck with it.
I initially had by BT proxy propped in the window, and the viron in the wooden pump house 16 metres away - it mostly worked, but with lots of short outages.


IIRC, the RSSI was typically about -80dB

Easiest way to make a esphome BT proxy:

The only thing I can think of is; my chlorinator has a particularly poor antenna. itā€™s 10 metres away, makes little difference placing the RPi on top of the cabinet. eitherway the furry overlord that rules our household does not permit loose wires or flashy things. they must be chomped.

sadly pre built images donā€™t seem to work on ESP32things. Easy enough to hack together a basic YAML that does the proxy and tracking and Iā€™ve got it sitting in a zip lock bag right on top of the chlorinator and its working.

1 Like

Question: assuming my chlorinator is a bit limited in its functionality due to what modules were installed, the model etc. I donā€™t have a lot available in my iPhone app. Just the pump on/off, the pump timer, the underwater lights, chlorine set point and some basic statistics like: cell operating time, low salt time, reversal count, cell load.

Should I remove some of these fields: chemistry status, chemistry values, Chlorine status, PH control, PH setpoint that do not return values?

iā€™d be keen to see if i canā€™t get the light controls inā€¦ thatā€™s be cool. Please ignore the IBS-TH2 card, its an Inkbird thermometer.

Easiest way would be to just disable those entities in HA. But you could go in and delete those from the integration if you wanted them gone gone.

The lighting wouldnā€™t been too hard. Looks like the technique for controlling the lighting is exactly the same as the pump, just with a different characteristic.

I can send you the decompiled code if you want to have a crack at it?

1 Like

Iā€™ve been communicating with the AstralPool team here in Australia. They are aware of (and amazed by) the work @pbutterworth has done making the BLE stuff work with the non-Halo gear :

ā€œItā€™s impressive considering it was never designed for that purposeā€

If what they told me is true - they are actively investigating opening the API for the Halo System sometime in the near future as they see the benefits this community has for the control and info.

If I hear more I will let everyone know.

Thanks.

7 Likes

Firstly, I must say great integration so thanks for all the hard work. I never expected to get much from my EQ35 with just bluetooth, so amazing you have been able to unpick it enough to get us what is available here.

Question which I hope will have a simple answer from those that understand this better.

I would like to look at longer term statistics for things like the pH in Grafana. I have Influxdb and grafana setup for this thing and it is all working well. But I canā€™t figure out how find the pH data in Grafana/InfluxDB. Normally you need to search by the measurement unit before you can identify the entity. But to me it looks like in the integration, pH does not have a unit, so I canā€™t see were to find in influxDB/Grafana.

Does anyone have a clue about how to find this?

PB, i could, i should.

My temporary solution for my BT proxy until my next order from core electronics.

1 Like

For those of you who struggled to find the PIN for your Chlorinator - hereā€™s a short video I took - https://youtu.be/bOfsZJzIme4?si=FrdI8nsDFZQXYODI

2 Likes

Damn I tried on mine and that option doesnt show up under MAINT once I click that it gives me other questions - Iā€™ve got a Astralpool Viron Chlorinator v18

these are the options I get

According to the user manual:

Just a note, some of the older chlorinators did not have bluetooth

Canā€™t wait for a Halo API to be true!

Iā€™m actually surprised that external connectivity doesnā€™t already exist for the Halo, considering the Astral Connect10 systems have their ā€œMyConnectedPool.comā€ integration.

Fingerā€™s crossed for something soon.

+1 just installed the Astral Halo connect system and want this integrated with HA

Iā€™ve done a little bit of debugging inside the Halo ChlorGo app, and it appears to be making a WebSocket connection to wss://halo.connectmypool.com.

But thatā€™s as far as I got unfortunately, mainly due to my own lack of resources.

My debugger studio canā€™t use Bluetooth to initiate the first connection, and I donā€™t have a rooted Android device that can sniff the traffic on my handset that is already connected.

Iā€™ve also just got a Halo installed. and with a quick change to the manifest service_uuid to end with 2, iā€™ve confirmed my esphome bluetooth proxy is functional.
image
Obviously @pbutterworthā€™s code wont work in its current state. But at least Iā€™ve confirmed my Bluetooth proxy is functional.

Now to dig further into these .net dllā€™s to see if i can determine the AccessCode that @bowler mentioned earlier.

Either way, it is worth noting that, initial pairing your mobile with the Halo, is all done via BLE. The unit obviously does have wifi / ethernet, and once connected, will stream its data to the cloud (thereā€™s a heap of firebase files in the APK).

Every time you open the app, you will notice a ā€œBlueā€ Circle next to your Halo device before you connect. This is to signify Bluetooth connectivity.
Once you Register a ā€œUserā€ in the mobile app, you will then be able able to access your device remotely, and you will see a ā€œGreenā€ Circle also.

And if you are BLE range of your Halo, You will see both the Blue and Green Circles next to your Chlorinator device.

It would appear the app attempts a BLE connection before attempting to connect via the Cloud service. (iā€™ve confirmed this by disabling BLE on my phone).
image

Also, I bluetooth paired 2 phones, and as soon as one phone connected, the other phone was unable to see the bluetooth connection (only gave me green wifi option). However also, did not allow a connection saying another user was connected. Is the equilibrium like this? can you still use the mobile app at the same time as @pbutterworthā€™s intergration?

1 Like