Page 1 of 1

Calculating washing machine costs; lost in numbers...

Posted: Wednesday 21 September 2022 21:26
by Sarcas
I used the script here in the forum to read values from my device. it needed some tweaking to make it work for me, but it works now. Almost. I just can't figure out the last step, the actual costs.

After all is done, I have these numbers after a washing cycle:

Start kWh = 39599
End kWh = 39975
Used kWh = 376
Price per kWh = 0.22

The original script says

Code: Select all

MachineCost = (domoticz.data.MachineEndkWh - domoticz.data.MachineStartkWh) / 100000 * MachinePricePerkWh   -- Deviding factor might need to be adjusted
MachineUsed = (domoticz.data.MachineEndkWh - domoticz.data.MachineStartkWh) / 1000                          -- Deviding factor might need to be adjusted
And then my brain freezes trying to figure out what to change :( And as important, why.

Thanks for any help here!

S.

Re: Calculating washing machine costs; lost in numbers...

Posted: Wednesday 21 September 2022 22:15
by waltervl
The original script will also show the cost per wash cycle. Does it too in your script?

So what is not correct in your version of the script?

Re: Calculating washing machine costs; lost in numbers...

Posted: Thursday 22 September 2022 8:33
by willemd
Sarcas wrote: Wednesday 21 September 2022 21:26 Start kWh = 39599
End kWh = 39975
Used kWh = 376
Price per kWh = 0.22
If those numbers would be real kWh as shown then it is a simple multiplication without dividing factor.
But my guess is that there should be a comma in the start-, end- and used-kWh, otherwise you have a very expensive washing machine !!
And you just need to apply the same factor in your calculation
So if the real usage is 0.376 kWh but your variable contains 376 you apply a factor 1000.

Is that what you were looking for?

Or you do:

MachineUsed = (domoticz.data.MachineEndkWh - domoticz.data.MachineStartkWh) / 1000 -- Deviding factor might need to be adjusted
MachineCost = MachineUsed * MachinePricePerkWh

Re: Calculating washing machine costs; lost in numbers...

Posted: Thursday 22 September 2022 9:57
by Sarcas
Those are the numbers Domoticz reads from my TKB TZ-69E smart energy plug in.

Code: Select all

domoticz.devices(idxVerbruikWasmachine).WhTotal
Oh hold on... WhTotal. Not kWh... Kilo... Kilo = 1000...

The fog starts to clear up ;)

So / 1000 will give me kWh from Wh!


MachineUsed = (domoticz.data.MachineEndkWh - domoticz.data.MachineStartkWh) / 1000
MachineUsed = (39975 - 39599) / 1000 = 0,376

MachineCost = MachineUsed * MachinePricePerkWh
MachineCost = 0,376 * 0,22 = 0,08272

That is way less than I expected.

Thanks for helping out!

S.

Re: Calculating washing machine costs; lost in numbers...

Posted: Thursday 22 September 2022 20:13
by willemd
0.376 kWh sounds very low for a complete washing cycle. You have a heating element and a motor to drive. Depends of course on the temperature and the type of cycle.

But I recently measured how much it takes to boil 1 liter of water and that wa approx. 0.1 kWh. Lower temperature takes of course less, but then you use more water in a washing machine. Let's say you increase by 20 degrees instead of 80, then you could heat 4 liters with 0.1 kWh, 12 with 0.3 kWh and use the rest for the motor ?

I will do some measurement as well.

Re: Calculating washing machine costs; lost in numbers...

Posted: Friday 23 September 2022 10:08
by willemd
I did a measurement as well: 0.474 kWh for a washing cycle of 1 h 26 minutes at 40 degrees.
I see a spike at the beginning to heat up the water and a much lower spike later for the rinse and an even lower for the spinning cycle at the end.

Re: Calculating washing machine costs; lost in numbers...

Posted: Saturday 24 September 2022 12:02
by willemd
And 0.292 KWh for a 30 minute mini-wash cycle at 40 degrees
And 0.321 KWh for a long cycle but then at 30 degrees

So you can save 33% of electricity by lowering the temperature with 10 degrees