Giter Site home page Giter Site logo

pymonoprice's People

Contributors

etsinko avatar flacjacket avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pymonoprice's Issues

Use async keyword instead of asyncio.coroutine

Python 3.5 introduced the async and await syntax to work with async functions. The @asyncio.coroutine decorator has been deprecated as of Python 3.8 and prints a warning when it's used (example). It is going to be removed in Python 3.10.

Rewriting it is straight forward:

# before
@asyncio.coroutine
def my_func():
    yield from other_func()

# new
async def my_func():
    await other_func()

To be future proof for future Home Assistant versions, it would be good to migrate to async and await syntax.

Use with rfc2217... small change required

Hi thanks for the code. In my setup I have my home assistant box far from the amp. As a workaround I connect a rpi to the amp, and create an rfc2217 service to expose the serial port over tcp (there is a very simple server script in the pyserial docs that you can run as-is).
The monoprice home assistant component should be able to take a url as “rfc2217:\\ip:port”. The hangup is with pymonoprice, around line 190 in init where we define a write timeout. This does not exist for rfc2217 and it errors out. If I comment that line out, everything works fine and I can control my amp from home assistant (via the Pi over tcp!)
Any way to put a condition around that one line? Right now I stopped updating my ha container because it keeps requiring me to change the file again. Thanks!!

Could not update zone 12

Hello friend,

First of I want to thank you for your effort to write an integration for monoprice!
I'm using it a couple of months, and I just noticed two warnings:
Could not update zone 12
Updating monoprice media_player took longer than the scheduled update interval 0:00:10

Do you know why Im getting those messages? And from time to time, I'm getting my wallpads inactive. I can play music on the speakers, but they wont to turn on. Only if I power off and then power on monoprice, then it can be toggled.

Also, is there any plans for upgrading this integration in terms to control treble and bass?
I'm also .net developer, if you need some assistance, I will gladly help.

Take care,
Stefan

Support for Monoprice 4 Zone Amp?

Hi @etsinko, I sincerely apologize for misusing this repo for this question, but I didn't want pollute the home-assistant/core issues list, and I couldn't find another way to contact you or @OnFreund.

I was just wondering if your Monoprice integration for Home Assistant supports the 4 zone amplifier (44519) as well? Or is it just the 6 zone version?

The reason I ask is because I am looking at whole home audio solutions for my new house, and while the 6 zone amp is good bang for the buck, the 4 zone amp provides more power to each zone (60W vs 25W at 8 ohms).

I am confirming whether the speakers we're going to install can actually support/use the extra power, but if they can, then I would prefer the extra power that comes with the 4 zone amp. But I need to make sure that it'll still work with HA, lol.

Any light either of you can shed on the subject would be appreciated. :)

Thanks!

Hey etsinko - trying to contact you, I have a request to ask

This is not an issue, but I don't know of any other way to contact you. I have a request to make the home assistant monoprice 6 zone 6 source amp integration better. Right now it only works with a direct RS232 connection and you specify the port in the .yaml (port: /dev/ttyUSB0) i would like to propose also adding support for the itach by specifying the port as (port: iTach) and this would direct the requests to the itach ip address which would need to be another field added. I am the developer who wrote the android app for the monoprice 6 zone 6 source amps, and I also have a python integration which i wrote for people who didn't want to spend that much on the iTach device. https://github.com/121940kz/Monoprice-Whole-Home-Audio-Android-App-Raspberry-Pi-Server

Can you email me back and [email protected]

Can't initialize connection through HomeAssistant

Looks like underlying dependency modified the signature of the method that is used for async connection. Here's a stack trace:

Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/monoprice/config_flow.py", line 80, in async_step_user
    info = await validate_input(self.hass, user_input)
  File "/usr/src/homeassistant/homeassistant/components/monoprice/config_flow.py", line 59, in validate_input
    await get_async_monoprice(data[CONF_PORT], hass.loop)
  File "/usr/local/lib/python3.10/site-packages/pymonoprice/__init__.py", line 381, in get_async_monoprice
    _, protocol = yield from create_serial_connection(loop, functools.partial(MonopriceProtocol, loop),
  File "/usr/local/lib/python3.10/site-packages/serial_asyncio/__init__.py", line 449, in create_serial_connection
    transport, protocol = await connection_for_serial(loop, protocol_factory, serial_instance)
  File "/usr/local/lib/python3.10/site-packages/serial_asyncio/__init__.py", line 476, in connection_for_serial
    protocol = protocol_factory()
  File "/usr/local/lib/python3.10/site-packages/pymonoprice/__init__.py", line 350, in __init__
    self._connected = asyncio.Event(loop=loop)
  File "/usr/local/lib/python3.10/asyncio/locks.py", line 168, in __init__
    super().__init__(loop=loop)
  File "/usr/local/lib/python3.10/asyncio/mixins.py", line 17, in __init__
    raise TypeError(
TypeError: As of 3.10, the *loop* parameter was removed from Event() since it is no longer necessary

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.