"Guessing" or "measuring" consumption of electric devices from a smart meter?

For optimizing our consumptions and to find some real potential for energy savings, I’d like to have an overview over my “biggest” consumers of energy.
Some - but not the least all - devices are on Tasmota-powered power plugs with energy readings. Not nearly all devices are plugged into one of these - and I don’t see the purpose of buying zillions of these, just to measure the load of a device (makes no sense economically and ecologically).

So, is there anyone around who has successfully implemented some kind of logic based on the readings of a smart meter? It is said, you could isolate (or guess) the power consumption of some devices based soley on the overall power meter, so how would you do that?

What I do is distribute the Tasmota energy meters among the consumers over time: one month (or week, or whatever makes sense) I measure the freezer, next week the “data center” (Internet router, openHAB server, NAS, …), next week heating, washing machine, …
Collect this data in a spreadsheet and after some time you have the daily/weekly/monthly consumption of each device. The “rest”, which cannot be measured by a Tasmota device (kitchen, lights, …), is just the difference between the known devices and the overall consumption.
This is far from accurate (e.g. my heater went from 90W constant power to 30W constant power after switching from winter to summer mode) but accurate enough to find the biggest potential for savings.

In my case I have ca. 600W average power consumption (varies between 400W and 800W each day) with my “data center” using >100W ==> 15% of my energy consumption is used to power openHAB (and a couple of other services) and the internet router. A good candidate for starting to save energy…

my house got 3 floors. Every floor is connected with a smart electricity meter.
I got a average consumption about 400W for the house summed up for all floors.
If I switch on a powerful consumer I can see the changing values for every floor. So identifying a large consumer is not that hard.
Finding a eg 30W consumer is not possible with this method. But what you can do is unplug all devices and plug in one by one. So will see the consumption without buying a smart socket for every device.

Here you can see what happens if someone is cooking a meal.

And here you can my power generation compared to my consumption.
Green is the energy from photvoltaik and yellow the consumption.
You can cleary see that the needed energy in yellow drops below zero when the sun sets.
(Above zero is excess, below zero is energy from my provider)

I’m going to start a similar project.
Base is a Tasmota smartmeter.
But I have a problem reading the device from OpenHAB (ver. 3.3).

The json string looks like
20:51:42.442 MQT: tele/StromZ/SENSOR = {“Time”:“2022-07-24T20:51:42”,“StromZ”:{“total_in”:2197.54,“total_out”:711.10,“Power_curr”:51}}
The only one working value is Power_curr.
total_in returns a historic value.
total_out returns “NULL”.

The Thing StromZ is defined by this code:
UID: mqtt:topic:mosquitto_on_pi:StromZ
label: StromZaehler
thingTypeUID: mqtt:topic
payloadNotAvailable: Offline
availabilityTopic: tele/StromZ/LWT
payloadAvailable: Online
bridgeUID: mqtt:broker:mosquitto_on_pi

  • id: total_in
    channelTypeUID: mqtt:number
    label: ZaehlerstandVerbrauch
    description: “”
    commandTopic: stat/StromZ/SENSOR
    unit: kWh
    min: 0
    stateTopic: tele/StromZ/Sensor
    transformationPattern: JSONPATH:$.StromZ.total_in
  • id: total_out
    channelTypeUID: mqtt:number
    label: ZaehlerstandEinspeisung
    description: “”
    commandTopic: stat/StromZ/SENSOR
    unit: kWh
    min: 0
    stateTopic: tele/StromZ/Sensor
    transformationPattern: JSONPATH:$.StromZ.total_out
  • id: Power_curr
    channelTypeUID: mqtt:number
    label: AktuellerVerbrauch
    description: “”
    commandTopic: stat/StromZ/SENSOR
    unit: W
    stateTopic: tele/StromZ/SENSOR
    transformationPattern: JSONPATH:$.StromZ.Power_curr

Of course, the commandTopic are obsolete, and I set tele to send every 10s.

Can You help me to figure out, what is going wrong?

Approach like any other MQTT payload problem.

First, make a temporary string channel and Item without transformations, so that you can easily see the whole payload(s) that arrive in your log.

I’d guess the topic payload sometimes does not have all fields present.

Hello rossko57,

The mosquitto receives the messages completely every 10th second.
So, I expect mistakes creating the channels in openHAB.
Just created another channel:

  • id: TestTxt
    channelTypeUID: mqtt:string
    label: TestText
    description: “”
    stateTopic: tele/StromZ/Sensor

and linked a new Item. The result is “NULL”.

Okay, so you’ve learn’t the problem is not about payload and JSONPATH. Look carefully at the Thing your channel belongs to, and in turn at the broker Bridge that belongs to.

To clarify, this is not output from the channel. A newly initialised Item is created with state NULL, and stays that way ntil something else updates it.

Hello rossko57,

can You help me to proceed?


after correcting a misspelling, the test string returns

and is updated every 10th second.

Meanwhile, I believe, that the items are not configured well. Can I somewhere see the code describing the items?