0
Answered

Add single price per day PLUS price per Kwh

Jas 2 years ago in Dashboard and Widgets updated by Support Manager 2 years ago 5

Hi, Is is possible to create a tariff which has a fixed price per day tariff PLUS price per Kwh used?

Where is the best place to get help in English - are there YouTube videos? I find the one with subtitles hard to follow.  

Answered

Hello Jas

Is is possible to create a tariff which has a fixed price per day tariff PLUS price per Kwh used?

Yes, it is possible, but not easy)

The Dashboard is very flexible and you can compose complex functions in JavaScript syntax in the widget settings in the Arithmetic operation with f(x)

https://support.smart-maic.com/en/knowledge-bases/2/articles/104-complicated-functions-in-the-widget-settings

An example for your task:
- make a table widget on the Dashboard
- select data display interval - MONTH. The data will be correct only for MONTH interval for this example.
- add consumption data [TW]
- add another bookmark with Arithmetic operation f(x)

var costDay = 5;
var costWatt = 0.0015;
var md = new Date(d.TIME).setMonth(new Date(d.TIME).getMonth()+1);
if (md > new Date()) {
new Date().getDate()*costDay + d.TW*costWatt;
} else {
new Date(+md-1).getDate()*costDay + d.TW*costWatt;
}

Where:

costDay -  a fixed price per day

costWatt -  price per Watt (= price per kWh / 1000)

Image 1648

Image 1651

Image 1652


See also article about tariff designer:

https://support.smart-maic.com/en/knowledge-bases/2/articles/238-tariff-designer-and-cost-analysis

Where is the best place to get help in English - are there YouTube videos?

Sorry, only the video with subtitles is available right now.

See also other articles about Dashboard in the Knowledge base:

https://support.smart-maic.com/en/knowledge-bases/2-main/categories/8-dashboard-and-server/articles

Hi, thanks for this.  I'm still trying to implement this solution.  

Why do I not have TW as an option? 

Image 1683

Also - what do you mean by "- add another bookmark with Arithmetic operation f(x)" - I don't seem to have the ability add TABS across the top of my widget - is that what you mean?

Image 1684

[TW] - for 3-lines D103 devices only.

For 1-line device D101 it is just [W]

To add new tab

Image 1685

Thanks again for your help....

I now have

Image 1686

NaN error....  

This is my formula

Image 1687

Any ideas?

[TW] - for 3-lines D103 devices only.

For 1-line device D101 it is just [W]

So, in the formulas use d.W instead d.TW