The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Remote access to moode via web-api
#1
Hi,

I'm building a remote 'control' for Moode. That is, since my amp is inside closed furniture I want to be able to adjust the volume without having to reach for my phone, tablet or other device with a browser. Just a small enclosure near the couch with a knob to adjust the volume. I've build a prototype around an esp8266 with a rotary encoder. This will send html commands to moode.local according to this post: http://moodeaudio.org/forum/showthread.p...87#pid2487
It's not perfect yet, but it works. However, in the above post other commands are given, like 'currentsong' and 'status'. I cannot get those to work. When I'm logged in via ssh and
type:

Code:
curl http://localhost/command/?cmd=status

nothing happens. If I try the same with the 'play' or 'pause' commands moode reacts as expected.
I need that data because I would like to put a little display on the device showing at least the current volume, if playing or in pause and maybe also the current song. 
I've searched for MPD web-api, but so far nothing useful has come up. 
By the way, I'm using the latest Moode (5.01 I believe) on a Pi 3B+. 

Update (even before I posted!):
In my office I'm running an older version of Moode (version 4 Beta 12 for some reason). This appears to respond quite differently. Here the 'status' and 'currentsong' work as mentioned in the above post. 'vol.sh --help' gives me a full page of options, none of which appear to have anything to do with MPD. Setting the volume with curl... (in the terminal with ssh) works, as long as I replace all spaces with '%20'. However, just cmd=vol.sh which should return the current volume does nothing... (This works fine on my 5.01 setup btw)
Reply


Messages In This Thread
Remote access to moode via web-api - by arjena - 05-10-2019, 12:52 PM

Forum Jump: