mherger wrote:
> > That sounds interesting. How exactly would I need to format those POST
> > requests? (I'm a total noob at those things).
>
> You'd send the command as a stringified JSON object in the body of the
> requeest:
>
> {"id":0,"params":["00:04:...",["serverstatus"]],"method":"slim.request"}
>
> ["serverstatus"] would be your command, where you put every argument as
> an array item. Eg. ["titles", 0, 100, "tags:a"] would give you one
> hundred titles, starting at the first (0), with ID, title, and artist
> name (a).
>
> {"id":0,"params":["00:04:...",["playlist", "play",
> "http://www.radio.com/some/stream"]],"method":"slim.request"}
>
> Would play the URL. And so on.
Great, thanks again Michael !!
I tried this with Pushcut and it works... well kinda... I mean, Pushcut
can run an action that does exactly what we need. I was able to play a
din-dong file on my HomePod Mini.
I used this request message:
{"id":1,"method":"slim.request","params":["<mac address
player>",["playlist","play","/mnt/music/Geluiden/Ding-dong-sound.mp3"]]}
Success... or maybe not... Only problem is that the action needs to be
triggered by human interaction. That's not what I want...
Now I turned my attention back to Homekit itself. There is a way to do
this with a Homekit Shortcut. Things here is that the Homekit user
interface strips the message down into keys. To illustrate what I mean,
here's a screenshot:
33387
I would follow the logic as I used with Pushcut:
"Get contents of" is the "http://<lms server>:9000//jsonrpc.js"
Method = 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 tried a few things like that but when I run the shortcut it says "An
SSL error has occurred and a secure connection to the server cannot be
made".
Would you have any ideas?
+-------------------------------------------------------------------+
|Filename: Screenshot 2021-02-16 at 18.20.12.jpg |
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=33387|
+-------------------------------------------------------------------+
'Yamaha A-S3000'
(https://uk.yamaha.com/en/products/audio_visual/hifi_components/a-s3000/index.html)
(sliver) -> 'Focal Electra 1028 Be'
(http://www.focal.com/en/electra-1000-be-2/209-electra-1028-be-3544053695099.html)
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
------------------------------------------------------------------------
Pascal Hibon's Profile: http://forums.slimdevices.com/member.php?userid=7969
View this thread: http://forums.slimdevices.com/showthread.php?t=113721
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins