Best way for emulating time of use electricity rates?

I'm trying to set a variable in home assistant of which electricity rate I'm currently on. My utility has 3 different rates (peak, partial peak, and off peak) which vary based on day of the week (weekday vs weekend) and season of the year. Additionally, holidays are entirely off-peak.

I imagine it can be done with a function block, but as I'm not a programmer, I'd like to try to do it with existing blocks and maybe some extra ones that can be installed on the pallet.

My thoughts are to have several inject nodes that fire at the appropriate change times. First I want to check if its a holiday, then check season, day of week, and time and finally send an output with the correct rate.

Does anyone have any recommendations where to begin?

Hi @poldim,

Some time ago I have created a custom node to create time-based profiles. One of my use cases was to generate a TOU profile. However that node has - like many of my other nodes - never seen the daylight yet...

Perhaps I can adapt it to fit your needs, because this is something I will also need myself in the near future. But I hope that others can jump in to give us some ideas, because I assume there are many ways that we can implement this.

We could do it e.g. via cron expressions, but there might be better ways to do it? Because it would be nice if we could configure this node dynamically from a user interface.

So please let the ideas come!!!! I will do the development part, since I have already a nearly finished node...

Bart

Btw perhaps for your use-case it id enough to use e.g. the following node from @Steve-Mcl :

Not sure if that can help you. But if that is the case, I will continue with my time-profile node separate from this discussion...

I didn't think about using cron, but this is a great great, thanks Bart!

Dmitriy,
You are welcome!
It would be nice if you could share the result of your experiment here, so we can all learn from it.
And of course if you are stuck, don't hesitate to come back here.
Although I haven't used the magnificent cron-plus node myself, others might jump in ...
Good luck!
Bart

Here is one solution using a combination of the excellent cron-plus node, holiday node and within-time node.
As always with NR there are multiple ways to obtain the desired outcome.
You can adjust the frequency of cron-plus.
I put the result into a global variable.

[{"id":"14a5ab56.0b4225","type":"cronplus","z":"89990f99.a6d4e","name":"E6 - TOU","outputField":"payload","timeZone":"","persistDynamic":false,"commandResponseMsgOutput":"output1","outputs":1,"options":[{"name":"schedule1","topic":"summer","payloadType":"str","payload":"weekday","expressionType":"cron","expression":"0 */5 * * JUN-SEP MON-FRI","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"},{"name":"schedule2","topic":"winter","payloadType":"str","payload":"weekday","expressionType":"cron","expression":"0 */5 * * OCT-MAY MON-FRI","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"},{"name":"schedule3","topic":"summer","payloadType":"str","payload":"weekend","expressionType":"cron","expression":"0 */5 * * JUN-SEP SAT-SUN","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"},{"name":"schedule4","topic":"winter","payloadType":"str","payload":"weekend","expressionType":"cron","expression":"0 */5 * * OCT-MAY SAT-SUN","location":"","offset":"0","solarType":"all","solarEvents":"sunrise,sunset"}],"x":280,"y":2960,"wires":[["70fff7d5.b829d8"]]},{"id":"70fff7d5.b829d8","type":"holiday","z":"89990f99.a6d4e","name":"USA - Louisiana - New-Orleans","country":"US","state":"la","region":"no","languages":"English","typePublic":true,"typeBank":true,"typeSchool":true,"typeObservance":false,"typeOptional":false,"weekend":"","x":510,"y":2960,"wires":[["c33bd6ec.6f5fe8"],["bdbaafd.70ecb5"]]},{"id":"c33bd6ec.6f5fe8","type":"change","z":"89990f99.a6d4e","name":"Off","rules":[{"t":"set","p":"period","pt":"global","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":730,"y":2940,"wires":[[]]},{"id":"bdbaafd.70ecb5","type":"switch","z":"89990f99.a6d4e","name":"Day ?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"weekend","vt":"str"},{"t":"eq","v":"weekday","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":730,"y":2980,"wires":[["8a60c235.b69b8"],["a0a834bd.956e98"]]},{"id":"8a60c235.b69b8","type":"switch","z":"89990f99.a6d4e","name":"Season ?","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"winter","vt":"str"},{"t":"eq","v":"summer","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":880,"y":2980,"wires":[["5cfc94a9.99c6ac"],["53749e56.e637e"]]},{"id":"5cfc94a9.99c6ac","type":"change","z":"89990f99.a6d4e","name":"Off","rules":[{"t":"set","p":"period","pt":"global","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1030,"y":2960,"wires":[[]]},{"id":"53749e56.e637e","type":"within-time-switch","z":"89990f99.a6d4e","name":"17-20","nameInt":"","positionConfig":"e2e4f670.cd19a8","startTime":"17:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"20:00","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":1030,"y":3020,"wires":[["2ae7df87.8bd6c"],["f0188b13.27d378"]]},{"id":"2ae7df87.8bd6c","type":"change","z":"89990f99.a6d4e","name":"Partial","rules":[{"t":"set","p":"period","pt":"global","to":"partial","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1190,"y":3000,"wires":[[]]},{"id":"f0188b13.27d378","type":"change","z":"89990f99.a6d4e","name":"Off","rules":[{"t":"set","p":"period","pt":"global","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1190,"y":3040,"wires":[[]]},{"id":"a0a834bd.956e98","type":"switch","z":"89990f99.a6d4e","name":"Season ?","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"winter","vt":"str"},{"t":"eq","v":"summer","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":880,"y":3060,"wires":[["53749e56.e637e"],["ed2dc379.a41d3"]]},{"id":"ed2dc379.a41d3","type":"within-time-switch","z":"89990f99.a6d4e","name":"12-15","nameInt":"","positionConfig":"e2e4f670.cd19a8","startTime":"12:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"15:00","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":1030,"y":3100,"wires":[["c70a9588.5c1918"],["7e064587.d0567c"]]},{"id":"7e064587.d0567c","type":"within-time-switch","z":"89990f99.a6d4e","name":"15 - 20","nameInt":"","positionConfig":"e2e4f670.cd19a8","startTime":"15:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"20:00","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":1200,"y":3120,"wires":[["d526882b.7882a8"],["8ffbc27c.b97b7"]]},{"id":"8ffbc27c.b97b7","type":"within-time-switch","z":"89990f99.a6d4e","name":"20 - 22","nameInt":"","positionConfig":"e2e4f670.cd19a8","startTime":"20:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"22:00","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":1360,"y":3140,"wires":[["4c181e4d.8c1ca"],["9a81aebf.ae421"]]},{"id":"c70a9588.5c1918","type":"change","z":"89990f99.a6d4e","name":"Partial","rules":[{"t":"set","p":"period","pt":"global","to":"partial","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1190,"y":3080,"wires":[[]]},{"id":"d526882b.7882a8","type":"change","z":"89990f99.a6d4e","name":"Peak","rules":[{"t":"set","p":"period","pt":"global","to":"peak","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1350,"y":3100,"wires":[[]]},{"id":"4c181e4d.8c1ca","type":"change","z":"89990f99.a6d4e","name":"Partial","rules":[{"t":"set","p":"period","pt":"global","to":"partial","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1510,"y":3120,"wires":[[]]},{"id":"9a81aebf.ae421","type":"change","z":"89990f99.a6d4e","name":"Off","rules":[{"t":"set","p":"period","pt":"global","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1510,"y":3160,"wires":[[]]},{"id":"e2e4f670.cd19a8","type":"position-config","name":"NewOrleans","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":"99","timeZoneDST":"0","stateTimeFormat":"3","stateDateFormat":"12"}]

It looks like this:

1 Like

I am working on exactly this at the moment as well.

We have a similar tarriff structure at the moment with something like

Summer
M-F 7AM-4PM - Shoulder
M-F 4PM-9PM - Peak
M-F 9PM-7AM - Off Peak

And similar structure for the other seasons, with variations for weekends etc

The best structure i have come up with at the moment is a MultiLevel/Dimensional Array

[MonthNumber][DayofWeek][HourofDay][ApplicableTarriff]

So you would using standard nodes - be very easily able to say

MonthNumber=5
DayOfweek=Mon
HourOfDay=11
ApplicableTarriff=AutumnShoulder

And then have a simple lookup table for how ever many tarriff types you have

You could then use an number of nodes (moment is the one i intend to use) to generate a lookup to the Array by doing a function to do somethhing like

(Pseudo Code)

Inject node- Timestamp -> MomentNode > ouput Month, DayOfWeek, Hour
CurrentTarriff = Output of Moment node

You could then just run this every minute to output a Global variable as to what the current tarrif was and you would then look up the table with all the tarriff values toget the appropriate number

I should have something finished by the end of the week on this

Craig

2 Likes

I should add here - that i found this idea better in terms of maintenance of the schedules (over doing it in something like CronPlus etc) as it should be easy to define the tables and have them initialised at each restart etc, somethink like

//Summer 1 Nov to 31 Mar
SummerMonths = [1,2,3,11,12];

// Summer Peak 2pm - 8pm M-F
// Peak Times (hours)
SummerPeakHours = [14,15,16,17,18,19];
SummerPeakDays=[Mon,Tue,Wed,Thu,Fri]

// Summer Shoulder 7AM - 2PM M-F, 8PM - 10PM, M-F, 7AM - 10PM, S-S
SummerShoulderHours = [7,8,9,10,11,12,13,20,21];
SummerShoulderDays=[Mon,Tue,Wed,Thu,Fri,Sat,Sun]

etc etc

Craig

2 Likes

As I said, many ways to do this. Function is clearly an option. However, the initial request was:

Hence, the solution above.

Interesting two see two different approaches for the same problem. While the solution from @greengolfer is indeed closer that what the OP has asked, the solution from @craigcurtin might be useful info for my custom time-profile node...
So please keep posting!

Challenge accepted :slight_smile:

Here is another way without cron-plus. Maybe easier to "see" the periods:

[{"id":"90982777.aae5b8","type":"inject","z":"89990f99.a6d4e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"120","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":230,"y":3200,"wires":[["24dae5a5.035aba"]]},{"id":"24dae5a5.035aba","type":"holiday","z":"89990f99.a6d4e","name":"USA - Louisiana - New-Orleans","country":"US","state":"la","region":"no","languages":"English","typePublic":true,"typeBank":true,"typeSchool":true,"typeObservance":false,"typeOptional":false,"weekend":"","x":490,"y":3200,"wires":[["6586584d.c6ab68"],["3c92cb0f.03cde4","ef941cc.2516be","229fbc7d.d9b054","c448faa4.011218","aec1c907.84ff88"]]},{"id":"6586584d.c6ab68","type":"change","z":"89990f99.a6d4e","name":"Off","rules":[{"t":"set","p":"period","pt":"global","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":750,"y":3200,"wires":[[]]},{"id":"3c92cb0f.03cde4","type":"within-time-switch","z":"89990f99.a6d4e","name":"Weekday - Summer - 15/20","nameInt":"","positionConfig":"e2e4f670.cd19a8","startTime":"15:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"20:00","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"1,2,3,4,5","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"4,5,6,7","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":820,"y":3300,"wires":[["1a691c1b.ceddb4"],["c77f2f26.4b669"]]},{"id":"1a691c1b.ceddb4","type":"change","z":"89990f99.a6d4e","name":"Peak","rules":[{"t":"set","p":"period","pt":"global","to":"peak","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":3300,"wires":[[]]},{"id":"ef941cc.2516be","type":"within-time-switch","z":"89990f99.a6d4e","name":"Weekday - Summer - 12/15","nameInt":"","positionConfig":"e2e4f670.cd19a8","startTime":"12:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"15:00","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"1,2,3,4,5","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"4,5,6,7","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":820,"y":3260,"wires":[["73c35883.4119d8"],["c77f2f26.4b669"]]},{"id":"73c35883.4119d8","type":"change","z":"89990f99.a6d4e","name":"Partial","rules":[{"t":"set","p":"period","pt":"global","to":"partial","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":3260,"wires":[[]]},{"id":"229fbc7d.d9b054","type":"within-time-switch","z":"89990f99.a6d4e","name":"Weekday - Summer - 20/22","nameInt":"","positionConfig":"e2e4f670.cd19a8","startTime":"20:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"22:00","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"1,2,3,4,5","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"4,5,6,7","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":820,"y":3340,"wires":[["ceb085ef.cb1888"],["c77f2f26.4b669"]]},{"id":"ceb085ef.cb1888","type":"change","z":"89990f99.a6d4e","name":"Partial","rules":[{"t":"set","p":"period","pt":"global","to":"partial","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":3340,"wires":[[]]},{"id":"aec1c907.84ff88","type":"within-time-switch","z":"89990f99.a6d4e","name":"Weekday - Winter - 17/20","nameInt":"","positionConfig":"e2e4f670.cd19a8","startTime":"17:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"20:00","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"1,2,3,4,5","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"0,1,2,3,8,9,10,11","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":810,"y":3420,"wires":[["aba501a1.a40ce"],["c77f2f26.4b669"]]},{"id":"aba501a1.a40ce","type":"change","z":"89990f99.a6d4e","name":"Partial","rules":[{"t":"set","p":"period","pt":"global","to":"partial","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":3420,"wires":[[]]},{"id":"c448faa4.011218","type":"within-time-switch","z":"89990f99.a6d4e","name":"Weekend- Summer - 17/20","nameInt":"","positionConfig":"e2e4f670.cd19a8","startTime":"17:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"20:00","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeRestrictions":0,"timeRestrictionsType":"none","timeDays":"6,0","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"4,5,6,7","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":820,"y":3380,"wires":[["a2483d8e.b16dc"],["c77f2f26.4b669"]]},{"id":"a2483d8e.b16dc","type":"change","z":"89990f99.a6d4e","name":"Partial","rules":[{"t":"set","p":"period","pt":"global","to":"partial","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":3380,"wires":[[]]},{"id":"c77f2f26.4b669","type":"change","z":"89990f99.a6d4e","name":"Off","rules":[{"t":"set","p":"period","pt":"global","to":"off","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1050,"y":3480,"wires":[[]]},{"id":"e2e4f670.cd19a8","type":"position-config","name":"NewOrleans","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":"99","timeZoneDST":"0","stateTimeFormat":"3","stateDateFormat":"12"}]

EDIT: One node was wrong in the initial post

1 Like

Wow that does look nice - i am going to put some time into that tonight and look for pros and cons against my first approach

Craig

OK started on this last night for an hour or so - there are going to be a LOT of time windows with the Time between tests

But it looks like it might be doable and it is self documenting so worth pursuing - will finish it up today and see what it looks like and then post it up for comment

Craig

OK well here is what the flow looks like

It could be a lot smaller and neater if done in a couple of function nodes with Arrays - but i think this format lends itself well to ongoing maintenance and support - i am happy with this and will use it for my solution for the next 6 months or so and see how it goes.

[{"id":"90982777.aae5b8","type":"inject","z":"55cbc3dd.d02e2c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":80,"wires":[["24dae5a5.035aba"]]},{"id":"6586584d.c6ab68","type":"change","z":"55cbc3dd.d02e2c","name":"Public-Holiday","rules":[{"t":"set","p":"period","pt":"global","to":"Public-Holiday","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":680,"y":80,"wires":[[]]},{"id":"3c92cb0f.03cde4","type":"within-time-switch","z":"55cbc3dd.d02e2c","name":"Summer Week Day - Shoulder - Day","nameInt":"","positionConfig":"e2e4f670.cd19a8","startTime":"7:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"13:59","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeDays":"1,2,3,4,5","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"0,1,2,10,11","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":750,"y":180,"wires":[["85b5ac01.2f6ea"],[]]},{"id":"1a691c1b.ceddb4","type":"change","z":"55cbc3dd.d02e2c","name":"Peak","rules":[{"t":"set","p":"period","pt":"global","to":"peak","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1250,"y":220,"wires":[[]]},{"id":"ef941cc.2516be","type":"within-time-switch","z":"55cbc3dd.d02e2c","name":"Summer Week Day - Peak","nameInt":"","positionConfig":"e2e4f670.cd19a8","startTime":"14:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"19:59","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeDays":"1,2,3,4,5","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"0,1,2,10,11","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":720,"y":120,"wires":[["dbb15981.573258"],[]]},{"id":"73c35883.4119d8","type":"change","z":"55cbc3dd.d02e2c","name":"Shoulder","rules":[{"t":"set","p":"period","pt":"global","to":"Shoulder","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1220,"y":400,"wires":[[]]},{"id":"c448faa4.011218","type":"within-time-switch","z":"55cbc3dd.d02e2c","name":"Winter - WeekDay - Peak","nameInt":"","positionConfig":"e2e4f670.cd19a8","startTime":"17:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"20:59","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeDays":"1,2,3,4,5","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"5,6,7","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":710,"y":300,"wires":[["51ec1af9.dda374"],[]]},{"id":"c77f2f26.4b669","type":"change","z":"55cbc3dd.d02e2c","name":"Off-Peak","rules":[{"t":"set","p":"period","pt":"global","to":"Off-Peak","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1220,"y":520,"wires":[[]]},{"id":"24dae5a5.035aba","type":"holiday","z":"55cbc3dd.d02e2c","name":"Australia - Sydney","country":"AU","state":"NSW","region":"no","languages":"English","typePublic":true,"typeBank":true,"typeSchool":false,"typeObservance":false,"typeOptional":false,"weekend":"","x":350,"y":80,"wires":[["6586584d.c6ab68"],["3c92cb0f.03cde4","ef941cc.2516be","c448faa4.011218","617b5e5a.a6fc9","c73605d4.0723e8","da878d00.88c38","49f66093.939c3","a49a1ba7.dd9ed8","7cae7413.2818fc"]]},{"id":"617b5e5a.a6fc9","type":"within-time-switch","z":"55cbc3dd.d02e2c","name":"Summer Week Day - Shoulder - Night","nameInt":"","positionConfig":"e2e4f670.cd19a8","startTime":"20:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"21:59","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeDays":"1,2,3,4,5","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"0,1,2,10,11","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":750,"y":240,"wires":[["85b5ac01.2f6ea"],[]]},{"id":"a49a1ba7.dd9ed8","type":"within-time-switch","z":"55cbc3dd.d02e2c","name":"All Seasons - Off Peak","nameInt":"","positionConfig":"e2e4f670.cd19a8","startTime":"22:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"6:59","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeDays":"*","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":700,"y":540,"wires":[["c77f2f26.4b669"],[]]},{"id":"7cae7413.2818fc","type":"within-time-switch","z":"55cbc3dd.d02e2c","name":"All Seasons - Weekend Shoulder","nameInt":"","positionConfig":"e2e4f670.cd19a8","startTime":"7:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"21:59","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeDays":"6,0","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"*","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":740,"y":600,"wires":[["d33e1f06.be522"],[]]},{"id":"c73605d4.0723e8","type":"within-time-switch","z":"55cbc3dd.d02e2c","name":"Winter - WeekDay - Shoulder - Day","nameInt":"","positionConfig":"e2e4f670.cd19a8","startTime":"7:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"16:59","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeDays":"1,2,3,4,5","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"5,6,7","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":740,"y":360,"wires":[["95ab6011.772ef"],[]]},{"id":"da878d00.88c38","type":"within-time-switch","z":"55cbc3dd.d02e2c","name":"Winter - WeekDay - Shoulder - Night","nameInt":"","positionConfig":"e2e4f670.cd19a8","startTime":"21:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"21:59","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeDays":"1,2,3,4,5","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"5,6,7","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":750,"y":420,"wires":[["95ab6011.772ef"],[]]},{"id":"49f66093.939c3","type":"within-time-switch","z":"55cbc3dd.d02e2c","name":"Autumn/Spring - WeekDay - Shoulder ","nameInt":"","positionConfig":"e2e4f670.cd19a8","startTime":"7:00","startTimeType":"entered","startOffset":0,"startOffsetType":"none","startOffsetMultiplier":60000,"endTime":"21:59","endTimeType":"entered","endOffset":0,"endOffsetType":"none","endOffsetMultiplier":60000,"timeDays":"1,2,3,4,5","timeOnlyOddDays":false,"timeOnlyEvenDays":false,"timeMonths":"3,4,8,9","timedatestart":"","timedateend":"","propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","x":750,"y":480,"wires":[["95ab6011.772ef","3adba0f9.631d8"],[]]},{"id":"49704715.a12e58","type":"link in","z":"55cbc3dd.d02e2c","name":"Peak In","links":["dbb15981.573258","51ec1af9.dda374"],"x":1115,"y":220,"wires":[["1a691c1b.ceddb4"]]},{"id":"dbb15981.573258","type":"link out","z":"55cbc3dd.d02e2c","name":"Peak Out","links":["49704715.a12e58"],"x":975,"y":140,"wires":[]},{"id":"51ec1af9.dda374","type":"link out","z":"55cbc3dd.d02e2c","name":"Peak Out","links":["49704715.a12e58"],"x":975,"y":300,"wires":[]},{"id":"85b5ac01.2f6ea","type":"link out","z":"55cbc3dd.d02e2c","name":"Shoulder Out","links":["d09fc92a.bc4a88"],"x":965,"y":220,"wires":[]},{"id":"d09fc92a.bc4a88","type":"link in","z":"55cbc3dd.d02e2c","name":"Shoulder In","links":["85b5ac01.2f6ea","95ab6011.772ef","d33e1f06.be522"],"x":1115,"y":380,"wires":[["73c35883.4119d8"]]},{"id":"95ab6011.772ef","type":"link out","z":"55cbc3dd.d02e2c","name":"Shoulder Out","links":["d09fc92a.bc4a88"],"x":975,"y":380,"wires":[]},{"id":"d33e1f06.be522","type":"link out","z":"55cbc3dd.d02e2c","name":"Shoulder Out","links":["d09fc92a.bc4a88"],"x":995,"y":600,"wires":[]},{"id":"3adba0f9.631d8","type":"debug","z":"55cbc3dd.d02e2c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1060,"y":460,"wires":[]},{"id":"e2e4f670.cd19a8","type":"position-config","name":"Sydney - Castle Cove","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":"99","timeZoneDST":"0","stateTimeFormat":"3","stateDateFormat":"12"}]

Thanks for the hint and the initial flow to get me moving in this direction @greengolfer

Craig

3 Likes

Thanks to everyone for their contributions on this topic. I follow it closely, because I plan to control the charging of my Tesla with node-red. A number of the ingredients are already in place, like reading the available solar power via modbus, and the Tesla API node. The topic here gives me another one, great.

To learn from your example I copied your flow. There seem to be a number of nodes missing on my side. Would you please give me a hint on what nodes I need to install, in order to be able to test your flow?

Sorry Yes

node-red-contrib-sunposition - gives you the within-time node which is the main one
Also node-red-contrib-holiday - gives the one node at the top for world wide public holidays

Not sure you would need any others

Craig

1 Like

So I ended up with multiple solutions just to see what would be easier than the others. And then to top it off, I challenged myself to figure out how to do with a function node even though my 6-year-old cousin can out code me.

I have a Rainforest gateway that's supposed to get the data over zigbee from the meter. So my initial through was to use that to trigger the tier changes. While my NR flow works, the gateway pulls worthless data that's not remotely close to accurate.


Next was using Big Timer nodes to schedule the time times. This actually works surprisingly well. If anyone hasn't used Big Timer, I highly recommend it.


Finally was my funciton block attempt. This uses three individual function blocks which progressively narrow down to a specific TOU rate. The flow is triggered by a cron plus node that is also very handy (also recommend anyone to try this working with times/schedules).

I'm currently running my function block flow to test it to, but honestly, I might go back to the Big Timer as I like how it displays the upcoming time for each of it's (or remaining time if it's active).

2 Likes

Hey well done hanging in there on this one

I have been happily using the one i posted up earlier and it works well.

Would be interested in seeing the stuff you have done with Peters Bigtimer if you could post up the flow ?

Craig

1 Like

Sure thing:

[{"id":"c882e7b1.5e1708","type":"bigtimer","z":"22471325.87950c","outtopic":"","outpayload1":"","outpayload2":"","name":"Summer, Peak","comment":"6/1-9/30, 3 PM - 8 PM, Mon-Fri","lat":"37.79461","lon":"-122.43763","starttime":"900","endtime":"1200","starttime2":0,"endtime2":0,"startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"on","outtext2":"off","timeout":1440,"sun":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":false,"jan":false,"feb":false,"mar":false,"apr":false,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":false,"dec":false,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":0,"month7":0,"day8":0,"month8":0,"day9":0,"month9":0,"day10":0,"month10":0,"day11":0,"month11":0,"day12":0,"month12":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":4160,"y":1050,"wires":[[],[],["393244eb.bf586c"]]},{"id":"84ccc004.5a2c6","type":"api-call-service","z":"22471325.87950c","name":"Partial Peak (RED)","server":"c75798f0.9eb148","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.dining_room_switch_status_led","data":"{\"effect\":\"Pulse RED\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":4780,"y":1200,"wires":[[]]},{"id":"393244eb.bf586c","type":"switch","z":"22471325.87950c","d":true,"name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":4520,"y":1250,"wires":[["84ccc004.5a2c6","4b1b0ea7.4d1f3"],["7d1e70a3.6edeb","9b0102e0.045aa"]]},{"id":"1bd1ad4d.431cf3","type":"bigtimer","z":"22471325.87950c","outtopic":"","outpayload1":"","outpayload2":"","name":"Summer, Partial Peak","comment":"6/1-9/30, 12 AM - 3 PM, Mon-Fri","lat":"37.79461","lon":"-122.43763","starttime":"720","endtime":"900","starttime2":0,"endtime2":0,"startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"on","outtext2":"off","timeout":1440,"sun":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":false,"jan":false,"feb":false,"mar":false,"apr":false,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":false,"dec":false,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":0,"month7":0,"day8":0,"month8":0,"day9":0,"month9":0,"day10":0,"month10":0,"day11":0,"month11":0,"day12":0,"month12":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":4180,"y":1170,"wires":[[],[],["ae08cb1a.285ec8"]]},{"id":"ae08cb1a.285ec8","type":"switch","z":"22471325.87950c","d":true,"name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":4520,"y":1360,"wires":[["4d16e365.f00ddc"],["7d1e70a3.6edeb"]]},{"id":"5180c5c9.6271ec","type":"bigtimer","z":"22471325.87950c","outtopic":"","outpayload1":"","outpayload2":"","name":"Summer, Partial Peak","comment":"6/1-9/30, 8-10 PM, Mon-Fri","lat":"37.79461","lon":"-122.43763","starttime":"1200","endtime":"1320","starttime2":0,"endtime2":0,"startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"on","outtext2":"off","timeout":1440,"sun":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":false,"jan":false,"feb":false,"mar":false,"apr":false,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":false,"dec":false,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":0,"month7":0,"day8":0,"month8":0,"day9":0,"month9":0,"day10":0,"month10":0,"day11":0,"month11":0,"day12":0,"month12":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":4180,"y":1290,"wires":[[],[],["ae08cb1a.285ec8"]]},{"id":"4d16e365.f00ddc","type":"api-call-service","z":"22471325.87950c","name":"Partial Peak (YELLOW)","server":"c75798f0.9eb148","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.dining_room_switch_status_led","data":"{\"effect\":\"Pulse YELLOW\"}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":4790,"y":1310,"wires":[[]]},{"id":"74db62d1.25b8dc","type":"bigtimer","z":"22471325.87950c","outtopic":"","outpayload1":"","outpayload2":"","name":"Summer, Partial Peak, Weekends","comment":"6/1-9/30, 5-8 PM, Sat-Sun","lat":"37.79461","lon":"-122.43763","starttime":"1020","endtime":"1200","starttime2":0,"endtime2":0,"startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"on","outtext2":"off","timeout":1440,"sun":true,"mon":false,"tue":false,"wed":false,"thu":false,"fri":false,"sat":true,"jan":false,"feb":false,"mar":false,"apr":false,"may":true,"jun":true,"jul":true,"aug":true,"sep":true,"oct":true,"nov":false,"dec":false,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":0,"month7":0,"day8":0,"month8":0,"day9":0,"month9":0,"day10":0,"month10":0,"day11":0,"month11":0,"day12":0,"month12":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":4220,"y":1400,"wires":[[],[],["ae08cb1a.285ec8"]]},{"id":"58b0fac3.a21e14","type":"bigtimer","z":"22471325.87950c","outtopic":"","outpayload1":"","outpayload2":"","name":"Winter, Partial Peak","comment":"10/1-5/31, 5-8 PM, Mon-Fri","lat":"37.79461","lon":"-122.43763","starttime":"1020","endtime":"1200","starttime2":0,"endtime2":0,"startoff":0,"endoff":0,"startoff2":0,"endoff2":0,"offs":0,"outtext1":"on","outtext2":"off","timeout":1440,"sun":false,"mon":true,"tue":true,"wed":true,"thu":true,"fri":true,"sat":false,"jan":true,"feb":true,"mar":true,"apr":true,"may":true,"jun":false,"jul":false,"aug":false,"sep":false,"oct":true,"nov":true,"dec":true,"day1":0,"month1":0,"day2":0,"month2":0,"day3":0,"month3":0,"day4":0,"month4":0,"day5":0,"month5":0,"day6":0,"month6":0,"day7":0,"month7":0,"day8":0,"month8":0,"day9":0,"month9":0,"day10":0,"month10":0,"day11":0,"month11":0,"day12":0,"month12":0,"d1":0,"w1":0,"d2":0,"w2":0,"d3":0,"w3":0,"d4":0,"w4":0,"d5":0,"w5":0,"d6":0,"w6":0,"xday1":0,"xmonth1":0,"xday2":0,"xmonth2":0,"xday3":0,"xmonth3":0,"xday4":0,"xmonth4":0,"xday5":0,"xmonth5":0,"xday6":0,"xmonth6":0,"xd1":0,"xw1":0,"xd2":0,"xw2":0,"xd3":0,"xw3":0,"xd4":0,"xw4":0,"xd5":0,"xw5":0,"xd6":0,"xw6":0,"suspend":false,"random":false,"randon1":false,"randoff1":false,"randon2":false,"randoff2":false,"repeat":true,"atstart":true,"odd":false,"even":false,"x":4170,"y":1510,"wires":[[],[],["ae08cb1a.285ec8"]]},{"id":"7d1e70a3.6edeb","type":"api-call-service","z":"22471325.87950c","name":"Off","server":"c75798f0.9eb148","version":3,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.dining_room_switch_status_led","data":"","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":4740,"y":1460,"wires":[[]]},{"id":"4b1b0ea7.4d1f3","type":"link out","z":"22471325.87950c","name":"Power in peak tier","links":["6f9b3e4f.934d6"],"x":4705,"y":1160,"wires":[]},{"id":"9b0102e0.045aa","type":"link out","z":"22471325.87950c","name":"Power out of peak tier","links":["114efbb3.dc5854"],"x":4705,"y":1420,"wires":[]},{"id":"aaa7d4a2.06e1d8","type":"inject","z":"22471325.87950c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"auto","payloadType":"str","x":3800,"y":1150,"wires":[["a782c45b.b0a618"]]},{"id":"48915e37.47d65","type":"inject","z":"22471325.87950c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"off","payloadType":"str","x":3800,"y":1270,"wires":[["f730e5a5.45c928"]]},{"id":"1dd109aa.b516b6","type":"inject","z":"22471325.87950c","name":"auto","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"auto","payloadType":"str","x":3950,"y":1090,"wires":[["c882e7b1.5e1708"]]},{"id":"41d1fbbc.1227d4","type":"inject","z":"22471325.87950c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"off","payloadType":"str","x":3950,"y":1050,"wires":[["c882e7b1.5e1708"]]},{"id":"30e5ecda.997bc4","type":"inject","z":"22471325.87950c","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"on","payloadType":"str","x":3950,"y":1010,"wires":[["c882e7b1.5e1708"]]},{"id":"7adb7d6a.c12994","type":"comment","z":"22471325.87950c","name":"Schedule via Big Timer","info":"# # Peak\n# # 5/1-10/31, 1 PM - 7 PM, Mon-Fri\n\n# # Partial Peak\n# # 5/1-10/31, 10 AM - 1 PM, Mon-Fri\n# # 5/1-10/31, 7-9 PM, Mon-Fri\n# # 5/1-10/31, 5-8 PM, Sat-Sun\n# # 11/1-4/30, 5-8 PM, Mon-Fri","x":3700,"y":930,"wires":[]},{"id":"a782c45b.b0a618","type":"trigger-state","z":"22471325.87950c","name":"TOU is ON, send AUTO","server":"c75798f0.9eb148","version":0,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"switch.dining_room_switch_utility_tou_notification","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"previous_state","comparatorType":"is_not","comparatorValueDatatype":"str","comparatorValue":"off","propertyValue":"old_state.state"},{"targetType":"this_entity","targetValue":"","propertyType":"current_state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"off","propertyValue":"new_state.state"}],"outputs":3,"customoutputs":[{"messageType":"payload","messageValue":"off","messageValueType":"json","comparatorPropertyType":"always","comparatorType":"is","comparatorValue":"","comparatorValueDataType":"str","comparatorPropertyValue":""}],"outputinitially":false,"state_type":"str","x":3860,"y":1200,"wires":[[],[],["c882e7b1.5e1708","1bd1ad4d.431cf3","5180c5c9.6271ec","74db62d1.25b8dc","58b0fac3.a21e14"]]},{"id":"f730e5a5.45c928","type":"trigger-state","z":"22471325.87950c","name":"TOU is OFF, send OFF","server":"c75798f0.9eb148","version":0,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"switch.dining_room_switch_utility_tou_notification","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"previous_state","comparatorType":"is_not","comparatorValueDatatype":"str","comparatorValue":"on","propertyValue":"old_state.state"},{"targetType":"this_entity","targetValue":"","propertyType":"current_state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"on","propertyValue":"new_state.state"}],"outputs":3,"customoutputs":[{"messageType":"payload","messageValue":"auto","messageValueType":"json","comparatorPropertyType":"always","comparatorType":"is","comparatorValue":"","comparatorValueDataType":"str","comparatorPropertyValue":""}],"outputinitially":false,"state_type":"str","x":3870,"y":1320,"wires":[[],[],["c882e7b1.5e1708","1bd1ad4d.431cf3","5180c5c9.6271ec","74db62d1.25b8dc","58b0fac3.a21e14"]]},{"id":"c75798f0.9eb148","type":"server","name":"Home Assistant Synology","version":1,"legacy":false,"addon":false,"rejectUnauthorizedCerts":false,"ha_boolean":"y|yes|true|on|ON|home|open","connectionDelay":true,"cacheJson":true}]

Hey looks good - i know Peter Scargill gives a lot of love to this node so i might swing across to using it

thanks for the heads up on it

Craig