Skip to content

Instantly share code, notes, and snippets.

@MoritzBuetzer
Created December 21, 2020 08:17
Show Gist options
  • Save MoritzBuetzer/6441d4045f989ef57aed915250bb4020 to your computer and use it in GitHub Desktop.
Save MoritzBuetzer/6441d4045f989ef57aed915250bb4020 to your computer and use it in GitHub Desktop.
REST Integration for V-Zug Home Appliances in Home Assistant
- platform: rest
resource: http://[DEVICE_IP]/ai?command=getDeviceStatus
name: 'V-Zug CookTopInduktion V6000'
authentication: digest
username: !secret vzug.username
password: !secret vzug.password
json_attributes:
- DeviceName
- Serial
- Inactive
- Status
- Program
- ProgramEnd
- platform: template
sensors:
vzug_cooktopinduktion_devicename:
friendly_name: 'V-Zug CookTopInduktion V6000 DeviceName'
value_template: "{{ state_attr('sensor.v_zug_cooktopinduktion_v6000', 'DeviceName') }}"
vzug_cooktopinduktion_serial:
friendly_name: 'V-Zug CookTopInduktion V6000 Serial'
value_template: "{{ state_attr('sensor.v_zug_cooktopinduktion_v6000', 'Serial') }}"
vzug_cooktopinduktion_inactive:
friendly_name: 'V-Zug CookTopInduktion V6000 Inactive'
value_template: "{{ state_attr('sensor.v_zug_cooktopinduktion_v6000', 'Inactive') }}"
vzug_cooktopinduktion_status:
friendly_name: 'V-Zug CookTopInduktion V6000 Status'
value_template: "{{ state_attr('sensor.v_zug_cooktopinduktion_v6000', 'Status') }}"
vzug_cooktopinduktion_program:
friendly_name: 'V-Zug CookTopInduktion V6000 Program'
value_template: "{{ state_attr('sensor.v_zug_cooktopinduktion_v6000', 'Program') }}"
vzug_cooktopinduktion_end:
friendly_name: 'V-Zug CookTopInduktion V6000 End'
value_template: "{{ state_attr('sensor.v_zug_cooktopinduktion_v6000', 'ProgramEnd')['End'] }}"
vzug_cooktopinduktion_endtype:
friendly_name: 'V-Zug CookTopInduktion V6000 End'
value_template: "{{ state_attr('sensor.v_zug_cooktopinduktion_v6000', 'ProgramEnd')['EndType'] }}"
@Hensenen
Copy link

Hensenen commented Dec 14, 2022

@Judocrafter @neonightmare Is there any chance to get the code for the adora Spühlen V4000? Basically i just dont know how to name the sensors :s (pretty new to HA).

@Hensenen I am using this one - based on the one from @wiesmann I guess:

#VZUG Integration Dishwasher
rest:
  - scan_interval: 60
    resource: http://[deviceIP]/ai?command=getDeviceStatus
    sensor:
      name: v_zug_dishwasher
      json_attributes:
        - DeviceName
        - Serial
        - Inactive
        - Status
        - Program
        - ProgramEnd
        - EndType

and

#VZUG Integration Dishwasher
template:
  - sensor:
      - name: v_zug_dishwasher_serial
        state: "{{ state_attr('sensor.v_zug_dishwasher', 'Serial') }}"
      - name: v_zug_dishwasher_inactive
        state: "{{ state_attr('sensor.v_zug_dishwasher', 'Inactive') }}"
      - name: v_zug_dishwasher_program
        state: "{{ state_attr('sensor.v_zug_dishwasher', 'Program') }}"
      - name: v_zug_dishwasher_status
        state: "{{ state_attr('sensor.v_zug_dishwasher', 'Status') }}"
      - name: v_zug_dishwasher_ProgramEnd
        state: "{{ state_attr('sensor.v_zug_dishwasher', 'ProgramEnd') }}"
      - name: v_zug_dishwasher_EndType
        state: "{{ state_attr('sensor.v_zug_dishwasher', 'EndType') }}"

@daphil012
Alright, thanks so far guys :) i managed to integrate the vzug Adora V4000 with these variables. I already made some quick n dirty card by using a combination of vertical/horizontal card with entitys, which works fine generally - but i have a problem with the remaining time (Programend).

As you can see in the screenshot, i get the whole string incl. the endtype - but i only would like to see the tie itself, without the other marks.

Since you seem to have a similiar dishwasher, do you get this string too - or how did you manage that point?

