Upcoming maintenance
Dear Customers and Partners.
This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.
This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.
We apologize for any inconvenience.
setAudioVolume "-N" not working on STR-DN860
-
I own a STR-DN860 (latest firmware - M29.R.0476 ) and I'm able to control the receiver's volume using setAudioVolume.
However decreasing by 1 isn't working.
I can set the "volume" parameter to any number and the volume changes to that number. Or I can set it to "+1" and it increases by 1.
However sending "-1" also increases the volume.Does it work correctly for anybody?
-
We had what same result in earlier versions of the firmware for STR-DN1080 also, but I believe that is fixed for that receiver (don't have the possibility to test right now). Looks like the firmware for STR-DN860 is not updated since then (I don't know if the firmware will be updated for STR-DN860).
-
(edited) I specify an N value for the volume. Sure it means keeping track of the current volume, or you can (probably should) query that first. Not so handy if you are just wanting a simple script though.
-
@david It would be really great if Sony rolled out API updates to older models to tidy things up. Even if there are no other fixes, just the API updates.
-
@grolschie Yes, that's what I'm currently doing.
Here's my AutoHotKey 2 script, perhaps someone finds it useful.
It increases/decreases volume when middle mouse button is pressed together with volume up/down.~Volume_Down & MButton:: ~MButton & Volume_Down:: { req := ComObject("WinHttp.WinHttpRequest.5.1") req.Open("POST", "http://192.168.0.110:10000/sony/audio") jsonbody := '{"method":"getVolumeInformation", "id":33, "params":[{}], "version":"1.1"}' req.Send(jsonbody) req.WaitForResponse() currVol := Integer(RTrim(SubStr(req.responseText, 94, 2),"}")) currVol-- whr := ComObject("WinHttp.WinHttpRequest.5.1") whr.Open("POST", "http://192.168.0.110:10000/sony/audio") whr.SetRequestHeader("Content-Type", "application/json") voldown := '{ "method":"setAudioVolume", "id":98, "params":[{ "volume": "' . currVol . '"}], "version":"1.1" }' whr.Send(voldown) } ~Volume_Up & MButton:: ~MButton & Volume_Up:: { whr := ComObject("WinHttp.WinHttpRequest.5.1") whr.Open("POST", "http://192.168.0.110:10000/sony/audio") whr.SetRequestHeader("Content-Type", "application/json") jsonbody := '{ "method":"setAudioVolume", "id":98, "params":[ {"volume":"+1"}], "version":"1.1" }' whr.Send(jsonbody) }
-
@root Very cool. Thanks for sharing the script.
-