Thank you for your donation!


Solved: Volume display not detecting changes
#1
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
Reply
#2
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
Enjoy the Music!
http://moodeaudio.org | http://twitter.com/MoodeAudio | http://github.com/moodeaudio
Reply
#3
(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)
Reply
#4
Hi moOde fans,
 :@
Reply
#5
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
Enjoy the Music!
http://moodeaudio.org | http://twitter.com/MoodeAudio | http://github.com/moodeaudio
Reply
#6
(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?
Reply
#7
Nice.

Have you implemented some sort of remote control script in Py?
Enjoy the Music!
http://moodeaudio.org | http://twitter.com/MoodeAudio | http://github.com/moodeaudio
Reply
#8
(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.
Reply
#9
Sounds cool :-)
I took the liberty of marking the thread SOLVED.
Enjoy the Music!
http://moodeaudio.org | http://twitter.com/MoodeAudio | http://github.com/moodeaudio
Reply


Forum Jump: