Flow Variable on the dashboard

Guys, Struggling here big time (probably a conceptual error). I am using the Mytimeout node by cherry in a flow.

I am using its 2nd output to (try) and get a countdown on the Dashboard (basically how many seconds the timer has left to run

Here is a screenshot of the debug output and below that is the clipboard paste from the debug window

{"payload":7021,"state":1,"flag":"ticks > 0"}

So it looks like the payload is an object that is returned - what i want to try and do is split out the payload (which is the seconds countdown and then assign that to a variable that will update on the dashboard.)

I seem to be lost - tried putting it into a function node and a split node but neither seemed to give me what i was expecting in the debug window - any pointers/hints please ?

Craig

You can access the seconds by using msg.payload.payload .

Sorry about that, it was meant to be part of msg, not part of msg.payload (my fault).

Aaaha - thank you very very much !!!!

Will try that now !

Craig

thank you very very much - works perfectly now !!!

Craig

@ncherry - should you change that??

Yes, unfortunately I have to. msg.payload.payload is just too weird. I'll release a 3.0.0 version and note this in the documentation. I hope to have this done in a few minutes.

Changes have been made, pushed and published. I also opened an github issue so others can find the information.

Craig, in the future if you can expand any object in the debug sidebar, you can also copy either it actual value, or (what you were looking for) the "path" to that data (i.e. msg.payload.payload) -- look for the little buttons that appear when you hover the mouse over the data of interest...

And if you have not seen it yet, it's worth a bit of time to read and understand how to work with messages

Yep thanks for that info Shrickus. Every time i think i am getting a handle on this thing i get bogged down by something i do not know for at least 1/2 a day !!

Craig

Good one thanks - i have updated my node and the flows where i am using it - works perfectly now !

Craig

Good to hear! :slight_smile:

I have some more fixes to make sure I handle input more consistently and verifying the config inputs but hopefully nothing more that will break backward compatibility.

No worries - it is a great node - you might want to float it out to Peter Scargill as it does everything his node does and many more things - might be worthwhile for him to note it in his blog and maybe retire his timeout node ?

Craig

Yes we do overlap, actually I started with code from Pete's BigTimer node so I could understand it but my code grew and became unmanageable (not his code, mine derived from his). I could never get his code to just run as a simple timer (may be my ignorance) so I wrote my own for just a subset. Most of the BigTimer functionality I would use would live in cron and is pumped in via MQTT.

Aah - i have nto done much with his bigtimer - i was more thinking of his timeout node - this was what i was previously using before finding your stuff a couple of days ago

Craig