Page 1 of 1

Virtual device to monitor thermostat energy usage

PostPosted: Tue Aug 27, 2019 2:02 pm
by haakon
Hi, I have several Z-wave thermostats (for floor heating) in the house that unfortunately lack support for energy monitoring. And they do not report wether the relay is switched on or off.

But because I know their connected load, and they are either heating or not, is seems feasible to estimate their power consumption based on whether the current temperature is higher or lower than the Heat Setpoint. If higher, it is off. If lower, it is on.

Is this possible to achieve with a plugin or two? Possibly with a little bit of coding?

I am not very skilled at programming, but I imagine that a script that turned a virtual device on or off based on this rule could be used in combination with the Virtual Energy Meter plugin (creates a child device that acts as an energy meter for devices with static energy consumption). Any suggestion that could lead me in the right direction would be much appreciated; thanks!



Haakon

Re: Virtual device to monitor thermostat energy usage

PostPosted: Tue Aug 27, 2019 4:04 pm
by jay (support)
[MODERATOR NOTE] moved to a more appropriate forum...

I moved the thread to a different location to open up potential solutions (beyond virtual devices). Let's see what the community can come up with.

Re: Virtual device to monitor thermostat energy usage

PostPosted: Tue Aug 27, 2019 4:59 pm
by FlyingDiver
If it was me, I'd go lo-tech. Run a schedule every minute that increments a variable by a set amount if the setpoint is above the temperature. Then run a daily schedule to do something with that number and reset the variable.

Re: Virtual device to monitor thermostat energy usage

PostPosted: Wed Aug 28, 2019 11:24 pm
by haakon
Thanks, Joe. Yes, the simpler, the better. This might be a dumb question, but … How can I make a schedule or trigger dependant on the set point temperature being above or below the room temperature? Conditions only let me compare each of those with a fixed number, right? Or is it possible to insert a string into that number field that reads the temperature of a device?

Re: Virtual device to monitor thermostat energy usage

PostPosted: Thu Aug 29, 2019 6:03 am
by FlyingDiver
Let's see. How about a trigger that gets fired every time the temperature changes, and sets a variable "heat_on" to True if the temp is below the set point. And set it False if not.

Then a scheduled action that looks at the first variable and increments a different variable if it's on.

Re: Virtual device to monitor thermostat energy usage

PostPosted: Fri Aug 30, 2019 12:27 pm
by haakon
Thanks! But this will require a script, right? In the condition options I can select "If device" > "Thermostat basement" > "Heat Setpoint" > "is less than" ... and then there is a number field. Or can I put some code in that field that will check the temperature (which is a device state, I guess)?

Re: Virtual device to monitor thermostat energy usage

PostPosted: Fri Aug 30, 2019 12:30 pm
by FlyingDiver
I think there are some plugins out there to do extended condition checking. I don't use them, so I can't be sure.

Otherwise, yeah you're probably going to need to write some Python.