Another thing: which kind of config/card did you use for your integration? i guess there are many better options, but couldnt find anything specific in my short google search.
2022-12-13 23_26_02-Dwains Dashboard – Home Assistant

@daphil012
Copy link

@Hensenen
I do not really use the integration in my dashboard but for push notifications if a program is finished. For this I simlply check on the sensor state and execute a notification.

platform: template value_template: "{{ 'Programm beendet' in states('sensor.v_zug_dishwasher') }}"

@chruetli
Copy link

chruetli commented Jan 5, 2023

I use this integration for my "AdoraWaschen V2000" (the "dishwasher" and the "washer" have the same json attributes). But I often get the following error message:
{"error":{"code":503.01}}
The "unaesthetic" part is that the values are shown as unknown but the bad thing is that this state change fills the log file. Anyone had the same problem? (Or an idea how to ignore those values)

@daphil012
Copy link

I get the same error-code - always after finishing a programm. It started some months ago, so I guess it is connected with one of the latest updates. I contacted the VZUG support and got the following feedback:

Besten Dank für Ihre Interesse an der Vernetzung der V-ZUG Geräte. Momentan dient die Vernetzung unserer Geräte im Moment lediglich dem Zugriff auf die Geräte über die V-ZUG App sowie unseres Partners digitalStrom.

As mentioned in my post 3 weeks ago, they claim to work on an API update, which hopefully will solve this issue.

@chruetli
Copy link

chruetli commented Jan 6, 2023

Hmm, thanks for the info. So we will wait for the next update...
Btw, any idea what the "EndType" is?

@jjdave2002
Copy link

Hi There, does anybody know the correct json attributes for a combi steamer V6000? It looks that 'program' and 'status' is not working correctly, always got an empty string. Thanks in advance for any help!! JJ

@daphil012
Copy link

Hmm, thanks for the info. So we will wait for the next update... Btw, any idea what the "EndType" is?

No, I am not sure. Just saw that while a program is running the value is "2" and as soon as the program stops it reports "0".

{"DeviceName":"","Serial":"XXX","Inactive":"false","Program":"Intensiv","Status":"Trocknen","ProgramEnd":{"End":"0h02","EndType":"2"},"deviceUuid":"XXX"}

and later

{"DeviceName":"","Serial":"XXX","Inactive":"false","Program":"Intensiv","Status":"Programm beendet, Nachtrocknen\nEnergie: 1,4 kWh, Wasser: 23 l","ProgramEnd":{"End":"","EndType":"0"},"deviceUuid":"XXX"}

@daphil012
Copy link

Hi There, does anybody know the correct json attributes for a combi steamer V6000? It looks that 'program' and 'status' is not working correctly, always got an empty string. Thanks in advance for any help!! JJ

I don't have a V6000 so I cannot check the values, but have you tried the URL to get the status?

http://DEVICEIP/ai?command=getDeviceStatus

@jjdave2002
Copy link

Hi There, does anybody know the correct json attributes for a combi steamer V6000? It looks that 'program' and 'status' is not working correctly, always got an empty string. Thanks in advance for any help!! JJ

I don't have a V6000 so I cannot check the values, but have you tried the URL to get the status?

http://DEVICEIP/ai?command=getDeviceStatus

Yes, I did it. But always get empty result for program and status, as below. Any ideas what might be wrong?
Thanks JJ

{"DeviceName":"","Serial":"23030 000000","Inactive":"false","Program":"","Status":"","ProgramEnd":{"EndType":"0","End":""},"deviceUuid":"3300600"}

@daphil012
Copy link

Well, if the device is not running this is normal. But as soon it starts - what is indicated by "inactive:false" - there should be information. Is there proper information in the VZUG mobile app and/or web app?

image

@jjdave2002
Copy link

Yes, in the mobile app status and program is shown properly.
And yes, I tested it also during running state e.q. inactive = false. Same result/effect -> no status nor program information.

@EagleAdam
Copy link

EagleAdam commented Jan 17, 2023

Hi all, I just found this thread, owner of a V4000 dishwasher as well. In browsing around I found another thread where they managed to get a bit more data out of the vzug appliances.

