thomasgermain / vaillant-component

Multimatic integration for Home Assistant (also compatible with sensoAPP)
MIT License
137 stars 24 forks source link

Feature: get data from emf_report #32

Closed apfelmaennchen closed 3 years ago

apfelmaennchen commented 3 years ago

The emf_report of pymultiMATIC reveals additional devices. In my case a heat pump VWF 117/4 which provides sensor values for energy consumption and environmental yield. Would be cool, if the component could provide these additional devices and sensors as well.

Great work, thanks a lot! apfelmaennchen

thomasgermain commented 3 years ago

Hello,

actually, I don't have anything in emf_report, so it would be great to have the json you receive from the API (don't forget to remove sensitive data) in order to be able to parse the data and made it available to HA

Are you able to do that ?

Thanks,

Thomas

apfelmaennchen commented 3 years ago

emf_report.json.txt

Most likely other devices like the RecoVair will also report into the emf_report. I can't currently confirm that, as my RecoVair has no active ebus connection.

It is also a little bit unfortunate that Vaillant doesn't include all live_reports as available on the devices in their API.

thomasgermain commented 3 years ago

Thanks for your input. Could you tell me what are the units ? I can see your heat pump consumed 18352000.0 XX. Is it only for yesterday or since the beginning ?

I remember why I didn't look further to include the emf_report. Actually, you can call the emf report with plenty of parameters (specially a time range parameter). And as far as I know, there is no way to know if there are compatible devices for emf_report, except by calling emf_report endpoint (= one wasted call if there are no compatible devices).

Maybe I can ask for daily, monthly, yearly and total (not sure if total is possible) report (what else could be interesting ?), but it means it will be 4 more calls to the API, and there are already 5 or 6 calls to get all data integrated into HA.

I can also try to configure what endpoint should be called by checking what are the enabled/disabled HA entities, but it requires lot of changes in HA component and in underlying connector.

I will keep this issue in mind, maybe an idea will come.

Thanks,

Thomas

apfelmaennchen commented 3 years ago

I would claim it is 18,352,000.0 Wh as the System reports 18,4 MWh as "History" (total) value.

Personally I would check during initial setup of the component whether an emf device is present or not. So you are not wasting update calls for installations without a corresponding device. I also would limited it to one update call of total ("History") values and realize the daily, weekly, monthly displays via a standard HA utility meter. I do the same for my overall energy meter. It does not make sense to retrieve and store redundant data via the API.

pepsonEL commented 3 years ago

I have multimatic VRC700 and it show me consuption gas and power but in app and in this component i dont have this info. Is any chance to it will be available in component also for me ?

thomasgermain commented 3 years ago

I have multimatic VRC700 and it show me consuption gas and power but in app and in this component i dont have this info. Is any chance to it will be available in component also for me ?

If it's not in the app, It can't be added to the component.

I would claim it is 18,352,000.0 Wh as the System reports 18,4 MWh as "History" (total) value.

Personally I would check during initial setup of the component whether an emf device is present or not. So you are not wasting update calls for installations without a corresponding device. I also would limited it to one update call of total ("History") values and realize the daily, weekly, monthly displays via a standard HA utility meter. I do the same for my overall energy meter. It does not make sense to retrieve and store redundant data via the API.

Thanks for the tip, I'll keep that in the backlog, I have few things to do before this one, but for sure, I'll have a try

thomasgermain commented 3 years ago

I had a look on this one. I look at what other integrations are doing, and they are not doing overly complex stuff.

So what I think I can start only with the total consumption of every reports (cooling, central heating, etc.). So user can use utility meter do to some calculation/report.

In a second step, if this is needed, I can create a service to get specific report (e.g. I want cooling report from 2021-01-15 to 2021-02-13). Service would take parameters function, energyType start date, en date).

What do you think ?

thomasgermain commented 3 years ago

Hell @apfelmaennchen, I'm a bit late, but I made some changes in 1.7.0 which makes this feature to be included easily.

