Giter VIP home page Giter VIP logo

hassio-addons's People

Contributors

benjaminreede avatar bergcyrill avatar jeffothy avatar kevinvincent avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hassio-addons's Issues

Stopped running in Hassio

Hi
when starting the plugin I get the following in the log:

s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
ifelse: fatal: unable to exec ./run.sh: Exec format error
[cmd] ./run.sh exited 126
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

Any ideas whats going on please?
Thanks

Need to update instruction for Docker install

In the instruction (README.md) for Docker install you are missing:

Change this line to let rawconfig = fs.readFileSync('**/data/**options.json');

Change this line to storage.init({dir: '**/data/**persist/'});

Add-on is not starting

Hi there, I would love to use this great add-on but, unfortunately, it doesn't start after the installation.
Log shows the following error message:

s6-overlay-suexec: fatal: can only run as pid 1

Rebuilding the add-on or restarting HA didn't help.

Thanks in advance for your help.

Premature close

Hi

I'm super excited about this project, but I keep getting a "premature close" when I do an npm install.

How do I rectify this?

Autostart Server with RaspPi-Reboot

Hey Kevin,

thanks for this awesome script.
Besides it being slow in response time for me, I love it.

Is it possible to add the server as a service and autostart it?
If so, would you tell me how?

Thanks!
Jan

Token Errors, I think...

My experience with the add on has been mixed. At first it worked fine for the few months I've had it installed. At some point though, this started happening. Once I re-authenticate it with the Sonos Developer site, it works fine for a day or two. But then starts throwing errors again. I'm not a developer in any shape of the word, so all of this is gibberish to me. Hoping one of the gurus here can help me out!

Here's the most recent log entry:

(node:214) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
Access Token Error Cannot create access token without a token to parse
(node:214) UnhandledPromiseRejectionWarning: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
at ServerResponse.setHeader (_http_outgoing.js:518:11)
at /app/server/index.js:378:16
(node:214) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
15:51:15 ✨ request completed GET 200 /api/playClipAll?&streamUrl=mailishere.mp3&volume=25&exclude=Backyard&prio=low 3ms

Originally posted by @patchrick84 in #16 (comment)

Can no longer install on HASSOS

Installing the addon throws this error on HAOS running 2021.8.8

tarting build for 8c1e12d6/amd64-addon-sonos_audioclip_tts:2.0.3
21-08-24 16:35:14 ERROR (SyncWorker_2) [supervisor.docker.addon] Can't build 8c1e12d6/amd64-addon-sonos_audioclip_tts:2.0.3: The command '/bin/ash -o pipefail -c apk add --no-cache nodejs nodejs-npm' returned a non-zero code: 1
21-08-24 16:35:14 ERROR (SyncWorker_2) [supervisor.docker.addon] Build log: 
Step 1/15 : ARG BUILD_FROM
Step 2/15 : FROM $BUILD_FROM
 ---> 8fc812b16962
Step 3/15 : ENV LANG C.UTF-8
 ---> Using cache
 ---> fa67bf397352
Step 4/15 : RUN apk add --no-cache nodejs nodejs-npm
 ---> Running in 10cdd8ba3624
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
ERROR: unable to select packages:

  nodejs-npm (no such package):
    required by: world[nodejs-npm]
Removing intermediate container 10cdd8ba3624

I have used this addon extensively on my old HA server, but now Im redoing my configuration from scratch and I seem to be missing something? Help, i need this addon :)

edit: i made a snapshot of just this addon on my old install and restored that on my new one, and that seems to work. Its a good workaround for me, but not for others..

get key failed from Google

Just installed the add-on from scratch, succeeded authenticating and creating an API key, configuring the plug-in with the client keys and secret

I'm running on hass.io 0.118.5

As an initial test, I tried to call http://hassio.local:8349/api/speakText?playerId=RINCON_XXXXXXXXXXXXXXXXX&text=hello&volume=20

There was nothing audible on my system, instead I received the following error
{"success":false,"error":"Error: get key failed from google\n at /app/node_modules/google-tts-api/lib/key.js:30:32\n at processTicksAndRejections (internal/process/task_queues.js:97:5)\n at async /app/server/index.js:319:17"}

What am I doing wrong?

