So let’s say there was a URL I could open up that had a gazillion quotes in it formatted in JSON.
Aside from the time triggers and the TTS, how would I look up a random entry and pass it to the service call in Node Red so TTS would read it?
So let’s say there was a URL I could open up that had a gazillion quotes in it formatted in JSON.
Aside from the time triggers and the TTS, how would I look up a random entry and pass it to the service call in Node Red so TTS would read it?
If the json object would contain an array, for the quotes you could first calculate the total length of it. Then randomize a number in between 0 and the length array. Then use that number as index to select from the array the particular quote associated with the index number.
That part I understand. What I don’t know how to do is use Node Red to do it.
You need to use the function node. Do you have the url?