I found the following:
http://172.16.0.xx/hh?command=getCommand&value=ECO_MGMT_ENERGY_PROGRAM&_=1673954407332
http://172.16.0.xx/hh?command=getCommand&value=ECO_MGMT_WATER_PROGRAM&_=1673954407333
http://172.16.0.xx/hh?command=getCommand&value=ECO_MGMT_ENERGY_AVG&_=1673954407334
http://172.16.0.xx/hh?command=getCommand&value=ECO_MGMT_WATER_AVG&_=1673954407335
http://172.16.0.xx/hh?command=getCommand&value=ECO_MGMT_ENERGY_TOTAL&_=1673954407337
http://172.16.0.xx/hh?command=getCommand&value=ECO_MGMT_WATER_TOTAL&_=1673954407338

Calling these gives me a json response:
{"type":"status","description":"Total consumption","command":"ECO_MGMT_ENERGY_TOTAL","value":"346 kWh","alterable":false}

Using this code I can get the value in HA:

  - scan_interval: 300
    resource: http://172.16.0.98/hh?command=getCommand&value=ECO_MGMT_ENERGY_TOTAL
    sensor:
      name: v_zug_totalenergy
      json_attributes:
        - command
        - value

and

template:
  - sensor:
      - name: v_zug_dishwasher_totalenergy
        state: "{{ state_attr('sensor.v_zug_totalenergy', 'value') }}"

Three issues:

  1. The value is a string, could someone help me learn how to convert it to an interger?
  2. From what I can tell, each value requires a separate REST call. Any idea how to "elegantly" put this into a config file?
  3. I think the number at the end of the URL is a unix timestamp

@adibu
Copy link

adibu commented Jan 26, 2023

Hi,

looking into the same parameters - want to read out total (and if possible current) energy and water consumtion from my machines to feed it in the energy monitor.

Your issues:

  1. This might be a starting point for string to value: and
  1. Yes most likely a unix epoch - however I learned that the API ignores values that are not implemented if added but you might play around and query historic values, if they change its a valid value parameter and the device stores historic states which would be nice.

My issues:

  • both are Adora V2000 series, both on latest firmware

  • I get an error {"error":{"code":400.03}}

  • this issue expands on commands:
    /hh?command=getCommands
    /hh?command=getCommand
    /hh?command=doTurnOff

  • some commands work such as:
    /hh?command=getCategories
    /hh?command=getProgram
    /hh?command=getZHMode
    /ai?command=getModelDescription
    /hh?command=getCategory&value=EcoManagement
    /ai?command=getDeviceStatus
    /ai?command=getLastPUSHNotifications

Any ideas?

@phoebos02
Copy link

phoebos02 commented Jan 31, 2023

  1. The value is a string, could someone help me learn how to convert it to an interger?

Hi all

I have a V4000 since some days and I gave all of it a bit of additional love. Here's my current config:

rest:
  - scan_interval: 20
    resource: http://192.168.2.2/ai?command=getDeviceStatus
    sensor:
      name: vzug_dishwasher
      json_attributes:
        - DeviceName
        - Serial
        - Inactive
        - Status
        - Program
        - ProgramEnd
        - EndType
  - scan_interval: 60
    resource: http://192.168.2.2/hh?command=getCommand&value=ECO_MGMT_ENERGY_PROGRAM
    sensor:
      name: vzug_dishwasher_last_energy
      value_template: "{{value_json.value[:-3].replace(',','.') | float(0) }}" # strip kWh
      unit_of_measurement: "kWh"
  - scan_interval: 120
    resource: http://192.168.2.2/hh?command=getCommand&value=ECO_MGMT_ENERGY_AVG
    sensor:
      name: vzug_dishwasher_avg_energy
      value_template: "{{ value_json.value[:-7].replace(',','.') | float(0) }}" # strip kWh/Ch.
      unit_of_measurement: "kWh"
  - scan_interval: 60
    resource: http://192.168.2.2/hh?command=getCommand&value=ECO_MGMT_ENERGY_TOTAL
    sensor:
      name: vzug_dishwasher_tot_energy
      value_template: "{{value_json.value[:-3].replace(',','.') | float(0) }}" # strip kWh
      unit_of_measurement: "kWh"
  - scan_interval: 60
    resource: http://192.168.2.2/hh?command=getCommand&value=ECO_MGMT_WATER_PROGRAM
    sensor:
      name: vzug_dishwasher_last_water
      value_template: "{{ value_json.value[:-1].replace(',','.') | float(0) }}" # strip l
      unit_of_measurement: "l"
  - scan_interval: 120
    resource: http://192.168.2.2/hh?command=getCommand&value=ECO_MGMT_WATER_AVG
    sensor:
      name: vzug_dishwasher_avg_water
      value_template: "{{ value_json.value[:-5].replace(',','.') | float(0) }}" # strip l/Ch.
      unit_of_measurement: "l"
  - scan_interval: 60
    resource: http://192.168.2.2/hh?command=getCommand&value=ECO_MGMT_WATER_TOTAL
    sensor:
      name: vzug_dishwasher_tot_water
      value_template: "{{ value_json.value[:-1].replace(',','.') | float(0) }}" # strip l
      unit_of_measurement: "l"