So in order to include that in the next version, I have a question about the response of the API, you gave me this: https://github.com/thomasgermain/vaillant-component/files/5666724/emf_report.json.txt some times ago. I can see all the reports are for one day (from 2020-12-08 to 2020-12-09). Is it by default or did you do a specific call (with some parameters ?) or did you configure something in the application or at your VRC7XX ?

Thanks,

Thomas

thomas-svrts commented 3 years ago

only exposing the total consumption (in kWh) for each function (heating, hot water, cooling) would already be nice. In my app this is logged under environmental yield. I'm also using the standard HA utility meter to do calculation on daily level...

I'm happy to test this feature. I'm using VWF 87/4 heatpump.

It also seems to me that ENVIRONMENTAL_YIELD contains the all-time consumption and CONSUMED_ELECTRICAL_POWER only the consumption since you connected your multimatic installation with the internet. So ENVIRONMENTAL_YIELD would be more usefull to expose to HA

apfelmaennchen commented 3 years ago

Is it by default or did you do a specific call (with some parameters ?) or did you configure something in the application or at your VRC7XX ?

It is the default, using the emf_report URL provided by pymultiMATIC. The emf_report_devices URL would allow query parameter to define the time range etc.

    query_params = {
        "energyType": energy_type,
        "function": function,
        "timeRange": time_range,
        "start": start,
        "offset": offset,
    }

It requires a device_id which I could not find out so far. Non of the other queries reveals any valid value for device_id. As the App is capable of showing different time ranges it must be possible though.

EDIT: I just ran the report I got the following:

                {
                    "function": "CENTRAL_HEATING",
                    "energyType": "CONSUMED_ELECTRICAL_POWER",
                    "currentMeterReading": 22345000.0,
                    "from": "2020-12-08",
                    "to": "2021-08-09"
                },
                {
                    "function": "CENTRAL_HEATING",
                    "energyType": "ENVIRONMENTAL_YIELD",
                    "currentMeterReading": 36663000.0,
                    "from": "2020-12-08",
                    "to": "2021-08-09"
                },

The 'from' date remained unchanged at '2020-12-08', the 'to' date updated to today. Both values correspond to the total values shown on the heat pump directly. Since my pump runs sind 10/2018 the 'from' date is definitly wrong and probably the date the internet gateway went online. That means we can just use the ha utility meter on the values as suggested earlier, ignoring the dates.

apfelmaennchen commented 3 years ago

It also seems to me that ENVIRONMENTAL_YIELD contains the all-time consumption and CONSUMED_ELECTRICAL_POWER only the consumption since you connected your multimatic installation with the internet.

ENVIRONMENTAL_YIELD is the energy output (heat) of your heat pump. CONSUMED_ELECTRICAL_POWER is the energy consumption (electricity) of the heat pump. A reasonable modern heat pump will yield 3-4 times the energy it consumes.

thomasgermain commented 3 years ago

Thanks for exploring that !

EDIT: I just ran the report I got the following:

                {
                    "function": "CENTRAL_HEATING",
                    "energyType": "CONSUMED_ELECTRICAL_POWER",
                    "currentMeterReading": 22345000.0,
                    "from": "2020-12-08",
                    "to": "2021-08-09"
                },
                {
                    "function": "CENTRAL_HEATING",
                    "energyType": "ENVIRONMENTAL_YIELD",
                    "currentMeterReading": 36663000.0,
                    "from": "2020-12-08",
                    "to": "2021-08-09"
                },

The 'from' date remained unchanged at '2020-12-08', the 'to' date updated to today. Both values correspond to the total values shown on the heat pump directly. Since my pump runs sind 10/2018 the 'from' date is definitly wrong and probably the date the internet gateway went online. That means we can just use the ha utility meter on the values as suggested earlier, ignoring the dates.

which URL (and parameters) are you calling to get these data ?

pfriedrich84 commented 3 years ago

Hi Thomas, i can help with the target as i played around it a bit already! ;-) This example of a sensor of mine is working: state_class: measurement last_reset: '1970-01-01T00:00:00+00:00' unit_of_measurement: kWh friendly_name: Server-Schrank [kWh] device_class: energy

