# Help with Hourglass node

**URL:** https://discourse.nodered.org/t/help-with-hourglass-node/25216
**Category:** General
**Created:** [20 April 2020 23:02 UTC](https://discourse.nodered.org/t/help-with-hourglass-node/25216 "2020-04-20T23:02:37Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![ajaymccollum](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@ajaymccollum](https://discourse.nodered.org/u/ajaymccollum)
#### Post date: [20 April 2020 23:02 UTC](https://discourse.nodered.org/t/help-with-hourglass-node/25216/1 "2020-04-20T23:02:37Z")

</div>

I'm trying to keep track of how long a device is running and I found this node:  
node-red-contrib-hourglass  
which seems to be exactly what I'm looking for. The problem is I can't seem to give it what its asking for. I was hoping someone could take a quick look and explain what the msg should look like to perform any of the simple commands. Also, probably _how_ to create the msg.commands it wants, just in case I'm even missing how to do that. I think I know that part, but since my tests aren't working, I might be missing the ball from the very start. Thanks again for the help, folks.

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [21 April 2020 05:22 UTC](https://discourse.nodered.org/t/help-with-hourglass-node/25216/2 "2020-04-21T05:22:37Z")

</div>

Example flow:

```auto
[{"id":"b45035ff.8935c","type":"hourglass","z":"90d407bb.306298","name":"","humanizeLocale":"","x":588,"y":240,"wires":[["a48c3610.434058"]]},{"id":"b1c4bb2c.f0269","type":"inject","z":"90d407bb.306298","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":156,"y":192,"wires":[["f6a74850.175fe"]]},{"id":"a48c3610.434058","type":"debug","z":"90d407bb.306298","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":722,"y":240,"wires":[]},{"id":"f6a74850.175fe","type":"change","z":"90d407bb.306298","name":"{command:'start'}","rules":[{"t":"set","p":"command","pt":"msg","to":"start","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":378,"y":192,"wires":[["b45035ff.8935c"]]},{"id":"847ac89.dbb57b8","type":"change","z":"90d407bb.306298","name":"{command:'status'}","rules":[{"t":"set","p":"command","pt":"msg","to":"status","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":378,"y":240,"wires":[["b45035ff.8935c"]]},{"id":"53577f1.0197c","type":"change","z":"90d407bb.306298","name":"{command:'stop'}","rules":[{"t":"set","p":"command","pt":"msg","to":"stop","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":378,"y":288,"wires":[["b45035ff.8935c"]]},{"id":"18d11244.be7586","type":"inject","z":"90d407bb.306298","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":156,"y":240,"wires":[["847ac89.dbb57b8"]]},{"id":"3db7fb7a.2571d4","type":"inject","z":"90d407bb.306298","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":156,"y":288,"wires":[["53577f1.0197c"]]}]

```

Press the first inject button to start it.  
Press the second for the status, press it again to see the timer increase  
Press the third to stop the timer, press the second again to see it stopped and its time.

---

<div class="post-metadata">

### Author: ![ajaymccollum](https://avatars.discourse-cdn.com/v4/letter/a/bbce88/32.png) [@ajaymccollum](https://discourse.nodered.org/u/ajaymccollum)
#### Post date: [21 April 2020 06:52 UTC](https://discourse.nodered.org/t/help-with-hourglass-node/25216/3 "2020-04-21T06:52:43Z")

</div>

Beautiful, thank you! Wow, I apparently don't know what "set" is in the change node. That setup right there makes no sense to me, so obviously I need to do some more research.

---

<div class="post-metadata">

### Author: ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)
#### Post date: [21 April 2020 08:14 UTC](https://discourse.nodered.org/t/help-with-hourglass-node/25216/4 "2020-04-21T08:14:11Z")

</div>

Quite helpful information here  
[https://nodered.org/docs/user-guide/messages](https://nodered.org/docs/user-guide/messages)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [5 May 2020 08:14 UTC](https://discourse.nodered.org/t/help-with-hourglass-node/25216/5 "2020-05-05T08:14:14Z")

</div>

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