template:
  - sensor:
      - name: vzug_dishwasher_devicename
        state: "{{ state_attr('sensor.vzug_dishwasher', 'DeviceName') }}"
      - name: vzug_dishwasher_serial
        state: "{{ state_attr('sensor.vzug_dishwasher', 'Serial') }}"
      - name: vzug_dishwasher_inactive
        state: "{{ state_attr('sensor.vzug_dishwasher', 'Inactive') }}"
      - name: vzug_dishwasher_program
        state: "{{ state_attr('sensor.vzug_dishwasher', 'Program') }}"
      - name: vzug_dishwasher_status
        state: "{{ state_attr('sensor.vzug_dishwasher', 'Status') }}"
      - name: vzug_dishwasher_program_end
        state: "{{ state_attr('sensor.vzug_dishwasher', 'ProgramEnd').End }}"
      - name: vzug_dishwasher_program_end_type
        state: "{{ state_attr('sensor.vzug_dishwasher', 'ProgramEnd').EndType }}"

@Tehral
Copy link

Tehral commented Feb 13, 2023

hi guys I am a bit confused.
I should just be able to add a sensors.yaml with the last code from phoebos02
include it in the configuration and then it should work?

Or am I understanding this wrong?

@Tehral
Copy link

Tehral commented Feb 13, 2023

  1. The value is a string, could someone help me learn how to convert it to an interger?

Hi all

I have a V4000 since some days and I gave all of it a bit of additional love. Here's my current config:

rest:
  - scan_interval: 20
    resource: http://192.168.2.2/ai?command=getDeviceStatus
    sensor:
      name: vzug_dishwasher
      json_attributes:
        - DeviceName
        - Serial
        - Inactive
        - Status
        - Program
        - ProgramEnd
        - EndType
  - scan_interval: 60
    resource: http://192.168.2.2/hh?command=getCommand&value=ECO_MGMT_ENERGY_PROGRAM
    sensor:
      name: vzug_dishwasher_last_energy
      value_template: "{{value_json.value[:-3].replace(',','.') | float(0) }}" # strip kWh
      unit_of_measurement: "kWh"
  - scan_interval: 120
    resource: http://192.168.2.2/hh?command=getCommand&value=ECO_MGMT_ENERGY_AVG
    sensor:
      name: vzug_dishwasher_avg_energy
      value_template: "{{ value_json.value[:-7].replace(',','.') | float(0) }}" # strip kWh/Ch.
      unit_of_measurement: "kWh"
  - scan_interval: 60
    resource: http://192.168.2.2/hh?command=getCommand&value=ECO_MGMT_ENERGY_TOTAL
    sensor:
      name: vzug_dishwasher_tot_energy
      value_template: "{{value_json.value[:-3].replace(',','.') | float(0) }}" # strip kWh
      unit_of_measurement: "kWh"
  - scan_interval: 60
    resource: http://192.168.2.2/hh?command=getCommand&value=ECO_MGMT_WATER_PROGRAM
    sensor:
      name: vzug_dishwasher_last_water
      value_template: "{{ value_json.value[:-1].replace(',','.') | float(0) }}" # strip l
      unit_of_measurement: "l"
  - scan_interval: 120
    resource: http://192.168.2.2/hh?command=getCommand&value=ECO_MGMT_WATER_AVG
    sensor:
      name: vzug_dishwasher_avg_water
      value_template: "{{ value_json.value[:-5].replace(',','.') | float(0) }}" # strip l/Ch.
      unit_of_measurement: "l"
  - scan_interval: 60
    resource: http://192.168.2.2/hh?command=getCommand&value=ECO_MGMT_WATER_TOTAL
    sensor:
      name: vzug_dishwasher_tot_water
      value_template: "{{ value_json.value[:-1].replace(',','.') | float(0) }}" # strip l
      unit_of_measurement: "l"

