11-02-2022, 10:16 AM
It would be great to have a REST API to control moOde remotely, and get status updates remotely, etc. This would open the possibility of plugins for things like Home Assistant.
Thank you for your donation!
Idea: REST API
|
11-02-2022, 10:16 AM
It would be great to have a REST API to control moOde remotely, and get status updates remotely, etc. This would open the possibility of plugins for things like Home Assistant.
11-02-2022, 10:25 AM
There are already ways to control moOde remotely and get status via http so it would be better to be more specific about what you want to accomplish instead of just saying make a REST API or a plugin for Home Assistant.
11-02-2022, 10:38 AM
(This post was last modified: 11-02-2022, 10:43 AM by gwurb.
Edit Reason: added a question
)
(11-02-2022, 10:25 AM)Tim Curtis Wrote: There are already ways to control moOde remotely and get status via http so it would be better to be more specific about what you want to accomplish instead of just saying make a REST API or a plugin for Home Assistant. Hi Tim, I would like to write a python script to control playback, get status of volume, get information about song or radio stream being played, etc. When you write that there is already a way to control moOde remotely and get status via http, where do I look for documentation or examples? I thought I may be able to start with something simple myself and tried doing this: curl http://moode/command/?cmd=status and I get no return. I found a post where you mentioned un-commenting an echo $resp in /var/www/command/index.php , but looking at /var/www/command/index.php I don't see an echo $resp being commented out. To be clear, I want to control moOde playback, not MPD. Thanks Edit: Or would you recommend that I direct attention to controlling MPD?
11-02-2022, 11:15 AM
It's in the Setup guide
https://github.com/moode-player/moode/bl.../setup.txt
11-02-2022, 11:31 AM
(11-02-2022, 11:15 AM)Tim Curtis Wrote: It's in the Setup guide Thanks for that Tim It has been a while since I've read the setup guide... years... Had a quick look, and http://moode/command/?cmd=get_currentsong returns [] http://moode/command/playback.php?cmd=get_mpd_status returns useful info that I can work with I'll look around to see if I can find a way to do everything I am after. Are the commands a work in progress as per Setup guide example not working, and needing an alternative url? Or do you think you think you'll keep them fairly constant?
11-02-2022, 11:41 AM
@gwurb
Go to m > Configure > System and turn on the metadata file local service. Now you’ll get currentsong info via the API. Regards, Kent
12-10-2022, 06:55 PM
Thank you very much for this thread this helps a lot to get the info if the player is in play or stop mode!!
2 Solutions: - http://moode/command/?cmd=get_currentsong - http://moode/command/?cmd=get_mpd_status After this i was able to connect a zigbee Button to "play" or "stop" sound .... and adjust the volume up and down.
02-18-2023, 08:19 PM
+1 For making this feature more visible, maybe a mention in the homepage feature list
A few years ago I remember going for Volumio because it had a rest api and I couldn't find a way to interact programmatically with moOde.
02-18-2023, 09:23 PM
(02-18-2023, 08:19 PM)adam_zzz Wrote: +1 For making this feature more visible, maybe a mention in the homepage feature list It's in the Setup Guide but I suppose that dev's don't read it ;-) But not a bad idea to mention it in the Feature list and Developer page. I'll add to the TODO list.
03-22-2023, 10:01 AM
(11-02-2022, 10:38 AM)gwurb Wrote:(11-02-2022, 10:25 AM)Tim Curtis Wrote: There are already ways to control moOde remotely and get status via http so it would be better to be more specific about what you want to accomplish instead of just saying make a REST API or a plugin for Home Assistant. I would also recommend the MPD route. Moode has a very good integration with MPD and for Python, there already is a good module with MPD support (https://github.com/Mic92/python-mpd2). I used this in developing mpd2chromecast for casting playback to chromecast devices. You will get the same results as using the moode API, but it will be a bit more generic and portable to other MPD-based solutions. |
« Next Oldest | Next Newest »
|