#Bosch Dishwasher Energy Monitoring

1 messages · Page 1 of 1 (latest)

toxic blade
#

I have a Bosch dishwasher, which reports energy usage ....but only as a percentage (i.e: Energy: 61% - see second screenshot). My best guess (in conjunction with ChatGPT) is that this percentage is a percentage of some arbitrary theoretical maximum energy consumption for that cycle.

That said, that's just a guess because the BSH API documentation isn't terribly helpful. With the help of ChatGPT, I ended up with this sensor to approximate the energy usage of my dishwasher so that I could start tracking it in the energy dashboard. However, I think something is a little off because I somehow end up with my dishwasher using more energy than the total energy usage in that given period (see first screenshot) and a report that my dishwasher is apparently using 4kWh of energy...which seems....off.

{% set base_energy = 1.2 %}
{% set forecast = states('sensor.dishwasher_common_option_energyforecast') | float(100) %}
{% if forecast > 0 %}
  {{ (base_energy * (100 / forecast)) | round(2) }}
{% else %}
  "Unknown"
{% endif %}

What am I doing wrong here?

restive harness
#

You're probably confusing power and energy.

#

Well I'm not actually sure. It's at 61% for ~4 hours?

toxic blade
#

Yeah, it's at 61% for 4 hours.

#

I'm guessing that's "61% of it's max energy usage for 4 hours" but idk

restive harness
#

What is base_energy, 1.2 what?

#

kW or kWh?

toxic blade
#

kW

#

that was my understanding anyway

restive harness
#

So if you want to get energy from that, you'll need a power sensor which would be 1.2 kW * 61% = 732W continuous power.

#

You would then need to Riemann sum that sensor to get an energy sensor.

toxic blade
#

Yeah...so I should trade that template sensor for a power sensor?

restive harness
#

Well the template is how you make the power sensor

toxic blade
#

ohhh

restive harness
#

And then Riemann sum integration creates the energy sensor from that power sensor.

toxic blade
#

ic

restive harness
#

then you add energy sensor to energy dashboard

toxic blade
#

yeah

#

so basically re-do the math on the sensor to be:

{% set base_energy = 1.2 %}
{% set forecast = states('sensor.dishwasher_common_option_energyforecast') | float(100) %}
{% if forecast > 0 %}
  {{ (base_energy * forecast) | round(2) }}
{% else %}
  "Unknown"
{% endif %}
restive harness
#

well forecast I assume is "61"

#

So you'll need to convert to float and /100

toxic blade
#

in this specific case, yes.....but it changes by program

restive harness
#

I mean it is a string

toxic blade
#

Oh. Yes, the % is an attribute.

restive harness
#

I guess you want this:

  {{ (base_energy * (forecast / 100)) | round(2) }}
#

that's your kW

toxic blade
#

Also, I just realized line 2 doesn't make any sense. | float (100) - a float with 100 decimal places? WTF?

restive harness
#

100 is not decimal places

toxic blade
#

it's not?

restive harness
#

it is the default value if undefined

toxic blade
#

Oh right

restive harness
#

I would probably have said float(0)

toxic blade
#

if I do that, I can probably simplfy that expression and get rid of the else then, right?

#
{% set base_energy = 1.2 %}
{% set forecast = states('sensor.dishwasher_common_option_energyforecast') | float(0) %}
{{ (base_energy * (forecast / 100)) | round(2) }}
restive harness
#

seems reasonable

toxic blade
#

I take it that editing this isn't going to recompute the historical data

restive harness
#

nope

toxic blade
#

bummer.

#

So for this power sensor, I'm guessing I want:

Unit of Measurement: kW
Device Class: Power
State class: Measurement

?

#

looks like I can't select the integral sensor in the energy dashboard

#

I wonder if it's just because there's no data in there yet

#

Okay, I think I fixed it - I had to go into the sensor and set the unit of measurement to W, then in the template options and select kW.

For some reason anything else causes the sensor to not provide the correct device class and options to the energy sensor

#

I don't really understand WHY that's the case though

restive harness
#

the riemann won't be correct until after the source power sensor updates at least once

#

it kind of starts out in an unknown type state

toxic blade
#

Ah.

#

Why the discrepancy in units to make things work?

restive harness
#

I'm not aware of any issues related to units.

toxic blade
#

in order for the dishwasher energy sensor to appear in the energy dashboard and be selectable, I have to set the unit to watts in the main sensor config, but kW in the template config.

#

the discrepancy doesn't make sense to me

toxic blade
#

if I set both units to kW - it somehow messes with the device class

restive harness
#

I would leave them both as kW, and then wait until after it updates once and see if the Riemann has correct value.

toxic blade
#

have done for a while and run the dishwasher...nada

restive harness
#

hm I'm not sure then.

toxic blade
#

the energy sensor is reorting 0.0 kW/h too

#

the power sensor shows 0.73 kW

restive harness
#

did you select k in the Riemann settings?

#

kkWh is too many k's 🤣

toxic blade
#

waaait a fuckin sec

#

no - i can't swlect the unit in the riemann settings - I think it's the columination of the two kWh sensor settings

restive harness
#

You don't pick the unit, but you can pick the prefix

#

if the input is already kW I guess you don't want that.

toxic blade
#

I've deleted the sensor and re-made it

restive harness
#

worked for me

toxic blade
#

GOT IT!

#

I ended up deleting them both and removing the metric prefix altogether

#

now let's see if this shows up in the energy dashboard

#

ooh it does!

#

looks like that worked - ty!

toxic blade
#

Hmm. Still something a little off, but I think it's with the Riemann sensor. I just ran a rinse cycle and it seems to think my dishwasher has used 4kWh in like 5 minutes.

#

the fact that it's a factor of 100 is suspicious...

#

This device usage here looks odd as well - the dishwasher has seemingly used more energy than the entire house did in that period

restive harness
#

When you have a sensor that's static like that for a long time you would benefit from setting a sub interval.

#

Then it will update more frequently and assign energy to the correct hours.

toxic blade
#

I mean it wouldn't really because the energy sensor from the dishwasher reports whatever until you pick a new program.

restive harness
#

Oh it doesn't go back to 0 at the end of the cycle?

toxic blade
#

Nope

restive harness
#

do you have an on/off sensor?

toxic blade
#

Yeah

restive harness
#

You should use that in the power template.

#

e.g. 0 if off else (base*power)

toxic blade
#

Yeah maybe I will... Though interestingly enough it already looks to be doing that