This is a related post to the following thread.
<Sample 1>

<Sample 2>
View attachment 1c4973d1-9b3c-41f7-9c35-9d95ced6db44-1_all_6756.mp4
First, create the data needed to control the WiiM.
1) Save the IP address of the WiiM device you wish to control in Notepad.
Open the WiiM home app and save the IP in the device settings under Network Status to Notepad.

# This IP is used to control any WiiM device using the WiiM API. If you want to control multiple WiiM devices, please copy the IPs of all devices.
2) Save the IP as a variable.
Tap the "Variables" tile on the Macrodroid home screen to create a global variable.

Tap the "+" icon.

Enter a variable name of your choice and set the variable type to "String". In this example, I use "Ultra_IP".

Tap OK, and a new variable will be created. Since the value of the variable is still empty.

Tap "empty" and enter the IP.

Check "Make Variable secure" and tap OK.
3) Create a URL to use in the macro.
Insert a variable into the request URL of the WiiM API.
This is a sample URL to play the preset on a WiiM device.
Change the yellow IP address to this one.
The blue "%d" is the preset number. Setting this to 1 will play Preset 1; setting it to 12 will play Preset 12.
This completes the process.
This URL is also pasted into Notepad. Please be careful not to include spaces.
4) Create a widget button to play preset 1.
Tap the tile "Add Macro".

After entering the macro name, tap the "+" button on the Triggers tab.
In this example, I use "01 Ultra Preset 1".

Tap the magnifying glass icon to search for "widgets".

Tap the "Widget Button".

Select "Custom" and tap the OK.

Tap "Select Image" to select an icon image.

"Add User Icon" can be tapped to add an image stored in storage here.

After selecting an image, enter your favorite label name and tap OK.

The target is now complete. Next, create the action.
Tap "+" to proceed.

Search for "http", and tap "HTTP Request".

Paste the URL created in "(3)" here.

Check the three checkboxes and tap here.

This completes the macro, but you can also launch any app after tapping the preset button. Here I will add an action that opens the WiiM app when the button is tapped.
Search for "app", and tap "Launch Application".

Select "Select Application" and then OK.

Choose WiiM Home.

OK.

Tap this button, and completes the process.

Press and hold the resulting macro to display the menu. Test your actions here.
Tap "(1) Test actions".
If preset 1 is played on WiiM and the WiiM app starts, it is a success.

In addition, you can duplicate this macro by tapping "(2) Clone macro" to create preset 2 or later macros. To do so, change the number at the end of the request URL.
With the macro completed, return to the phone's home screen and add the Android widget.
Press and hold the Home screen and tap the widget button.

Select a custom button from Macrodroid widgets.

Select the macro you just created.

Thank you for your hard work
.

In the next time, I will create a macro that uses the Drawer action to display the preset list.
- The WiiM ecosystem for me is now complete.
- Modify my old phone to WiiM Remote to control tablet and WiiM devices at the same time.
<Sample 1>

<Sample 2>
View attachment 1c4973d1-9b3c-41f7-9c35-9d95ced6db44-1_all_6756.mp4
First, create the data needed to control the WiiM.
1) Save the IP address of the WiiM device you wish to control in Notepad.
Open the WiiM home app and save the IP in the device settings under Network Status to Notepad.

# This IP is used to control any WiiM device using the WiiM API. If you want to control multiple WiiM devices, please copy the IPs of all devices.
2) Save the IP as a variable.
Tap the "Variables" tile on the Macrodroid home screen to create a global variable.

Tap the "+" icon.

Enter a variable name of your choice and set the variable type to "String". In this example, I use "Ultra_IP".

Tap OK, and a new variable will be created. Since the value of the variable is still empty.

Tap "empty" and enter the IP.

Check "Make Variable secure" and tap OK.
3) Create a URL to use in the macro.
Insert a variable into the request URL of the WiiM API.
This is a sample URL to play the preset on a WiiM device.
http://10.10.10.254/httpapi.asp?command=MCUKeyShortClick:%d
Change the yellow IP address to this one.
http://{v=Ultra_IP}/httpapi.asp?command=MCUKeyShortClick:%d
The blue "%d" is the preset number. Setting this to 1 will play Preset 1; setting it to 12 will play Preset 12.
http://{v=Ultra_IP}/httpapi.asp?command=MCUKeyShortClick:1
This completes the process.
This URL is also pasted into Notepad. Please be careful not to include spaces.
4) Create a widget button to play preset 1.
Tap the tile "Add Macro".

After entering the macro name, tap the "+" button on the Triggers tab.
In this example, I use "01 Ultra Preset 1".

Tap the magnifying glass icon to search for "widgets".

Tap the "Widget Button".

Select "Custom" and tap the OK.

Tap "Select Image" to select an icon image.

"Add User Icon" can be tapped to add an image stored in storage here.

After selecting an image, enter your favorite label name and tap OK.

The target is now complete. Next, create the action.
Tap "+" to proceed.

Search for "http", and tap "HTTP Request".

Paste the URL created in "(3)" here.

Check the three checkboxes and tap here.

This completes the macro, but you can also launch any app after tapping the preset button. Here I will add an action that opens the WiiM app when the button is tapped.
Search for "app", and tap "Launch Application".

Select "Select Application" and then OK.

Choose WiiM Home.

OK.

Tap this button, and completes the process.

Press and hold the resulting macro to display the menu. Test your actions here.
Tap "(1) Test actions".
If preset 1 is played on WiiM and the WiiM app starts, it is a success.

In addition, you can duplicate this macro by tapping "(2) Clone macro" to create preset 2 or later macros. To do so, change the number at the end of the request URL.
With the macro completed, return to the phone's home screen and add the Android widget.
Press and hold the Home screen and tap the widget button.

Select a custom button from Macrodroid widgets.

Select the macro you just created.

Thank you for your hard work


In the next time, I will create a macro that uses the Drawer action to display the preset list.
Attachments
Last edited: