V1.1.0 App module stable release: New Time-of-use app

Tags: #<Tag:0x00007fca27af9e40> #<Tag:0x00007fca27af9c60>

(Glyn Hudson) #1

Emoncms app module V1.1.0 has been released to stable branch, includes new ‘time-of-use’ app, perfect for economy 7 night-time tariffs. Update available to all emonPi/emonBase via one-button update

Big thanks to @Greebo :+1:

Original development thread:

(Westerner) #2

Yes, many thanks to all, especially @Greebo for this. Very neat.

(Glyn Hudson) #3

V1.1.0 app module changes are now live on

(Nuno Araujo) #4


Its is possible to customize the peak and off peak period for each day?

example, in Portugal the sunday its a offpeak period. (0-24h)


My Electric Time Of Use App For Economy 10
(Glyn Hudson) #5

Yes it is possible to customise

  • sent from my mobile device

(Nuno Araujo) #6

where? I only have this options to indicate the offpeak period

Economy 7 start
Economy 7 stop:


(Glyn Hudson) #7

Ah sorry, It’s only possible to set the time of off-peak for a particular 24hr period e.g. Economy 7 start is the start time off off-peak and economy 7 end it the end time of off-peak:

It’s not possible yet to set particular days as off-peak.

(Jai) #8

Just to clarify the start and end time hour format. If entering “7” for 7am, what would you need to enter for 7pm “-5” ie -5 hours from 12am (0)?

(Greebo) #9

The hours are all in 24 hour format. 7pm = “19”

(Dimitar Kazakov) #10


I’m trying to use “Time of use” app with the following config:

Time of use
app “timeofuse”
unitcost_day “0.228588”
unitcost_night “0.12654”
currency “BGN”
economy7_start “22.0”
economy7_end “6.0”

As you can see off-peak time is 22:00 till 06:00 in the morning and the time range is crossing midnight.

The moment I put economy7_start to 22, it begins to show errors:

EmonCMS Error

Message: TypeError: bargraph_series[1].data[z] is undefined
URL: http://emonpi.domainlocal/emoncms/app/view?name=Time%20of%20use&readkey=e16675eb55365a98d85abaa25e42c019
Line: 496
Column: 17

When economy7_start set to 0,1,2,3,4,5, then it is ok.
I think this app is not designed for off peak time ranges crossing over the midnight. Is that right, or there is a bug?


(Dimitar Kazakov) #11

I tried negative number for economy7_start: -2 , supposing it will represent 22 (24-2)
Time of use
app “timeofuse”
economy7_start “-2”
economy7_end “6”
unitcost_day “0.228588”
currency “BGN”
unitcost_night “0.12654”

Now app is opening without errors, but I’m not quite sure it will really work as expected that way


(Greebo) #12

You could also try the “Time of Use - flexible” app…
It definitely handles a cost tier crossing over midnight.

(Dimitar Kazakov) #13

yes, "Time of Use - flexible” seems better fits in that use case, by creating 3 tiers, one for daily tariff - 06-22 and two for night tariff - 22-24 and 00-06