MonoPrice 6 zone Whole home amp Driver

DEPRECATED please use HE own driver you would need a Telnet To serial adapter or a Telnet to Serial scrip running on a machine like a Raspberry PI.
I will let all this post and the GitHub up for educational propose only

I'm wringing this diver to control the Monoprice 6 zone Amplifier is work in progress i will love some feedback if you have one off this devices it use a Raspberry pi and a USB to Serial adapter, and telnet communication to the hub

Update 02/05/19 parent/child approach is post it
Update 04/29/20 now using a serial to Ethernet adapter
Update 04/30/20 code clean up ability to change poll time
Update 06/18/20 more clean up dashboard friendly use music player tile
Update 08/11/20 new raspberry pi approach using ser2tcp.py by Pavel Revak
Update 08/12/20 compatibility with 2 and 3 amps connected as a chain don't own a second amp
Update 08/20/20 Parent save source name to be display on dashboard
Update 08/26/20 add mute override option

WARNING: volume change doesn't work if zone is muted
WARNING: some users have experience some issues with serial cables if can't communicate with the amp try another cable.

1 Like

This looks very interesting to me. I am currently moving over many devices to my new hub. I am wondering if this could work on a windows home server or a VortexBox (Fedora Linux).

1 Like

I don't think there's any problem running the script in windows or any Linux distribution, is written in python, if you can run python and install pyserial package I think that is the only package that does not come in the basic installation of python, you will have to change the serial port in the script to wherever port you will be connecting to the Amp. Give it a try and let me know if you need any help. now im trying writing a better driver for the hubitat hub im using parent/child approach still a lot to get this to were I want it.

Don't kill me for the dumb question, but can this code work on SmartThings? I have the Monoprice 10761 and I can't figure out any of the other ST solutions for integrating with this speaker system. I have an extra Raspberry Pi sitting around, so if this code works, this could be amazing!

I wrote a CLI program and a flask based REST API as well. It's probably not pretty, but it works.

Same as yours, it requires a Pi and a USB->serial converter. I use a Pi Zero W. I know it's kludgy to call the cli program from the REST API, but the API was an afterthought. Just wanted to toss that out there, it might be easier to integrate with my REST API for control.

I don't thing ST hub support telnet and that is the base of this driver, in some point on the past when I was still on ST I test @signal15 way and after some try and error work pretty good, but later I migrate to huibitat.

I'm migrating over from SmartThings and my Monoprice 6-Zone Amp (10761) is the last piece of my puzzle. I am able to use the original 1-zone Device (from @martinez.mp3) successfully with my Raspberry Pi setup, but the Parent/Child approach doesn't. It successfully creates the child zones, but each of them doesn't actually control anything.

I just ordered the TCP-IP-Serial device to try that approach (and free up one of my Pi's), I'll let you know if that works.

Either way, I do have 12 zones (2 amps chained together), is it possible to update this Device handler such that it can handle that many zones? Thanks in advance!

Secondarily, how is everyone actually displaying/using these zone devices on their dashboards??

I know work at least with one amp, that is what im using now, work better that the raspberry pi a lot more simple and the tcp/ip-serial device is not that expensive compare with the price of the apm, I have to put my hands on the code again to make it work for 2 or 3 amp setup I only own 1 but I could make an attempt to change the code and see if it work for you. about the dashboard I didn't figure out how to put everything on one tile but I with some help from @Cobra put volume control, mute, source change on a music player tile and next to it switch tile for on and off. I will take a look tomorrow on adding support for 2 and 3 amps,

1 Like

@martinez.mp3, I got the TCP-IP device today and installed the new drivers but it still isnt' working. Not getting any response back at all - nor are any of the commands seemingly doing anything. Link to the TCP-IP server seems active though.

Can you get in to the tcp/ip to serial adapter configuration page?
If you do can you try telnet to it from putty?
If you can try to write ?10, did you get a response?
Let me know how all this test go.

Yes, I can get to the serial adapter config page, see first pic. And yes, it seems I can Telnet into it from Putty (and the TCP status shows that connection). But when I try to query status, it seems to transmit, but nothing received back.Annotation 2020-08-07 141118 Annotation 2020-08-07 141522

I got the feeling that is the serial communication between the TCP/IP to serial and the amp, look like the hub already connect to it if your hub have ip 192.168.86.33.
this is screen capture of all my configuration look at the putty telnet configuration I have then try to send something again you should get:

Command Error.

then send ?10
you should get
6 set of very long numbers representing the status of your first amp and if you do:
?20
you should get another 6 long number representing the status of your second amp
try and let me know how it went.

Thanks for continuing to help, @martinez.mp3! My settings thankfully match yours, and although I do think I'm successfully telnet-ing into the TCP/IP, I agree it might be a problem with the actual serial connection. No matter which commands/requests I send, there is nothing received back. I am currently using a gender changer for the serial cable, but I just ordered a true male-to-male serial cable that I receive tomorrow. I'll let you know if that works.

get this sofware https://www.usriot.com/support/downloads/usr-tcp-test-testing-software.html I use it when I was troble shutting. initially I have problem sending en of the line character 'CR' that the amp is specting, with that is important that after you write ?10 hit enter and check that the flashing cursor is on the next line below then hit send another way to check is clicking on Send As Hex and check that the string is convert to hex it should show 3F 31 30 0D 0A I attach some pictures let me know how all this go.

So weird! I got the new serial cable and still nothing back from the Monoprice. I did a loopback test to ensure the USR-TCP232 and serial cable was working (they are), I even factory reset the TCP and triple-checked all settings to match yours (they do). And I tried a second serial cable just in case, still nothing. I tried testing via Putty Telnet and the USR software - exactly as you specify and NOTHING is coming back from the Monoprice. I put back my old Raspberry Pi connection (with USB-to-serial) and SmartThings is able to control it via that serial, so the Monoprice is still generally working with serial. Not sure what the issue might be with with this TCP setup.

Looks like I can generally connect via the RPi method, so if you are updating your code, I hope it'll work on that side. Thanks!!

wow, im trying to figure if the tcp ip-serial is sending the 'CR' that amp expect at the end of the line. I reset the tcp ip-serial and set it again to see if I could replicate your error,for a minute I got the same issue you have but it was because I have a typo on the baud rate, ones I set it on the 9600 the error when away, as a test reboot the amp and only have the USR-TCP232 app connected and try to send 3F 31 30 0D 0A selecting "Send as hex" Send Options see if you got any response and let me know, I'm going to look at the pi version and fix it im aiming for a universal drive the work on the pi or the tcp/ip - serial adapter lets see what get you away from the Smarttings hub I know how much I hate have one thing left to unplug that hub foreverrrrrrrrrrrrrrrrrrrrrrrr :face_vomiting:

Still cannot manually connect via the USR-TCP232 no matter what I do. I tripled checked everything, I tried the "send as hex" and nothing. I wonder if the TCP is broken...I have no other explanation. I'll return and try another.

HOWEVER, in the meantime, I was able to install "ser2net" on my Raspberry Pi and that I can successfully control the Monoprice. And I think that functions similarly to what the TCP does... So, hopefully once you have the drivers updated, I can test.

are you getting anything back from the scrip ser2net?. if you go top putty and connect to the pi running the ser2net and send ?10 did you get any response????

Yes, via RPi Ser2Net I can successfully control the Monoprice manually.