EDIT: api/playClip works fine and the audio plays alright!

The plug-in log shows

s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
> [email protected] server /app
> node server | pino-colada
Starting with configuration: {
  SONOS_CLIENT_ID: '<hidden>',
  SONOS_CLIENT_SECRET: '<hidden>,
  GOOGLE_TTS_LANGUAGE: 'en-US'
}
Express server is running on localhost:8349
(node:206) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
16:58:27 ✨ request completed GET 304 /api/speakText?playerId=RINCON_XXXXXXXXXXXXXXXXX&text=hello&volume=20 344ms

My system configuration is as follows:

System Health

Home Assistant Core Integration

version: 0.118.5
installation_type: Home Assistant OS
dev: false
hassio: true
docker: true
virtualenv: false
python_version: 3.8.6
os_name: Linux
os_version: 4.19.127-v7l
arch: armv7l
timezone: <hidden>

Home Assistant Cloud

logged_in: false
can_reach_cert_server: ok
can_reach_cloud_auth: ok
can_reach_cloud: ok

Hass.io

host_os: HassOS 4.17
update_channel: stable
supervisor_version: 2020.12.2
docker_version: 19.03.12
disk_total: 28.0 GB
disk_used: 6.9 GB
healthy: true
supported: true
board: rpi4
supervisor_api: ok
version_api: ok
installed_addons: TellStick (2.0), File editor (5.2.0), Node-RED (7.2.11), Terminal & SSH (8.10.0), deCONZ (6.5.0), Plejd (0.4.8), Mosquitto broker (5.1)

Lovelace

dashboards: 2
mode: storage
views: 7
resources: 0

can't properly authenticate with Sonos

Hi. I've followed all the steps in the ReadMe, but I think I might be missing something. I'm not getting anything except a spinning Sonos circle and a loading progress bar when I try to go through the auth flow.

I'm running home assistant on a raspberry pi, using the home assistant OS.
Instead of reaching the "authentication failed" page, after logging into Sonos and pressing allow, it just sits there with a progress bar that never resolves, and a spinning circle. If I click OK again, it says "we're having trouble connecting to Sonos right now."
The url also never gets to the point where the "fix redirect" step comes in. The farthest I get looks like this:

https://api.sonos.com/login/v3/oauth/authorize?client_id=xxxxxxxxx&response_type=code&state=none&redirect_uri=https%3A%2F%2Fhassio.local%3A8349%2Fredirect&scope=playback-control-all

Has anyone seen this before/suggestions on what I could be doing wrong? I also tried port forwarding 8349, with no luck. I feel like I'm so close but so far! :)

[Feature Request] Delay HTTP Response until the announcement has finished.

I wanted to be able to chain an announcement with an audio clip but the second call occurs without checking if the first announcement ever finished. The only way I have found to make it wait is using the delay node. I tried using the home assistant wait until node but as far as I can tell, there is no attribute of the announcement ever recorded to the entity. This is not ideal as I intended on using it with announcements of varying lengths. If you could maybe make the payload wait to continue until after the announcement finishes then they could be chained.

Edit: I have used this in Node Red for so long (Thanks by the way) I forgot that its just a simple HTTP request and not a node red palette. Ignore everything from above because it's not relevant. I guess what I want is for it to return the HTTP statusCode 200 after the announcement has finished playing and not immediately after receiving... Does that make sense?

Sync workaround

Hi @kevinvincent,

Thanks for your work on this plugin. Is it still maintained?
Would it be possible to share your (pseudo) way of syncing audioClips?

(Would be nice if Sonos would add it to the groups API interface, in addition to players separately)

Additionally it would be nice to be able to support clipType to play the embedded chime sound, as described in https://developer.sonos.com/reference/control-api/audioclip/cliptype/.
Happy to make a PR if this is still under development.

I see an interesting PR which could be merged as well.

Authentication failed

Can't get past the authentication part, after the second redirect when I have to put replace "https://hassio.local:8349/redirect?..." with my ip address I get "Authentication failed"

Addon log:
Access Token Error Client request error: getaddrinfo EAI_AGAIN api.sonos.com api.sonos.com:443
14:11:18 ✨ request errored GET 500 /redirect?state=none&code=xxxxx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.