Monoprice Whole Home Audio controller 10761 success

Hey all. Been watching this thread for a long time and was wondering if you all could help me out. We have finally moved into our new home and I wired the whole house based on this thread with the monoprice 6-zone unit.

More of a general question. I am just really getting going with things in HA. Was wondering if anyone was willing to share some ideas of how you use your monoprice unit and maybe some code. Again I am somewhat of a newb. But did get the unit hooked up in docker via the serial cable on my synology NAS. Now I would love to start learning more with it. Your thoughts are much appreciated.

I had mine for 5 months, works great. I did a pretty neat thing (I think):

I had two sources going into the Monoprice: zone 2 from a Denon receiver, and a direct hookup to Sonos (it has two outputs).

Now, the Monoprice supports 6 inputs. In my setup, input 1 and 2 play the input as noted above. If I select 3, 4, 5, or 6, then plays a particular Sonos play list and switches immediately back to input 2. I thus can pick from 4 playlists from the Monoprice’s keyboards. Also, I can run the house sound without the receiver being on.

All done with Karl’s mini-media-player, great stuff. Have fun.

Love the source automation idea.

I run HA in docker in windows so I have been focusing on getting the RS232 connectivity working. The problem is you cannot map a serial port though. So I have resulted in getting a TCP/RS232 device and using socat to map a serial port.

When it works it is great. However the serial drops after a day or so so I need to restart HA to get it working again. Need help with the socat command to make it more stable OR maybe the component needs a refresh or retry option?

In case people are intrested, here is my socat config
socat pty,link=/dev/ttyV0,waitslave tcp:192.168.160.149:10000,keepalive,keepidle=10,keepintvl=10 &

I looked at using IP2SER from iTach. Gave up. Then I used a USB-Serial adapter with a PI, worked just fine.

I now run HA on a HP Z220S with an I5 CPU, cheap and solid. And all the ports you need…, it uses about 15 Watts.

This sounds pretty awesome. Can you share how you accomplished this?

I setup a automation for each keyboard and each of the 6 options (that part can probably be reduced to less code), if the input is in the range of 3-6, the script starts Sonos with the appropriate playlist, then sets the Monoprice input back to 2, where the Sonos is connected.

If input 1 is selected, or turned on, it leaves it at that (Denon Zone 2), if the input is 2, then is starts Sonos (previously selected playlist).

I only have one Sonos, thus the last requested playlist plays. I only turns on the speaker(s) for the respective keyboard. This is from configuration.yaml:

  - platform: monoprice
    port: /dev/ttyS0
    zones:
      11:
        name: Kitchen Speakers
      12:
        name: Deck Speakers
      13:
        name: Bedroom Speakers
      14:
        name: Bathroom Speakers
      15:
        name: Library Speakers
      16:
        name: Spare Speakers
    sources:
      1:
        name: House Audio
      2:
        name: Sonos
      3:
        name: Sonos Piano
      4:
        name: Sonos Chill
      5:
        name: Sonos Lounge
      6:
        name: Sonos Energetic

This is one of the automations:

- id: '1553157703280'
  initial_state: true  
  alias: Monoprice play Kitchen Sonos Piano
  trigger:
    platform: template
    value_template: "{{ is_state_attr('media_player.kitchen_speakers', 'source', 'Sonos Piano') }}"
  action:
    - service: script.do_monoprice_play
      data_template:
        entity: media_player.kitchen_speakers
        source: 'Piano'

This is the script:

> do_monoprice_play: # entity and source variables
>   sequence:
>     - service: media_player.select_source   
>       data_template:
>         source: "{{ source }}"
>         entity_id: media_player.house_sonos
>     - service: media_player.select_source    
>       data_template:
>         source: 'Sonos'
>         entity_id: "{{ entity }}"
1 Like

Awesome work everyone. I definitely haven’t done anything with Automations or scripts yet as my programming knowledge is rather limited. I did get a lovelace card setup using Spotify which lets me choose the source input (in my case a echo dot plugged into the Monoprice Unit) Then using the miniplayer group card in order to display the Controller in each room. I can then choose to turn on or off each room and control the volume level all from the HA interface.

23%20AM

entities:
  - artwork: cover
    entity: media_player.spotify
    group: true
    hide:
      power: true
      volume: false
    shortcuts:
      columns: 4
      buttons:
        - name: Country Mix
          type: playlist
          id: 'spotify:user:spotify:playlist:37i9dQZF1DX1lVhptIYRda'
        - name: Classic Rock
          type: playlist
          id: 'spotify:user:spotify:playlist:37i9dQZF1DWXRqgorJj26U'
    info: short
    source: icon
    type: 'custom:mini-media-player'
  - entity: media_player.back_porch
    group: true
    hide:
      controls: true
    type: 'custom:mini-media-player'
  - entity: media_player.office
    group: true
    hide:
      controls: true
    type: 'custom:mini-media-player'
  - entity: media_player.garage
    group: true
    hide:
      controls: true
    type: 'custom:mini-media-player'
  - entity: media_player.kitchen_speaker
    group: true
    hide:
      controls: true
    type: 'custom:mini-media-player'
type: entities

Have been learning a lot from you all and would love to do more. keep em coming!!

I wish there was a better way to have spotify inside HA. The api seems a little unstable sometimes. Like if I hit play sometimes it will work and sometimes not. I also had to manually setup my playlist quick links as an example. Has anyone messed with iFraming the whole spotify web interface into a tab??

Anybody knows how to enable wall pads when I am connecting to rs232 port?
When I add integration with HA through RS232 port, wall pads have become inactive…they just showiung volume,treble, bass, but I cant control direct on wall pads anything.
How to enable control on my wall pads? thanks

You may want to check your wiring. RS232 does not touch the wall pads at all.

Thanks. Maybe I need to restart HA or Monoprice…

@DotNetDann why ma wall pads are disabled / wont turn on, if I dont play any music on input?
Weird…

Hi, just bought this last week. It’s awesome. I don’t see the PA service created yet though? Is that going to get added? What’s the best way to play a notification over the whole system (not chromecast)?

I was just switching from the iTach IP2SER adapter. Just received my PI and got home assistant installed so completely new to this. So from this thread there is supposed to be a native configuration. I have a UGREEN USB to serial adapter (prolific chipset and shows up as /dev/ttyUSB0), which is plugged in directly to the WHA. Is the only thing I need to then to add the mediaplayer lines to the configuration.yaml and I should be good to go? Or are there other steps I need before this will work. I don’t seem to see anything in home assistant after adding the config and restarting.

[ 2.889680] usb 1-1.1.2: pl2303 converter now attached to ttyUSB0
[ 5.379431] audit: type=1300 audit(1577816808.008:2): arch=c00000b7 syscall=64 success=yes exit=70868 a0=6 a1=7f95b91010 a2=114d4 a3=0 items=0 ppid=302 pid=304 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294

I have 3 monoprice controllers setup. 1 and 3 work great. But nothing seems to work with 2. The logs have the following, but not sure where to begin. Anyone have any advice?

monoprice: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 299, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 461, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/monoprice/media_player.py", line 146, in update
    state = self._monoprice.zone_status(self._zone_id)
  File "/usr/local/lib/python3.7/site-packages/pymonoprice/__init__.py", line 182, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/pymonoprice/__init__.py", line 226, in zone_status
    return ZoneStatus.from_string(self._process_request(_format_zone_status_request(zone), skip=6))
  File "/usr/local/lib/python3.7/site-packages/pymonoprice/__init__.py", line 215, in _process_request
    'Connection timed out! Last received bytes {}'.format([hex(a) for a in result]))
serial.serialutil.SerialTimeoutException: Connection timed out! Last received bytes ['0x3f', '0x32', '0x31', '0xd', '0xa', '0x23']

Hello,

Did the PA Input ever get figured out? I am really curious how that would work specifically if you wanted to use alexa or ai voice equivalent (in my case I have mycroft on a pi 3B+ with a mic 6 hat array currently but plan on adding more eventually) to announce TTS or just ask questions etc.

Thanks in advance!

Hey patmann03

Did you ever get the PA system working or were you able to get notifications playing throughout the whole system? I am curious on this, I have a pi with mycroft ai installed on it and would be very interested in using the PA system on the monoprice to speak notifications or to reply back to a question etc and then resume playback.

Thanks!

@salok08228
I did not get the PA functionality working, but through node-red I’m able to turn zones on and switch the source and do announcements easily.

I call the services for source selection and power through node red to HA, then play pre recorded MP3’s on my server (haven’t gotten around to getting a good TTS service on linux yet, most of them sound terrible).

Thanks for the feedback!

I ended up searching the Q&As on monoprice about the PA input and one user responded with some interesting feedback to get it working:

BEST ANSWER: Yes… sort of. If you input Alexa into Input One and send 12VDC signal to the 3.5mm mono PA jack all audio on Input One will be broadcast to all zones. To create the 12VDC trigger you will need a Sound Activated Relay like the RDL STACR2 Audio Controlled Relay. This will take a little creativity on your part but will work when you get all the levels set correctly. It’s not difficult but will require some patience on your part to make it work correctly. Hope this helps.

It appears you need that sound activated relay to get it to work with an alexa or voice assistant equivalent. I am going to pursue that at some point and I will post my results but it might be a while until I get all of the equipment and test it out.

@salok08228 thanks for the quick response, cool you got it working.

I have speakers outside that I’ve connected to the amplifier, and thus my node red implementation works better for me. I can turn the speakers on for the doorbell, but keep them off for other announcements. The RS232 implementation with HA and using automation with node red is just super awesome.