The value is just always increasing and never reseted (so total consumption - value is somewhere around 500kwh). The Energy Implementation of HomeAssistant is now showing those 4-5kwh on a daily basis. Depends on usage/Backup-Tasks/VMs etc - so its automatically splitting it based on the daily increase ... :)

Other possibility would be to reset the value and just add the Delta. Then you would have to put the current timestamp within last_reset. If you have a beta i'm happy to try it!

Hope this helps!

Cheers, Paul

apfelmaennchen commented 3 years ago

which URL (and parameters) are you calling to get these data ?

#!/usr/bin/env python3
import asyncio
import json
import os
import shutil
import sys

import aiohttp

sys.path.append("../")
from pymultimatic.api import Connector, ApiError, urls
from pymultimatic.model import mapper

async def main(user, passw):
    print('Trying to connect with user ' + user)

    async with aiohttp.ClientSession() as sess:

        shutil.rmtree('./dump_result', ignore_errors=True)
        os.mkdir('./dump_result')

        connector = Connector(user, passw, sess)

        try:
            await connector.login(True)
            print('Login successful')
        except ApiError as err:
            print('Cannot login: ' + await err.response.text())

        facilities = await connector.get(urls.facilities_list())
        serial = mapper.map_serial_number(facilities)

        url =  urls.emf_report(**{'serial': serial})
        print(url)
        data = await connector.get(url)
        print(json.dumps(data, indent=4, sort_keys=False))

if __name__ == "__main__":
    if not len(sys.argv) == 3:
        print('Usage: python3 dump.py user pass')
        sys.exit(0)
    user = sys.argv[1]
    passw = sys.argv[2]

    asyncio.get_event_loop().run_until_complete(main(user, passw))
thomasgermain commented 3 years ago

Ok so you're calling https://smart.vaillant.com/mobile/api/v4/facilities/xxx/emf/v1/devices, could you give me the full response you received ?

I would like to be able to get the overall total value for each report of each device in one single api call, but I'm afraid I will have to do a single API call per reports.

BTW, I still can't believe you consume 22345000.0 watt/h (= ~22000 kw/h) in ~ 8 months. This is 5 years of my whole house consumption (I'm at ~4000kw/h/year), Am I missing something ?

apfelmaennchen commented 3 years ago

BTW, I still can't believe you consume 22345000.0 watt/h (= ~22000 kw/h) in ~ 8 months. This is 5 years of my whole house consumption (I'm at ~4000kw/h/year), Am I missing something ?

No, the heat pump runs since October 2018, so its almost 3 years at about 5.000 kWh per year. The remaining consumption was caused during the construction phase of my house. The construction company ran the heat element (not the heat pump) to dry of the concrete. Don't ask, I made them pay the power bill.

The wrong 'from' date relates to the point, that I didn't set the internet gateway online before August 2020, none the less the consumption is displayed correctly. This seems to be a bug.

I thought I provide the script so you could see how I retrieve the data. It is one API call to get the totals of all functions: emf.txt

As said I had no luck with an API call per device which would allow to apply the above mentioned query parameters.

thomasgermain commented 3 years ago

No, the heat pump runs since October 2018, so its almost 3 years at about 5.000 kWh per year. The remaining consumption was caused during the construction phase of my house. The construction company ran the heat element (not the heat pump) to dry of the concrete. Don't ask, I made them pay the power bill.

Ah ok, sorry for being so intrusive :worried:, I just wanted to know the accuracy of the data. Now the 22000 kwh sounds logic. So you confirm that the numbers you see in the API response is the same as the total you can see on your heat pump/VRC700 ?

As said I had no luck with an API call per device which would allow to apply the above mentioned query parameters. Actually, there is 2 calls

  • https://smart.vaillant.com/mobile/api/v4/facilities/xxx/emf/v1/devices lists all the devices and the toal values for each report of each devices
  • https://smart.vaillant.com/mobile/api/v4/facilities/xxx/emf/v1/devices\{deviceId} + energyType, function, timeRange, start, offset parameters to have specific data from a specific report. The deviceId in your case is NoneGateway-LL_HMU00_0304_flexoTHERM_PR_EBUS

