Dashboard2 - seeking help formatting a msg for the ui-audio node, endpoints don't seem to work

Hi Steve,

I want to thank you again for doggedly continuing to help me. I'm giving up at this point, not because it can't be done, but because the thing you said about clicking on the interface made me realise this isn't a good solution for my specific use case.

Basically, if it requires an interface click before it will work, then it is not a suitable solution for critical notifications eg people breaking into the tractor shed again. The consequences of not receiving a notification because a click hadn't clicked is too high for me, so I'm going to pursue using the audio out of whatever pi zero.

I have several old ones, and this is a good use: a sensor node with voice notifications. I can make it pretty.

But, @Steve-Mcl, I also want to thank you generally because of all that I learned from you. The big ones were:

  • a better understanding of how http endpoints work and can be called. I think this will be extremely helpful knowledge in other contexts. Dangi ka matha.
  • cache busting. Wow! very valuable and a wonderful surprise as a concept.

I invite anyone who solves this in an easy way to share their solution. I will post the Piper tutorial in the next few days, my hands are very full. Working on a 500L compressor I retrieved from the store because I have a tractor with a flat tyre.

The conversation went like this:

"Why does this sound like it's full of water?"

"It always sounds like that."

"I see. So when did you last drain the tank?"

"Drain the tank?"

"There's water in it, when did you last drain it?"

"You're supposed to drain it? How?"

They've been using it for five years.

Anyway thanks again. I'll post my solution with flow when I figure it out.

And @E1cid, your idea of putting the Piper call inside the endpoint was super interesting, and very much cooler than what I had going on, and I'm stealing it. You have a nice brain.

1 Like

So the actual end goal is to play a custom audio file on a device in response to an alarm condition. So if the device is fixed position then yes something like a pi playing audio would work as it needs continuous power so not easily mobile. However you could use something like a mobile phone if you need mobility and use a client app like pushover. Pushover can’t play a pushed audio file but it can play a custom local audio mp3 file when triggered by Node-RED. ( and can receive an image from a camera in your shed if required)

1 Like

To add to what Dave said - I do something similar with node-red-contrib-telegrambot. I get doorbell notifications with a picture & my phone pings.

Other options: With a cheap Google Nest speaker - you can send it "braodcast" notifications with your audio (see the cast contrib nodes)

Also, there are off the shelf audio over IP streamers you can simply poke buffer to via the TCP or UDP out node. I've used the Barix Annuncicom and the Barix Exstreamer for this in a factory to sent TTS announcements over the PA: https://www.barix.com/product/ip-intercom/

2 Likes

I would add another alternative, if you have an android phone, you could use automate or tasker apps. Both can receive http requests or mqtt via plugins or possibly google cloud messaging. Once message is received they can override volume levels or do not disturb settings and convert text to speech to alert you.

1 Like

Thank you @dceejay.

The intention is voice notifications per context. I am in any case replacing old smart switches, and this provides an opportunity to do a multifunction sensor node with a speaker; really max out what an old pi zero can do.

Ideally I'll publish an MQTT message, and a subscribed device in the relevant room/building will play it. That's the need.

My system sends me emails about important stuff, so voice is not really a major issue except if I am asleep.

Frigate integration via MQTT has been life changing. Voice notifications of threat, especially during harvest season, will be a cherry on the cake.

1 Like

Thank you @Steve-Mcl

This'll sound political but I swear it's not; you can hear it from any direction.

People make choices during wartime that are to do with what they truly believe is right, but the consequences of those decisions fall on their kids as well.

Having had the childhood I did, a large reason I use a pure Node-RED setup is a point blank refusal to use cloud services for anything at all in the home.

See how I said nothing about any idiology at all, yet said a true thing?

Your suggestions have all been 100% rock solid. Thanks for being part of this community.

Hi @E1cid,

Interesting and worth looking into. Since my use case avoids cloud services, I'd need to use a VPN to speak to my MQTT server, but the concept is still sound, thank you.

Actually I have seen an implementation of Node-RED that runs on Android, now that I think on it. Hmmm.

Standard node-red can run on Android, though there have been reports that with current versions there may be issues.