Integrating MyVaillant app with EmonCMS

[Split from Vaillant inbuilt monitoring vs MID meters]

I’m monitoring a new Vaillant system (not mine), and have gone the pure software route - scraping data out of their app using the myPyllant library.

Seems I can get temps for indoor, outdoor, setpoint and flow, but not return. I can also get real-time power consumption, but not heat. That’s just enough for the carnot cop formula to show something sensible. One can at least see how the heat pump is behaving.

I could also download hourly consumption, yield and heat produced, but the app is showing wildly optimistic COP values, so I don’t trust them. I suspect it’s not calibrated for glycol. Owner more interested in consumption and running costs.

3 Likes

Interesting! How often can you poll this? The MyVallant app takes so long to update, I didn’t think that realtime data would be available. Maybe we should start a new thread?

I’m polling it every 1 minute via cron. Energy consumption seems to be updated at least that often. Temperatures only update every 5 minutes. Flow temperature reported to 0.5° resolution, while room and outdoor temp reported to 0.063°.

Here’s a close up view of 1 hour; note 12 steps of flow temp regardless of step size.

Screenshot_20240123_003552

There’s lots of config stuff included in the data, but not much more in the real-time department.

That’s very cool. But it’s a shame there’s no flow rate, heat output or return temp. Still very useful with zero hardware expense.

Could you share your code for integrating this into Emncms?

I need to generalise my code and get it up on github, but in the meantime this is the bones of it:

    async with MyPyllantAPI(user, password, brand, country) as api:
        async for system in api.get_systems(include_mpc=True):
            data = dict()

            # Outdoor Temperature
            data["outdoorT"] = system.state["system"]["outdoor_temperature"]

            # Indoor Temperature
            data["roomT"] = system.state["zones"][0]["current_room_temperature"]
            data["targetT"] = system.state["zones"][0]["desired_room_temperature_setpoint"]

            # Flow Temperature
            data["flowT"] = system.state["circuits"][0]["current_circuit_flow_temperature"]
            data["flowTargetT"] = system.state["circuits"][0]["heating_circuit_flow_setpoint"]

            # Water Temperature
            data["waterT"] = system.state["dhw"][0]["current_dhw_temperature"]
            data["dhwTarget"] = system.configuration["dhw"][0]["tapping_setpoint"]

            # Electrical Consumption
            data["elec"] = system.mpc["devices"][0]["current_power"]

            # System States
            data["isDHW"] = system.state["circuits"][0]["circuit_state"] == "STANDBY" and system.mpc["devices"][0]["current_power"] > 100
            data["isHeating"] = system.state["circuits"][0]["circuit_state"] == "HEATING" and system.state["zones"][0]["heating_state"] == "HEATING_UP"
            data["isImmersion"] = system.state["dhw"][0]["current_special_function"] == "CYLINDER_BOOST"

            # Miscellaneous
            data["humidT"] = system.state["zones"][0]["current_room_humidity"]
            data["waterpressure"] = system.state["system"]["system_water_pressure"]

            postToEmoncms(data)
2 Likes

This only works once you’ve been updated to new MyVaillant app right?

Another approach I experimented with, and doesn’t require additional hardware, is ebusd->emconcms. This will give you return temp, flow rate, pump power, integral etc, but you will still suffer from inaccuracies. My experience, comparing to heat meter, is that:

  • Vaillant flow rate is accurate
  • Vaillant elec usage is accurate (but excludes any additional pumps you might have)
  • Vailant flow/return temps are not accurate.