This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
start clock / start line dashboard
#2
Photo 
The first crude version of the start clock done. Needs visual polishing (e.g. bigger size of numbers) but even this would do I think. The code below if some on is interested. 



****

[{"id":"a1ce90e8.3919c","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"a8a4805c.a7da4","type":"ui_button","z":"a1ce90e8.3919c","name":"5 Min","group":"abc45751.2dc208","order":2,"width":"2","height":"2","passthru":false,"label":"5 Min","tooltip":"","color":"blue","bgcolor":"White","icon":"","payload":"true","payloadType":"bool","topic":"topic","topicType":"msg","x":70,"y":80,"wires":[["f4bcbabc.3308b8","32ab5b2a.e9fc24"]]},{"id":"f4bcbabc.3308b8","type":"countdown","z":"a1ce90e8.3919c","name":"","topic":"","payloadTimerStart":"true","payloadTimerStartType":"bool","payloadTimerStop":"false","payloadTimerStopType":"bool","timer":"300","resetWhileRunning":true,"setTimeToNewWhileRunning":true,"startCountdownOnControlMessage":false,"x":650,"y":80,"wires":[["63cae013.f34dc"],["d3ad6b0b.bf2598"]]},{"id":"d3ad6b0b.bf2598","type":"function","z":"a1ce90e8.3919c","name":"fmtMSS","func":"function fancyTimeFormat(duration)\n{   \n    // Hours, minutes and seconds\n    var hrs = ~~(duration / 3600);\n    var mins = ~~((duration % 3600) / 60);\n    var secs = ~~duration % 60;\n\n    // Output like \"1:01\" or \"4:03:59\" or \"123:03:59\"\n    var ret = \"\";\n\n    if (hrs > 0) {\n        ret += \"\" + hrs + \":\" + (mins < 10 ? \"0\" : \"\");\n    }\n\n    ret += \"\" + mins + \":\" + (secs < 10 ? \"0\" : \"\");\n    ret += \"\" + secs;\n    return ret;\n}\n\nmsg.payload = fancyTimeFormat(msg.payload);\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":900,"y":200,"wires":[["63cae013.f34dc"]]},{"id":"63cae013.f34dc","type":"ui_text","z":"a1ce90e8.3919c","group":"abc45751.2dc208","order":1,"width":"6","height":"3","name":"","label":"","format":"{{msg.payload}}","layout":"row-spread","x":855,"y":320,"wires":[],"l":false},{"id":"8cc3911e.095d4","type":"ui_button","z":"a1ce90e8.3919c","name":"","group":"abc45751.2dc208","order":5,"width":"6","height":"1","passthru":false,"label":"Reset","tooltip":"","color":"White","bgcolor":"Red","icon":"","payload":"false","payloadType":"bool","topic":"topic","topicType":"msg","x":70,"y":420,"wires":[["32ab5b2a.e9fc24","f016ab6d.094c68","38b1119.c2328ee"]]},{"id":"3a006463.b7f62c","type":"ui_button","z":"a1ce90e8.3919c","name":"4 Min","group":"abc45751.2dc208","order":3,"width":"2","height":"2","passthru":false,"label":"4 Min","tooltip":"","color":"White","bgcolor":"Blue","icon":"","payload":"true","payloadType":"bool","topic":"topic","topicType":"msg","x":70,"y":160,"wires":[["45fd8c79.dbfdc4","f016ab6d.094c68"]]},{"id":"45fd8c79.dbfdc4","type":"countdown","z":"a1ce90e8.3919c","name":"","topic":"","payloadTimerStart":"true","payloadTimerStartType":"bool","payloadTimerStop":"false","payloadTimerStopType":"bool","timer":"240","resetWhileRunning":false,"setTimeToNewWhileRunning":true,"startCountdownOnControlMessage":false,"x":650,"y":160,"wires":[[],["d3ad6b0b.bf2598"]]},{"id":"f016ab6d.094c68","type":"change","z":"a1ce90e8.3919c","name":"Stop countd 2","rules":[{"t":"change","p":"payload","pt":"msg","from":"true","fromt":"bool","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":300,"y":220,"wires":[["f4bcbabc.3308b8","4f03cb31.cd4864"]]},{"id":"32ab5b2a.e9fc24","type":"change","z":"a1ce90e8.3919c","name":"Stop countd 1","rules":[{"t":"change","p":"payload","pt":"msg","from":"true","fromt":"bool","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":300,"y":120,"wires":[["45fd8c79.dbfdc4","4f03cb31.cd4864"]]},{"id":"e8daa4f8.c30738","type":"ui_button","z":"a1ce90e8.3919c","name":"1 Min","group":"abc45751.2dc208","order":4,"width":"2","height":"2","passthru":false,"label":"1 Min","tooltip":"","color":"White","bgcolor":"green","icon":"","payload":"true","payloadType":"bool","topic":"topic","topicType":"msg","x":70,"y":260,"wires":[["4f03cb31.cd4864","38b1119.c2328ee"]]},{"id":"4f03cb31.cd4864","type":"countdown","z":"a1ce90e8.3919c","name":"","topic":"","payloadTimerStart":"true","payloadTimerStartType":"bool","payloadTimerStop":"false","payloadTimerStopType":"bool","timer":"60","resetWhileRunning":false,"setTimeToNewWhileRunning":true,"startCountdownOnControlMessage":false,"x":650,"y":260,"wires":[[],["d3ad6b0b.bf2598"]]},{"id":"38b1119.c2328ee","type":"change","z":"a1ce90e8.3919c","name":"Stop Countd 3","rules":[{"t":"change","p":"payload","pt":"msg","from":"true","fromt":"bool","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":300,"y":320,"wires":[["45fd8c79.dbfdc4","f4bcbabc.3308b8"]]},{"id":"abc45751.2dc208","type":"ui_group","name":"Timer buttons","tab":"923e6acb.6645f8","order":1,"disp":false,"width":"6","collapse":false},{"id":"923e6acb.6645f8","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]
Reply


Messages In This Thread
start clock / start line dashboard - by Accablant - 2021-04-27, 01:48 PM
RE: start clock / start line dashboard - by Accablant - 2021-04-29, 11:33 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)