Supergiovane / node-red-contrib-sonospollytts

Play speech TTS using Sonos.
https://www.facebook.com/supergiovaneDev
MIT License
12 stars 6 forks source link

Sonos One : No connection #7

Closed 1of4 closed 5 years ago

1of4 commented 5 years ago

I seems that my Sonos One don't have an open port 80. Are there any prerequisites on the Sonos site ?

Supergiovane commented 5 years ago

Hello 1of4, sonos doesn't need any configuration at all. You only need to know the sonos's IP address. I have no sonos one to test, but sonos AMP works. Are you sure, you've set the right sonos IP address?

1of4 commented 5 years ago

Hi, Yes the ip is fixed in the router and also reported from the Sonos app.

"{"name":"RequestError","message":"Error: connect ECONNREFUSED 192.168.84.34:80","cause":{"errno":"ECONNREFUSED","code":"ECONNREFUSED","syscall":"connect","address":"192.168.84.34","port":80},"error":

This is the first part of the debug message..

Supergiovane commented 5 years ago

Hmm.... that's strange. Have you tried to reboot both sonos and node-red? Never hat such as problem, if the IP is set correctly. Are you able to control sonos via sonos app?

Supergiovane commented 5 years ago

Also can you try this in a terminal window? npm info sonos version

1of4 commented 5 years ago

It reports 1.9.0.

1of4 commented 5 years ago

I just installed the node-red-contrib-better-sonos and I can control the ONE with it. So the basic communition with the speaker seems to work.

Supergiovane commented 5 years ago

It should work. I do not know if sonos one is able to handle the API, because i don't have one to test here, sorry. A new version of the sonospollytts (1.0.8) is about to be published, with an updated sonos node dependency. Maybe it can resolve your issue. I'll publish that today or later tomorrow.

1of4 commented 5 years ago

Ok. Cool, thank you. I will try it out and provide you with the results.

1of4 commented 5 years ago

Hey! I found the problem:

I added a 'Space' after Sonos's ip address.. You should trim the string :)

Supergiovane commented 5 years ago

Ok, will do. Thank you! Great to hear!

1of4 commented 5 years ago

I can play the mp3 from your example.

But the polly generated content won't play. The is no debug message etc. So I don't know if my AWS credentials may be the problem. Is there a way to debug this?

Supergiovane commented 5 years ago

Leave me 5 minutes to test...

Supergiovane commented 5 years ago

The node-red's console should show "[error] The security token included in the request is invalid." You'll see this message in the debug window of node-red.

1of4 commented 5 years ago

There's no such message. I assume your node gets the mp3 from AWS and saves it somewehere in the system? If this is the case, where can I find the files?

Supergiovane commented 5 years ago

./tmp Do you hear the hailing sound?

1of4 commented 5 years ago

The AWS integration works. I can see the mp3's and I can play them locally on my PC. The volume is set to 100,

Maybe a problem with the path to the mp3's `? I could play your example mp3 'http://media.ilmeteo.it/audio/2018-03-31.mp3', ...

Supergiovane commented 5 years ago

That's the first time i hear about this problem. Please, reboot your raspberry or you host who you've installed node-red. The plugin will try again to access the ./tmp folder.

Supergiovane commented 5 years ago

Can you send me a screenshot of your sonospollytts config?

Supergiovane commented 5 years ago

a question.... do you use http or https for your nodered?

1of4 commented 5 years ago

Yes, the mp3's are there. Unbenannt

1of4 commented 5 years ago

Http

Supergiovane commented 5 years ago

There's nothing wrong on it. Do you hear the "computer call" hailing? A sort ob "beeep beeep" when you try to TTS something?

1of4 commented 5 years ago

I'm, running the NodeRed on a RaspberryMatic. NodeRed is a package called RedMatic. Maybe this could be the problem? I can't play any local mp3's. I am going to ask one of the pro's there if there's something different with the tmp folder

Supergiovane commented 5 years ago

Maybe the webserver of the Matic can't access the ./tmp folder. This can be the issue. Please ask that. In the case, i'll put an option to allow you to select the temp folder of your choice.

1of4 commented 5 years ago

I just placed the question in the Slack Channel. I will get back to you when I got an answer. Thank you for your support on this đź‘Ť

Supergiovane commented 5 years ago

Can you please give me the URL of your request in the slack channel, so i can read it directly? Thanks.

1of4 commented 5 years ago

https://homematicuser.slack.com/messages/CC7906VQD

But it’s a german thread..

Von: Supergiovane notifications@github.com Gesendet: Montag, 25. März 2019 10:57 An: Supergiovane/node-red-contrib-sonospollytts node-red-contrib-sonospollytts@noreply.github.com Cc: 1of4 1of4@mailbox.org; Author author@noreply.github.com Betreff: Re: [Supergiovane/node-red-contrib-sonospollytts] Sonos One : No connection (#7)

Can you please give me the URL of your request in the slack channel, so i can read it directly? Thanks.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Supergiovane/node-red-contrib-sonospollytts/issues/7#issuecomment-476126076, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ArNzQohsFqynqabHdfl7zyAJYWwP2l92ks5vaJ2CgaJpZM4cGNHj.

Supergiovane commented 5 years ago

Then please keep me informed... thanks!

1of4 commented 5 years ago

Hi, the problem is solved. The NodeRed on the RaspberryMatic listens on port 80, not 1880.

Supergiovane commented 5 years ago

In any case, writing to the filesystem is OK, reading should be OK as well. I suspect there's something wrong when the sonos tries to read from the sonospollytts http endpoint. Are your sure that the node-red port is the default 1880 and that there's nothing blocking the access from an external device (in this case your sonos one) to the RedMatic (maybe a firewall or whatsoever)?

1of4 commented 5 years ago

It's system specific on this RaspberryMatic. NodeRed is hidden behind another webserver which listens on 80 or 443. I can play anything now!

Supergiovane commented 5 years ago

Well, good to hear! Cheers!

1of4 commented 5 years ago

Thank you, great work !