---
title: Integration with Yamaha MusicCast
description: Yamaha's devices in the Musiccast series provides the Yamaha Extended Control API for audio and video products over the local network (Ethernet and Wi-Fi). Yamaha has released a Basic version for cont
---

[Skip to content](https://knowledgebase.grenton.com/en/gate-http-integration-with-yamaha-musiccast#main-content)

English

Show submenu for translations

[New ticket](https://knowledgebase.grenton.com/en/kb-tickets/new?hsLang=en) [Customer portal](https://knowledgebase.grenton.com/wsparcie?hsLang=en)

![Logo\_Grenton\_Main\_2020\_RGB\_v1.0-1.png\]](https://knowledgebase.grenton.com/hs-fs/hubfs/Logo_Grenton_Main_2020_RGB_v1.0-1.png?width=200&height=94&name=Logo_Grenton_Main_2020_RGB_v1.0-1.png)

Open main navigation

Close main navigation

- English
  
  Show submenu for translations
- [New ticket](https://knowledgebase.grenton.com/en/kb-tickets/new)
- [Customer portal](https://knowledgebase.grenton.com/wsparcie)
- [Trainings](https://www.grenton.com/cooperation/trainings.html)

[Trainings](https://www.grenton.com/cooperation/trainings.html)

 Hello. How can we help you?

- There are no suggestions because the search field is empty.

1. [Knowledge Base](https://knowledgebase.grenton.com/en?hsLang=en)
2. [Manuals](https://knowledgebase.grenton.com/en/manuals?hsLang=en)
3. [Gate HTTP](https://knowledgebase.grenton.com/en/manuals?hsLang=en#gate-http)

# Integration with Yamaha MusicCast

Yamaha's devices in the Musiccast series provides the Yamaha Extended Control API for audio and video products over the local network (Ethernet and Wi-Fi).

Yamaha has released a Basic version for controlling a device in a zone and an Advanced version for configuring a multi-room installation. The API provided is full and allows you to configure the installation without using the Yamaha Musiccast Control mobile app. Nevertheless, it is recommended to configure your multi-room installation and devices using the dedicated app.

In this tutorial will show you how to use myGrenton to: 

- turning the speaker on/off
- changing volume level
- reading the currently playing song

In this tutorial we will use the Basic API:

- System - device information and capabilities 
    - path /YamahaExtendedControl/v1/system/...
- Zone 
    - path /YamahaExtendedControl/v1/{zone\_id}/...
- Network/USB - playback control 
    - path /YamahaExtendedControl/v1/netusb/...

In the first step, you need to configure the MusicCast multi-room with the help of the Yamaha Musicast Controller mobile app. Next, you need to obtain the IP address of the device/devices that the DHCP server (router) has assigned.

 

Then, you need to determine which information you can obtain. This is depending on the capabilities of our hardware from the machine point of view. This can be done using the endpoint

http://{adr\_ip}/YamahaExtendedControl/v1/system/getFeatures

```
"zone": [        {            "id": "main",            "func_list": [                "power",                "sleep",                "volume",                "mute",                "sound_program",                "equalizer",                "signal_info",                "prepare_input_change",                "link_control",                "link_audio_delay"            ],            ...        }]
```

 

Testing of API is possible using Postman, cUrl or Advanced REST Client  
(Windows application - [https://install.advancedrestclient.com/install](https://install.advancedrestclient.com/install)).

An important information received from JSON response is a “zone” list and zones’ ID. In this case, the zone is only one and it is named “main” zone. This is needed for audio control, as the basic API (Basic) gives functions for zone.

To integrate with Yamaha MusicCast, you need to create virtual (periphery) objects in Object Manager environment.

The first ones are *HttpListener* objects. Prepare mentioned objects for the following functionalities:

- to receiving actual status 
    - /YamahaExtendedControl/v1/main/getStatus
- to receiving information about a played track 
    - /YamahaExtendedControl/v1/netusb/getPlayInfo
- to controlling a playback 
    - /YamahaExtendedControl/v1/netusb/setPlayback
- to setting a volume level 
    - /YamahaExtendedControl/v1/main/setVolume
- to turning a device on/off 
    - /YamahaExtendedControl/v1/main/setPower

The second virtual (periphery) object is *Timer. *Create this object for obtaining information from a speaker every 1 second.

To store data about the current status of received information, there is a need to create user features on Gate HTTP.

 

Below, you find the steps how to configure the mentioned elements.

[#1](https://knowledgebase.grenton.com/docs/product-documentation/-/issues/1?hsLang=en)

First, you need to create *User features* in Gate Http for the integration:

 

- y\_volume : number, volume level
- y\_state : number 0/1, indicator if the device is on or in the standby mode
- y\_played\_track : string with information about the currently played track
- y\_max\_volume : number, information about the maximum volume of the device
- y\_played\_artist : string with information about the currently played artist
- y\_played\_album : string with information about the currently played album

[![](https://support.grenton.pl/docs/product-documentation/-/raw/master/tutorials/yamaha-musiccast_gate-http-mygrenton/userFeatures.png)](https://knowledgebase.grenton.com/docs/product-documentation/-/raw/master/tutorials/yamaha-musiccast_gate-http-mygrenton/userFeatures.png?hsLang=en)![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35108266386originalQIADeUwfhyCUFd30aGO_Jq3qz0-3p_kyAw-4.png)

[#2](https://knowledgebase.grenton.com/docs/product-documentation/-/issues/2?hsLang=en)

Next, create a *HttpRequest* virtual (periphery) object to retrieve information about the status of the device:

-  Host: device IP address
-  Path: /YamahaExtendedControl/v1/main/getStatus, where “main” is the name of the zone
-  ResponseType: JSON
-  the rest of the properties remains as default
-  the *OnResponse* event runs a script that writes the received data to the *User features*

![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35108266418originaleqCQ5rIwBtDpYHIBx5W7wuKMgEECmfQXWg-4.png)[![](https://support.grenton.pl/docs/product-documentation/-/raw/master/tutorials/yamaha-musiccast_gate-http-mygrenton/getStatusReq.png)](https://knowledgebase.grenton.com/docs/product-documentation/-/raw/master/tutorials/yamaha-musiccast_gate-http-mygrenton/getStatusReq.png?hsLang=en)

[#3](https://knowledgebase.grenton.com/docs/product-documentation/-/issues/3?hsLang=en)

Prepare a script to process the received response about the device status. The script stores information about whether the device is on or off, what the allowed maximum and current volume are.

```
local body = GATE_HTTP->yGetStateReq->ResponseBodyif body ~= nil then    if body.response_code == 0 then            if body.power == "standby" then            GATE_HTTP->y_state = 0         elseif body.power == "on" then            GATE_HTTP->y_state = 1        end        if body.max_volume ~= nil then            GATE_HTTP->y_max_volume = body.max_volume        end                if body.volume ~= nil then            GATE_HTTP->y_volume = body.volume        end    end    end
```

 

The script checks if the data we want to obtain exists and then writes it to *User features*.

![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35108266440original7Koi5rkEG_-phM1RLFWS9ds8OvJcypWpQA-4.png)[![](https://support.grenton.pl/docs/product-documentation/-/raw/master/tutorials/yamaha-musiccast_gate-http-mygrenton/getStateScript.png)](https://knowledgebase.grenton.com/docs/product-documentation/-/raw/master/tutorials/yamaha-musiccast_gate-http-mygrenton/getStateScript.png?hsLang=en)

[#4](https://knowledgebase.grenton.com/docs/product-documentation/-/issues/4?hsLang=en)

Create a *HttpRequest* virtual (periphery) object to retrieve information about the played song:

 

- Host: device IP address
- Path: /YamahaExtendedControl/v1/netusb/getPlayInfo
- ResponseType: JSON
- the rest of the properties remains as default
- the *OnResponse* event runs a script that saves the received data to the *User feature*

![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35108266676originaljTqldfo0IQ1GI2g85PkxvQVMfGepDPwUvA-4.png)[![](https://support.grenton.pl/docs/product-documentation/-/raw/master/tutorials/yamaha-musiccast_gate-http-mygrenton/player_inforReq.png)](https://knowledgebase.grenton.com/docs/product-documentation/-/raw/master/tutorials/yamaha-musiccast_gate-http-mygrenton/player_inforReq.png?hsLang=en)

[#5](https://knowledgebase.grenton.com/docs/product-documentation/-/issues/5?hsLang=en)

Create a script that processes information about the currently playing song. Retrieves information about the song, artist and played album.

```
local body = GATE_HTTP->y_get_play_info->ResponseBodyif body ~= nil then    if body.response_code == 0 then                if body.artist ~= nil then            GATE_HTTP->y_played_artist = body.artist        end        if body.track ~= nil then            GATE_HTTP->y_played_track = body.track        end        if body.album ~= nil then            GATE_HTTP->y_played_album = body.album        end    end    end
```

<https://knowledgebase.grenton.com/docs/product-documentation/-/raw/master/tutorials/yamaha-musiccast_gate-http-mygrenton/getPlayInfoScript.png?hsLang=en>[![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35108266747originalSq3qCdmS8VYWytVMyEiVbYLpNyzPGz4EOA-4.png)](https://knowledgebase.grenton.com/docs/product-documentation/-/issues/6?hsLang=en)

[#6](https://knowledgebase.grenton.com/docs/product-documentation/-/issues/6?hsLang=en)

For the above virtual (periphery) objects, create a timer that every 1 second will start retrieving the current data from the speaker. To realize this, you should set the *Interval* property of *Timer* to 1000ms. Then, to *OnTimer* event assign the command which runs the *SendRequest()* methods of the *Http Request* objects.

![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35108266855original80YiBbgyCI3hJBDhRuFCaFoRt-AMxEmKGg-4.png)[![](https://support.grenton.pl/docs/product-documentation/-/raw/master/tutorials/yamaha-musiccast_gate-http-mygrenton/timer_refresh.png)](https://knowledgebase.grenton.com/docs/product-documentation/-/raw/master/tutorials/yamaha-musiccast_gate-http-mygrenton/timer_refresh.png?hsLang=en)

[#7](https://knowledgebase.grenton.com/docs/product-documentation/-/issues/7?hsLang=en)

In order to play, stop and change the song, create a *HttpRequest* virtual (periphery) object that will connect to the *setPlayback* endpoint:

 

- Host: device IP address
- Path: /YamahaExtendedControl/v1/netusb/setPlayback
- ResponseType: JSON
- the rest of the properties remains as default

![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35108267316originals2K4RyH0ofpL3ScsPkGepbctzqbJNvp7jQ-4.png)[![](https://support.grenton.pl/docs/product-documentation/-/raw/master/tutorials/yamaha-musiccast_gate-http-mygrenton/player_req.png)](https://knowledgebase.grenton.com/docs/product-documentation/-/raw/master/tutorials/yamaha-musiccast_gate-http-mygrenton/player_req.png?hsLang=en)

[#8](https://knowledgebase.grenton.com/docs/product-documentation/-/issues/8?hsLang=en)

The *HttpRequest* virtual (periphery) object created in the previous step will be used by the script to control playback. The script takes an 'action' parameter specifying the command to be executed.

![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35108267321originalC7_kT0gWXRKDbB-ZA4Hl50Pu9P_RHrbCxg-4.png)[![](https://support.grenton.pl/docs/product-documentation/-/raw/master/tutorials/yamaha-musiccast_gate-http-mygrenton/playpuseScript.png)](https://knowledgebase.grenton.com/docs/product-documentation/-/raw/master/tutorials/yamaha-musiccast_gate-http-mygrenton/playpuseScript.png?hsLang=en)

[#9](https://knowledgebase.grenton.com/docs/product-documentation/-/issues/9?hsLang=en)

To control the volume level, create a *HttpRequest* virtual (periphery) object that will connect to the endpoint:

 

- Path: /YamahaExtendedControl/v1/main/setVolume
- Host: IP address of the device
- ResponseType: JSON
- the rest of the properties remains as default

![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35108268214originalc123VN9WkmR9OobIEShLh2u5kDxeb45Xcg-4.png)[![](https://support.grenton.pl/docs/product-documentation/-/raw/master/tutorials/yamaha-musiccast_gate-http-mygrenton/setVolume.png)](https://knowledgebase.grenton.com/docs/product-documentation/-/raw/master/tutorials/yamaha-musiccast_gate-http-mygrenton/setVolume.png?hsLang=en)

[#10](https://knowledgebase.grenton.com/docs/product-documentation/-/issues/10?hsLang=en)

A script to decrease the volume level:

```
local vol = GATE_HTTP->y_volumelocal query = "volume="if (vol-1) >= 0  then    vol = vol - 1    GATE_HTTP->y_volume = vol    else    vol = 0endquery = query..volGATE_HTTP->y_setVolume->SetQueryStringParams(query)GATE_HTTP->y_setVolume->SendRequest()
```

 

[![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35108268242originaliuMx9fpB9BoKQBjHMgAx0MXcbkRpbde5Bg-4.png)](https://knowledgebase.grenton.com/docs/product-documentation/-/issues/11?hsLang=en)

[#11](https://knowledgebase.grenton.com/docs/product-documentation/-/issues/11?hsLang=en)

A script to increase the volume level:

```
local vol = GATE_HTTP->y_volumelocal query = "volume="local max = GATE_HTTP->y_max_volumeif (vol+1) <= max then    vol = vol + 1    GATE_HTTP->y_volume = vol    else    vol = maxendquery = query..volGATE_HTTP->y_setVolume->SetQueryStringParams(query)GATE_HTTP->y_setVolume->SendRequest()
```

 

[![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35108268281original81SUFQjg3oUNagfXbNQNBfCmTZrtBgWG2A-4.png)](https://knowledgebase.grenton.com/docs/product-documentation/-/issues/12?hsLang=en)

[#12](https://knowledgebase.grenton.com/docs/product-documentation/-/issues/12?hsLang=en)

Create another *HttpRequest* virtual (periphery) object to turn the device (speaker) on and off. Configure it as follows:

 

- Host: device IP address
- Path: /YamahaExtendedControl/v1/main/setPower
- ResponseType: JSON
- the rest of the properties remains as default

![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35108268310originalvAuKGbok2G1TyFrUm32Cfun5hwxLp1oRbA-4.png)[![](https://support.grenton.pl/docs/product-documentation/-/raw/master/tutorials/yamaha-musiccast_gate-http-mygrenton/toggle_req.png)](https://knowledgebase.grenton.com/docs/product-documentation/-/raw/master/tutorials/yamaha-musiccast_gate-http-mygrenton/toggle_req.png?hsLang=en)

[#13](https://knowledgebase.grenton.com/docs/product-documentation/-/issues/13?hsLang=en)

Script for switching the device state:

```
if GATE_HTTP->y_state == 0 then    GATE_HTTP->y_state = 1 else    GATE_HTTP->y_state = 0 endGATE_HTTP->y_toggle->SendRequest()
```

 

[![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35108268320original4EceEI_m5D5SdriXuyLo8g_WpWS9_bD57A-4.png)](https://knowledgebase.grenton.com/docs/product-documentation/-/issues/14?hsLang=en)

[#14](https://knowledgebase.grenton.com/docs/product-documentation/-/issues/14?hsLang=en)

The above scripts are needed to build an interface in myGrenton where you can see information about the currently playing song, control of start/stop playback, switch song, turn the device on/off.

![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35108268504originalPl7GFxQfSzHkO4ZjXlDaPsT9vQIli4lkyA-4.png)

[#15](https://knowledgebase.grenton.com/docs/product-documentation/-/issues/15?hsLang=en)

*Value* widgets are configured to show the specified* Embedded feature*.

![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35108268530originalkrXc_9kYopFSCRiPaXWypOXtye8hcybA-A-4.png)

[#1](https://knowledgebase.grenton.com/docs/product-documentation/-/issues/17?hsLang=en)6

The *dual scene* widget - for play/stop the song - calls a script that takes information about action to the parameter according to the Yamaha API documentation.

![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35108268564original8rFzXlXixcowzsVOcasQ0_9hKiSfdLRkNA-4.png)

[#1](https://knowledgebase.grenton.com/docs/product-documentation/-/issues/16?hsLang=en)7 

The *dual scene* widget - for changing the track being played - calls a script that takes information about action to the parameter according to the Yamaha API documentation.

![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35108268547original_XXyZj-4AMt_jtftAtGPp-knHc8QLijR8Q-4.png)

[#18](https://knowledgebase.grenton.com/docs/product-documentation/-/issues/18?hsLang=en)

The *dual scene* widget - for volume control - calls dedicated scripts which were created earlier.

![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35108268590originalnDRJ4NaoNASalYJAPE-L9Vq5C3pT0AtFVQ-4.png)

[#19](https://knowledgebase.grenton.com/docs/product-documentation/-/issues/19?hsLang=en)

Finally, add the* ON\_OFF* widget calling a script which is responsible for turning the device on and off.

![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/s3.amazonaws.comcdn.freshdesk.comdatahelpdeskattachmentsproduction35108268620originalSHOSCsqhnwut8RhnPyGQAmhRzb_aHPF-gA-4.png)

The last step is sending the configuration to CLU and uploading the interface to the mobile device.

![](https://knowledgebase.grenton.com/hubfs/Knowledge%20Base%20Import/support.grenton.plensupportsolutionsarticles35000171602-gate-http-integration-with-yamaha-musiccasthit-2.gif)

- [Installation guidelines](https://knowledgebase.grenton.com/en/installation-guidelines?hsLang=en#main-content)

    - [How to Prepare Electrical Installation](https://knowledgebase.grenton.com/en/installation-guidelines?hsLang=en#how-to-prepare-electrical-installation)
- [Reference devices](https://knowledgebase.grenton.com/en/reference-devices?hsLang=en#main-content)

    - [Integrated Device](https://knowledgebase.grenton.com/en/reference-devices?hsLang=en#integrated-device)
- [Most Common Mistakes](https://knowledgebase.grenton.com/en/most-common-mistakes?hsLang=en)
- [Electrical Installation](https://knowledgebase.grenton.com/en/electrical-installation?hsLang=en)
- [Manuals](https://knowledgebase.grenton.com/en/manuals?hsLang=en#main-content)

    - [Gate Modbus](https://knowledgebase.grenton.com/en/manuals?hsLang=en#gate-modbus)
    - [Training](https://knowledgebase.grenton.com/en/manuals?hsLang=en#training)
    - [SW Applications](https://knowledgebase.grenton.com/en/manuals?hsLang=en#sw-applications)
    - [Gate HTTP](https://knowledgebase.grenton.com/en/manuals?hsLang=en#gate-http)
    - [Smart Panel](https://knowledgebase.grenton.com/en/manuals?hsLang=en#smart-panel)
    - [Configuration](https://knowledgebase.grenton.com/en/manuals?hsLang=en#configuration)
    - [myGrenton interfaces](https://knowledgebase.grenton.com/en/manuals?hsLang=en#mygrenton-interfaces)
    - [Virtual Objects](https://knowledgebase.grenton.com/en/manuals?hsLang=en#virtual-objects)
    - [Gate Alarm](https://knowledgebase.grenton.com/en/manuals?hsLang=en#gate-alarm)
- [Intercom](https://knowledgebase.grenton.com/en/intercom?hsLang=en)
- [FAQ](https://knowledgebase.grenton.com/en/faq?hsLang=en#main-content)

    - [FAQ](https://knowledgebase.grenton.com/en/faq?hsLang=en#faq)
    - [About Grenton](https://knowledgebase.grenton.com/en/faq?hsLang=en#about-grenton)
- [Price list and documents](https://knowledgebase.grenton.com/en/price-list-and-documents?hsLang=en)

[![Grenton logo](https://knowledgebase.grenton.com/hs-fs/hubfs/Logo_Grenton_variants_BIG_2020_plus_RGB_v0.2-02.png?width=400&height=100&name=Logo_Grenton_variants_BIG_2020_plus_RGB_v0.2-02.png "Grenton logo")](http://grenton.com)

<https://www.facebook.com/grenton.smart.home> <https://www.instagram.com/grenton_smart_home/> <https://www.youtube.com/channel/UCFNNI-dgO1cm81kCrSr1bzg> <https://www.linkedin.com/company/grenton>

Copyright © 2026, Grenton Sp.z o.o.