# {Problem}Bigtimer

**URL:** <https://discourse.nodered.org/t/problem-bigtimer/16863>\
**Category:** General\
**Created:** [18 October 2019 16:48 UTC](https://discourse.nodered.org/t/problem-bigtimer/16863 "2019-10-18T16:48:02Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michelelac](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@Michelelac](https://discourse.nodered.org/u/Michelelac)\
**Post date:** [18 October 2019 16:48 UTC](https://discourse.nodered.org/t/problem-bigtimer/16863/1 "2019-10-18T16:48:02Z")

</div>

Hi everyone, I am recently using node-red and therefore I am very inexperienced with this type of programming. I have created a project that consists in switching on a relay thanks to node-red and now I should visualize the BigTimer on the web interface. Can you help me? I really don't know how to do it!

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [18 October 2019 16:53 UTC](https://discourse.nodered.org/t/problem-bigtimer/16863/2 "2019-10-18T16:53:06Z")

</div>

Welcome to the forum. It would be helpful if you could post your flow here, that will make it easier for us to make suggestions to help you.

---

<div class="post-metadata">

**Author:** ![Michelelac](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@Michelelac](https://discourse.nodered.org/u/Michelelac)\
**Post date:** [18 October 2019 17:01 UTC](https://discourse.nodered.org/t/problem-bigtimer/16863/3 "2019-10-18T17:01:10Z")

</div>

"fc1a6598.792f18"  
Yes, excuse me ... I should create a schedule by creating precise time intervals ...

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [18 October 2019 17:08 UTC](https://discourse.nodered.org/t/problem-bigtimer/16863/4 "2019-10-18T17:08:29Z")

</div>

> [@Michelelac](#):
>
> visualize the BigTimer on the web interface

I don't think you can in any automated way because I don't think bigtimer outputs its settings.

I think that the cron-plus node is more likely to expose the data you want and there is a thread elsewhere where someone is talking about building (indeed having built) a web interface to complement cron-plus for her own needs.

---

<div class="post-metadata">

**Author:** ![Michelelac](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@Michelelac](https://discourse.nodered.org/u/Michelelac)\
**Post date:** [18 October 2019 17:15 UTC](https://discourse.nodered.org/t/problem-bigtimer/16863/5 "2019-10-18T17:15:47Z")

</div>

Hi, so with cron plus should I be able to do what I want?

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [18 October 2019 17:20 UTC](https://discourse.nodered.org/t/problem-bigtimer/16863/6 "2019-10-18T17:20:00Z")

</div>

One question, do you just want to control the relay with BigTimer?

---

<div class="post-metadata">

**Author:** ![Michelelac](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@Michelelac](https://discourse.nodered.org/u/Michelelac)\
**Post date:** [18 October 2019 17:22 UTC](https://discourse.nodered.org/t/problem-bigtimer/16863/7 "2019-10-18T17:22:23Z")

</div>

They assigned me an exercise where I have to control the relay following precise time portions, set by any device from the web interface!

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [18 October 2019 17:26 UTC](https://discourse.nodered.org/t/problem-bigtimer/16863/8 "2019-10-18T17:26:36Z")

</div>

By a web interface or from the node-red editor?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [18 October 2019 17:26 UTC](https://discourse.nodered.org/t/problem-bigtimer/16863/9 "2019-10-18T17:26:42Z")

</div>

Well, it isn't that easy. Building a scheduling web interface is actually quite hard. But at least the node supports the data flow as far as I'm aware. I've not yet done it myself.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [18 October 2019 17:27 UTC](https://discourse.nodered.org/t/problem-bigtimer/16863/10 "2019-10-18T17:27:02Z")

</div>

That is possible with node-red-contrib-cron-plus.

Read the built help info after you install it and import the sample demo for tips on how to use it.

---

<div class="post-metadata">

**Author:** ![Michelelac](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@Michelelac](https://discourse.nodered.org/u/Michelelac)\
**Post date:** [18 October 2019 17:28 UTC](https://discourse.nodered.org/t/problem-bigtimer/16863/11 "2019-10-18T17:28:37Z")

</div>

By a web interface!

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [18 October 2019 17:29 UTC](https://discourse.nodered.org/t/problem-bigtimer/16863/12 "2019-10-18T17:29:27Z")

</div>

OK, then see @Steve-Mcl's post above.

---

<div class="post-metadata">

**Author:** ![Michelelac](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@Michelelac](https://discourse.nodered.org/u/Michelelac)\
**Post date:** [18 October 2019 17:29 UTC](https://discourse.nodered.org/t/problem-bigtimer/16863/13 "2019-10-18T17:29:39Z")

</div>

okay, thanks for helping me!

---

<div class="post-metadata">

**Author:** ![Michelelac](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@Michelelac](https://discourse.nodered.org/u/Michelelac)\
**Post date:** [18 October 2019 17:30 UTC](https://discourse.nodered.org/t/problem-bigtimer/16863/14 "2019-10-18T17:30:51Z")

</div>

okay, you were very kind!

---

<div class="post-metadata">

**Author:** ![Michelelac](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@Michelelac](https://discourse.nodered.org/u/Michelelac)\
**Post date:** [18 October 2019 17:31 UTC](https://discourse.nodered.org/t/problem-bigtimer/16863/15 "2019-10-18T17:31:50Z")

</div>

I know, plus I'm very inexperienced!😅

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [18 October 2019 17:43 UTC](https://discourse.nodered.org/t/problem-bigtimer/16863/16 "2019-10-18T17:43:14Z")

</div>

Well, you've certainly been pushed in at the deep end!

I would look at how you could simplify the schedule as much as possible. Then build the UI. Once you have that, you will need to translate the data from the UI to/from the cron-plus data structure. As the name implies, it uses CRON format which you can lookup.

Building the UI is what will take the most time. Try to define it as simply as possible. Can you get away with a single on/off event for each working day for example? Do you need exact times or can you get away with hours? etc.

---

<div class="post-metadata">

**Author:** ![Michelelac](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@Michelelac](https://discourse.nodered.org/u/Michelelac)\
**Post date:** [18 October 2019 18:05 UTC](https://discourse.nodered.org/t/problem-bigtimer/16863/17 "2019-10-18T18:05:56Z")

</div>

Yes, I need to create for example an ignition that goes from 16:00 in the afternoon to 18: 00. I tried but I really can't ... you could guide me or link me to sites that explain step by step what I have to do? that I'm asking a little too much but I don't know how to get out of it)

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [18 October 2019 18:42 UTC](https://discourse.nodered.org/t/problem-bigtimer/16863/18 "2019-10-18T18:42:36Z")

</div>

Well I would start simply and create a Dashboard page with two inputs for the times then see how data flows out and how you can make it flow in.

Then expand the UI if you need to.

Here is the simplest possible input for a start and end time:

```auto
[{"id":"6b009717.947618","type":"debug","z":"63281c77.40a064","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":490,"y":1420,"wires":[]},{"id":"1b4b05f0.7fdf3a","type":"ui_text_input","z":"63281c77.40a064","name":"","label":"Start","tooltip":"","group":"fa3eee85.b8eb1","order":3,"width":0,"height":0,"passthru":false,"mode":"time","delay":300,"topic":"start","x":310,"y":1420,"wires":[["6b009717.947618"]]},{"id":"818949b1.1eff98","type":"ui_text_input","z":"63281c77.40a064","name":"","label":"End","tooltip":"","group":"fa3eee85.b8eb1","order":3,"width":0,"height":0,"passthru":false,"mode":"time","delay":300,"topic":"end","x":310,"y":1460,"wires":[["eaba0840.cc84f8"]]},{"id":"eaba0840.cc84f8","type":"debug","z":"63281c77.40a064","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":490,"y":1460,"wires":[]},{"id":"fa3eee85.b8eb1","type":"ui_group","z":"","name":"Time","tab":"70bd0808.2b4f68","disp":true,"width":"18","collapse":false},{"id":"70bd0808.2b4f68","type":"ui_tab","z":"","name":"Schedule-Test","icon":"dashboard","disabled":false,"hidden":false}]

```

You need to know how to translate the two inputs into CRON formats, this may help:

[https://www.freeformatter.com/cron-expression-generator-quartz.html](https://www.freeformatter.com/cron-expression-generator-quartz.html)

For example, to specify something that will happen every day at 4pm: `0 0 0,16 ? * * *`

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [18 October 2019 19:15 UTC](https://discourse.nodered.org/t/problem-bigtimer/16863/19 "2019-10-18T19:15:42Z")

</div>

And because you caught me bored at the end of the week and because it was an interesting excercise, here is a more complete example:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/6/69a9a061dc6d5e1242eaaf82a191cde7c88b1233.png)

```auto
[{"id":"9be1f49f.37f098","type":"subflow","name":"UI Time Input To Cron","info":"","category":"","in":[{"x":60,"y":80,"wires":[{"id":"fb4ea2b7.8f275"}]}],"out":[{"x":320,"y":80,"wires":[{"id":"fb4ea2b7.8f275","port":0}]}],"env":[],"color":"#DDAA99"},{"id":"fb4ea2b7.8f275","type":"function","z":"9be1f49f.37f098","name":"","func":"const out = {}\n\nout.input = msg.payload\n\nconst dt = new Date(msg.payload)\n\nout.hour = dt.getUTCHours()\nout.minute = dt.getUTCMinutes()\n\nout.cron = `0 ${out.minute} 0,${out.hour} ? * * *`\n\nmsg.payload = out\n\nreturn msg;","outputs":1,"noerr":0,"x":190,"y":80,"wires":[[]]},{"id":"6b009717.947618","type":"debug","z":"63281c77.40a064","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":710,"y":1420,"wires":[]},{"id":"1b4b05f0.7fdf3a","type":"ui_text_input","z":"63281c77.40a064","name":"","label":"Start","tooltip":"","group":"fa3eee85.b8eb1","order":3,"width":0,"height":0,"passthru":false,"mode":"time","delay":300,"topic":"start","x":310,"y":1420,"wires":[["42c8160e.52b738"]]},{"id":"818949b1.1eff98","type":"ui_text_input","z":"63281c77.40a064","name":"","label":"End","tooltip":"","group":"fa3eee85.b8eb1","order":3,"width":0,"height":0,"passthru":false,"mode":"time","delay":300,"topic":"end","x":310,"y":1460,"wires":[["cfa735d3.457d78"]]},{"id":"eaba0840.cc84f8","type":"debug","z":"63281c77.40a064","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":710,"y":1460,"wires":[]},{"id":"177ea815.3a30f8","type":"inject","z":"63281c77.40a064","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":1420,"wires":[["1b4b05f0.7fdf3a","818949b1.1eff98"]]},{"id":"42c8160e.52b738","type":"subflow:9be1f49f.37f098","z":"63281c77.40a064","x":500,"y":1420,"wires":[["6b009717.947618"]]},{"id":"cfa735d3.457d78","type":"subflow:9be1f49f.37f098","z":"63281c77.40a064","x":500,"y":1460,"wires":[["eaba0840.cc84f8"]]},{"id":"fa3eee85.b8eb1","type":"ui_group","z":"","name":"Time","tab":"70bd0808.2b4f68","disp":true,"width":"6","collapse":false},{"id":"70bd0808.2b4f68","type":"ui_tab","z":"","name":"Schedule-Test","icon":"dashboard","disabled":false,"hidden":false}]

```

Just needs cron-plus adding in now.

---

<div class="post-metadata">

**Author:** ![Michelelac](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@Michelelac](https://discourse.nodered.org/u/Michelelac)\
**Post date:** [20 October 2019 08:45 UTC](https://discourse.nodered.org/t/problem-bigtimer/16863/20 "2019-10-20T08:45:55Z")

</div>

you were too kind,thanks!  
I apologize for boring you !!🤣🤣

[Next page](https://discourse.nodered.org/t/problem-bigtimer/16863.md?page=2)
