GithubHelp home page GithubHelp logo

thoukydides / siri-squeezebox-control Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 0.0 71 KB

Siri control of Logitech Media Server (Squeezebox) via Scriptable

Home Page: https://www.thouky.co.uk

License: ISC License

JavaScript 100.00%
siri scriptable-app squeezebox squeezebox-server logitech-media-server logitechmediaserver shortcuts-app

siri-squeezebox-control's Introduction

siri-squeezebox-control's People

Contributors

thoukydides avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

siri-squeezebox-control's Issues

Error when running script

Thanks for this - I was looking for something like this for a long time.

But I get the following error, even when running the script directly in Scriptable (The shortcut results in the same error:

2019-10-21 16:45:05: {"id":1,"method":"slim.request","params":["",["players",0,5]]}
2019-10-21 16:45:05: {"result":{"count":4,"players_loop":[{"uuid":null,"isplayer":1,"connected":1,"playerid":"aa:aa:b5:32:8c:27","isplaying":0,"playerindex":"0","power":0,"ip":"192.168.1.50:55346","modelname":"SqueezeLite","seq_no":0,"canpoweroff":1,"displaytype":"none","model":"squeezelite","name":"Kitchen","firmware":0},{"uuid":null,"isplayer":1,"playerid":"28:cf:e9:1d:41:c3","connected":1,"isplaying":0,"playerindex":1,"power":1,"modelname":"SqueezeLite","seq_no":0,"ip":"192.168.1.162:58327","canpoweroff":1,"firmware":"v1.9.0-1119","model":"squeezelite","name":"Macbook Pro","displaytype":"none"},{"uuid":null,"isplayer":1,"connected":1,"playerid":"aa:aa:86:04:b3:54","isplaying":0,"playerindex":2,"power":0,"modelname":"SqueezeLite","ip":"192.168.1.50:55146","seq_no":0,"canpoweroff":1,"displaytype":"none","model":"squeezelite","name":"Lounge","firmware":0},{"uuid":null,"isplayer":1,"playerid":"02:00:e3:df:02:35","connected":1,"isplaying":0,"playerindex":3,"power":0,"modelname":"Group","seq_no":0,"ip":"127.0.0.1:0","canpoweroff":1,"firmware":1,"model":"group","name":"Main","displaytype":"none"}]},"id":1,"method":"slim.request","params":["",["players","0","5"]]}
2019-10-21 16:45:05: {"id":1,"method":"slim.request","params":["",["syncgroups","?"]]}
2019-10-21 16:45:05: {"result":{},"id":1,"method":"slim.request","params":["",["syncgroups","?"]]}
2019-10-21 16:45:05: TypeError: undefined is not an object (evaluating 'result.syncgroups_loop.forEach') at line 594
2019-10-21 16:45:05: Something unexpected happened. (undefined is not an object (evaluating 'result.syncgroups_loop.forEach'))
2019-10-21 16:45:05: {"id":1,"method":"slim.request","params":["",["players",0,5]]}
2019-10-21 16:45:05: {"result":{"count":4,"players_loop":[{"uuid":null,"isplayer":1,"connected":1,"playerid":"aa:aa:b5:32:8c:27","isplaying":0,"playerindex":"0","power":0,"ip":"192.168.1.50:55346","modelname":"SqueezeLite","seq_no":0,"canpoweroff":1,"displaytype":"none","model":"squeezelite","name":"Kitchen","firmware":0},{"uuid":null,"isplayer":1,"playerid":"28:cf:e9:1d:41:c3","connected":1,"isplaying":0,"playerindex":1,"power":1,"modelname":"SqueezeLite","seq_no":0,"ip":"192.168.1.162:58327","canpoweroff":1,"firmware":"v1.9.0-1119","model":"squeezelite","name":"Macbook Pro","displaytype":"none"},{"uuid":null,"isplayer":1,"connected":1,"playerid":"aa:aa:86:04:b3:54","isplaying":0,"playerindex":2,"power":0,"modelname":"SqueezeLite","ip":"192.168.1.50:55146","seq_no":0,"canpoweroff":1,"displaytype":"none","model":"squeezelite","name":"Lounge","firmware":0},{"uuid":null,"isplayer":1,"playerid":"02:00:e3:df:02:35","connected":1,"isplaying":0,"playerindex":3,"power":0,"modelname":"Group","seq_no":0,"ip":"127.0.0.1:0","canpoweroff":1,"firmware":1,"model":"group","name":"Main","displaytype":"none"}]},"id":1,"method":"slim.request","params":["",["players","0","5"]]}
2019-10-21 16:45:05: {"id":1,"method":"slim.request","params":["",["syncgroups","?"]]}
2019-10-21 16:45:05: {"result":{},"id":1,"method":"slim.request","params":["",["syncgroups","?"]]}
2019-10-21 16:45:05: TypeError: undefined is not an object (evaluating 'result.syncgroups_loop.forEach') at line 594
2019-10-21 16:45:05: Something unexpected happened. (undefined is not an object (evaluating 'result.syncgroups_loop.forEach'))

No spoken response when running via Siri / Shortcuts app

Hi, thanks for creating this useful script. I managed to get it working with Siri following your instructions. (i.e. commands do get relayed to my Squeezebox player) However, I do not get a spoken response at all (like "Sorry, I don't know how to..."). I tested in Shortcuts app directly and I don't get the spoken response too. Testing in Scriptable, I do get the spoken response although it is in a male voice (my siri setting is female). Any ideas what could be wrong?

UPDATE: After some more troubleshooting, managed to get a workaround going. Here's my findings and workaround solution in case anyone else have the same issue.

  1. Scriptable app uses Voiceover function in iOS for the text to speech (hence the male voice in my case as that is the default for Accessibility -> Voiceover)
  2. I create a simple script in Scriptable to test the Speech.speak API in the shortcuts app. No luck there so I now suspect the issue is with the Scriptable app rather than your script.
  3. Googling online, found a release note saying the Speech.speak API does not work in Siri for some languages. (https://talk.automators.fm/t/release-notes-for-scriptable/1611/4). I use English(Australia). Not sure if that is the cause.
  4. As a workaround, instead of using the Speech.speak API, I changed it to Script.setShortcutOutput(Response) to pass the message back to the Shortcut app. Then in the Shortcut app, I added another action to speak the output from Scriptable.

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.