Page 1 of 1

Viessman Aquastilla smart

Posted: Thursday 08 January 2026 23:37
by Mozekam
Hello everyone,
First of all, I'd like to praise this forum – it's a never-ending source of knowledge and help! I have a quick question. Is there any way to retrieve data from the Viessman Aquastilla app? I know the ViCare app works with Domoticz, but unfortunately, my water softener can only connect to the dedicated Aquastilla app.

Has anyone had any experience with this?

Best regards!

Re: Viessman Aquastilla smart

Posted: Thursday 08 January 2026 23:57
by waltervl
There is a python library for this. If it works for you it can be used to integrate it as a Python plugin or use it as a simple interface with virtual devices.
https://github.com/alakdae/aquastilla-softener

Re: Viessman Aquastilla smart

Posted: Friday 09 January 2026 19:47
by Mozekam
Thank you for your quick reply. Do you have any instructions for someone who's never done this before? ;)

Re: Viessman Aquastilla smart

Posted: Friday 09 January 2026 22:48
by waltervl
Invest some time in learning the principles of Python.
Install the python library so you can use it. Instruction should be in the GitHub repository.
Then copy/paste the script example in the readme of the library and create a file test.py.
Modify the contents so it has the correct account credentials.
Then run in a terminal session in the folder where the test.py script is

Code: Select all

python3 test.py
You should see information about the device and some commands are sent to the device (last lines of the script).
When you change the commands you can run the script again.
If you run into errors try chatgpt or copilot or another AI to solve it.

Re: Viessman Aquastilla smart

Posted: Sunday 11 January 2026 23:10
by Mozekam
Hello, thank you very much for your suggestions - I underestimated the AI ​​tools. Got it sorted. Everything works beautifully.

Re: Viessman Aquastilla smart

Posted: Monday 12 January 2026 9:31
by waltervl
Nice!
Can you share your solution? Do you have a github repository?

Re: Viessman Aquastilla smart

Posted: Monday 12 January 2026 11:13
by Mozekam
Of course, I will describe everything - I just need a moment, only late yesterday evening I managed to run a satisfactory script :)

As for github, I don't have it yet.

Re: Viessman Aquastilla smart

Posted: Wednesday 14 January 2026 22:47
by Mozekam
Hello,
Below I'm posting a script for reading data via the Aquastilla API.

It collects data such as:
- salt level
- water used today
- remaining water until the next regeneration
- expected regeneration date
- flood alarm (I have a dedicated wireless sensor connected)
- vacation mode (status preview and remote on/off capability)
- display of the current operating mode

In the future, I'll probably want to add the ability to remotely turn off the water flow – this option is available in the app.

crontab task:

Code: Select all

*/15 * * * * /usr/bin/python3 /home/pi/domoticz/scripts/python/aquastilla_domoticz.py
The script runs once every 15 minutes. I haven't tried running it at a shorter interval, because, according to the information I have, too frequent calls can temporarily lock the account. Secondly, I don't think it makes sense to update such data too frequently.

