# Volume Manager raspberry

**URL:** <https://forum.webostv.developer.lge.com/t/volume-manager-raspberry/6865>\
**Category:** Others\
**Created:** [April 30, 2024, 2:44am UTC](https://forum.webostv.developer.lge.com/t/volume-manager-raspberry/6865 "2024-04-30T02:44:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![igniters](https://avatars.discourse-cdn.com/v4/letter/i/9d8465/32.png) [@igniters](https://forum.webostv.developer.lge.com/u/igniters)\
**Post date:** [April 30, 2024, 2:44am UTC](https://forum.webostv.developer.lge.com/t/volume-manager-raspberry/6865/1 "2024-04-30T02:44:49Z")

</div>

I am using the macbook simulator and raspberry to develop a web application.

I need to control the sound.  
Switch between hdmi .

I am trying to call the following functions .

```auto
function volumeUp() {
  return webOS.service.request("luna://com.webos.audio", {
    method: "volumeUp",
    onComplete: function (inResponse) { })
      console.log('Volume increased by 1.');
      // Do something
    },
    onFailure: function (inError) {
      console.log('Failed to increase volume by 1.')
      console.log('[' + inError.errorCode + ']: ' + inError.errorText);
      // Do something
      return;
    },
  });
}

function volumeDown() {
  return webOS.service.request('luna://com.webos.audio', {
    method: 'volumeDown',
    onComplete: function (inResponse) { } }
      console.log('Volume down by 1.');
      // Do something
    },
    onFailure: function (inError) {
      console.log('Failed to turn the volume down by 1.')
      console.log('[' + inError.errorCode + ']: ' + inError.errorText);
      // Do something
      return;
    },
  });
}

function setMuted() {
  return webOS.service.request('luna://com.webos.audio', {
    method: 'setMuted',
    onComplete: function (inResponse) { } }
      console.log('Volume is muted');
      // do something
    },
    onFailure: function (inError) {
      console.log('Unable to mute the sound.');
      console.log('[' + inError.errorCode + ']: ' + inError.errorText);
      // Do something
      return;
    },
  });
}

```

But they don’t work.  
If you connect via ssh to raspberry . Then the command in the console works

```auto
luna-send -f -n 1 luna://com.webos.service.audio/media/setVolume '{"volume":1, "sessionId":0}'

```

---

<div class="post-metadata">

**Author:** ![narae0.kim](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@narae0.kim](https://forum.webostv.developer.lge.com/u/narae0.kim)\
**Post date:** [April 30, 2024, 3:09am UTC](https://forum.webostv.developer.lge.com/t/volume-manager-raspberry/6865/2 "2024-04-30T03:09:43Z")

</div>

This forum is only for webOS TV apps. Thank you.