template:
  - sensor:
      - name: vzug_dishwasher_devicename
        state: "{{ state_attr('sensor.vzug_dishwasher', 'DeviceName') }}"
      - name: vzug_dishwasher_serial
        state: "{{ state_attr('sensor.vzug_dishwasher', 'Serial') }}"
      - name: vzug_dishwasher_inactive
        state: "{{ state_attr('sensor.vzug_dishwasher', 'Inactive') }}"
      - name: vzug_dishwasher_program
        state: "{{ state_attr('sensor.vzug_dishwasher', 'Program') }}"
      - name: vzug_dishwasher_status
        state: "{{ state_attr('sensor.vzug_dishwasher', 'Status') }}"
      - name: vzug_dishwasher_program_end
        state: "{{ state_attr('sensor.vzug_dishwasher', 'ProgramEnd').End }}"
      - name: vzug_dishwasher_program_end_type
        state: "{{ state_attr('sensor.vzug_dishwasher', 'ProgramEnd').EndType }}"

forgot to qoute

@Tehral
Copy link

Tehral commented Feb 13, 2023

I also tried

rest:

template:

  • sensor:
    • name: oven_name
      state: "{{ state_attr('sensor.v_zug_oven', 'DeviceName') }}"
  • sensor:
    • name: oven_inactive
      state: "{{ state_attr('sensor.v_zug_oven', 'Inactive') }}"
  • sensor:
    • name: oven_status
      state: "{{ state_attr('sensor.v_zug_oven', 'Status') }}"
  • sensor:
    • name: oven_program
      state: "{{ state_attr('sensor.v_zug_oven', 'Program') }}"
  • sensor:
    • name: oven_program_end
      state: "{{ state_attr('sensor.v_zug_oven', 'ProgramEnd') }}"

@izacus
Copy link

izacus commented Apr 16, 2023

I'm not sure if this is still useful to anyone, but if I've noticed that the web UI always calls http://<ip>/hh?command=getZHMode right before calling http://<ip>/ai?command=getDeviceStatus.

If I do the same, then the amount of 501.03 errors is significantly reduced.

@chruetli
Copy link

@izacus How can I combine this "wakeup" call with the rest call?

@asowlnowl
Copy link

hi
i use the following config to get the engergy statistics:

sensor:

  • platform: rest
    name: 'V-Zug AdoraWash V4000 Eco Info'
    json_attributes_path: "$.energy"
    json_attributes:
    - total
    - lastMonth
    - lastYear
    - average
    - program
    resource: http://192.168.2.xx/hh?command=getEcoInfo

template:

  • sensor:
    • name: "V-Zug AdoraWash Energy total"
      device_class: energy
      state_class: total_increasing
      unit_of_measurement: kWh
      state: >
      {{ state_attr('sensor.v_zug_adorawash_v4000_eco_info', 'total')}}

That works with my adora wash v4000, AdoraDish V4000, Combair and Combisteamer v6000

but v-zug will change their api in the future. they will publish the new api.

@brutasse
Copy link

but v-zug will change their api in the future. they will publish the new api.

Hello @asowlnowl, is there a way to know more about this new API effort? Do you have a contact with v-zug?

@asowlnowl
Copy link

asowlnowl commented Apr 29, 2023

Hello @asowlnowl, is there a way to know more about this new API effort? Do you have a contact with v-zug?

they told me last fall that they have no eta yet. i just asked per contact form on their website for the api documentation.

@siku2
Copy link

siku2 commented Aug 22, 2023

FYI, I finally bit the bullet and created a proper integration for Home Assistant that can be installed using HACS.
The integration can be found here: https://github.com/siku2/hass-vzug

I used a lot of information in this thread for reference, so thank you all for sharing.

@phoebos02
Copy link

Nice one! Can’t wait to try it out. 👍

@adibu
Copy link

adibu commented Aug 26, 2023

Thank you for this - only had basic date before now a lot more is in the HACS integration. Great stuff!

@MoritzBuetzer
Copy link
Author

@siku2 awesome!

@simondaehler
Copy link

Awsome, Thanks
I have a AdoraDish V2000 I get the error "Einrichtung fehlgeschlage, wird erneut versucht" I guess the interface is not compatible with the V4000....

@siku2
Copy link

siku2 commented Aug 27, 2023

@simondaehler, can you create a new issue or discussion over at the repository? I would like to figure out what the issue is so the V2000 series can be supported as well, I just need a few things from your side and I don't want to clog up this thread.

@chruetli
Copy link

@siku2 I'm using your integration with an adorawash_v2000. I set it up with the very first version, so at least this one did work.

@tebeso
Copy link

tebeso commented Sep 17, 2023

I have both adorawash2000 and adoradry2000 and it works with latest version 0.31. Thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment