Viessmann VitoConnect API

Begonnen von ritschi, 22 März 2018, 06:53:24

Vorheriges Thema - Nächstes Thema

Mave

Meine Viessmann App zeigt den Gasverbrauch getrennt nach Heizung und Warmwasser.

In FHEM stimmt der Gasverbrauch für die Heizung, der Gasverbrauch vom Warmwasser ist mit dem Verbrauch der Heizung identisch und ist somit falsch.

Hat jemand eine Idee, wie man an den Verbrauch für Warmwasser kommt?


Frini

Ich glaube da wird im Hintergrund noch gearbeitet. In der VicareApp sind diese Daten noch nicht eingepflegt.

Mave

Danke Frini.

Hast Du auch noch die Fehlermeldungen im Log?

opus42

Zitat von: Mave am 30 Oktober 2018, 21:20:43
Meine Viessmann App zeigt den Gasverbrauch getrennt nach Heizung und Warmwasser.

In FHEM stimmt der Gasverbrauch für die Heizung, der Gasverbrauch vom Warmwasser ist mit dem Verbrauch der Heizung identisch und ist somit falsch.

Hat jemand eine Idee, wie man an den Verbrauch für Warmwasser kommt?

Moin, welche ViessmannApp nutzt Du? In ViCare wird das m.E. ja nicht angezeigt. Mittels des Scriptes erhalte ich für Heiz- und Warmwasserbetrieb auch identische Werte. Diese Werte stimmen aber nicht mit den Werten die in der Anzeige der Heizung dargestellt werden überein (dort gibt es auch nur den (Gesamt-)Gasverbrauch, dazu aber auch noch den Stromverbrauch.)

Mave

Ich nutze neben der ViCare noch die Vitotrol Plus und da werden die Gasverbräuche von Heizung und Warmwasser separat ausgewiesen.

Das, was in FHEM angezeigt wird, entspricht exakt dem Gasverbrauch für Heizung. Das bedeutet, der Verbrauch für Warmwasser fehlt.

Aladin222

@mave,

