The inner working of a talking clock. No voice part included!

Only that there are a few different ones and people have their own likes.

I have just spent the afternoon/day writing this.

There is a bit of redundant code. I've left it there only as an option to which you want to use.
(That is further down at/in the CLOCK part.)

The bigger picture for this is it gives you a full date if you want it.
But I then went on to make a talking clock, as said.

[{"id":"e592d0a554e7a74f","type":"switch","z":"fe5670ff.ea94e","name":"Time Date Day","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":":","vt":"str"},{"t":"cont","v":"-","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":530,"y":170,"wires":[["178ef413e8763620","613ad7bf1a7480d8"],["5bb0d73c90c50f79","81ccaf07e492a4de"],["fd03349f83fea7bf","41249c5b3de307d4"]]},{"id":"8596a5fdffabb834","type":"split","z":"fe5670ff.ea94e","name":"","splt":" ","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":360,"y":120,"wires":[["bc51deace6a4b42f","e592d0a554e7a74f"]]},{"id":"178ef413e8763620","type":"debug","z":"fe5670ff.ea94e","name":"Time","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":710,"y":130,"wires":[]},{"id":"613ad7bf1a7480d8","type":"fan","z":"fe5670ff.ea94e","name":"","x":675,"y":260,"wires":[["994fa3fcde0aa24f"]],"l":false},{"id":"5bb0d73c90c50f79","type":"debug","z":"fe5670ff.ea94e","name":"Date","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":710,"y":170,"wires":[]},{"id":"81ccaf07e492a4de","type":"fan","z":"fe5670ff.ea94e","name":"","x":675,"y":300,"wires":[["9ca005b9e9398526"]],"l":false},{"id":"fd03349f83fea7bf","type":"debug","z":"fe5670ff.ea94e","name":"Day","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":710,"y":210,"wires":[]},{"id":"41249c5b3de307d4","type":"fan","z":"fe5670ff.ea94e","name":"","x":675,"y":340,"wires":[["1061130bf893383d"]],"l":false},{"id":"780c44bb57eb1870","type":"moment","z":"fe5670ff.ea94e","name":"","topic":"","input":"payload","inputType":"msg","inTz":"Australia/Sydney","adjAmount":"0","adjType":"hours","adjDir":"add","format":"dddd HH:mm:ss DD-MMMM","locale":"en-AU","output":"payload","outputType":"msg","outTz":"Australia/Sydney","x":380,"y":70,"wires":[["a51e3e0c085e9427","8596a5fdffabb834"]]},{"id":"bc51deace6a4b42f","type":"debug","z":"fe5670ff.ea94e","name":"SPLIT","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":500,"y":120,"wires":[]},{"id":"994fa3fcde0aa24f","type":"change","z":"fe5670ff.ea94e","name":"time","rules":[{"t":"set","p":"time","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":760,"y":260,"wires":[["e157ba574b653c5a","7820f96daed2185f"]]},{"id":"9ca005b9e9398526","type":"change","z":"fe5670ff.ea94e","name":"date","rules":[{"t":"set","p":"date","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":760,"y":300,"wires":[["e157ba574b653c5a"]]},{"id":"1061130bf893383d","type":"change","z":"fe5670ff.ea94e","name":"day","rules":[{"t":"set","p":"day","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":760,"y":340,"wires":[["e157ba574b653c5a"]]},{"id":"76f8b4e666599fc1","type":"inject","z":"fe5670ff.ea94e","name":"Start","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"5","topic":"","payload":"","payloadType":"date","x":180,"y":70,"wires":[["780c44bb57eb1870"]]},{"id":"a51e3e0c085e9427","type":"debug","z":"fe5670ff.ea94e","name":"debug 281","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":820,"y":70,"wires":[]},{"id":"e157ba574b653c5a","type":"join","z":"fe5670ff.ea94e","name":"","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":900,"y":300,"wires":[["1e86394a30fa5573","de9a05c00c7556e6"]]},{"id":"7820f96daed2185f","type":"fan","z":"fe5670ff.ea94e","name":"Time","x":295,"y":500,"wires":[["836aae305955a631","f03a6d46fd63f7ac"]],"l":false},{"id":"1e86394a30fa5573","type":"debug","z":"fe5670ff.ea94e","name":"debug 282","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1020,"y":240,"wires":[]},{"id":"de9a05c00c7556e6","type":"string","z":"fe5670ff.ea94e","name":"","methods":[{"name":"replaceAll","params":[{"type":"str","value":"\\n"},{"type":"str","value":"  "}]},{"name":"replaceAll","params":[{"type":"str","value":"/"},{"type":"str","value":" "}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":1030,"y":300,"wires":[["486f14e9565b5654","771469a7b7764524"]]},{"id":"836aae305955a631","type":"debug","z":"fe5670ff.ea94e","name":"debug 284","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":240,"y":460,"wires":[]},{"id":"f03a6d46fd63f7ac","type":"split","z":"fe5670ff.ea94e","name":"","splt":":","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":390,"y":500,"wires":[["84040a8c060de44b","fe74213776223967","684755d45e69bb92"]]},{"id":"486f14e9565b5654","type":"debug","z":"fe5670ff.ea94e","name":"debug 283","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1050,"y":350,"wires":[]},{"id":"771469a7b7764524","type":"template","z":"fe5670ff.ea94e","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"It is {{day}} the {{date}} and it is {{time}}","output":"str","x":810,"y":400,"wires":[["4f73a4204b2c59f8"]]},{"id":"84040a8c060de44b","type":"debug","z":"fe5670ff.ea94e","name":"debug 285","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":410,"y":460,"wires":[]},{"id":"fe74213776223967","type":"switch","z":"fe5670ff.ea94e","d":true,"name":"","property":"parts.index","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"2","vt":"num"}],"checkall":"true","repair":false,"outputs":3,"x":390,"y":550,"wires":[["6cb38a47ef96dec1"],["c9941c49843cb51a"],["5af44b35e506449f"]]},{"id":"684755d45e69bb92","type":"switch","z":"fe5670ff.ea94e","name":"","property":"parts.index","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"2","vt":"num"}],"checkall":"true","repair":false,"outputs":3,"x":380,"y":690,"wires":[["9912a1829ae8b8ab"],["28fcf7ba685ec0a5"],["859f79752e7538c4"]]},{"id":"4f73a4204b2c59f8","type":"string","z":"fe5670ff.ea94e","name":"","methods":[{"name":"replaceAll","params":[{"type":"str","value":"-"},{"type":"str","value":" "}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":980,"y":400,"wires":[["7931bf171302c7fb"]]},{"id":"6cb38a47ef96dec1","type":"function","z":"fe5670ff.ea94e","name":"words","func":"var value = {\n    0: \"zero\",\n    1: \"zero one\",\n    2: \"zero two\",\n    3: \"zero three\",\n    4: \"zero four\",\n    5: \"zero five\",\n    6: \"zero six\",\n    7: \"zero seven\",\n    8: \"zero eight\",\n    9: \"zero nine\",\n    10: \"ten\",\n    11: \"eleven\",\n    12: \"twelve\",\n    13: \"thirteen\",\n    14: \"forteen\",\n    15: \"fifteen\",\n    16: \"sixteen\",\n    17: \"seventeen\",\n    18: \"eighteen\",\n    19: \"nineteen\",\n    20: \"twenty\",\n    21: \"twenty one\",\n    22: \"twenty two\",\n    23: \"twenty three\",\n    24: \"twenty four\",\n    25: \"twenty five\",\n    26: \"twnety six\",\n    27: \"twnety seven\",\n    28: \"twenty eight\",\n    29: \"twnety nine\",\n    30: \"thirty\",\n    31: \"thirty one\",\n    32: \"thirty two\",\n    33: \"thirty three\",\n    34: \"thirty four\",\n    35: \"thirty five\",\n    36: \"thirty six\",\n    37: \"thirty even\",\n    38: \"thirty eight\",\n    39: \"tirty nine\",\n    40: \"forty\",\n    41: \"forty one\",\n    42: \"forty two\",\n    43: \"forty three\",\n    44: \"forty four\",\n    45: \"forty five\",\n    46: \"forty six\",\n    47: \"forty seven\",\n    48: \"forty eight\",\n    49: \"forty nine\",\n    50: \"fifty\",\n    51: \"fifty one\",\n    52: \"fifty two\",\n    53: \"fifty three\",\n    54: \"fifty four\",\n    55: \"fifty five\",\n    56: \"fifty six\",\n    57: \"fifty seven\",\n    58: \"fity eight\",\n    59: \"fifty nine\",\n};\nconst foo = parseInt(msg.payload);\nconst words = value[foo];\nmsg.payload = words;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":540,"y":520,"wires":[["d3ae156e26d48f2e","d70896bb97d72e26"]]},{"id":"c9941c49843cb51a","type":"function","z":"fe5670ff.ea94e","name":"words","func":"var value = {\n    0: \"zero\",\n    1: \"zero one\",\n    2: \"zero two\",\n    3: \"zero three\",\n    4: \"zero four\",\n    5: \"zero five\",\n    6: \"zero six\",\n    7: \"zero seven\",\n    8: \"zero eight\",\n    9: \"zero nine\",\n    10: \"ten\",\n    11: \"eleven\",\n    12: \"twelve\",\n    13: \"thirteen\",\n    14: \"forteen\",\n    15: \"fifteen\",\n    16: \"sixteen\",\n    17: \"seventeen\",\n    18: \"eighteen\",\n    19: \"nineteen\",\n    20: \"twenty\",\n    21: \"twenty one\",\n    22: \"twenty two\",\n    23: \"twenty three\",\n    24: \"twenty four\",\n    25: \"twenty five\",\n    26: \"twnety six\",\n    27: \"twnety seven\",\n    28: \"twenty eight\",\n    29: \"twnety nine\",\n    30: \"thirty\",\n    31: \"thirty one\",\n    32: \"thirty two\",\n    33: \"thirty three\",\n    34: \"thirty four\",\n    35: \"thirty five\",\n    36: \"thirty six\",\n    37: \"thirty even\",\n    38: \"thirty eight\",\n    39: \"tirty nine\",\n    40: \"forty\",\n    41: \"forty one\",\n    42: \"forty two\",\n    43: \"forty three\",\n    44: \"forty four\",\n    45: \"forty five\",\n    46: \"forty six\",\n    47: \"forty seven\",\n    48: \"forty eight\",\n    49: \"forty nine\",\n    50: \"fifty\",\n    51: \"fifty one\",\n    52: \"fifty two\",\n    53: \"fifty three\",\n    54: \"fifty four\",\n    55: \"fifty five\",\n    56: \"fifty six\",\n    57: \"fifty seven\",\n    58: \"fity eight\",\n    59: \"fifty nine\",\n};\nconst foo = parseInt(msg.payload);\nconst words = value[foo];\nmsg.payload = words;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":540,"y":550,"wires":[["a8a6a09046eae761","01954cd9dbd09b59"]]},{"id":"5af44b35e506449f","type":"function","z":"fe5670ff.ea94e","name":"words","func":"var value = {\n    0:\"zero\",\n    1:\"zero one\",\n    2:\"zero two\",\n    3:\"zero three\",\n    4:\"zero four\",\n    5:\"zero five\",\n    6:\"zero six\",\n    7:\"zero seven\",\n    8:\"zero eight\",\n    9:\"zero nine\",\n    10:\"ten\",\n    11:\"eleven\",\n    12:\"twelve\",\n    13:\"thirteen\",\n    14:\"forteen\",\n    15:\"fifteen\",\n    16:\"sixteen\",\n    17:\"seventeen\",\n    18:\"eighteen\",\n    19:\"nineteen\",\n    20:\"twenty\",\n    21:\"twenty one\",\n    22:\"twenty two\",\n    23:\"twenty three\",\n    24:\"twenty four\",\n    25:\"twenty five\",\n    26:\"twnety six\",\n    27:\"twnety seven\",\n    28:\"twenty eight\",\n    29:\"twnety nine\",\n    30:\"thirty\",\n    31:\"thirty one\",\n    32:\"thirty two\",\n    33:\"thirty three\",\n    34:\"thirty four\",\n    35:\"thirty five\",\n    36:\"thirty six\",\n    37:\"thirty even\",\n    38:\"thirty eight\",\n    39:\"tirty nine\",\n    40:\"forty\",\n    41:\"forty one\",\n    42:\"forty two\",\n    43:\"forty three\",\n    44:\"forty four\",\n    45:\"forty five\",\n    46:\"forty six\",\n    47:\"forty seven\",\n    48:\"forty eight\",\n    49:\"forty nine\",\n    50:\"fifty\",\n    51:\"fifty one\",\n    52:\"fifty two\",\n    53:\"fifty three\",\n    54:\"fifty four\",\n    55:\"fifty five\",\n    56:\"fifty six\",\n    57:\"fifty seven\",\n    58:\"fity eight\",\n    59:\"fifty nine\",\n};\nconst foo = parseInt(msg.payload);\nconst words = value[foo];\nmsg.payload = words;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":540,"y":580,"wires":[["33968b181cbc74c6","a96bc82be3395e38"]]},{"id":"9912a1829ae8b8ab","type":"link call","z":"fe5670ff.ea94e","name":"","links":["cf92980dadbeed9f"],"linkType":"static","timeout":"30","x":570,"y":660,"wires":[["c2cd4468f7ce2313"]]},{"id":"28fcf7ba685ec0a5","type":"link call","z":"fe5670ff.ea94e","name":"","links":["cf92980dadbeed9f"],"linkType":"static","timeout":"30","x":570,"y":690,"wires":[["1f5f91dd2e83c6bc"]]},{"id":"859f79752e7538c4","type":"link call","z":"fe5670ff.ea94e","name":"","links":["cf92980dadbeed9f"],"linkType":"static","timeout":"30","x":570,"y":720,"wires":[["cc9462990c4f348b"]]},{"id":"7931bf171302c7fb","type":"debug","z":"fe5670ff.ea94e","name":"Formatted","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1150,"y":400,"wires":[]},{"id":"d3ae156e26d48f2e","type":"debug","z":"fe5670ff.ea94e","name":"HH","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":660,"y":420,"wires":[]},{"id":"d70896bb97d72e26","type":"change","z":"fe5670ff.ea94e","name":"","rules":[{"t":"set","p":"hours","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":635,"y":520,"wires":[["4aad5cb4d8e430d6"]],"l":false},{"id":"a8a6a09046eae761","type":"debug","z":"fe5670ff.ea94e","name":"mm","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":660,"y":450,"wires":[]},{"id":"01954cd9dbd09b59","type":"change","z":"fe5670ff.ea94e","name":"","rules":[{"t":"set","p":"minutes","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":635,"y":550,"wires":[["4aad5cb4d8e430d6"]],"l":false},{"id":"48583defe77b5551","type":"inject","z":"fe5670ff.ea94e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"00","payloadType":"num","x":390,"y":610,"wires":[["5af44b35e506449f"]]},{"id":"33968b181cbc74c6","type":"debug","z":"fe5670ff.ea94e","name":"ss","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":660,"y":480,"wires":[]},{"id":"a96bc82be3395e38","type":"change","z":"fe5670ff.ea94e","name":"","rules":[{"t":"set","p":"seconds","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":635,"y":580,"wires":[["4aad5cb4d8e430d6"]],"l":false},{"id":"c2cd4468f7ce2313","type":"change","z":"fe5670ff.ea94e","name":"","rules":[{"t":"set","p":"hours","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":685,"y":660,"wires":[["4aad5cb4d8e430d6"]],"l":false},{"id":"1f5f91dd2e83c6bc","type":"change","z":"fe5670ff.ea94e","name":"","rules":[{"t":"set","p":"minutes","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":685,"y":690,"wires":[["4aad5cb4d8e430d6"]],"l":false},{"id":"cc9462990c4f348b","type":"change","z":"fe5670ff.ea94e","name":"","rules":[{"t":"set","p":"seconds","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":685,"y":720,"wires":[["4aad5cb4d8e430d6"]],"l":false},{"id":"4aad5cb4d8e430d6","type":"join","z":"fe5670ff.ea94e","name":"","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":880,"y":550,"wires":[["4bf01c8019414489","fba940b58ade7019"]]},{"id":"4bf01c8019414489","type":"string","z":"fe5670ff.ea94e","name":"","methods":[{"name":"replaceAll","params":[{"type":"str","value":"\\n"},{"type":"str","value":"  "}]},{"name":"replaceAll","params":[{"type":"str","value":"/"},{"type":"str","value":" "}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":1010,"y":550,"wires":[["7d3e1a3d2f07330b","56996cce43f62d81"]]},{"id":"fba940b58ade7019","type":"debug","z":"fe5670ff.ea94e","name":"Work with this","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1020,"y":510,"wires":[]},{"id":"7d3e1a3d2f07330b","type":"template","z":"fe5670ff.ea94e","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"The time is {{time}}","output":"str","x":880,"y":460,"wires":[["3d4e316faded4821"]]},{"id":"56996cce43f62d81","type":"template","z":"fe5670ff.ea94e","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"The time is {{hours}} {{minutes}} and {{seconds}} seconds","output":"str","x":890,"y":610,"wires":[["3609ca75de8b8ad2","cdd7047.02819f8"]]},{"id":"3d4e316faded4821","type":"string","z":"fe5670ff.ea94e","name":"","methods":[{"name":"replaceAll","params":[{"type":"str","value":"-"},{"type":"str","value":" "}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":1050,"y":460,"wires":[["3db13991235940e7"]]},{"id":"3609ca75de8b8ad2","type":"debug","z":"fe5670ff.ea94e","name":"Formatted","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1060,"y":610,"wires":[]},{"id":"3db13991235940e7","type":"debug","z":"fe5670ff.ea94e","name":"Formatted","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1220,"y":460,"wires":[]}]

It isn't the best, but it does work and breaks down the parts then translates them to words rather than numbers.

The top part gets the date, day and time.
The time is then taken down and split up to Hours Minutes and Seconds.
They are then translated to words. (See my other post if you are bored)

Then it joins them back up into 1 message and formats it to say the time.
The original way worked, but then I tried with the link call node to help expand my understanding of how that works.
The disabled switch node is left there if you want to delete the lower part using the link call way.

P.S. -- sorry.

There is the fan node in the flow.
It is NOT NEEDED.
If you import the flow and don't have it: Just delete the nodes and wire past them.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.