you need to create a file and paste the following script into it (You'll need to provide your login details, IP address, and optionally, the names of the displayed information—e.g., modes or error messages)

/home/pi/domoticz/scripts/python/aquastilla_domoticz.py

Code: Select all

import requests
import json
from datetime import datetime, timedelta, timezone
from aquastilla_softener import AquastillaSoftener

# =====================================================
# --- KONFIGURACJA DANYCH LOGOWANIA ---
# =====================================================
EMAIL = "TWÓJ_EMAIL"
PASSWORD = "TWOJE_HASLO"
DOMOTICZ_URL = "http://localhost:8080"

# =====================================================
# --- TWOJE NUMERY IDX Z DOMOTICZA ---
# =====================================================
IDX_SOL = 10          
IDX_WODA_DZIS = 11    
IDX_WODA_ZAPAS = 12   
IDX_ALARM = 13        
IDX_DATA_REGEN = 14   
IDX_WAKACJE_SW = 15   
IDX_TRYB = 16         
# =====================================================

def update_domoticz(idx, nvalue, svalue):
    url = f"{DOMOTICZ_URL}/json.htm?type=command&param=udevice&idx={idx}&nvalue={nvalue}&svalue={svalue}"
    try:
        response = requests.get(url, timeout=5)
        return response.status_code == 200
    except Exception as e:
        print(f"Błąd Domoticz (IDX {idx}): {e}")
        return False

# Słownik tłumaczeń trybów (dostosuj, jeśli API zwróci inne nazwy)
TRYBY_PRACY = {
    "SERVICE": "Zmiękczanie",
    "REGENERATION": "Regeneracja",
    "BACKWASH": "Płukanie wsteczne",
    "BRINE": "Solankowanie",
    "RINSE": "Płukanie końcowe",
    "REFILL": "Napełnianie zbiornika",
    "STANDBY": "Oczekiwanie"
}

try:
    softener = AquastillaSoftener(email=EMAIL, password=PASSWORD)
    devices = softener.list_devices()
    
    if not devices:
        print("Nie znaleziono urządzeń.")
    else:
        device = devices[0]
        uuid = device['uuid']
        headers = softener._get_headers()
        base = softener._api_base_url

        res_state = requests.get(f"{base}/device/{uuid}/state", headers=headers)
        data = res_state.json()

        res_settings = requests.get(f"{base}/device/{uuid}/settings", headers=headers)
        settings = res_settings.json()

        # --- OBRÓBKA DANYCH ---
        
        sol = data.get("saltPercent", 0)
        woda_dzis = round(data.get("todayWaterUsage", 0) * 1000, 1)
        woda_zapas = round(data.get("waterLeft", 0) * 1000, 1)
        
        # Pobieranie i mapowanie trybu pracy
        raw_mode = data.get("operationMode", "UNKNOWN").upper()
        tryb_tekst = TRYBY_PRACY.get(raw_mode, f"Inny ({raw_mode})")

        raw_date = data.get("expectedRegenerationDate", "Brak")
        clean_date = raw_date.split("T")[0] if "T" in raw_date else raw_date

        is_vacation = settings.get("vacationMode", False)
        vac_n = 1 if is_vacation else 0
        vac_s = "On" if is_vacation else "Off"

        # Alarm zalania
        flood_status = device.get("deviceHistory", {}).get("flood")
        n_alert, s_alert = 1, "System bezpieczny"
        if flood_status:
            flood_time = datetime.fromisoformat(flood_status.replace("Z", "+00:00"))
            if datetime.now(timezone.utc) - flood_time < timedelta(minutes=30):
                n_alert, s_alert = 4, "ALARM! WYKRYTO ZALANIE!"

        # --- WYSYŁKA DO DOMOTICZA ---
        update_domoticz(IDX_SOL, 0, sol)
        update_domoticz(IDX_WODA_DZIS, 0, woda_dzis)
        update_domoticz(IDX_WODA_ZAPAS, 0, woda_zapas)
        update_domoticz(IDX_DATA_REGEN, 0, clean_date)
        update_domoticz(IDX_ALARM, n_alert, s_alert)
        update_domoticz(IDX_WAKACJE_SW, vac_n, vac_s)
        update_domoticz(IDX_TRYB, 0, tryb_tekst) # <--- Wysyłka trybu

        print(f"[{datetime.now().strftime('%H:%M:%S')}] Aktualizacja OK.")
        print(f"Tryb: {tryb_tekst}, Sól: {sol}%, Woda dziś: {woda_dzis}L")

except Exception as e:
    print(f"Błąd krytyczny: {e}")
    
The attached photo shows what types of virtual sensors should be added in domoticz.

This is my first post, so please be understanding when it comes to descriptions and information :)

Thanks again to waltervl for effectively pointing me in the right direction :D

Re: Viessman Aquastilla smart

Posted: Thursday 15 January 2026 11:37
by waltervl
Thanks for sharing. Next wonderful step would be to make this a python plugin but that is perhaps for another Aquastilla user with python skills to do... ;)