Thanks for your help :smile:

pfriedrich84 commented 3 years ago

With a short hint how to collect the data i would share my response too :) (Linux container i guess?)

apfelmaennchen commented 3 years ago

So you confirm that the numbers you see in the API response is the same as the total you can see on your heat pump/VRC700?

Yes, this I can confirm!

The per device call is also working now. I have tried the deviceId many times before without success. I might have had a typo, I should stop doing such things late at night ;-)

URL https://smart.vaillant.com/mobile/api/v4/facilities/xxxx/emf/v1/devices/NoneGateway-LL_HMU00_0304_flexoTHERM_PR_EBUS?energyType=CONSUMED_ELECTRICAL_POWER&function=CENTRAL_HEATING&timeRange=WEEK&start=2021-08-08&offset=0

OUTPUT

{
    "body": [
        {
            "key": "2021-08-02",
            "summaryOfValues": 42578.9473,
            "dataset": [
                {
                    "key": "2021-08-02",
                    "value": 5248.8503
                },
                {
                    "key": "2021-08-03",
                    "value": 6291.2621
                },
                {
                    "key": "2021-08-04",
                    "value": 6291.2621
                }, .....

I did not yet find out, what the 'offset'parameter is good for.

apfelmaennchen commented 3 years ago

With a short hint how to collect the data i would share my response too :)

I have posted the python script which I use to retrieve the data, so you would need access to a python3 interpreter on the command line. The script is based on pymultiMATIC, all you need after installing pymultiMATIC via pip is running the script with your vaillant user and password.

thomasgermain commented 3 years ago

With a short hint how to collect the data i would share my response too :) (Linux container i guess?)

Ah yes, it would be interesting, just to ensure that everybody is receiving the total value :) with the single call. In that case, it would be easy to make new entities available for the energy monitoring.

As @apfelmaennchen said, there is the script he posted before, or you can check here: https://github.com/thomasgermain/pymultiMATIC/tree/master/script, you have a print_response.sh or print_response.ps1 (powershell windows) script. You have to provide user, password and the url you want to the response for. It just does some curl to authenticate et then call the given URL and print the response

pfriedrich84 commented 3 years ago

sorry, tried in a linux container but not able to get a response. not a phyton guy ... :)

if you build a beta i would snap my homeassistant-vm an try it that way ... :(

thomasgermain commented 3 years ago

If you are on windows, you can try print_response.ps1 in a powershell, it should work

pfriedrich84 commented 3 years ago

If you are on windows, you can try print_response.ps1 in a powershell, it should work

Thats what i tried with bypass of executionpolicy etc. but Responste is always NOT_AUTHORIZED EDIT: of course i put the params in ;-)

thomasgermain commented 3 years ago

Are you sure user/passw are corrects :innocent: ? and did you include your URL (like here https://smart.vaillant.com/mobile/api/v4/facilities/xxx/emf/v1/devices, you have to replace xxx by your serial number)

pfriedrich84 commented 3 years ago

yes i am, I added a new user to be able to delete afterwards in multimatic ;-)

powershell -executionpolicy bypass ".\print_response.ps1 usr pwd https://smart.vaillant.com/mobile/api/v4/facilities/211647002019711609330170****/emf/v1/devices" (last 4 digits removed for the post)

Sorry, but what about adding a beta which puts in into the log or something? Upgrade via hacs is plenty fast ...

thomasgermain commented 3 years ago

Yeah sure, I will do a beta, but I wanted to be sure the value are correct for everybody. The beta requires some work and tests before it's available

pfriedrich84 commented 3 years ago

Thomas one idea, can you put a pyscript here to use? https://hacs-pyscript.readthedocs.io/en/latest/tutorial.html#writing-your-first-script

like this it would be easy for everybody to deliver the data.

apfelmaennchen commented 3 years ago

Responste is always NOT_AUTHORIZED

I have to put user and password in quotes, otherwise I get an authorization error, probably due to special characters in the password. Might be the same for the print_response.ps1 script.

