Doing calculations with variables or sensor values

Posted on
Mon Mar 26, 2018 7:59 am
haakon offline
User avatar
Posts: 45
Joined: Mar 02, 2017

Doing calculations with variables or sensor values

Hi, there. Is there a plugin or method that lets me create variables or virtual devices based on values from my other devices and calculations?

I am trying to monitor my heating and power consumption. To make it work I would like to do these three things:

1. Have a variable (or virtual temperature sensor) whose value is the mean of all my temperature sensors' current values.

2. Have a variable (or virtual energy meter) whose value is the sum of the current energy consumption of a group of devices.

3. Have a variable (or virtual energy meter) whose value is the sum of the current energy consumption of a group of devices (as above) and then multiplied with a fixed number.*

* The purpose of this: I have energy meters on most but not all my heaters. In order to estimate the total power consuption by all heaters, I would like to sum up the current wattage of heaters with available data and then multiply this value with a certain ratio.

Posted on
Mon Mar 26, 2018 8:51 pm
DaveL17 offline
User avatar
Posts: 6742
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Doing calculations with variables or sensor values

This is not only possible, but relatively easy if you use a python script. Shoot me a private message and we'll get you going.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Mar 27, 2018 3:52 pm
haakon offline
User avatar
Posts: 45
Joined: Mar 02, 2017

Re: Doing calculations with variables or sensor values

Great! Thanks Dave, I’ll message you.


Sent from my iPhone using Tapatalk Pro

Posted on
Mon Oct 08, 2018 4:22 am
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: Doing calculations with variables or sensor values

Hi haakon

How did you get on with this? I am looking to do the same for power consumption, doing some basic maths based on several device and variable values, and update another variable value with the result. I want to be able to produce a weekly email with the week's energy use, and also provide detail into the breakdown.

Thanks

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest