That’s too funny. On the bright side, you got some good practice with input numbers, automations, and input selects.
Anyone else using the PA jack? For me, it might be the best part of the amp.
I use it for doing notifications throughout the house. For instance, I see the author of this component is muting all his channels when the doorbell rings. I’m taking it a step further by playing the doorbell ring throughout the house. I’m also using it for TTS. Things like “The washer is finished and ready to be emptied”.
Don’t you need a 12v trigger for the PA? What do you use for the trigger? What volume level does the PA use, and is it set or configurable?
I’ve just gone through the Monoprice RS232 commands again, and it looks like there is a PA control command. I haven’t tested it yet though.
You are correct you do need a 12v trigger. It uses the volume that the channels are set at.
The hardware I use is this:
https://www.itead.cc/sonoff-sv.html
With this firmware:
And this power supply:
http://a.co/7yKfQ3R
I just now looked at the RS232 commands. Totally looks like maybe you can trigger PA without the 12v trigger. That would be sweet!
Thanks. If a zone is off does the PA turn into on?
No, it doesn’t. I’ve written a script that turns the zones on, turns on my relay, sends amazon polly TTS to mopidy and then turns off my relay. I’d like to further extend the script to allow me to pass in the zones I want to send the TTS to. I hope this pull request gets merged so I can use that, too.
I’ve been waiting for that pull request to be merged. In the meantime, I’ve been using input numbers as a way to save and restore zone state and input:
This is off topic, but I am moving into my new house next week that has built-in whole home audio, with surround sound in the basement and main living room. I am very new to audio set-ups so excuse my ignorance, but I bought two Yamaha receivers for the 5.1 surround sound in the basement and living room, could I hook the 10761 up to the main living room receiver so that it would be able to control the other zones throughout the house? Also, ethernet isn’t running to the current keypads, so I wouldn’t be able to use the Monoprice keypads. Is that a deal breaker? Can I use the Monoprice without the keypads? Thanks for any input!
@adamderuwe you are welcome! I just noticed that you had already figured out how UI works. I like your idea with separate sliders for controlling the volume - it takes fewer clicks to change the volume.
This is what automation I came up with:
input_number:
loft_volume:
name: Loft Volume
initial: 0.5
min: 0
max: 1.0
step: 0.01
automation:
- alias: Loft Volume
hide_entity: True
trigger:
platform: state
entity_id: input_number.loft_volume
action:
- service: media_player.volume_set
data_template:
entity_id: media_player.loft
volume_level: '{{ trigger.to_state.state | float }}'
Yours probably looks similar to this.
Nice. That’s similar to mine. I was also setting the input_number if the volume was changed outside of input_number (i.e. the wall remotes)
@adamderuwe I also noticed that you use monoprice’s PA function. The pymonoprice
(https://github.com/etsinko/pymonoprice) library that is used by HA has functinality to enable/disable PA. I’ll take a look into adding it to HA once the current pull request is merged. I don’t want to spam the team with too many PRs.
I will probably implement it as a service call, similar to snapshot functionality.
That would be amazing! Would certainly simplify things for me. I appreciate your work on this component and python library.
I am trying to setup the monoprice audio controller and I’m getting a timeout error. I tracked down which port the device is plugged into and I believe I have it setup correctly. Could this be an issue with the RS 232 cable? I’m not really sure what to do here and any help would be greatly appreciated!
2017-12-25 15:10:46 ERROR (MainThread) [homeassistant.components.media_player] Error on device update!
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py”, line 217, in async_add_entity
yield from entity.async_device_update(warning=False)
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 306, in async_device_update
yield from self.hass.async_add_job(self.update)
File “/usr/lib/python3.6/asyncio/futures.py”, line 332, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.6/asyncio/tasks.py”, line 250, in _wakeup
future.result()
File “/usr/lib/python3.6/asyncio/futures.py”, line 245, in result
raise self._exception
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/lib/python3.6/site-packages/homeassistant/components/media_player/monoprice.py”, line 100, in update
state = self._monoprice.zone_status(self._zone_id)
File “/usr/lib/python3.6/site-packages/pymonoprice/init.py”, line 94, in zone_status
return ZoneStatus.from_string(self._process_request(’?{}\r’.format(zone), num_ignore=6))
File “/usr/lib/python3.6/site-packages/pymonoprice/init.py”, line 79, in _process_request
raise serial.SerialTimeoutException(‘Connection timed out! Last received bytes {}’.format([hex(a) for a in result]))
serial.serialutil.SerialTimeoutException: Connection timed out! Last received bytes [‘0x3f’, ‘0x31’, ‘0x31’, ‘0xd’, ‘0xa’, ‘0x23’]
Can you post the output of the command below? Make sure nothing is using the serial port when you run the command.
“cat /dev/ttyS0” (replace /dev/ttyS0 with your serial port)
Sorry it took me so long to respond, it says, “cat: can’t open ‘/dev/ttyUSB0’: No such file or directory” I don’t know if I’m typing the right command, I just copy and pasted “cat /dev/ttyUSB0” into the terminal and that’s what it gave me.
You need to figure out what port your usb/serial adapter is on.
What is the output of this?
dmesg | grep tty
1.159501] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
[ 5.051137] usb 1-1.4: pl2303 converter now attached to ttyUSB0
What about ‘sudo cat /dev/ttyUSB0’?
“cat: can’t open ‘/dev/ttyUSB0’: No such file or directory”`
I’m having the same issue installing the Monoprice 6 zone amp. I’m running ver62 Hassio. port: /dev/ttyUSB0
I’m also not 100% that I have port correct. If I choose another port I don’t get all the errors, so I’m assuming port: /dev/ttyUSB0 is correct. But…
Here’s one of the errors:
Wed Jan 31 2018 11:17:40 GMT-0500 (Eastern Standard Time)
monoprice: Error on device update!
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py”, line 397, in _async_add_entity
yield from entity.async_device_update(warning=False)
File “/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py”, line 308, in async_device_update
yield from self.hass.async_add_job(self.update)
File “/usr/lib/python3.6/asyncio/futures.py”, line 332, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.6/asyncio/tasks.py”, line 250, in _wakeup
future.result()
File “/usr/lib/python3.6/asyncio/futures.py”, line 245, in result
raise self._exception
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/lib/python3.6/site-packages/homeassistant/components/media_player/monoprice.py”, line 129, in update
state = self._monoprice.zone_status(self._zone_id)
File “/usr/lib/python3.6/site-packages/pymonoprice/init.py”, line 182, in wrapper
return func(*args, **kwargs)
File “/usr/lib/python3.6/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/lib/python3.6/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’, ‘0x21’, ‘0x24’, ‘0xc2’]