openshwprojects / OpenBK7231T_App

Open source firmware (Tasmota/Esphome replacement) for BK7231T, BK7231N, BL2028N, T34, XR809, W800/W801, W600/W601 and BL602
https://openbekeniot.github.io/webapp/devicesList.html
1.39k stars 240 forks source link

[Feature request] Split energy totals #916

Open analystcmyk opened 1 year ago

analystcmyk commented 1 year ago

TLDR :

Add energy used to separate total variables, based on timeslots. eg. LowTarrifTotal between 00:00 and 07:00, HighTarrifTotal between 07:00 and 00:00

Situation :

image

  1. Weekend : low, 00-24
  2. Monday - Friday : low 00-08
  3. Monday - Friday : mid 08-10, 14-18, 22-00
  4. Monday - Friday : high 10-14,18-22

image

Issue :

Calculating real costs per floor is a nightmare, to be energy efficient you want to promote low tariff usage.

Those responsible for splitting the bill have no way to distinguish between different tariffs.

This means a lot of owners just take the average price per KWh.

This is problematic :

Proposed :

A variant of SetupEnergyStats that allows for split totalcounters

In this situation it would mean that each meter will have 3 additional total power used variables. ( low, high, mid)

example : SetupEnergyTotalGroup [TotalGroupName] [starttime][endtime] [WeekDayFlags] eg.

SetupEnergyTotalGroup "LOW" 00:00 08:00 0xff;  // all days
SetupEnergyTotalGroup "MID" 08:00 10:00 0xFC; // weekdays

All TotalGroup values should be available via MQTT.

Possible issues :

Remarks :

Some examples of time-of-use pricing schemes:

analystcmyk commented 1 year ago

Other scenarios :

analystcmyk commented 1 year ago

Not part of this feature request, but related:

// totalgroup "mary" is created, start with 0
SetupEnergyTotalGroup ADD "mary" 

// totalgroup "john" is created, start with 0
SetupEnergyTotalGroup ADD "john" 

// add all energy used now to totalgroup named "john"
SetupEnergyTotalGroup SET "john"

 // delete the totalgroup "john"
SetSetupEnergyTotalGroup REMOVE "john";

This would allow dynamically setting the total, (checkout, checkin) for example you just send the name of the total via MQTT

Maybe this is already possible with existing scripting