python3 dump.py 'user' 'password'

thomasgermain commented 3 years ago

@apfelmaennchen I just did a PR here (https://github.com/thomasgermain/pymultiMATIC/pull/77). I still need to do more unit tests. May I ask you to test that SystemManager#get_emf_devices actually works ? (I only receive an HTTP 409 since I don't have any compatible device). You should receive the same kind of result as the direct API call does. Also please note, in that branch, urls.emf_report became urls.emf_devices

apfelmaennchen commented 3 years ago

May I ask you to test that SystemManager#get_emf_devices actually works ?

It does work and outputs a list:

EmfReport(device_id='NoneGateway-LL_HMU00_0304_flexoTHERM_PR_EBUS', device_name='VWF 117/4', device_type='HEAT_PUMP', function='CENTRAL_HEATING', energyType='CONSUMED_ELECTRICAL_POWER', value=22353000.0, from_date=datetime.date(2020, 12, 8), to_date=datetime.date(2021, 8, 10))
EmfReport(device_id='NoneGateway-LL_HMU00_0304_flexoTHERM_PR_EBUS', device_name='VWF 117/4', device_type='HEAT_PUMP', function='DHW', energyType='ENVIRONMENTAL_YIELD', value=468000.0, from_date=datetime.date(2020, 12, 8), to_date=datetime.date(2021, 8, 10))
EmfReport(device_id='NoneGateway-LL_HMU00_0304_flexoTHERM_PR_EBUS', device_name='VWF 117/4', device_type='HEAT_PUMP', function='CENTRAL_HEATING', energyType='ENVIRONMENTAL_YIELD', value=36679000.0, from_date=datetime.date(2020, 12, 8), to_date=datetime.date(2021, 8, 10))
EmfReport(device_id='NoneGateway-LL_HMU00_0304_flexoTHERM_PR_EBUS', device_name='VWF 117/4', device_type='HEAT_PUMP', function='COOLING', energyType='ENVIRONMENTAL_YIELD', value=0.0, from_date=datetime.date(2020, 12, 8), to_date=datetime.date(2021, 8, 10))
EmfReport(device_id='NoneGateway-LL_HMU00_0304_flexoTHERM_PR_EBUS', device_name='VWF 117/4', device_type='HEAT_PUMP', function='COOLING', energyType='CONSUMED_ELECTRICAL_POWER', value=0.0, from_date=datetime.date(2020, 12, 8), to_date=datetime.date(2021, 8, 10))
EmfReport(device_id='NoneGateway-LL_HMU00_0304_flexoTHERM_PR_EBUS', device_name='VWF 117/4', device_type='HEAT_PUMP', function='DHW', energyType='CONSUMED_ELECTRICAL_POWER', value=752000.0, from_date=datetime.date(2020, 12, 8), to_date=datetime.date(2021, 8, 10))
apfelmaennchen commented 3 years ago

Just while you are at it, there is also the live reports, which would give us some more sensor data. You could just add a SystemManager#get_live-reports in the same manner. By the way the live_report_device URL does not reveal any additional information over the live_report, at least on my setup.

https://smart.vaillant.com/mobile/api/v4/facilities/xxxx/livereport/v1

{
    "body": {
        "devices": [
            {
                "reports": [
                    {
                        "unit": "\u00b0C",
                        "name": "Vorlauftemperatur VF1",
                        "value": 35.4,
                        "_id": "FlowTemperatureVF1",
                        "measurement_category": "TEMPERATURE",
                        "associated_device_function": "HEATING"
                    },
                    {
                        "unit": "bar",
                        "name": "Wasserdruck",
                        "value": 1.8,
                        "_id": "WaterPressureSensor",
                        "measurement_category": "PRESSURE",
                        "associated_device_function": "HEATING"
                    }
                ],
                "_id": "Control_SYS_MultiMatic",
                "name": "multiMATIC"
            }
        ]
    },
    "meta": {
        "resourceState": [
            {
                "state": "SYNCED",
                "timestamp": 1628607843,
                "link": {
                    "rel": "child",
                    "resourceLink": "/facilities/xxxx/livereport/v1/devices/Control_SYS_MultiMatic/reports/FlowTemperatureVF1"
                }
            },
            {
                "state": "SYNCED",
                "timestamp": 1628607843,
                "link": {
                    "rel": "child",
                    "resourceLink": "/facilities/xxxx/livereport/v1/devices/Control_SYS_MultiMatic/reports/WaterPressureSensor"
                }
            }
        ]
    }
}
thomasgermain commented 3 years ago

Thanks for the test ! Live report are already included. Normally you should have the water pressure and water temp inside the circuit available. There is also the water tank temperature (if any). I will start a 1.8.0 beta :smile:

thomasgermain commented 3 years ago

Hmm, it was actually quite fast, but release 1.8.0b0 is out :grinning:. It should be available through HACS.

You should be able to see at least one new device in the integration (I never have more than one device in any example I saw, but technically speaking, the API est returning a list, so you might see more devices). In this device, you should have multiple entities about the consumption. The entity id is quite long, but this is the only way to avoid collisions. And, of course, these entities should be "energy" compatible, meaning you can add them to your energy dashboard.

Please note I was not able to test it at all. I only tested it with static data provided by you.

Let me know if it works !

pfriedrich84 commented 3 years ago

It is perfect ;-)

