Eheim Aquarium Filter

Hello,

I am trying to build a scrape sensor to pull in the “degree of pollution” of my canister filter.

I followed a tutorial and was able to get the scrape sensor to work but am having difficulty in figuring out how to modify it to make it work with what I am after. I cannot seem to figure out what to use as a “select” value to get the contamination number. I am trying to pull in the “5%” that is showing above the degree of pollution graph.

the filter is WIFI based and I am pointing to its local webpage.

If anyone can assist it would be greatly appreciated.

the code I am trying:

- resource: http://10.129.1.12/#/filterOverview?id=FC:F5:C4:8A:6A:9F#top
  scan_interval: 28800
  sensor:
    - unique_id: aquarium_filter_pollution
      name: Aquarium filter pollution
      select: "label.ng-binding"

Hi there

Looking for the same, did you progress here?
I wanted a simple command to turn it off and on without going to the web interface

After I finally made the webinterface work yesterday, poked a bit into the website - it isn’t as easy as this unfortunately, since the website itself does not have the data. What you see in the browser is dynamically created. Try to wget or curl the resource you are trying to scrape (this is what happens internally) and you will not see any “ng-binding” class.

I am still willing to make it work, will play around a bit.

Poked around a bit more. Well, this damn thing actively resists being auto-queried by home assistant, especially the “pollution grade” (which actually seems to be a very made-up value… I haven’t cleaned my filter since I installed it back in 2020, and it shows “5% pollution”…).
My findings so far:

  • web page itself only establishes a framework
  • real data comes through websocket calls to “ws:///ws”
  • you get data pushed to you when you connect to websocket (which is convenient, isn’t it?) or when you send a {"title":"GET_FILTER_DATA","from":"USER","to":"MASTER"} (may not work in complex master-slave setups, but works with my standalone filter).
    You get several messages back. One is titled "USRDTA" and contains controller setup information, like your email address, SSID etc.
    Then you get "MESH_NETWORK", which gives you the eheim topology back. In my simple case (only one filter, no other eheim smart devices) it looks like this (my filter is set to “Bio”, i.e. nightmode from 0:00 through 09:30, with throughput of 400l/h at day and 840l/h at night - the fish tank is in the living room, I don’t want noise during the day and I don’t car eabout the night):
{
    "title": "MESH_NETWORK",
    "from": "<FILTER-MAC>",
    "clientList": ["<FILTER-MAC>"]
}

And then you get the most important “FILTER_DATA”, and this is a mystery to me.

{
    "title": "FILTER_DATA",
    "from": "<FILTER-MAC>",
    "minFreq": 3500,
    "maxFreq": 7100,
    "maxFreqRglOff": 7600,
    "freq": 5400,
    "freqSoll": 5400,
    "dfs": 666,
    "dfsFaktor": 1237,
    "sollStep": 0,
    "rotSpeed": 32,
    "pumpMode": 4,
    "filterActive": 1,
    "runTime": 1425973,
    "actualTime": 2223,
    "serviceHour": 4320,
    "pm_dfs_soll_high": 11,
    "pm_dfs_soll_low": 1,
    "pm_time_high": 10,
    "pm_time_low": 10,
    "nm_dfs_soll_day": 0,
    "nm_dfs_soll_night": 10,
    "end_time_night_mode": 570,
    "start_time_night_mode": 1439,
    "version": 76,
    "turnOffTime": 0,
    "turnTimeFeeding": 0
}

sigh Someone teach Eheim engineers some English. Or German.
"title" and "from" are easy to guess, no questions.
Minfreq, maxfreq, maxFreqReglOff (especially the last one is a nice mix of English and German words) - probably the minimum and maximum possible rotation frequencies of the filter. "maxFreqReglOff" is probably “maximum frequency cutoff”.
"freq" and "freqSoll" - I guess “Current frequency” and “target frequency” (probably different when the filter is accelerating or decelerating or calibrating?..)
"dfs" - probably related to “Durchfluss”, German for “flow”
"dfsFaktor" - “flow factor”. Whatever it is, both actually, I have no idea. Maybe the product of dfs and dfsFaktor resutls in maximum possible flow?..
"sollStep" - “targeted step”. No idea again.
"rotSpeed" - duh. What could this possibly be, especially if non-zero?..
"pumpMode" - maybe the “4” is indicating “Bio”?..
"filterActive" - okay, this makes sense.
"runtime", "actualTime", "serviceHour" - more or less clear
"pm_*" - settings related to “Pulse mode”, I’d guess. Ok-kay, I’m not using it.
"nm_dfs_soll_day/night" - these are settings for “Bio” (nm = night mode). You can set flow levels, and though the web interface shows them in l/h, they are actually not seamlessly controllable, and changing the flow by 1 step results in changed values here. So based on my Reverse Engineering, these are “level”, with “0” being lowest flow and “10” being the highest.
"start/end_time_night_mode" - simply start/end times of the “night” in Bio-mode, in minutes since midnight.
"turnOffTime" - probably time remaining in the “filter pause” (you can pause the filter for feeding, kinda makes sense).
"turnTimeFeeding" - maybe the rotation count for the autofeeder (if you have one)?..

If you change settings for the “bio” mode, following is sent:

{
    "title": "START_NOCTURNAL_MODE",
    "to": "<FILTER_MAC>",
    "dfs_soll_day": 0,
    "dfs_soll_night": 9,
    "end_time_night_mode": 570,
    "start_time_night_mode": 1440,
    "from": "USER"
}

(in this particular case, I changed the night mode flow from 840 to 805l/h)

Lots of numbers, heh? And: none of them resembles the 5% pollution grade

Several conclusions.

  1. forget “pollution grade”. Whatever you are being shown in the web interface, is a lie. This was actually my impression even before peeking at the websocket, because you would need to spend a fortune on sensors to determine the “pollution grade” - no way this is integrated in a consumer grade 330€ filter.Theoretically, yes, you could measure nitrite and nitrate levels pre- and post-filter and compare them… Or, at the bare minimum, measure post-filter… But I know of no nitrite/nitrate sensors which don’t involve paper strips or small bottles.
  2. even if you were willing to trust whatever filter controller says about “pollution grade”, there seems to be no easy way to retrieve this information. None of the published values (and I peeked in the website traffic, too) seems to be realted to those “5%” my filter is showing.
  3. whatever "serviceHour" means, it is not “amount of hours in service”. My filter reports “4320” there, which would be around half a year - the filter is running since mid 2020 though.
  4. speaking about this, I noticed my filter is showing “service hours: 72180” in the web interface. Needless to say how far off this number is - this would be more than 8 years.

With the above, I’d say - the only more or less reliable values there are configuration values and maybe rotation frequencies. The sensor numbers shown in the web-interface are so far off, I wouldn’t trust them at all.

1 Like

I am currently trying to make an integration out of this, feel free to contact me if you want to help. I am very interested in getting this to work with HA!

2 Likes