die Vitotrol Plus App scheint es im Store nicht mehr zu geben :-(
Also ,lösche sie nicht !
Es wird eine Vitrol App im Store angeboten ,welche eine Registrierung bzw Anmeldung bei mir nicht zulässt !

Wie wird die Gasmenge denn angezeigt ? In KWh oder m3 ? Passt die Zahlenangabe mit Fhem genau überein ?


opus42

#171
Zitat von: Aladin222 am 01 November 2018, 02:43:30
@mave,

die Vitotrol Plus App scheint es im Store nicht mehr zu geben :-(
Also ,lösche sie nicht !
Es wird eine Vitrol App im Store angeboten ,welche eine Registrierung bzw Anmeldung bei mir nicht zulässt !

Wie wird die Gasmenge denn angezeigt ? In KWh oder m3 ? Passt die Zahlenangabe mit Fhem genau überein ?

Merkwürdig, ich hatte mir gestern noch die Plus Version installiert, mir einen Zugang dafür  registriert um dann festzustellen kein passendes Gerät  zu haben.
Die vom Script angezeigten Werte sind geringer als die an der Anlage angezeigten. Wie @mave  schon sagte sind es im Script lediglich/immer die Werte der Heizverbrauchs.

thetrueavatar

Hello,  for information, I have added a bunch of new methods that might interest you on my api:
- getDhwGasConsumption
- getHeatingGasConsumption
- getHeatingBurnerCurrentPower
- getHeatingBurnerModulation
- getCirculationPumpStatus
- isDhwCharging
- getDhwChargingLevel
- isOneTimeDhwCharge
- getDhwPumpsCirculation
- getDhwPumpsPrimary
- getDhwSchedule
- setRawDhwSchedule
- getHeatingSchedule
- setRawSchedule
- getCirculationSchedule
- setRawCirculationSchedule

Code is availabable on github https://github.com/thetrueavatar/Viessmann-API and documentation is now auto-generated base on code(still have some problem with @param,@return,@throws annotation though) and can be found here:
https://htmlpreview.github.io/?https://raw.githubusercontent.com/thetrueavatar/Viessmann-Api/develop/docs/class-Viessmann.API.ViessmannAPI.html

Frini

Hi have seen it on github. I will give it a try next week.
The parts isOneTimeCharge the code for manual dhw charging?

thetrueavatar

Zitat von: Frini am 02 November 2018, 19:59:58
Hi have seen it on github. I will give it a try next week.
The parts isOneTimeCharge the code for manual dhw charging?

To be honest I don't know. I have seen this feature in the demo sample that can be found in the ViCare App(guess it's a mistake that we can find it there). I don't know exactly the meaning of it. Since I don't have this on my own heating device I have only be able to test it against those demo sample but till now demo sample was corresponding to what viessmann service expose...
Here is the json file from demo sample:

{
  "actions": [
    {
      "isExecutable": true,
      "href": "http://0.0.0.0:8082/operational-data/installations/demo/gateways/7123456789123456/devices/0/features/heating.dhw.oneTimeCharge/activate",
      "method": "POST",
      "title": "activate",
      "name": "activate"
    },
    {
      "isExecutable": true,
      "href": "http://0.0.0.0:8082/operational-data/installations/demo/gateways/7123456789123456/devices/0/features/heating.dhw.oneTimeCharge/deactivate",
      "method": "POST",
      "title": "deactivate",
      "name": "deactivate"
    }
  ],
  "links": [
    {
      "rel": [
        "self"
      ],
      "href": "http://0.0.0.0:8082/operational-data/installations/demo/gateways/7123456789123456/devices/0/features/heating.dhw.oneTimeCharge"
    },
    {
      "rel": [
        "up"
      ],
      "href": "http://0.0.0.0:8082/operational-data/installations/demo/gateways/7123456789123456/devices/0/features"
    },
    {
      "rel": [
        "http://schema.viessmann.com/link-relations#live-updates"
      ],
      "href": "/operational-data/installations/demo/gateways/7123456789123456/devices/0/features/heating.dhw.oneTimeCharge"
    },
    {
      "rel": [
        "via"
      ],
      "href": "https://staging-estrella.viessmann-platform.io/estrella/rest/v1.0/installations/demo/gateways/7123456789123456/devices/0/features/heating.dhw.oneTimeCharge"
    }
  ],
  "properties": {
    "active": {
      "value": false,
      "type": "boolean"
    }
  },
  "entities": [
    {
      "rel": [
        "http://schema.viessmann.com/link-relations#feature-meta-information"
      ],
      "properties": {
        "apiVersion": 1,
        "isEnabled": true,
        "isReady": true,
        "gatewayId": "7123456789123456",
        "timestamp": "2017-12-22T12:19:05.613Z",
        "uri": "/v1/gateways/7123456789123456/devices/0/features/heating.dhw.oneTimeCharge",
        "feature": "heating.dhw.oneTimeCharge",
        "deviceId": "0"
      }
    }
  ],
  "class": [
    "heating.dhw.oneTimeCharge",
    "feature"
  ]
}

My guess it's that's kind of manual charging indeed. I know that I can on my Vitocell 100-B add an electrical heating to increase hot-storage water temperature. Maybe this is related but I'm not sure...

Mave

Zitat von: Aladin222 am 01 November 2018, 02:43:30
@mave,

die Vitotrol Plus App scheint es im Store nicht mehr zu geben :-(
Also ,lösche sie nicht !
Es wird eine Vitrol App im Store angeboten ,welche eine Registrierung bzw Anmeldung bei mir nicht zulässt !

Wie wird die Gasmenge denn angezeigt ? In KWh oder m3 ? Passt die Zahlenangabe mit Fhem genau überein ?

Ich teile die Angabe in FHEM durch 8 und damit stimmt der Wert exakt mit der App (kWh) überein.

thetrueavatar

#176
For information a french guy has analyzed data returned by ViCare and found some bug/difference with gaz consumption depending on period asked:
- day: return last seven daily consumption.   Was 8 on Vitotrol Plus
- week: return last 52 weekly consumption Was 53 on Vitotrol Plus
- month: return last 12 monthly consumption Was 12 on Vitotrol Plus
- year: return last 2 yearly consumption Was 3 on Vitotrol Plus

I will fill in this post as soon as jeedom forum is available but afair he noticed some bug while consumption > 256kwh.

Frini

Zitat von: thetrueavatar am 03 November 2018, 00:02:28
To be honest I don't know. I have seen this feature in the demo sample that can be found in the ViCare App(guess it's a mistake that we can find it there). I don't know exactly the meaning of it. Since I don't have this on my own heating device I have only be able to test it against those demo sample but till now demo sample was corresponding to what viessmann service expose...
Here is the json file from demo sample:

{
  "actions": [
    {
      "isExecutable": true,
      "href": "http://0.0.0.0:8082/operational-data/installations/demo/gateways/7123456789123456/devices/0/features/heating.dhw.oneTimeCharge/activate",
      "method": "POST",
      "title": "activate",
      "name": "activate"
    },
    {
      "isExecutable": true,
      "href": "http://0.0.0.0:8082/operational-data/installations/demo/gateways/7123456789123456/devices/0/features/heating.dhw.oneTimeCharge/deactivate",
      "method": "POST",
      "title": "deactivate",
      "name": "deactivate"
    }
  ],
  "links": [
    {
      "rel": [
        "self"
      ],
      "href": "http://0.0.0.0:8082/operational-data/installations/demo/gateways/7123456789123456/devices/0/features/heating.dhw.oneTimeCharge"
    },
    {
      "rel": [
        "up"
      ],
      "href": "http://0.0.0.0:8082/operational-data/installations/demo/gateways/7123456789123456/devices/0/features"
    },
    {
      "rel": [
        "http://schema.viessmann.com/link-relations#live-updates"
      ],
      "href": "/operational-data/installations/demo/gateways/7123456789123456/devices/0/features/heating.dhw.oneTimeCharge"
    },
    {
      "rel": [
        "via"
      ],
      "href": "https://staging-estrella.viessmann-platform.io/estrella/rest/v1.0/installations/demo/gateways/7123456789123456/devices/0/features/heating.dhw.oneTimeCharge"
    }
  ],
  "properties": {
    "active": {
      "value": false,
      "type": "boolean"
    }
  },
  "entities": [
    {
      "rel": [
        "http://schema.viessmann.com/link-relations#feature-meta-information"
      ],
      "properties": {
        "apiVersion": 1,
        "isEnabled": true,
        "isReady": true,
        "gatewayId": "7123456789123456",
        "timestamp": "2017-12-22T12:19:05.613Z",
        "uri": "/v1/gateways/7123456789123456/devices/0/features/heating.dhw.oneTimeCharge",
        "feature": "heating.dhw.oneTimeCharge",
        "deviceId": "0"
      }
    }
  ],
  "class": [
    "heating.dhw.oneTimeCharge",
    "feature"
  ]
}

My guess it's that's kind of manual charging indeed. I know that I can on my Vitocell 100-B add an electrical heating to increase hot-storage water temperature. Maybe this is related but I'm not sure...

I this could it be.
i tried to do it according the code by you where you activate the ecoprogram. But it didn't work. But at the moment I am in Denmark so I only can "work" with my mobile phone.

thetrueavatar

#178
I do confirm there is a remaining bug with echo activation.
EDIT: just fix it. Could you give it a try once again ?

Mave

Zitat von: Mave am 28 Oktober 2018, 13:40:03
Nach Installation von PHP-CURL kann ich die Werte auslesen!

sudo apt-get install php-curl


Jetzt habe ich "nur" noch diese Meldungen im Log:

PHP Notice:  Undefined offset: 0 in /opt/fhem/viessmann.php on line 193
PHP Warning:  Invalid argument supplied for foreach() in /opt/fhem/viessmann.php on line 194
PHP Notice:  Undefined offset: 0 in /opt/fhem/viessmann.php on line 193
PHP Warning:  Invalid argument supplied for foreach() in /opt/fhem/viessmann.php on line 194
PHP Notice:  Undefined offset: 0 in /opt/fhem/viessmann.php on line 193
PHP Warning:  Invalid argument supplied for foreach() in /opt/fhem/viessmann.php on line 194
PHP Notice:  Undefined offset: 0 in /opt/fhem/viessmann.php on line 193
PHP Warning:  Invalid argument supplied for foreach() in /opt/fhem/viessmann.php on line 194
PHP Notice:  Undefined offset: 0 in /opt/fhem/viessmann.php on line 193
PHP Warning:  Invalid argument supplied for foreach() in /opt/fhem/viessmann.php on line 194
PHP Notice:  Undefined offset: 0 in /opt/fhem/viessmann.php on line 193
PHP Warning:  Invalid argument supplied for foreach() in /opt/fhem/viessmann.php on line 194
PHP Notice:  Undefined offset: 0 in /opt/fhem/viessmann.php on line 193
PHP Warning:  Invalid argument supplied for foreach() in /opt/fhem/viessmann.php on line 194



Diese Meldungen sind lästig und müllen das Log voll.

Jemand eine Idee, wie das Problem gelöst werden kann?

Alternativ eine Idee, wie man das Logging von PHP deaktivieren kann?