Entitäten VWF 87/4 CENTRAL_HEATING CONSUMED_ELECTRICAL_POWER 14.248.000,0 Wh VWF 87/4 CENTRAL_HEATING ENVIRONMENTAL_YIELD 36.662.000,0 Wh VWF 87/4 COOLING CONSUMED_ELECTRICAL_POWER 511.000,0 Wh VWF 87/4 COOLING ENVIRONMENTAL_YIELD 3.426.000,0 Wh VWF 87/4 DHW CONSUMED_ELECTRICAL_POWER 5.135.000,0 Wh VWF 87/4 DHW ENVIRONMENTAL_YIELD 5.663.000,0 Wh

added to the energy board, now waiting for values there

cheers, Paul

edit: it added those entites within one device as you stated. edit2: the bad water operation was because the company activated the add.heater for the water - crap ...

thomasgermain commented 3 years ago

Glad to hear it's working :)

Forgot to say, it updates every 4h, it can be reduced or increased, depending of your feedback

pfriedrich84 commented 3 years ago

I will keep it running - cooling and water is active so there should be changes. Will give you an update asap.

Regarding the interval ... well i don't know it might be usefull to get it more often - maybe with a parameter? as we don't have a PV yet it doesn't matter for me, it just statistics.

one thing right away, you are reporting Wh now but the interace is only delivery kWh, so it might make sense to adapt that later on.

apfelmaennchen commented 3 years ago

Glad to hear it's working :)

Forgot to say, it updates every 4h, it can be reduced or increased, depending of your feedback

Just installed it, seems to work well! I would reccommend updating atleast every hour, to be able to match it nicely with power yield from a pv system. We might also want to check how often the internet gateway actually updates the values because this would limit the max. polling frequency.

pfriedrich84 commented 3 years ago

I agree with apfelmaennchen, would be nice a bit more frequent. is used the total counters and they add up fine on the energy dash: usage

But some errors in the log i will add them here. error3.txt error1.txt error2.txt

thomasgermain commented 3 years ago

Thanks for your feedback, I will change the refresh to 1h, maybe 30min ? (I will wait few days before releasing a new beta, in case of some errors pop :innocent: )

@pfriedrich84 errors are related to dhw and zone (as usual, wrong response set by vaillant API..).

Again, thank you both for your testing and feedback, really appreciated :)

pfriedrich84 commented 3 years ago

Hi Thomas, i feel like the values are not updating regulary.

In multimatic app i've used 1 kwh on cooling at 12:00 and 20:00 each yesterday. so total of 2kwh, while the values in hassio show just 1kwh. The 20:00 value is not showing up yet, all the values are unchanged since 16-20h.

I tried request_hvac_update but no change. any Idea? :) [Edit] about 20min after that the missing 1kwh appeared, anyway odd [Edit2] so it added to the wrong day - crap :D

