Home of the Squeezebox™ & Transporter® network music players.
Page 4 of 4 FirstFirst ... 234
Results 31 to 35 of 35

Thread: LMS and Apple

  1. #31
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,525

    LMS and Apple

    > Some time ago, I played with Shortcuts, too.
    > Maybe this could be of any help to master the JSON request:
    >
    > 'Sending commands to LMS via iOS app shortcuts'
    > (https://forums.slimdevices.com/showt...l=1#post981807)


    Yes, that's exactly how I did it, too. Great screenshots!

    You can then Shortcuts have parse the response into a dictionary, from
    which you can easily access the result (if needed).

    --

    Michael

  2. #32
    Senior Member Pascal Hibon's Avatar
    Join Date
    Oct 2006
    Location
    Belgium
    Posts
    1,583
    Quote Originally Posted by mherger View Post
    >> Question is: how do I fill in the rest? I guess I need to break the
    >> message up into different keys (?). so "id" would be a key and "method"
    >> would be a key and "params" would be a key?

    >
    > I'd say so. But then can you create a value which would be another
    > object (array) for the params?


    BTW: I just stumbled across this document:

    https://support.apple.com/de-ch/guid...d0f2e057df/ios
    Thanks again Michael !! Appreciate your help.
    I tried like a million combinations with those keys but no luck.

    But I found a way around it. I selected "file" for "Request Body" of the "Get contents of" command and selected a variable for the "file".
    Prior to the "Get contents of" command I lookup a text file on my local http server which contains the string "{"id":1,"method":"slim.request","params":["aa:aa:45:03:00:73",["playlist","play","/mnt/music/Geluiden/Ding-dong-sound.mp3"]]}". And I assigned it to the variable that I then pass onto "file" for "Request Body".
    Okay, this is not the most elegant solution but it works!

    In regards to Pushcut: it lets you create an action that executes the post message. But the action is represented by a button that the user has to push on the notification Pushcut sends out.
    The copy url thing is indeed what you need to do. but this url is pasted in a "Get contents of" command in a HomeKit shortcut. That triggers the PushCut notification. When the notification appears on your phone, you need to pull it down and that reveals the action button of the action created in Pushcut. When the user presses the button it will then send the post message. And that is not what I want.

    Anyway, I found a way that works. It is a pity how Apple treats HomeKit. HomeKit supports shortcuts but this is a subset of the Shortcuts app from Apple. I was able to create a working shortcut in the Shortcuts app. But due to the poor shortcuts implementation in HomeKit I couldn't get it to work in HomeKit. There are some things I really don't understand in Apple's way of reasoning. Why just not integrate the Shortcuts app into HomeKit; that would make HomeKit a hell of a lot more powerful...
    Yamaha A-S3000 (sliver) -> Focal Electra 1028 Be
    1 x SB Boom, 1 x SB Radio, 1 x SB Touch and 2 x RPI 2B
    1 x SB3 and 1 x SB Touch in storage
    ReadyNAS NVX for storage
    piCorePlayer on RPI 4B as LMS server
    iPeng on iPhone, SqueezePad & iPeng on iPad, Material Skin
    http://www.last.fm/user/phibon

  3. #33
    Senior Member Pascal Hibon's Avatar
    Join Date
    Oct 2006
    Location
    Belgium
    Posts
    1,583
    Quote Originally Posted by karlek View Post
    Some time ago, I played with Shortcuts, too.
    Maybe this could be of any help to master the JSON request:

    Sending commands to LMS via iOS app shortcuts

    Control your music with Siri and Shortcuts
    I have it working in the Shotcuts apps as well. However, homeKit uses a subset of the shortcuts commands from the Shortcuts app. I couldn't get it to work in the HomeKit app.
    And shamefully, HomeKit doesn't let you run shortcuts from the Shortcuts app...
    Yamaha A-S3000 (sliver) -> Focal Electra 1028 Be
    1 x SB Boom, 1 x SB Radio, 1 x SB Touch and 2 x RPI 2B
    1 x SB3 and 1 x SB Touch in storage
    ReadyNAS NVX for storage
    piCorePlayer on RPI 4B as LMS server
    iPeng on iPhone, SqueezePad & iPeng on iPad, Material Skin
    http://www.last.fm/user/phibon

  4. #34
    Senior Member
    Join Date
    Apr 2015
    Location
    Germany
    Posts
    782
    Ok, that’s a shame.
    Unfortunately I could not do anything constructive in HomeKit. Probably because I don’t own an Apple TV (4?) nor a HomePod.

  5. #35
    Senior Member
    Join Date
    Apr 2015
    Location
    Germany
    Posts
    782
    Quote Originally Posted by Pascal Hibon View Post
    homeKit uses a subset of the shortcuts commands from the Shortcuts app. I couldn't get it to work in the HomeKit app.
    If I understand, there is no „file“ option in HomeKit. Then You should really look at my screenshots in the first linked thread, where I describe the steps to fill the JSON request in the appropriate fields.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •