node-red-contrib-google-home-notify icon indicating copy to clipboard operation
node-red-contrib-google-home-notify copied to clipboard

mp3 play function is not working

Open jbkuma opened this issue 7 years ago • 14 comments
trafficstars

I've tried tinkering with this to get it to work, but it just reads out the URL. The pattern matching bit was missing from node-red-google-home-notify.js, so I added it in and restarted but no joy. Is there another bit that needs to be changed?

jbkuma avatar Sep 04 '18 20:09 jbkuma

I wanted to play a mp3 doorbell sound, but having the same issue. It would be great if this could be fixed, as there is no other similar node in the node-red library.

Paul

Paul-Reed avatar Sep 08 '18 19:09 Paul-Reed

There is node-red-contrib-chromecast. You are be able to use a google home with this.

Hypnos3 avatar Sep 11 '18 07:09 Hypnos3

Yes thanks, I'm using that node now, and it appears to work well with the ring-doorbell node.

https://discourse.nodered.org/t/ring-doorbell-google-home/2924/15?u=paul-reed

Paul-Reed avatar Sep 11 '18 08:09 Paul-Reed

The only Problem I have with the node-red-contrib-chromecast nose was, that if the cast device was not available, the whole Node-Red instance crashes. I'm working of a fork of this wo fix this. I'm new with github, so this could taken a while.

Hypnos3 avatar Sep 11 '18 09:09 Hypnos3

I've noticed that too. I messaged the node's author, to ask if he's still maintaining the node, but not got a reply. I see that you already submitted a PR for this issue in July, which hasn't been merged or acknowledged.... Ever thought about using it to create a new NR node - node-red-contrib-cast ? The current node name only covers a small area of the node's abilities, yet cast would cover all.

Paul-Reed avatar Sep 11 '18 10:09 Paul-Reed

Yes, I have forked the original one and I plan to fix that problem. Additional I will ad a posibility for volume control.

I took the new name node-red-contrib-cast from your foretaste here.

Hypnos3 avatar Sep 12 '18 07:09 Hypnos3

Hi @jbkuma, @Paul-Reed, @Hypnos3 , it is just the author did not update the npm source.

The only thing you need to do is is download the file (node-red-google-home-notify.js) and overwrite the default one at your host.

testert1ng avatar Sep 13 '18 05:09 testert1ng

I'm switched to node-red-contrib-cast, node-red-contrib-google-home-notify is not working for me, because I can not select an other language as English (see #20).

In the end both based on castv2-client library (google-home-notify also based on castv2-client).

Hypnos3 avatar Sep 13 '18 11:09 Hypnos3

Hi @jbkuma, @Paul-Reed, @Hypnos3 , it is just the author did not update the npm source.

The only thing you need to do is is download the file (node-red-google-home-notify.js) and overwrite the default one at your host.

I've done this but it still just reads out the URL instead of playing the file.

jbkuma avatar Sep 13 '18 20:09 jbkuma

@Hypnos3 Sorry for that. I will try to add that feature when I am available.

testert1ng avatar Sep 13 '18 23:09 testert1ng

@jbkuma I think you have not changed the file in the proper directory. There are two folders contains this module. Please try replace both of them. In my RPi, the directories are

/home/pi/.node-red/node_modules/node-red-contrib-google-home-notify/

and

/home/pi/node_modules/node-red-contrib-google-home-notify/

Please make sure the one under .node-red is updated. Then, should work after reboot.

testert1ng avatar Sep 13 '18 23:09 testert1ng

@testerting @Hypnos3 To help with latency etc, it would be great if the mp3 file could use a fixed path, instead of being a hosted http address. For example; • Add a mp3 file in a folder /home/pi/.node-red/sample/dingdong.mp3 • Create a Static folder entry in settings.js, - httpStatic: '/home/pi/.node-red/public', • Then to access the mp3 file from within node-RED, the path would be - /sample/dingdong.mp3 I have tried by simply substituting the URL with the path, but doesn't seem to work out of the box... Any thoughts?

Hi Paul,

It is a little complete for your request. The library we used only send the URL to google home so it can get the media itself to play. As you only concern on latency, I suggest you to host all mp3 files on the same RPi. You can install a apache serser for example

sudo apt-get install apache2 -y

And save all you mp3 at

/var/www/html/mp3/xxx.mp3

Then you can visit them using the url

http://your.pi.address(192.168.x.x)/mp3/xxx.mp3

This latency can be ignored as you are visiting the LAN.

testert1ng avatar Sep 14 '18 00:09 testert1ng

I had replaced it in the correct directory, but I was just restarting node-red, not rebooting. Now that I rebooted it works correctly. Thanks!

jbkuma avatar Sep 14 '18 01:09 jbkuma

Thanks @testerting, that's what I have at the moment, but thought a path may be preferable. I'm now using node-red-contrib-cast which is a fork of node-red-contrib-chromecast and is being actively developed by @Hypnos3.

Paul

Paul-Reed avatar Sep 14 '18 21:09 Paul-Reed