apfelmaennchen commented 3 years ago

I will change the refresh to 1h, maybe 30min ?

I have set it to update every 15 min., but honestly speaking neither the display in the app nor in ha really fits to the reading of my 'external' energy meter. I will collect more data and see what I can find out.

We would probably need a fixed reading around midnight to get atleast reliable readings for a daily consumption.

EDIT: My app and ha is not updating anymore since yesterday and I get an error message :-( 15 Min. might be too frequent for the vaillant server ... I keep investigating

pfriedrich84 commented 3 years ago

Update from my side, i changed it to 1hour, works nicely in my opinion this is "good enough" as Vaillant is only updating each kwh anyway. Also a conversion from Wh to kWh would be nice as it looks weird in the GUI and vaillant is not delivering in this detail anyway.

I will keep it running now / next update on the weekend ....

cheers, Paul

pfriedrich84 commented 3 years ago

Update from my side, i tried with 30min now which seems fine for the API but ended up on 1h again as the figures are not perfect anyway. It_ seems this report is not delivering the same figues as the Multimatic App ...

I am comparing the weekly stats with the energy screen but also the created sensor-entities from the integration.

Example App shows for the last days (starting from Sunday) - 3,4,2 kwh for Cooling Electric Consumption while the sensor/energy dash shows 2, 4, 2. When i check the hourly graph in the multimatic app it shows 1kwh each at 04:00, 12:00 and 20:00 yesterday so would be no reason to not show it right? ;-) Maybe its showing to the today balance, will update on that ...

I would say it's okay to deliver it outside the beta as the report is working for now. Just not to expect 100% the figures of the app ...

Cheers, Paul

thomasgermain commented 3 years ago

Thanks for your feedback :) I will set 30min, since this is a single API call, it doesn't cost too much.

So if I understand you well, there is difference between the entity state and the app ? (I don't consider energy dashboard right now, because I can't do anything about it and I guess that plenty of improvements/bugfixes will come with next releases). For now I don't see what I can do better/differently.

Could you (and others) test if requesting an hvac update change something ? I know it has some impact of live reports and current temperature of a zone, etc. but I don't know if it has impact of emf reports.

Here is a small automation doing the request once per hour.

- id: request_hvac_update_multimatic
  alias: "Multimatic update hvac"
  trigger:
    - platform: time_pattern
      hours: "/1"
  action:
    - service: multimatic.request_hvac_update
pfriedrich84 commented 3 years ago

So if I understand you well, there is difference between the entity state and the app ? (I don't consider energy dashboard right now, because I can't do anything about it and I guess that plenty of improvements/bugfixes will come with next releases). For now I don't see what I can do better/differently.

Correct, i only look at the dashboard to see if there is any crazy stuff going on!

Could you (and others) test if requesting an hvac update change something ? I know it has some impact of live reports and current temperature of a zone, etc. but I don't know if it has impact of emf reports.

Sure i'll let the service run and see if there is any change in data quality (the missing kwh was deliveryed today btw)

[EDIT] This seems to do the trick ... figures are now well covered during the day ...

apfelmaennchen commented 3 years ago

The app most likely uses the device specific query which delivers a hourly, daily, weekly value and is compared to the summary query slight more independend on the query time. But using the hourly report and adding it up to a counter doesn't seem like a good solution!

I guess it doesn't become much better as what we have.

pfriedrich84 commented 3 years ago

i think it's fine with 30min and the data quality. The hourly hvac_update made a difference on how fast the figures are showing up. I think we can take it out of beta ...

Please just convert from Wh to kWh als default unit :)

thomasgermain commented 3 years ago

I hope I'll release later on this week (but I'm quite busy).

I'll keep the value in Wh because the API provides it in Wh. As far as I know, the energy dashboard can handle it. If you want, you can still use https://www.home-assistant.io/integrations/template/

pfriedrich84 commented 3 years ago

As far as I know, the energy dashboard can handle it. If you want, you can still use https://www.home-assistant.io/integrations/template/

True, it handles fine!