Moode Forum
[SOLVED] Volume display not detecting changes - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7)
+--- Thread: [SOLVED] Volume display not detecting changes (/showthread.php?tid=671)

Pages: 1 2


Volume display not detecting changes - fabnavigator - 11-10-2018

Hi,

New user here. I'm sending html requests to the player and everything is working, except the volume knob isn't showing the correct updated volume. My ears tell me it is working correctly, but the volume display stays the same. Strange thing is, I thought it was working yesterday (but of course I could be wrong). Since then I've played around some with various configuration settings in the GUI, but I can't see how I broke this. Everything else in the playback window is updating correctly.

Thanks,

Bill


RE: Volume display not detecting changes - Tim Curtis - 11-10-2018

When you say "sending html requests to the player" do you mean sending commands to it via its web API?

http://moode/command?cmd=stop
http://moode/command?cmd=play


RE: Volume display not detecting changes - fabnavigator - 11-10-2018

(11-10-2018, 02:12 PM)Tim Curtis Wrote: When you say "sending html requests to the player" do you mean sending commands to it via its web API?

http://moode/command?cmd=stop
http://moode/command?cmd=play

Yes. I'm using Python requests to do a setvol command in this case.

        url = 'http://192.168.0.85/command/'
        payload = {'cmd': 'setvol 15'}
        response = requests.get(url, params=payload)


RE: Volume display not detecting changes - JST1963 - 11-10-2018

Hi moOde fans,


RE: Volume display not detecting changes - Tim Curtis - 11-10-2018

Use vol.sh

Code:
pi@rp3:~ $ /var/www/vol.sh -help
vol.sh with no arguments will print the current volume level
vol.sh restore will set alsa/mpd volume based on current knob setting
vol.sh <level between 0-100>, mute (toggle), up <step> or dn <step>, -help

For example:

http://moode/command?cmd=vol.sh up 1
http://moode/command?cmd=vol.sh dn 1
http://moode/command?cmd=vol.sh 25
http://moode/command?cmd=vol.sh mute

-Tim


RE: Volume display not detecting changes - fabnavigator - 11-10-2018

(11-10-2018, 07:50 PM)Tim Curtis Wrote: Use vol.sh

Code:
pi@rp3:~ $ /var/www/vol.sh -help
vol.sh with no arguments will print the current volume level
vol.sh restore will set alsa/mpd volume based on current knob setting
vol.sh <level between 0-100>, mute (toggle), up <step> or dn <step>, -help

For example:

http://moode/command?cmd=vol.sh up 1
http://moode/command?cmd=vol.sh dn 1
http://moode/command?cmd=vol.sh 25
http://moode/command?cmd=vol.sh mute

-Tim
Thank you Tim. That works perfectly. I'll change my code.

My code was actually written for RuneAudio. I converted to Moode yesterday and everything seemed to be working...

Is there a reference for all of the correct commands that I should be using?


RE: Volume display not detecting changes - Tim Curtis - 11-10-2018

Nice.

Have you implemented some sort of remote control script in Py?


RE: Volume display not detecting changes - fabnavigator - 11-11-2018

(11-10-2018, 09:15 PM)Tim Curtis Wrote: Nice.

Have you implemented some sort of remote control script in Py?

Yes. I wrote a very simple custom component for Home Assistant that lets me control the music player. It just sends out commands. It doesn't get back any state information.


RE: Volume display not detecting changes - Tim Curtis - 11-11-2018

Sounds cool :-)
I took the liberty of marking the thread SOLVED.


RE: Volume display not detecting changes - kiwipaul - 04-03-2022

(11-11-2018, 04:24 AM)fabnavigator Wrote:
(11-10-2018, 09:15 PM)Tim Curtis Wrote: Nice.

Have you implemented some sort of remote control script in Py?

Yes. I wrote a very simple custom component for Home Assistant that lets me control the music player. It just sends out commands. It doesn't get back any state information.

Greetings. I am also trying to control Moode from Home Assistant. Are you able to share your custom component?