It is most unlikely it is node red, it is something outside node red that is not ready.
To find how long you have to wait you could reboot, open node red, and keep clicking the inject till it works. Then you can look in syslog to see what happened just before that time.
In a perfect world that would work.
Alas when I load firefox it takes a few minutes before I can use it.
I have about 43
WINDOWS open and some have a few tabs some have A LOT!
It takes a lot of time.
So it kind of isn't practical.
But it gives me an idea.
Are you running FF on the pi?!!!
Have you got any GUI stuff auto running on boot? If so it is probably just the pi working flat out on startup preventing your output from working.
Run FF on your PC and keep it open on the editor, then you just need to refresh the page when node red is up.
This is on the NUC.
Intel 7i5 thing.
Oh yes, you did say that I think. Still, running the browser on another machine would allow you to get into the editor immediately node red is up.
What I've done is made a flow that starts counting every second NR is alive sending that to the TTS node.
When that gets its self working I will hear the value.
xx minutes yy seconds
I'll just wait until next boot/session.
Does that sound like a nominal strategy?
That is a good idea. I would do it a little slower though, it will take more than a second to say, so you will end up with them getting queued up continuously. Perhaps do it every 5 seconds.
Touche. You said 5 seconds too.
Yeah, I realised that after posting.
As most, if not all services on most Linux installs start up using systemd scripts, you can configure the Node-RED script to wait for other services to have started.
Have a look at the [service]
section of the script file spec for systemd as well as the [unit]
section which has requires
and after
. There is also a [timer]
section where you can define a delayed startup.
Just booted today.
Same problem.
With the script running I got 30 seconds.
BUT!
Alas that isn't accurate.
Why?
Because of how I did the script. (Silly me)
I started a trigger
node (only that I could then stop it when I got the desired output, rather than a inject
node sending an output every second.
Put that into a counter
node (sorry: count
).
That is how many seconds.
But as the trigger
was every 5
seconds the time needed is 5 * 30.
ie: 150 seconds.
STRANGE as I had it (before this) set to 180 seconds before starting.
So there may be something else going on in the mix causing this problem.
Thanks @TotallyInformation
Folks, sorry, it has been a while for me to post about this.
This is a test flow/code I have that is started a short time after booting.
[{"id":"3873937e50fb8fa2","type":"inject","z":"fe5670ff.ea94e","name":"Startup","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":true,"onceDelay":"10","topic":"","payload":"","payloadType":"date","x":100,"y":1320,"wires":[["3808cb58b5131dd7"]]},{"id":"3808cb58b5131dd7","type":"trigger","z":"fe5670ff.ea94e","name":"Clock","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"-1","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":215,"y":1320,"wires":[["9487e7a21eb9a291"]],"l":false},{"id":"d66151331cf82699","type":"inject","z":"fe5670ff.ea94e","name":"STOP","props":[{"p":"reset","v":"true","vt":"bool"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":90,"y":1400,"wires":[["3808cb58b5131dd7","9487e7a21eb9a291","79f3d1175311ff50"]]},{"id":"9487e7a21eb9a291","type":"counter","z":"fe5670ff.ea94e","name":"","init":"0","step":"1","lower":"","upper":"59","mode":"increment","outputs":"1","x":265,"y":1320,"wires":[["557407571bfbf994"]],"l":false},{"id":"f8777ebbf11de5b5","type":"link call","z":"fe5670ff.ea94e","name":"","links":["cf92980dadbeed9f"],"linkType":"static","timeout":"30","x":680,"y":1320,"wires":[["cb4fbc327699ea01"]]},{"id":"3423dd4b8318abbd","type":"debug","z":"fe5670ff.ea94e","name":"COUNT","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1190,"y":1320,"wires":[]},{"id":"9254560c11f1ad38","type":"change","z":"fe5670ff.ea94e","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"count","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":1320,"wires":[["f8777ebbf11de5b5"]]},{"id":"267536ae99635aa1","type":"switch","z":"fe5670ff.ea94e","name":"59?","property":"count","propertyType":"msg","rules":[{"t":"eq","v":"59","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":470,"y":1360,"wires":[["2ba9458152698855"]]},{"id":"2ba9458152698855","type":"counter","z":"fe5670ff.ea94e","name":"","init":"0","step":"1","lower":null,"upper":null,"mode":"increment","outputs":"1","x":670,"y":1360,"wires":[["27ab4716c9ebc475"]]},{"id":"a0d4096f2907ad1e","type":"debug","z":"fe5670ff.ea94e","name":"COUNT","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":830,"y":1400,"wires":[]},{"id":"c2f36a3eac3c4b11","type":"template","z":"fe5670ff.ea94e","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{minutes}} minutes {{payload}}","output":"str","x":1010,"y":1320,"wires":[["3423dd4b8318abbd","d163f6686c928fd9"]]},{"id":"27ab4716c9ebc475","type":"change","z":"fe5670ff.ea94e","name":"","rules":[{"t":"set","p":"minutes","pt":"flow","to":"count","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":850,"y":1360,"wires":[["a0d4096f2907ad1e"]]},{"id":"cb4fbc327699ea01","type":"function","z":"fe5670ff.ea94e","name":"get minutes","func":"let minutes = flow.get('minutes') || 0;\nmsg.minutes = minutes;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":840,"y":1320,"wires":[["c2f36a3eac3c4b11"]]},{"id":"557407571bfbf994","type":"function","z":"fe5670ff.ea94e","name":"mod 5","func":"let x = msg.count;\nif (x % 5 == 0)\n{\n return msg;\n}\nreturn;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":320,"y":1280,"wires":[["5362988ff6eec273"]]},{"id":"03ee2be1e4a4c5b7","type":"trigger","z":"fe5670ff.ea94e","name":"","op1":"close","op2":"open","op1type":"str","op2type":"str","duration":"4","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":330,"y":1240,"wires":[["7d369ee5b2d6c42b"]]},{"id":"7d369ee5b2d6c42b","type":"change","z":"fe5670ff.ea94e","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"control","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":425,"y":1240,"wires":[["d163f6686c928fd9"]],"l":false},{"id":"79f3d1175311ff50","type":"change","z":"fe5670ff.ea94e","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"foo","tot":"str"},{"t":"delete","p":"reset","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":215,"y":1240,"wires":[["03ee2be1e4a4c5b7"]],"l":false},{"id":"5362988ff6eec273","type":"junction","z":"fe5670ff.ea94e","x":390,"y":1320,"wires":[["9254560c11f1ad38","267536ae99635aa1"]]},{"id":"d163f6686c928fd9","type":"gate","z":"fe5670ff.ea94e","name":"","controlTopic":"control","defaultState":"open","openCmd":"open","closeCmd":"close","toggleCmd":"toggle","defaultCmd":"default","statusCmd":"status","persist":false,"storeName":"memory","x":860,"y":1080,"wires":[["9af43c00.e81b5"]]},{"id":"9af43c00.e81b5","type":"play audio","z":"fe5670ff.ea94e","name":"","voice":"42","x":1110,"y":1000,"wires":[]}]
NO FOREIGN NODES!
Oops, sorry.
node-red-contrib-counter
It speaks the uptime every 5 seconds.
So you hear:
zero minutes 5 seconds
zero minutes 10 seconds
zero minutes 15 seconds
And so on.
Until the STOP
button/inject node is pressed.
I am hearing NOTHING.
Also, if/when I open the tab with that code it is NOT counting.
Which may explain why I'm hearing nothing.
Ok, I'll cop that.
It waits 10 seconds from start before it starts running.
Yes, I will change it to another (higher) value - like maybe 30 seconds.
Though I feel I have been there already.
Still no output.
I know this is also NOT using the watson voice
node.
Which is what I want to use at the end of the day.
This is just to indicate to me when the sound thing gets its act together. Then I make the delay on the inject
node to talk to me slightly bigger than that interval.
Add debug nodes to the flow and work out which node is not doing as it should.
Also got gate and play audio in there (easily deleted of course as not needed)
But you've a link call in it that has no-where to go
Thanks.
Seems I am blind to some things I have done.
Which is not good / worrying.
I'll dig into the link node and what it is supposed to be doing.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.