Fluval Aquasky BLE RGB-Light

Hi @alpopone,

sorry for the (very) late reply. Somehow I am not getting email notifications any longer…

Oddly enough, I never had any issues getting a correct system time before the addon connects to the lights - but then again, many things in ESPHome changed in the last year(s)… :wink:

To be honest, your solution looks quite good, but you could skip the reconnection by using the time sync function of the addon. I created a button on my dashboard for that, but you could try to implement that into the time sync trigger.

The button I made works like this:

button:
  - platform: template        
    id: freki1_timesync    
    name: Freki1 sync time
    on_press:
      then:
        - fluval_ble_led.sync_time: fluval_freki1

fluval_freki1 is the name of the addon instance:

fluval_ble_led:
  - ble_client_id: ble_freki1
    time_id: ha_time
    number_of_channels: 4
    id: fluval_freki1

So in your case you could try:

time:
  - platform: homeassistant
    id: ha_time
    on_time_sync:
      then:  
        - fluval_ble_led.sync_time: <your fluval_ble_led name here>

best regards
mrzottel

Hi @dannyslinn,

sorry for the late answer - as I already said, I am not getting email notifications anymore :wink:

Also, time flies by, it’s no longer funny anymore :woozy_face:

So in theory, every device compatible with ESPHome should work as long as it supports bluetooth.

Personaly, I use these boards: AZDelivery 1 x ESP32 Dev Kit C V4 NodeMCU WLAN WiFi Development Board mit USB-C Anschluss kompatibel mit Arduino inklusive E-Book!: Amazon.de: Computer & Zubehör

but their availability might be limited depending on where you live on this planet :wink:

Also, an “open” dev board might not be your ideal setup if you never worked with stuff like this before. I 3d printed a “mostly watertight” case for it and put it on a selfmade PCB with some relais, a LCD and ports for temperature sensors and stuff like that which monitors my fish tank and starts fans in case of over temperature etc. So a bit more involved than just controlling lights.

If you still want to go on with the project, just write me a PM and we can figure out what works best for you :wink:

best regards
mrzottel

Hi @mrzottel ,
Thank you for your response and support!
I tested your suggestion and it works great in my enviroment. Will stick to it as it is more elegant than a full disconnect-reconnect cycle.

Best Regards,
Alexander

Hello, which / are any / esp home components still supported?
I deployed fluval_ble_led a year or two ago - the old fluval_ble_led seems no longer online and I can get none of the external components configs found in this thread to work.
This is blocking me from making any changes to the esphome device at all.

For this external component,

external_components:
  - source: github://mrzottel/esphome@fluval_ble_led
    components: [ fluval_ble_led ]

I get the following errors:

Failed config

external_components: [source /config/esphome/aquarium-ble-light-controller.yaml:3]

  • source: github://mrzottel/esphome@fluval_ble_led
    components:

    Could not find init.py file for component fluval_ble_led. Please check the component is defined by this source (search path: /data/external_components/7f010557/esphome/components/fluval_ble_led/init.py).

    • fluval_ble_led

Thanks for all your hard work. And for your incredibly nicely readable formulated comments

Hi all, trying to wrap my head around this thing. I have a Fluval AquaSky 2 and would love to be able to simply turn it on and off from within HA.

I have an ESP32 with a base ESPHome install on it that has been brought into ESP builder and added to HA. Do I literally add this code to the yaml for this device in ESP Builder to get this started?

external_components:
  - source: github://mrzottel/esphome@fluval_ble_led
    components: [ fluval_ble_led ]

I’ve not done a lot of direct yaml work before, outside of supplying a variable here and there to existing code, so I’m a little uncertain how this is supposed to work. :confused:

Honestly I’m also not entirely clear how it works once it’s connected… will entities automatically appear in HA once the above code is added and the ESP32 is near enough to the tank to connect?

I currently am running in Pro mode and am happy with the settings, but it’s a hassle anytime I simply want to turn the lights on and off for a moment outside of the set programming. That’s sort of what I’m hoping for here. And I guess this hopefully fixes the clock drift and power loss reset problem is an added bonus, although I’ve literally never been affected. (good luck, as I’ve read the reports of others who have so I know it’s a legit thing)

Hi all,

