Monoprice Whole Home Audio controller 10761 success

There’s a big thread on the Monoprice WHA audio controller/amp (model 10761) over on avsforum.com, and there is another big thread on the smartthings forum discussing it. It’s a great unit for the price and allows full remote control via RS232. I couldn’t find any info on integrating it into HomeAssistant, but @jnewland already wrote the code to do so, and it works great. I thought I’d post my experience on using his code to set everything up.

What you need:
USB>RS232 adapter. I used one with an FTDI chipset.
Server running NODE. I used my QNAP with NODE running in a Docker container. I run HomeAssistantin another Docker container

Connect the USB>RS232 adapter to the Monoprice unit and your server. I connected to the Monoprice unit using screen to send test commands to the Monoprice unit to make sure the server>Monoprice direct connection was OK.

Install @jnewland’s NODE API (https://github.com/jnewland/mpr-6zhmaut-api) on the NODE server. You can then check the connection with cURL.

Add @jnewland’s custom Monoprice platform (https://github.com/jnewland/ha-config/blob/master/custom_components/media_player/mpr_6zhmaut.py) to the media_player component. Following his configuration.yaml (https://github.com/jnewland/ha-confi...iguration.yaml) and media_player.yaml (https://github.com/jnewland/ha-confi...ia_player.yaml) puts all the pieces together.

I ran into an issue with multiple status commands being sent too close together to additional slave mono price controllers. I couldn’t figure out how to add a delay between requests, so I just commented the subsequent requests out. Because I only have one Monoprice unit, this wasn’t an issue for me. See lines 23 and 24 here: https://github.com/johnnyletrois/mpr.../master/app.js.

Again, big thanks to @jnewland for the code. I’ve got everything set up exactly the way I wanted with wall control, app/webapp control, and automations for the Monoprice unit.

3 Likes

That is really cool.

I was looking at the monoprice 10761, and then read all your posts where you mention using it, and I decided to buy one!
Can you go more in depth on how you have managed to set it up and how you find yourself using it? I have some ideas on how I will want to use it, and I’m not sure how far off they are…
thanks!

Monoprice Six Zone Controller HomeAssistant setup

Hook amp up to QNAP via USB to serial adapter with FTDI chip

Adapter mounts at /dev/ttyUSB0

Create node v4.6 container in container station forwarding port 8181 and granting access to /dev/ttyUSB0 using command line
SSH into QNAP as admin

run: docker run -t -i --device=/dev/ttyUSB0 -p 8181:8181 node:4.6 bash

SSH into docker container

run: docker exec -i -t DOCKERCONTAINERNAME bash

Set node server API up following instructions at http://www.intranetofstuff.com/2016/08/03/rpi-serial-server.html

clone repo to /opt/local

mkdir stereo-server in /opt/local

cp cloned files to /opt/local/stereo-server

npm start from inside /opt/local/stereo-server

server should start and run in foreground with requests/responses visible from command line

check status using CURL

If HomeAssistant docker not setup, install. After installed, configure.

configuration.yaml - add: media_player: !include media_player.yaml

Set up media_player.yaml as at https://github.com/jnewland/ha-config/blob/master/media_player.yaml
For host, use IP address of node API server in QNAP Virtual Switch tab of Network & Virtual Switche (10.0.3.1)

Copy mpr_6zhmaut.py (https://github.com/jnewland/ha-config/blob/master/custom_components/media_player/mpr_6zhmaut.py) to HomeAssistant custom_components/media_player/ folder

Start HomeAssistant and enjoy!

The Monoprice is great because it has six independent speaker zones and six independent inputs. Any input can be output to any individual or combination of zones (1:1 or 1:many). My zones are: 1) Attic Sitting, 2) Attic Bath, 3) Bedroom Landing, 4) Office, 5) Porch, and 6) Patio. Using groups.yaml, I’ve grouped them into All Attic, All Inside, and All Outside groups. I plan on buying another Monoprice unit for six more zones: 1) Living Room, 2) Family Room, 3) Kitchen, 4) Entry, 5) Workshop, 6) Basement.

I use four out of six inputs now: 1 Chromecast Audio for general use (music and other casting); 1 Chromecast Audio dedicated to voice notifications; 1 Airport Express of Airplay; and 1 stereo mini connected to my server.

When an automation triggers a voice notification (like when the alarm is armed, the front door is opened, etc.), each zone current input is set to an input slider. The notification Chromecast input is then selected for all inside zones, the notification plays, and then the inside zones are all returned to their previous input. Most of the time we’re just streaming music, so pausing/resuming isn’t necessary. A more elegant solution would be to have a mixer overlay the voice notification, but then I’d need a mixer and separate Chromecast Audio for each input.

I also use this really cool streaming radio control: Chromecast Radio with station and player selection

thank you so much for all the info! My amp actually just arrived today (early!) and I’m busy trying to get it all set up.

I have Home Assistant running in a Fedora 26 VM, so I’m having to customize the setup a bit. Currently, I’m having trouble getting the npm stuff to work, but I’m determined to make some progress!

If i manage to get it all set up, I’ll post my steps.

it is working!!!
it definitely isn’t set up well at the moment (fired up a separate VM to test host the npm app for testing) but i should be able to clean it up tomorrow :slight_smile: I will post my exact steps once i finalize my initial setup.
do you have your config posted by chance? i would love to check it out for ideas :slight_smile: i know that i want to set up tts alerts, but haven’t even looked into it yet…

I really like using lightweight docker containers for each individual component. The node server is one docker container, HomeAssistant is another, my MQTT broker is another, and another container watches my Dahua IP cameras for virtual tripwire notifications. It’s pretty easy to manage after you get the hang of it.

I’m building on @CCOSTAN’s speech engine for voice notifications. See here: Adding Voice to the Smart Home (Home Assistant Style)

I had to do some fiddling with input_sliders in order to remember zone inputs. I really should get set up on github so I can keep track of my changes.

I just updated to the latest version of Home assistant and there is now a component available to control the mono price 6 zone controller! I was using the node.js setup, but I just switched over to the new component and everything works great! Even my automatons still work the same since I kept the same names for each mono price zone.

Yeah, I updated yesterday and set up the native integration. It works great!

Thanks @etsinko!

With the old custom component, the selected input source was displayed on the media_player card as media_title. The current native integration doesn’t do that. I’d make a PR, but I don’t know how. It should be a quick fix.

@johnnyletrois you are welcome!
I’ll look into media_title being displayed on the media_player card.

Awesome. I think it should be pretty simple:

@property
def media_title(self):
    """ Current media source. """
    return self._source

Thanks for adding the MonoPrice integration!

This PR has been merged into Home Assistant. Should be in the next release.

https://github.com/home-assistant/home-assistant/pull/10120

1 Like

This works great. Thanks!

Is there a way to add a zone into a group? If I wanted a group or tab per bedroom, I want it to show the zone that is that that bedroom.

Thanks

1 Like

@etsinko Thank you, thank you for your awesome work on this component. Much better than my hacked together restful sensors.

I’m looking at your configs on github and don’t see that you’ve done this. Do you know of a way to set an input_number for the volume of each zone? I’d love to be able to control each zone’s volume from the HA UI. Thanks again.

What do you mean “control each zone’s volume from the HA UI?” You can already do that.

Wow, I’m an idiot. I didn’t click the three dots. To bring up this:

So I made a bunch of automatons and scripts to do this:

image

I also did the same thing with a input_select for the source.

I feel stupid.

1 Like