it seems that the latest ESPHome update broke the component. I’m on it.

Update: Component compiles again and seems to work fine on my test setup. I love breaking changes before christmas :grimacing:

best regards
mrzottel

1 Like

Hi @kalanster,

just adding the component would not be enough, it needs to be configured as well as the required entities added. There is quite some documentation about that as well as sample yaml in the thread above.

If that does not help you, feel free to PM me =)

best regards
mrzottel

Is it also possible to run on home assitant (rpi5) without esp home?

If I’m understanding correctly this is all developed as a custom ESPhome plugin. I’m wondering - is there a reason for that (personal preference)?

Reason I wonder is, if technically possible, it would be convenient to package the logic into a HA integration that runs on top of its BT stack (Bluetooth proxy, etc). At least, I’d love to leverage that.

Hi @RFC793,

yes, this is all in a custom ESPHome component. It was kind of a mix of personal preference and my interest to control my Fluval LEDs with the ESPHome devices I already used to check and influence temperature in the aquarium.

So I tried to find a component and found this thread, but there was no ready to use component yet but some very good work already done. I kind of reverse engineered the protocol and encryption and managed to create the C++ part of the component quite quickly. (I’m more used to C# though). The Python part was way harder for me to get right, and I think I did not really fully understand how it works today.

I started to work on a HA integration, but since this was even more Python, I did not get far, especially since HA is a way bigger hill to climb than ESPHome was.

But I will gladly assist in anyone trying to make an integration out of this!

best regards
mrzottel

Thanks. That makes a lot of sense. I’m actually in the market to buy a new aquarium light. And of course I’m looking at automation and saw a few hopeful candidates.

  • There’s Hygger’s smart lights. They apparently use Tuya under the hood (at least one of the graphics on Amazon say to use the Tuya app). So, could maybe leverage the Tuya BLE already in HA, or maybe reflash it with ESPhome. Price is low, a bit of a gamble, and doesn’t seem to have separate cold vs warm white channels (it does have a load of LEDs though.
  • There’s Glowarium. I’m skeptical, but with BLE and WiFi - can surely get one of them working, even if it is a custom firmware (or maybe not and it will always be glued to the Chinese Cloud)
  • Then there’s the Fluvals. They are pricier than I first wanted (and seem to be comparatively low wattage). They are a name brand, AND someone has at least cracked the comms - so that’s a huge plus. BUT: there is a new generation (Aquasky 3.0) that I would want to get. It supports BLE and WiFi, but also boasts a new app - and I fear they may not be protocol compatible. Or worse: they do actual encryption.

So now I don’t know whether to go for the Fluval 3.0 and hope for the best. Get the 2.0, it isn’t as nice but I know I can integrate it. Or a cheapo where I don’t risk much if I end up needing to reflash it.

Fun times. Do you know if 3.0 speaks the same protocol?

Regarding programming effort I have about 20 years of Python, and even more C/C++ under my belt. I would definitely give it a shot.

Nice project!
I have two tanks with Aquasky “Bluetooth 1st generation”.
is this the version 2 or version 1 of the AquaSky?
I am a bit confused.

Regards!
Dennis

I had a look at it and my best guess would be, that the Aquasky 3.0 still uses the same protocol, since it has mostly the same features etc. It is also controllable by bluetooth like the older ones - only wifi is new, but even this would require bluetooth to set up.

I have no Aquasky 3.0 to test though, so this is really just a guess based on the the fact that it costs money to create a new protocol and/or encryption and I have not heard from Fluval yet that they considered this component a security issue. So no need for them to spend any money to do the same things but different… :wink:

But to be sure, either the source code or some reversing of the fluval connect app might help :wink:

Also, if you want to create a HA integration I am happy to assist if you want. The ESPHome component is in a github repo, all of the quite simple decoding and the protocol are in one C++ file. I tried to create a HA integration myself, but got a bit lost in all the frameworks etc. used by HA, including their own, and never found the time to really get into it.

@SuperElma “Bluetooth 1st generation” is AquaSky 2, which use a “bluetooth only” connection.

1 Like

This is my repo when I was working on this

I had two lights connected, it took a lot of memory from the ESP device so it wasn’t very stable. I used it to auto sync my lights whenever there was a power outage. If only they included an RTC chip in these…